diff options
Diffstat (limited to 'net/mac802154')
-rw-r--r-- | net/mac802154/driver-ops.h | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/net/mac802154/driver-ops.h b/net/mac802154/driver-ops.h index dfd29ffb8fee..f21e864613d0 100644 --- a/net/mac802154/driver-ops.h +++ b/net/mac802154/driver-ops.h | |||
@@ -50,16 +50,15 @@ static inline void drv_stop(struct ieee802154_local *local) | |||
50 | local->started = false; | 50 | local->started = false; |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline int drv_set_channel(struct ieee802154_local *local, | 53 | static inline int |
54 | const u8 page, const u8 channel) | 54 | drv_set_channel(struct ieee802154_local *local, u8 page, u8 channel) |
55 | { | 55 | { |
56 | might_sleep(); | 56 | might_sleep(); |
57 | 57 | ||
58 | return local->ops->set_channel(&local->hw, page, channel); | 58 | return local->ops->set_channel(&local->hw, page, channel); |
59 | } | 59 | } |
60 | 60 | ||
61 | static inline int drv_set_tx_power(struct ieee802154_local *local, | 61 | static inline int drv_set_tx_power(struct ieee802154_local *local, s8 dbm) |
62 | const s8 dbm) | ||
63 | { | 62 | { |
64 | might_sleep(); | 63 | might_sleep(); |
65 | 64 | ||
@@ -71,8 +70,7 @@ static inline int drv_set_tx_power(struct ieee802154_local *local, | |||
71 | return local->ops->set_txpower(&local->hw, dbm); | 70 | return local->ops->set_txpower(&local->hw, dbm); |
72 | } | 71 | } |
73 | 72 | ||
74 | static inline int drv_set_cca_mode(struct ieee802154_local *local, | 73 | static inline int drv_set_cca_mode(struct ieee802154_local *local, u8 cca_mode) |
75 | const u8 cca_mode) | ||
76 | { | 74 | { |
77 | might_sleep(); | 75 | might_sleep(); |
78 | 76 | ||
@@ -84,8 +82,7 @@ static inline int drv_set_cca_mode(struct ieee802154_local *local, | |||
84 | return local->ops->set_cca_mode(&local->hw, cca_mode); | 82 | return local->ops->set_cca_mode(&local->hw, cca_mode); |
85 | } | 83 | } |
86 | 84 | ||
87 | static inline int drv_set_lbt_mode(struct ieee802154_local *local, | 85 | static inline int drv_set_lbt_mode(struct ieee802154_local *local, bool mode) |
88 | const bool mode) | ||
89 | { | 86 | { |
90 | might_sleep(); | 87 | might_sleep(); |
91 | 88 | ||
@@ -97,8 +94,8 @@ static inline int drv_set_lbt_mode(struct ieee802154_local *local, | |||
97 | return local->ops->set_lbt(&local->hw, mode); | 94 | return local->ops->set_lbt(&local->hw, mode); |
98 | } | 95 | } |
99 | 96 | ||
100 | static inline int drv_set_cca_ed_level(struct ieee802154_local *local, | 97 | static inline int |
101 | const s32 ed_level) | 98 | drv_set_cca_ed_level(struct ieee802154_local *local, s32 ed_level) |
102 | { | 99 | { |
103 | might_sleep(); | 100 | might_sleep(); |
104 | 101 | ||
@@ -110,8 +107,7 @@ static inline int drv_set_cca_ed_level(struct ieee802154_local *local, | |||
110 | return local->ops->set_cca_ed_level(&local->hw, ed_level); | 107 | return local->ops->set_cca_ed_level(&local->hw, ed_level); |
111 | } | 108 | } |
112 | 109 | ||
113 | static inline int drv_set_pan_id(struct ieee802154_local *local, | 110 | static inline int drv_set_pan_id(struct ieee802154_local *local, __le16 pan_id) |
114 | const __le16 pan_id) | ||
115 | { | 111 | { |
116 | struct ieee802154_hw_addr_filt filt; | 112 | struct ieee802154_hw_addr_filt filt; |
117 | 113 | ||
@@ -128,8 +124,8 @@ static inline int drv_set_pan_id(struct ieee802154_local *local, | |||
128 | IEEE802154_AFILT_PANID_CHANGED); | 124 | IEEE802154_AFILT_PANID_CHANGED); |
129 | } | 125 | } |
130 | 126 | ||
131 | static inline int drv_set_extended_addr(struct ieee802154_local *local, | 127 | static inline int |
132 | const __le64 extended_addr) | 128 | drv_set_extended_addr(struct ieee802154_local *local, __le64 extended_addr) |
133 | { | 129 | { |
134 | struct ieee802154_hw_addr_filt filt; | 130 | struct ieee802154_hw_addr_filt filt; |
135 | 131 | ||
@@ -146,8 +142,8 @@ static inline int drv_set_extended_addr(struct ieee802154_local *local, | |||
146 | IEEE802154_AFILT_IEEEADDR_CHANGED); | 142 | IEEE802154_AFILT_IEEEADDR_CHANGED); |
147 | } | 143 | } |
148 | 144 | ||
149 | static inline int drv_set_short_addr(struct ieee802154_local *local, | 145 | static inline int |
150 | const __le16 short_addr) | 146 | drv_set_short_addr(struct ieee802154_local *local, __le16 short_addr) |
151 | { | 147 | { |
152 | struct ieee802154_hw_addr_filt filt; | 148 | struct ieee802154_hw_addr_filt filt; |
153 | 149 | ||
@@ -164,8 +160,8 @@ static inline int drv_set_short_addr(struct ieee802154_local *local, | |||
164 | IEEE802154_AFILT_SADDR_CHANGED); | 160 | IEEE802154_AFILT_SADDR_CHANGED); |
165 | } | 161 | } |
166 | 162 | ||
167 | static inline int drv_set_pan_coord(struct ieee802154_local *local, | 163 | static inline int |
168 | const bool is_coord) | 164 | drv_set_pan_coord(struct ieee802154_local *local, bool is_coord) |
169 | { | 165 | { |
170 | struct ieee802154_hw_addr_filt filt; | 166 | struct ieee802154_hw_addr_filt filt; |
171 | 167 | ||
@@ -182,9 +178,9 @@ static inline int drv_set_pan_coord(struct ieee802154_local *local, | |||
182 | IEEE802154_AFILT_PANC_CHANGED); | 178 | IEEE802154_AFILT_PANC_CHANGED); |
183 | } | 179 | } |
184 | 180 | ||
185 | static inline int drv_set_csma_params(struct ieee802154_local *local, | 181 | static inline int |
186 | u8 min_be, u8 max_be, | 182 | drv_set_csma_params(struct ieee802154_local *local, u8 min_be, u8 max_be, |
187 | u8 max_csma_backoffs) | 183 | u8 max_csma_backoffs) |
188 | { | 184 | { |
189 | might_sleep(); | 185 | might_sleep(); |
190 | 186 | ||
@@ -197,8 +193,8 @@ static inline int drv_set_csma_params(struct ieee802154_local *local, | |||
197 | max_csma_backoffs); | 193 | max_csma_backoffs); |
198 | } | 194 | } |
199 | 195 | ||
200 | static inline int drv_set_max_frame_retries(struct ieee802154_local *local, | 196 | static inline int |
201 | s8 max_frame_retries) | 197 | drv_set_max_frame_retries(struct ieee802154_local *local, s8 max_frame_retries) |
202 | { | 198 | { |
203 | might_sleep(); | 199 | might_sleep(); |
204 | 200 | ||
@@ -210,8 +206,8 @@ static inline int drv_set_max_frame_retries(struct ieee802154_local *local, | |||
210 | return local->ops->set_frame_retries(&local->hw, max_frame_retries); | 206 | return local->ops->set_frame_retries(&local->hw, max_frame_retries); |
211 | } | 207 | } |
212 | 208 | ||
213 | static inline int drv_set_promiscuous_mode(struct ieee802154_local *local, | 209 | static inline int |
214 | const bool on) | 210 | drv_set_promiscuous_mode(struct ieee802154_local *local, bool on) |
215 | { | 211 | { |
216 | might_sleep(); | 212 | might_sleep(); |
217 | 213 | ||