aboutsummaryrefslogtreecommitdiff
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.h68
1 files changed, 33 insertions, 35 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index e8960ae3986..af4691fed64 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -168,41 +168,6 @@ static inline void drv_bss_info_changed(struct ieee80211_local *local,
trace_drv_return_void(local);
}
-static inline int drv_tx_sync(struct ieee80211_local *local,
- struct ieee80211_sub_if_data *sdata,
- const u8 *bssid,
- enum ieee80211_tx_sync_type type)
-{
- int ret = 0;
-
- might_sleep();
-
- check_sdata_in_driver(sdata);
-
- trace_drv_tx_sync(local, sdata, bssid, type);
- if (local->ops->tx_sync)
- ret = local->ops->tx_sync(&local->hw, &sdata->vif,
- bssid, type);
- trace_drv_return_int(local, ret);
- return ret;
-}
-
-static inline void drv_finish_tx_sync(struct ieee80211_local *local,
- struct ieee80211_sub_if_data *sdata,
- const u8 *bssid,
- enum ieee80211_tx_sync_type type)
-{
- might_sleep();
-
- check_sdata_in_driver(sdata);
-
- trace_drv_finish_tx_sync(local, sdata, bssid, type);
- if (local->ops->finish_tx_sync)
- local->ops->finish_tx_sync(&local->hw, &sdata->vif,
- bssid, type);
- trace_drv_return_void(local);
-}
-
static inline u64 drv_prepare_multicast(struct ieee80211_local *local,
struct netdev_hw_addr_list *mc_list)
{
@@ -253,6 +218,7 @@ static inline int drv_set_key(struct ieee80211_local *local,
might_sleep();
+ sdata = get_bss_sdata(sdata);
check_sdata_in_driver(sdata);
trace_drv_set_key(local, cmd, sdata, sta, key);
@@ -272,6 +238,7 @@ static inline void drv_update_tkip_key(struct ieee80211_local *local,
if (sta)
ista = &sta->sta;
+ sdata = get_bss_sdata(sdata);
check_sdata_in_driver(sdata);
trace_drv_update_tkip_key(local, sdata, conf, ista, iv32);
@@ -476,6 +443,37 @@ static inline void drv_sta_remove(struct ieee80211_local *local,
trace_drv_return_void(local);
}
+static inline __must_check
+int drv_sta_state(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ struct sta_info *sta,
+ enum ieee80211_sta_state old_state,
+ enum ieee80211_sta_state new_state)
+{
+ int ret = 0;
+
+ might_sleep();
+
+ sdata = get_bss_sdata(sdata);
+ check_sdata_in_driver(sdata);
+
+ trace_drv_sta_state(local, sdata, &sta->sta, old_state, new_state);
+ if (local->ops->sta_state) {
+ ret = local->ops->sta_state(&local->hw, &sdata->vif, &sta->sta,
+ old_state, new_state);
+ } else if (old_state == IEEE80211_STA_AUTH &&
+ new_state == IEEE80211_STA_ASSOC) {
+ ret = drv_sta_add(local, sdata, &sta->sta);
+ if (ret == 0)
+ sta->uploaded = true;
+ } else if (old_state == IEEE80211_STA_ASSOC &&
+ new_state == IEEE80211_STA_AUTH) {
+ drv_sta_remove(local, sdata, &sta->sta);
+ }
+ trace_drv_return_int(local, ret);
+ return ret;
+}
+
static inline int drv_conf_tx(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata, u16 queue,
const struct ieee80211_tx_queue_params *params)