diff options
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 32a2e707e222..02d91332d7dd 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -573,37 +573,12 @@ static inline void drv_sta_pre_rcu_remove(struct ieee80211_local *local, | |||
573 | trace_drv_return_void(local); | 573 | trace_drv_return_void(local); |
574 | } | 574 | } |
575 | 575 | ||
576 | static inline __must_check | 576 | __must_check |
577 | int drv_sta_state(struct ieee80211_local *local, | 577 | int drv_sta_state(struct ieee80211_local *local, |
578 | struct ieee80211_sub_if_data *sdata, | 578 | struct ieee80211_sub_if_data *sdata, |
579 | struct sta_info *sta, | 579 | struct sta_info *sta, |
580 | enum ieee80211_sta_state old_state, | 580 | enum ieee80211_sta_state old_state, |
581 | enum ieee80211_sta_state new_state) | 581 | enum ieee80211_sta_state new_state); |
582 | { | ||
583 | int ret = 0; | ||
584 | |||
585 | might_sleep(); | ||
586 | |||
587 | sdata = get_bss_sdata(sdata); | ||
588 | if (!check_sdata_in_driver(sdata)) | ||
589 | return -EIO; | ||
590 | |||
591 | trace_drv_sta_state(local, sdata, &sta->sta, old_state, new_state); | ||
592 | if (local->ops->sta_state) { | ||
593 | ret = local->ops->sta_state(&local->hw, &sdata->vif, &sta->sta, | ||
594 | old_state, new_state); | ||
595 | } else if (old_state == IEEE80211_STA_AUTH && | ||
596 | new_state == IEEE80211_STA_ASSOC) { | ||
597 | ret = drv_sta_add(local, sdata, &sta->sta); | ||
598 | if (ret == 0) | ||
599 | sta->uploaded = true; | ||
600 | } else if (old_state == IEEE80211_STA_ASSOC && | ||
601 | new_state == IEEE80211_STA_AUTH) { | ||
602 | drv_sta_remove(local, sdata, &sta->sta); | ||
603 | } | ||
604 | trace_drv_return_int(local, ret); | ||
605 | return ret; | ||
606 | } | ||
607 | 582 | ||
608 | static inline void drv_sta_rc_update(struct ieee80211_local *local, | 583 | static inline void drv_sta_rc_update(struct ieee80211_local *local, |
609 | struct ieee80211_sub_if_data *sdata, | 584 | struct ieee80211_sub_if_data *sdata, |