]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
mac802154: ops: declare channel and page as u8
authorAlexander Aring <alex.aring@gmail.com>
Tue, 28 Oct 2014 17:21:19 +0000 (18:21 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 28 Oct 2014 22:19:07 +0000 (23:19 +0100)
The range of channel and page fits into an unsigned byte range. This
patch changes the set_channel parameter definitions for channel and
page to u8.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Cc: Alan Ott <alan@signal11.us>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/net/ieee802154/at86rf230.c
drivers/net/ieee802154/cc2520.c
drivers/net/ieee802154/fakelb.c
drivers/net/ieee802154/mrf24j40.c
include/net/mac802154.h

index 662efd3e07b9680a552ed621b08a04a1e1318b88..5068c1bd004669f83c97e702ef5fb3744970a48d 100644 (file)
@@ -54,7 +54,7 @@ struct at86rf2xx_chip_data {
        u16 t_tx_timeout;
        int rssi_base_val;
 
-       int (*set_channel)(struct at86rf230_local *, int, int);
+       int (*set_channel)(struct at86rf230_local *, u8, u8);
        int (*get_desense_steps)(struct at86rf230_local *, s32);
 };
 
@@ -1012,13 +1012,13 @@ at86rf230_stop(struct ieee802154_hw *hw)
 }
 
 static int
-at86rf23x_set_channel(struct at86rf230_local *lp, int page, int channel)
+at86rf23x_set_channel(struct at86rf230_local *lp, u8 page, u8 channel)
 {
        return at86rf230_write_subreg(lp, SR_CHANNEL, channel);
 }
 
 static int
-at86rf212_set_channel(struct at86rf230_local *lp, int page, int channel)
+at86rf212_set_channel(struct at86rf230_local *lp, u8 page, u8 channel)
 {
        int rc;
 
@@ -1043,7 +1043,7 @@ at86rf212_set_channel(struct at86rf230_local *lp, int page, int channel)
 }
 
 static int
-at86rf230_channel(struct ieee802154_hw *hw, int page, int channel)
+at86rf230_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
 {
        struct at86rf230_local *lp = hw->priv;
        int rc;
index b479c9d560f827a28756cbc05c426c9ef33ba3d3..78ea2cadeb78308e02da74f0b9769488791a3462 100644 (file)
@@ -569,7 +569,7 @@ cc2520_ed(struct ieee802154_hw *hw, u8 *level)
 }
 
 static int
-cc2520_set_channel(struct ieee802154_hw *hw, int page, int channel)
+cc2520_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
 {
        struct cc2520_private *priv = hw->priv;
        int ret;
index 2a97cbb3aa01c1877a0e2a02081c9a1a68984ff6..4092e704c4aab4a105bb5e38d56cad2f7f91ffa7 100644 (file)
@@ -55,7 +55,7 @@ fakelb_hw_ed(struct ieee802154_hw *hw, u8 *level)
 }
 
 static int
-fakelb_hw_channel(struct ieee802154_hw *hw, int page, int channel)
+fakelb_hw_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
 {
        pr_debug("set channel to %d\n", channel);
 
index f19cf588de2e94d62902077f1972d3513b3fe271..52b3d3116755ee89ac6b0efa8c7d645f4351e89c 100644 (file)
@@ -423,8 +423,7 @@ static void mrf24j40_stop(struct ieee802154_hw *hw)
        write_short_reg(devrec, REG_INTCON, val);
 }
 
-static int mrf24j40_set_channel(struct ieee802154_hw *hw,
-                               int page, int channel)
+static int mrf24j40_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
 {
        struct mrf24j40 *devrec = hw->priv;
        u8 val;
index 0ea44cda2920248eed91d32878ce752b0d0c6cbd..85a4efca418bd7c5af1cdcefca8ce0c7661f49f3 100644 (file)
@@ -178,9 +178,8 @@ struct ieee802154_ops {
        int             (*xmit_async)(struct ieee802154_hw *hw,
                                      struct sk_buff *skb);
        int             (*ed)(struct ieee802154_hw *hw, u8 *level);
-       int             (*set_channel)(struct ieee802154_hw *hw,
-                                      int page,
-                                      int channel);
+       int             (*set_channel)(struct ieee802154_hw *hw, u8 page,
+                                      u8 channel);
        int             (*set_hw_addr_filt)(struct ieee802154_hw *hw,
                                            struct ieee802154_hw_addr_filt *filt,
                                            unsigned long changed);