diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-11-06 13:13:34 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-09 21:14:09 (GMT) |
commit | a729cff8ad5120d0d5172ec28a3843d1cb458f79 (patch) | |
tree | 96e85c0805050ba03a2df2a4278640da8f0454c5 /net/mac80211/main.c | |
parent | 1f074bd8eb7a4a210a5119cd7220f89da6c7a2c3 (diff) | |
download | linux-a729cff8ad5120d0d5172ec28a3843d1cb458f79.tar.xz |
mac80211: implement wifi TX status
Implement the socket wifi TX status error
queue reflection in mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 8e9327b..e323d4e 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -596,6 +596,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, WIPHY_FLAG_4ADDR_STATION | WIPHY_FLAG_REPORTS_OBSS; + wiphy->features = NL80211_FEATURE_SK_TX_STATUS; + if (!ops->set_key) wiphy->flags |= WIPHY_FLAG_IBSS_RSN; @@ -669,6 +671,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, INIT_WORK(&local->sched_scan_stopped_work, ieee80211_sched_scan_stopped_work); + spin_lock_init(&local->ack_status_lock); + idr_init(&local->ack_status_frames); + /* preallocate at least one entry */ + idr_pre_get(&local->ack_status_frames, GFP_KERNEL); + sta_info_init(local); for (i = 0; i < IEEE80211_MAX_QUEUES; i++) { @@ -1044,6 +1051,13 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) } EXPORT_SYMBOL(ieee80211_unregister_hw); +static int ieee80211_free_ack_frame(int id, void *p, void *data) +{ + WARN_ONCE(1, "Have pending ack frames!\n"); + kfree_skb(p); + return 0; +} + void ieee80211_free_hw(struct ieee80211_hw *hw) { struct ieee80211_local *local = hw_to_local(hw); @@ -1054,6 +1068,10 @@ void ieee80211_free_hw(struct ieee80211_hw *hw) if (local->wiphy_ciphers_allocated) kfree(local->hw.wiphy->cipher_suites); + idr_for_each(&local->ack_status_frames, + ieee80211_free_ack_frame, NULL); + idr_destroy(&local->ack_status_frames); + wiphy_free(local->hw.wiphy); } EXPORT_SYMBOL(ieee80211_free_hw); |