diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-10-28 13:21:19 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-10-28 18:19:07 -0400 |
commit | e37d2ec82a222f1819e7793a27bc052999a379fb (patch) | |
tree | 363144f3952095eb48fed347fe3b4f2c9919fa9f | |
parent | 16301861004e50be9c47113cceca62f56516a9a2 (diff) |
mac802154: ops: declare channel and page as u8
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>
-rw-r--r-- | drivers/net/ieee802154/at86rf230.c | 8 | ||||
-rw-r--r-- | drivers/net/ieee802154/cc2520.c | 2 | ||||
-rw-r--r-- | drivers/net/ieee802154/fakelb.c | 2 | ||||
-rw-r--r-- | drivers/net/ieee802154/mrf24j40.c | 3 | ||||
-rw-r--r-- | include/net/mac802154.h | 5 |
5 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 662efd3e07b9..5068c1bd0046 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c | |||
@@ -54,7 +54,7 @@ struct at86rf2xx_chip_data { | |||
54 | u16 t_tx_timeout; | 54 | u16 t_tx_timeout; |
55 | int rssi_base_val; | 55 | int rssi_base_val; |
56 | 56 | ||
57 | int (*set_channel)(struct at86rf230_local *, int, int); | 57 | int (*set_channel)(struct at86rf230_local *, u8, u8); |
58 | int (*get_desense_steps)(struct at86rf230_local *, s32); | 58 | int (*get_desense_steps)(struct at86rf230_local *, s32); |
59 | }; | 59 | }; |
60 | 60 | ||
@@ -1012,13 +1012,13 @@ at86rf230_stop(struct ieee802154_hw *hw) | |||
1012 | } | 1012 | } |
1013 | 1013 | ||
1014 | static int | 1014 | static int |
1015 | at86rf23x_set_channel(struct at86rf230_local *lp, int page, int channel) | 1015 | at86rf23x_set_channel(struct at86rf230_local *lp, u8 page, u8 channel) |
1016 | { | 1016 | { |
1017 | return at86rf230_write_subreg(lp, SR_CHANNEL, channel); | 1017 | return at86rf230_write_subreg(lp, SR_CHANNEL, channel); |
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | static int | 1020 | static int |
1021 | at86rf212_set_channel(struct at86rf230_local *lp, int page, int channel) | 1021 | at86rf212_set_channel(struct at86rf230_local *lp, u8 page, u8 channel) |
1022 | { | 1022 | { |
1023 | int rc; | 1023 | int rc; |
1024 | 1024 | ||
@@ -1043,7 +1043,7 @@ at86rf212_set_channel(struct at86rf230_local *lp, int page, int channel) | |||
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | static int | 1045 | static int |
1046 | at86rf230_channel(struct ieee802154_hw *hw, int page, int channel) | 1046 | at86rf230_channel(struct ieee802154_hw *hw, u8 page, u8 channel) |
1047 | { | 1047 | { |
1048 | struct at86rf230_local *lp = hw->priv; | 1048 | struct at86rf230_local *lp = hw->priv; |
1049 | int rc; | 1049 | int rc; |
diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c index b479c9d560f8..78ea2cadeb78 100644 --- a/drivers/net/ieee802154/cc2520.c +++ b/drivers/net/ieee802154/cc2520.c | |||
@@ -569,7 +569,7 @@ cc2520_ed(struct ieee802154_hw *hw, u8 *level) | |||
569 | } | 569 | } |
570 | 570 | ||
571 | static int | 571 | static int |
572 | cc2520_set_channel(struct ieee802154_hw *hw, int page, int channel) | 572 | cc2520_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel) |
573 | { | 573 | { |
574 | struct cc2520_private *priv = hw->priv; | 574 | struct cc2520_private *priv = hw->priv; |
575 | int ret; | 575 | int ret; |
diff --git a/drivers/net/ieee802154/fakelb.c b/drivers/net/ieee802154/fakelb.c index 2a97cbb3aa01..4092e704c4aa 100644 --- a/drivers/net/ieee802154/fakelb.c +++ b/drivers/net/ieee802154/fakelb.c | |||
@@ -55,7 +55,7 @@ fakelb_hw_ed(struct ieee802154_hw *hw, u8 *level) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | static int | 57 | static int |
58 | fakelb_hw_channel(struct ieee802154_hw *hw, int page, int channel) | 58 | fakelb_hw_channel(struct ieee802154_hw *hw, u8 page, u8 channel) |
59 | { | 59 | { |
60 | pr_debug("set channel to %d\n", channel); | 60 | pr_debug("set channel to %d\n", channel); |
61 | 61 | ||
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c index f19cf588de2e..52b3d3116755 100644 --- a/drivers/net/ieee802154/mrf24j40.c +++ b/drivers/net/ieee802154/mrf24j40.c | |||
@@ -423,8 +423,7 @@ static void mrf24j40_stop(struct ieee802154_hw *hw) | |||
423 | write_short_reg(devrec, REG_INTCON, val); | 423 | write_short_reg(devrec, REG_INTCON, val); |
424 | } | 424 | } |
425 | 425 | ||
426 | static int mrf24j40_set_channel(struct ieee802154_hw *hw, | 426 | static int mrf24j40_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel) |
427 | int page, int channel) | ||
428 | { | 427 | { |
429 | struct mrf24j40 *devrec = hw->priv; | 428 | struct mrf24j40 *devrec = hw->priv; |
430 | u8 val; | 429 | u8 val; |
diff --git a/include/net/mac802154.h b/include/net/mac802154.h index 0ea44cda2920..85a4efca418b 100644 --- a/include/net/mac802154.h +++ b/include/net/mac802154.h | |||
@@ -178,9 +178,8 @@ struct ieee802154_ops { | |||
178 | int (*xmit_async)(struct ieee802154_hw *hw, | 178 | int (*xmit_async)(struct ieee802154_hw *hw, |
179 | struct sk_buff *skb); | 179 | struct sk_buff *skb); |
180 | int (*ed)(struct ieee802154_hw *hw, u8 *level); | 180 | int (*ed)(struct ieee802154_hw *hw, u8 *level); |
181 | int (*set_channel)(struct ieee802154_hw *hw, | 181 | int (*set_channel)(struct ieee802154_hw *hw, u8 page, |
182 | int page, | 182 | u8 channel); |
183 | int channel); | ||
184 | int (*set_hw_addr_filt)(struct ieee802154_hw *hw, | 183 | int (*set_hw_addr_filt)(struct ieee802154_hw *hw, |
185 | struct ieee802154_hw_addr_filt *filt, | 184 | struct ieee802154_hw_addr_filt *filt, |
186 | unsigned long changed); | 185 | unsigned long changed); |