aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-06 08:13:34 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-09 16:14:09 -0500
commita729cff8ad5120d0d5172ec28a3843d1cb458f79 (patch)
tree96e85c0805050ba03a2df2a4278640da8f0454c5 /net/mac80211/main.c
parent1f074bd8eb7a4a210a5119cd7220f89da6c7a2c3 (diff)
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.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 8e9327bca910..e323d4e6647b 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,
596 WIPHY_FLAG_4ADDR_STATION | 596 WIPHY_FLAG_4ADDR_STATION |
597 WIPHY_FLAG_REPORTS_OBSS; 597 WIPHY_FLAG_REPORTS_OBSS;
598 598
599 wiphy->features = NL80211_FEATURE_SK_TX_STATUS;
600
599 if (!ops->set_key) 601 if (!ops->set_key)
600 wiphy->flags |= WIPHY_FLAG_IBSS_RSN; 602 wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
601 603
@@ -669,6 +671,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
669 INIT_WORK(&local->sched_scan_stopped_work, 671 INIT_WORK(&local->sched_scan_stopped_work,
670 ieee80211_sched_scan_stopped_work); 672 ieee80211_sched_scan_stopped_work);
671 673
674 spin_lock_init(&local->ack_status_lock);
675 idr_init(&local->ack_status_frames);
676 /* preallocate at least one entry */
677 idr_pre_get(&local->ack_status_frames, GFP_KERNEL);
678
672 sta_info_init(local); 679 sta_info_init(local);
673 680
674 for (i = 0; i < IEEE80211_MAX_QUEUES; i++) { 681 for (i = 0; i < IEEE80211_MAX_QUEUES; i++) {
@@ -1044,6 +1051,13 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
1044} 1051}
1045EXPORT_SYMBOL(ieee80211_unregister_hw); 1052EXPORT_SYMBOL(ieee80211_unregister_hw);
1046 1053
1054static int ieee80211_free_ack_frame(int id, void *p, void *data)
1055{
1056 WARN_ONCE(1, "Have pending ack frames!\n");
1057 kfree_skb(p);
1058 return 0;
1059}
1060
1047void ieee80211_free_hw(struct ieee80211_hw *hw) 1061void ieee80211_free_hw(struct ieee80211_hw *hw)
1048{ 1062{
1049 struct ieee80211_local *local = hw_to_local(hw); 1063 struct ieee80211_local *local = hw_to_local(hw);
@@ -1054,6 +1068,10 @@ void ieee80211_free_hw(struct ieee80211_hw *hw)
1054 if (local->wiphy_ciphers_allocated) 1068 if (local->wiphy_ciphers_allocated)
1055 kfree(local->hw.wiphy->cipher_suites); 1069 kfree(local->hw.wiphy->cipher_suites);
1056 1070
1071 idr_for_each(&local->ack_status_frames,
1072 ieee80211_free_ack_frame, NULL);
1073 idr_destroy(&local->ack_status_frames);
1074
1057 wiphy_free(local->hw.wiphy); 1075 wiphy_free(local->hw.wiphy);
1058} 1076}
1059EXPORT_SYMBOL(ieee80211_free_hw); 1077EXPORT_SYMBOL(ieee80211_free_hw);