diff options
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 102 |
1 files changed, 67 insertions, 35 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 9c1da0809160..14123dce544b 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -16,10 +16,11 @@ static inline int drv_start(struct ieee80211_local *local) | |||
16 | 16 | ||
17 | might_sleep(); | 17 | might_sleep(); |
18 | 18 | ||
19 | trace_drv_start(local); | ||
19 | local->started = true; | 20 | local->started = true; |
20 | smp_mb(); | 21 | smp_mb(); |
21 | ret = local->ops->start(&local->hw); | 22 | ret = local->ops->start(&local->hw); |
22 | trace_drv_start(local, ret); | 23 | trace_drv_return_int(local, ret); |
23 | return ret; | 24 | return ret; |
24 | } | 25 | } |
25 | 26 | ||
@@ -27,8 +28,9 @@ static inline void drv_stop(struct ieee80211_local *local) | |||
27 | { | 28 | { |
28 | might_sleep(); | 29 | might_sleep(); |
29 | 30 | ||
30 | local->ops->stop(&local->hw); | ||
31 | trace_drv_stop(local); | 31 | trace_drv_stop(local); |
32 | local->ops->stop(&local->hw); | ||
33 | trace_drv_return_void(local); | ||
32 | 34 | ||
33 | /* sync away all work on the tasklet before clearing started */ | 35 | /* sync away all work on the tasklet before clearing started */ |
34 | tasklet_disable(&local->tasklet); | 36 | tasklet_disable(&local->tasklet); |
@@ -46,8 +48,9 @@ static inline int drv_add_interface(struct ieee80211_local *local, | |||
46 | 48 | ||
47 | might_sleep(); | 49 | might_sleep(); |
48 | 50 | ||
51 | trace_drv_add_interface(local, vif_to_sdata(vif)); | ||
49 | ret = local->ops->add_interface(&local->hw, vif); | 52 | ret = local->ops->add_interface(&local->hw, vif); |
50 | trace_drv_add_interface(local, vif_to_sdata(vif), ret); | 53 | trace_drv_return_int(local, ret); |
51 | return ret; | 54 | return ret; |
52 | } | 55 | } |
53 | 56 | ||
@@ -56,8 +59,9 @@ static inline void drv_remove_interface(struct ieee80211_local *local, | |||
56 | { | 59 | { |
57 | might_sleep(); | 60 | might_sleep(); |
58 | 61 | ||
59 | local->ops->remove_interface(&local->hw, vif); | ||
60 | trace_drv_remove_interface(local, vif_to_sdata(vif)); | 62 | trace_drv_remove_interface(local, vif_to_sdata(vif)); |
63 | local->ops->remove_interface(&local->hw, vif); | ||
64 | trace_drv_return_void(local); | ||
61 | } | 65 | } |
62 | 66 | ||
63 | static inline int drv_config(struct ieee80211_local *local, u32 changed) | 67 | static inline int drv_config(struct ieee80211_local *local, u32 changed) |
@@ -66,8 +70,9 @@ static inline int drv_config(struct ieee80211_local *local, u32 changed) | |||
66 | 70 | ||
67 | might_sleep(); | 71 | might_sleep(); |
68 | 72 | ||
73 | trace_drv_config(local, changed); | ||
69 | ret = local->ops->config(&local->hw, changed); | 74 | ret = local->ops->config(&local->hw, changed); |
70 | trace_drv_config(local, changed, ret); | 75 | trace_drv_return_int(local, ret); |
71 | return ret; | 76 | return ret; |
72 | } | 77 | } |
73 | 78 | ||
@@ -78,9 +83,10 @@ static inline void drv_bss_info_changed(struct ieee80211_local *local, | |||
78 | { | 83 | { |
79 | might_sleep(); | 84 | might_sleep(); |
80 | 85 | ||
86 | trace_drv_bss_info_changed(local, sdata, info, changed); | ||
81 | if (local->ops->bss_info_changed) | 87 | if (local->ops->bss_info_changed) |
82 | local->ops->bss_info_changed(&local->hw, &sdata->vif, info, changed); | 88 | local->ops->bss_info_changed(&local->hw, &sdata->vif, info, changed); |
83 | trace_drv_bss_info_changed(local, sdata, info, changed); | 89 | trace_drv_return_void(local); |
84 | } | 90 | } |
85 | 91 | ||
86 | static inline u64 drv_prepare_multicast(struct ieee80211_local *local, | 92 | static inline u64 drv_prepare_multicast(struct ieee80211_local *local, |
@@ -88,10 +94,12 @@ static inline u64 drv_prepare_multicast(struct ieee80211_local *local, | |||
88 | { | 94 | { |
89 | u64 ret = 0; | 95 | u64 ret = 0; |
90 | 96 | ||
97 | trace_drv_prepare_multicast(local, mc_list->count); | ||
98 | |||
91 | if (local->ops->prepare_multicast) | 99 | if (local->ops->prepare_multicast) |
92 | ret = local->ops->prepare_multicast(&local->hw, mc_list); | 100 | ret = local->ops->prepare_multicast(&local->hw, mc_list); |
93 | 101 | ||
94 | trace_drv_prepare_multicast(local, mc_list->count, ret); | 102 | trace_drv_return_u64(local, ret); |
95 | 103 | ||
96 | return ret; | 104 | return ret; |
97 | } | 105 | } |
@@ -103,19 +111,21 @@ static inline void drv_configure_filter(struct ieee80211_local *local, | |||
103 | { | 111 | { |
104 | might_sleep(); | 112 | might_sleep(); |
105 | 113 | ||
106 | local->ops->configure_filter(&local->hw, changed_flags, total_flags, | ||
107 | multicast); | ||
108 | trace_drv_configure_filter(local, changed_flags, total_flags, | 114 | trace_drv_configure_filter(local, changed_flags, total_flags, |
109 | multicast); | 115 | multicast); |
116 | local->ops->configure_filter(&local->hw, changed_flags, total_flags, | ||
117 | multicast); | ||
118 | trace_drv_return_void(local); | ||
110 | } | 119 | } |
111 | 120 | ||
112 | static inline int drv_set_tim(struct ieee80211_local *local, | 121 | static inline int drv_set_tim(struct ieee80211_local *local, |
113 | struct ieee80211_sta *sta, bool set) | 122 | struct ieee80211_sta *sta, bool set) |
114 | { | 123 | { |
115 | int ret = 0; | 124 | int ret = 0; |
125 | trace_drv_set_tim(local, sta, set); | ||
116 | if (local->ops->set_tim) | 126 | if (local->ops->set_tim) |
117 | ret = local->ops->set_tim(&local->hw, sta, set); | 127 | ret = local->ops->set_tim(&local->hw, sta, set); |
118 | trace_drv_set_tim(local, sta, set, ret); | 128 | trace_drv_return_int(local, ret); |
119 | return ret; | 129 | return ret; |
120 | } | 130 | } |
121 | 131 | ||
@@ -129,8 +139,9 @@ static inline int drv_set_key(struct ieee80211_local *local, | |||
129 | 139 | ||
130 | might_sleep(); | 140 | might_sleep(); |
131 | 141 | ||
142 | trace_drv_set_key(local, cmd, sdata, sta, key); | ||
132 | ret = local->ops->set_key(&local->hw, cmd, &sdata->vif, sta, key); | 143 | ret = local->ops->set_key(&local->hw, cmd, &sdata->vif, sta, key); |
133 | trace_drv_set_key(local, cmd, sdata, sta, key, ret); | 144 | trace_drv_return_int(local, ret); |
134 | return ret; | 145 | return ret; |
135 | } | 146 | } |
136 | 147 | ||
@@ -145,10 +156,11 @@ static inline void drv_update_tkip_key(struct ieee80211_local *local, | |||
145 | if (sta) | 156 | if (sta) |
146 | ista = &sta->sta; | 157 | ista = &sta->sta; |
147 | 158 | ||
159 | trace_drv_update_tkip_key(local, sdata, conf, ista, iv32); | ||
148 | if (local->ops->update_tkip_key) | 160 | if (local->ops->update_tkip_key) |
149 | local->ops->update_tkip_key(&local->hw, &sdata->vif, conf, | 161 | local->ops->update_tkip_key(&local->hw, &sdata->vif, conf, |
150 | ista, iv32, phase1key); | 162 | ista, iv32, phase1key); |
151 | trace_drv_update_tkip_key(local, sdata, conf, ista, iv32); | 163 | trace_drv_return_void(local); |
152 | } | 164 | } |
153 | 165 | ||
154 | static inline int drv_hw_scan(struct ieee80211_local *local, | 166 | static inline int drv_hw_scan(struct ieee80211_local *local, |
@@ -159,8 +171,9 @@ static inline int drv_hw_scan(struct ieee80211_local *local, | |||
159 | 171 | ||
160 | might_sleep(); | 172 | might_sleep(); |
161 | 173 | ||
174 | trace_drv_hw_scan(local, sdata, req); | ||
162 | ret = local->ops->hw_scan(&local->hw, &sdata->vif, req); | 175 | ret = local->ops->hw_scan(&local->hw, &sdata->vif, req); |
163 | trace_drv_hw_scan(local, sdata, req, ret); | 176 | trace_drv_return_int(local, ret); |
164 | return ret; | 177 | return ret; |
165 | } | 178 | } |
166 | 179 | ||
@@ -168,18 +181,20 @@ static inline void drv_sw_scan_start(struct ieee80211_local *local) | |||
168 | { | 181 | { |
169 | might_sleep(); | 182 | might_sleep(); |
170 | 183 | ||
184 | trace_drv_sw_scan_start(local); | ||
171 | if (local->ops->sw_scan_start) | 185 | if (local->ops->sw_scan_start) |
172 | local->ops->sw_scan_start(&local->hw); | 186 | local->ops->sw_scan_start(&local->hw); |
173 | trace_drv_sw_scan_start(local); | 187 | trace_drv_return_void(local); |
174 | } | 188 | } |
175 | 189 | ||
176 | static inline void drv_sw_scan_complete(struct ieee80211_local *local) | 190 | static inline void drv_sw_scan_complete(struct ieee80211_local *local) |
177 | { | 191 | { |
178 | might_sleep(); | 192 | might_sleep(); |
179 | 193 | ||
194 | trace_drv_sw_scan_complete(local); | ||
180 | if (local->ops->sw_scan_complete) | 195 | if (local->ops->sw_scan_complete) |
181 | local->ops->sw_scan_complete(&local->hw); | 196 | local->ops->sw_scan_complete(&local->hw); |
182 | trace_drv_sw_scan_complete(local); | 197 | trace_drv_return_void(local); |
183 | } | 198 | } |
184 | 199 | ||
185 | static inline int drv_get_stats(struct ieee80211_local *local, | 200 | static inline int drv_get_stats(struct ieee80211_local *local, |
@@ -211,9 +226,10 @@ static inline int drv_set_rts_threshold(struct ieee80211_local *local, | |||
211 | 226 | ||
212 | might_sleep(); | 227 | might_sleep(); |
213 | 228 | ||
229 | trace_drv_set_rts_threshold(local, value); | ||
214 | if (local->ops->set_rts_threshold) | 230 | if (local->ops->set_rts_threshold) |
215 | ret = local->ops->set_rts_threshold(&local->hw, value); | 231 | ret = local->ops->set_rts_threshold(&local->hw, value); |
216 | trace_drv_set_rts_threshold(local, value, ret); | 232 | trace_drv_return_int(local, ret); |
217 | return ret; | 233 | return ret; |
218 | } | 234 | } |
219 | 235 | ||
@@ -223,12 +239,13 @@ static inline int drv_set_coverage_class(struct ieee80211_local *local, | |||
223 | int ret = 0; | 239 | int ret = 0; |
224 | might_sleep(); | 240 | might_sleep(); |
225 | 241 | ||
242 | trace_drv_set_coverage_class(local, value); | ||
226 | if (local->ops->set_coverage_class) | 243 | if (local->ops->set_coverage_class) |
227 | local->ops->set_coverage_class(&local->hw, value); | 244 | local->ops->set_coverage_class(&local->hw, value); |
228 | else | 245 | else |
229 | ret = -EOPNOTSUPP; | 246 | ret = -EOPNOTSUPP; |
230 | 247 | ||
231 | trace_drv_set_coverage_class(local, value, ret); | 248 | trace_drv_return_int(local, ret); |
232 | return ret; | 249 | return ret; |
233 | } | 250 | } |
234 | 251 | ||
@@ -237,9 +254,10 @@ static inline void drv_sta_notify(struct ieee80211_local *local, | |||
237 | enum sta_notify_cmd cmd, | 254 | enum sta_notify_cmd cmd, |
238 | struct ieee80211_sta *sta) | 255 | struct ieee80211_sta *sta) |
239 | { | 256 | { |
257 | trace_drv_sta_notify(local, sdata, cmd, sta); | ||
240 | if (local->ops->sta_notify) | 258 | if (local->ops->sta_notify) |
241 | local->ops->sta_notify(&local->hw, &sdata->vif, cmd, sta); | 259 | local->ops->sta_notify(&local->hw, &sdata->vif, cmd, sta); |
242 | trace_drv_sta_notify(local, sdata, cmd, sta); | 260 | trace_drv_return_void(local); |
243 | } | 261 | } |
244 | 262 | ||
245 | static inline int drv_sta_add(struct ieee80211_local *local, | 263 | static inline int drv_sta_add(struct ieee80211_local *local, |
@@ -250,13 +268,11 @@ static inline int drv_sta_add(struct ieee80211_local *local, | |||
250 | 268 | ||
251 | might_sleep(); | 269 | might_sleep(); |
252 | 270 | ||
271 | trace_drv_sta_add(local, sdata, sta); | ||
253 | if (local->ops->sta_add) | 272 | if (local->ops->sta_add) |
254 | ret = local->ops->sta_add(&local->hw, &sdata->vif, sta); | 273 | ret = local->ops->sta_add(&local->hw, &sdata->vif, sta); |
255 | else if (local->ops->sta_notify) | ||
256 | local->ops->sta_notify(&local->hw, &sdata->vif, | ||
257 | STA_NOTIFY_ADD, sta); | ||
258 | 274 | ||
259 | trace_drv_sta_add(local, sdata, sta, ret); | 275 | trace_drv_return_int(local, ret); |
260 | 276 | ||
261 | return ret; | 277 | return ret; |
262 | } | 278 | } |
@@ -267,13 +283,11 @@ static inline void drv_sta_remove(struct ieee80211_local *local, | |||
267 | { | 283 | { |
268 | might_sleep(); | 284 | might_sleep(); |
269 | 285 | ||
286 | trace_drv_sta_remove(local, sdata, sta); | ||
270 | if (local->ops->sta_remove) | 287 | if (local->ops->sta_remove) |
271 | local->ops->sta_remove(&local->hw, &sdata->vif, sta); | 288 | local->ops->sta_remove(&local->hw, &sdata->vif, sta); |
272 | else if (local->ops->sta_notify) | ||
273 | local->ops->sta_notify(&local->hw, &sdata->vif, | ||
274 | STA_NOTIFY_REMOVE, sta); | ||
275 | 289 | ||
276 | trace_drv_sta_remove(local, sdata, sta); | 290 | trace_drv_return_void(local); |
277 | } | 291 | } |
278 | 292 | ||
279 | static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue, | 293 | static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue, |
@@ -283,9 +297,10 @@ static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue, | |||
283 | 297 | ||
284 | might_sleep(); | 298 | might_sleep(); |
285 | 299 | ||
300 | trace_drv_conf_tx(local, queue, params); | ||
286 | if (local->ops->conf_tx) | 301 | if (local->ops->conf_tx) |
287 | ret = local->ops->conf_tx(&local->hw, queue, params); | 302 | ret = local->ops->conf_tx(&local->hw, queue, params); |
288 | trace_drv_conf_tx(local, queue, params, ret); | 303 | trace_drv_return_int(local, ret); |
289 | return ret; | 304 | return ret; |
290 | } | 305 | } |
291 | 306 | ||
@@ -295,9 +310,10 @@ static inline u64 drv_get_tsf(struct ieee80211_local *local) | |||
295 | 310 | ||
296 | might_sleep(); | 311 | might_sleep(); |
297 | 312 | ||
313 | trace_drv_get_tsf(local); | ||
298 | if (local->ops->get_tsf) | 314 | if (local->ops->get_tsf) |
299 | ret = local->ops->get_tsf(&local->hw); | 315 | ret = local->ops->get_tsf(&local->hw); |
300 | trace_drv_get_tsf(local, ret); | 316 | trace_drv_return_u64(local, ret); |
301 | return ret; | 317 | return ret; |
302 | } | 318 | } |
303 | 319 | ||
@@ -305,18 +321,20 @@ static inline void drv_set_tsf(struct ieee80211_local *local, u64 tsf) | |||
305 | { | 321 | { |
306 | might_sleep(); | 322 | might_sleep(); |
307 | 323 | ||
324 | trace_drv_set_tsf(local, tsf); | ||
308 | if (local->ops->set_tsf) | 325 | if (local->ops->set_tsf) |
309 | local->ops->set_tsf(&local->hw, tsf); | 326 | local->ops->set_tsf(&local->hw, tsf); |
310 | trace_drv_set_tsf(local, tsf); | 327 | trace_drv_return_void(local); |
311 | } | 328 | } |
312 | 329 | ||
313 | static inline void drv_reset_tsf(struct ieee80211_local *local) | 330 | static inline void drv_reset_tsf(struct ieee80211_local *local) |
314 | { | 331 | { |
315 | might_sleep(); | 332 | might_sleep(); |
316 | 333 | ||
334 | trace_drv_reset_tsf(local); | ||
317 | if (local->ops->reset_tsf) | 335 | if (local->ops->reset_tsf) |
318 | local->ops->reset_tsf(&local->hw); | 336 | local->ops->reset_tsf(&local->hw); |
319 | trace_drv_reset_tsf(local); | 337 | trace_drv_return_void(local); |
320 | } | 338 | } |
321 | 339 | ||
322 | static inline int drv_tx_last_beacon(struct ieee80211_local *local) | 340 | static inline int drv_tx_last_beacon(struct ieee80211_local *local) |
@@ -325,9 +343,10 @@ static inline int drv_tx_last_beacon(struct ieee80211_local *local) | |||
325 | 343 | ||
326 | might_sleep(); | 344 | might_sleep(); |
327 | 345 | ||
346 | trace_drv_tx_last_beacon(local); | ||
328 | if (local->ops->tx_last_beacon) | 347 | if (local->ops->tx_last_beacon) |
329 | ret = local->ops->tx_last_beacon(&local->hw); | 348 | ret = local->ops->tx_last_beacon(&local->hw); |
330 | trace_drv_tx_last_beacon(local, ret); | 349 | trace_drv_return_int(local, ret); |
331 | return ret; | 350 | return ret; |
332 | } | 351 | } |
333 | 352 | ||
@@ -338,10 +357,17 @@ static inline int drv_ampdu_action(struct ieee80211_local *local, | |||
338 | u16 *ssn) | 357 | u16 *ssn) |
339 | { | 358 | { |
340 | int ret = -EOPNOTSUPP; | 359 | int ret = -EOPNOTSUPP; |
360 | |||
361 | might_sleep(); | ||
362 | |||
363 | trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn); | ||
364 | |||
341 | if (local->ops->ampdu_action) | 365 | if (local->ops->ampdu_action) |
342 | ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action, | 366 | ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action, |
343 | sta, tid, ssn); | 367 | sta, tid, ssn); |
344 | trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, ret); | 368 | |
369 | trace_drv_return_int(local, ret); | ||
370 | |||
345 | return ret; | 371 | return ret; |
346 | } | 372 | } |
347 | 373 | ||
@@ -349,9 +375,14 @@ static inline int drv_get_survey(struct ieee80211_local *local, int idx, | |||
349 | struct survey_info *survey) | 375 | struct survey_info *survey) |
350 | { | 376 | { |
351 | int ret = -EOPNOTSUPP; | 377 | int ret = -EOPNOTSUPP; |
378 | |||
379 | trace_drv_get_survey(local, idx, survey); | ||
380 | |||
352 | if (local->ops->get_survey) | 381 | if (local->ops->get_survey) |
353 | ret = local->ops->get_survey(&local->hw, idx, survey); | 382 | ret = local->ops->get_survey(&local->hw, idx, survey); |
354 | /* trace_drv_get_survey(local, idx, survey, ret); */ | 383 | |
384 | trace_drv_return_int(local, ret); | ||
385 | |||
355 | return ret; | 386 | return ret; |
356 | } | 387 | } |
357 | 388 | ||
@@ -370,6 +401,7 @@ static inline void drv_flush(struct ieee80211_local *local, bool drop) | |||
370 | trace_drv_flush(local, drop); | 401 | trace_drv_flush(local, drop); |
371 | if (local->ops->flush) | 402 | if (local->ops->flush) |
372 | local->ops->flush(&local->hw, drop); | 403 | local->ops->flush(&local->hw, drop); |
404 | trace_drv_return_void(local); | ||
373 | } | 405 | } |
374 | 406 | ||
375 | static inline void drv_channel_switch(struct ieee80211_local *local, | 407 | static inline void drv_channel_switch(struct ieee80211_local *local, |
@@ -377,9 +409,9 @@ static inline void drv_channel_switch(struct ieee80211_local *local, | |||
377 | { | 409 | { |
378 | might_sleep(); | 410 | might_sleep(); |
379 | 411 | ||
380 | local->ops->channel_switch(&local->hw, ch_switch); | ||
381 | |||
382 | trace_drv_channel_switch(local, ch_switch); | 412 | trace_drv_channel_switch(local, ch_switch); |
413 | local->ops->channel_switch(&local->hw, ch_switch); | ||
414 | trace_drv_return_void(local); | ||
383 | } | 415 | } |
384 | 416 | ||
385 | #endif /* __MAC80211_DRIVER_OPS */ | 417 | #endif /* __MAC80211_DRIVER_OPS */ |