aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-ops.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r--net/mac80211/driver-ops.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index e8960ae39861..70dfb6415c20 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -253,6 +253,7 @@ static inline int drv_set_key(struct ieee80211_local *local,
253 253
254 might_sleep(); 254 might_sleep();
255 255
256 sdata = get_bss_sdata(sdata);
256 check_sdata_in_driver(sdata); 257 check_sdata_in_driver(sdata);
257 258
258 trace_drv_set_key(local, cmd, sdata, sta, key); 259 trace_drv_set_key(local, cmd, sdata, sta, key);
@@ -272,6 +273,7 @@ static inline void drv_update_tkip_key(struct ieee80211_local *local,
272 if (sta) 273 if (sta)
273 ista = &sta->sta; 274 ista = &sta->sta;
274 275
276 sdata = get_bss_sdata(sdata);
275 check_sdata_in_driver(sdata); 277 check_sdata_in_driver(sdata);
276 278
277 trace_drv_update_tkip_key(local, sdata, conf, ista, iv32); 279 trace_drv_update_tkip_key(local, sdata, conf, ista, iv32);
@@ -476,6 +478,37 @@ static inline void drv_sta_remove(struct ieee80211_local *local,
476 trace_drv_return_void(local); 478 trace_drv_return_void(local);
477} 479}
478 480
481static inline __must_check
482int drv_sta_state(struct ieee80211_local *local,
483 struct ieee80211_sub_if_data *sdata,
484 struct sta_info *sta,
485 enum ieee80211_sta_state old_state,
486 enum ieee80211_sta_state new_state)
487{
488 int ret = 0;
489
490 might_sleep();
491
492 sdata = get_bss_sdata(sdata);
493 check_sdata_in_driver(sdata);
494
495 trace_drv_sta_state(local, sdata, &sta->sta, old_state, new_state);
496 if (local->ops->sta_state) {
497 ret = local->ops->sta_state(&local->hw, &sdata->vif, &sta->sta,
498 old_state, new_state);
499 } else if (old_state == IEEE80211_STA_AUTH &&
500 new_state == IEEE80211_STA_ASSOC) {
501 ret = drv_sta_add(local, sdata, &sta->sta);
502 if (ret == 0)
503 sta->uploaded = true;
504 } else if (old_state == IEEE80211_STA_ASSOC &&
505 new_state == IEEE80211_STA_AUTH) {
506 drv_sta_remove(local, sdata, &sta->sta);
507 }
508 trace_drv_return_int(local, ret);
509 return ret;
510}
511
479static inline int drv_conf_tx(struct ieee80211_local *local, 512static inline int drv_conf_tx(struct ieee80211_local *local,
480 struct ieee80211_sub_if_data *sdata, u16 queue, 513 struct ieee80211_sub_if_data *sdata, u16 queue,
481 const struct ieee80211_tx_queue_params *params) 514 const struct ieee80211_tx_queue_params *params)