aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/562-mac80211_remove_code_duplication.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-10 12:59:40 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-03-10 12:59:40 +0000
commitf72846920089377e0283b424364a3a1f6d6e8ac4 (patch)
tree08516156f029ddf7e44986bca9fde02ddeabbe39 /package/mac80211/patches/562-mac80211_remove_code_duplication.patch
parent7dff84b6703a69fb6585052ee0e27cf794d3d8b5 (diff)
downloadupstream-f72846920089377e0283b424364a3a1f6d6e8ac4.tar.gz
upstream-f72846920089377e0283b424364a3a1f6d6e8ac4.tar.bz2
upstream-f72846920089377e0283b424364a3a1f6d6e8ac4.zip
mac80211/ath9k: some more performance improvements
SVN-Revision: 30866
Diffstat (limited to 'package/mac80211/patches/562-mac80211_remove_code_duplication.patch')
-rw-r--r--package/mac80211/patches/562-mac80211_remove_code_duplication.patch127
1 files changed, 127 insertions, 0 deletions
diff --git a/package/mac80211/patches/562-mac80211_remove_code_duplication.patch b/package/mac80211/patches/562-mac80211_remove_code_duplication.patch
new file mode 100644
index 0000000000..e411d766c0
--- /dev/null
+++ b/package/mac80211/patches/562-mac80211_remove_code_duplication.patch
@@ -0,0 +1,127 @@
+--- a/net/mac80211/debugfs_netdev.c
++++ b/net/mac80211/debugfs_netdev.c
+@@ -445,26 +445,23 @@ IEEE80211_IF_FILE(dot11MeshHWMPRannInter
+ IEEE80211_IF_FILE(dot11MeshForwarding, u.mesh.mshcfg.dot11MeshForwarding, DEC);
+ #endif
+
+-
+-#define DEBUGFS_ADD(name) \
+- debugfs_create_file(#name, 0400, sdata->debugfs.dir, \
+- sdata, &name##_ops);
+-
+ #define DEBUGFS_ADD_MODE(name, mode) \
+ debugfs_create_file(#name, mode, sdata->debugfs.dir, \
+ sdata, &name##_ops);
+
+-static void add_sta_files(struct ieee80211_sub_if_data *sdata)
++#define DEBUGFS_ADD(name) DEBUGFS_ADD_MODE(name, 0400)
++
++static void add_common_files(struct ieee80211_sub_if_data *sdata)
+ {
+ DEBUGFS_ADD(drop_unencrypted);
+- DEBUGFS_ADD(flags);
+- DEBUGFS_ADD(state);
+- DEBUGFS_ADD(channel_type);
+ DEBUGFS_ADD(rc_rateidx_mask_2ghz);
+ DEBUGFS_ADD(rc_rateidx_mask_5ghz);
+ DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
+ DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
++}
+
++static void add_sta_files(struct ieee80211_sub_if_data *sdata)
++{
+ DEBUGFS_ADD(bssid);
+ DEBUGFS_ADD(aid);
+ DEBUGFS_ADD(last_beacon);
+@@ -475,15 +472,6 @@ static void add_sta_files(struct ieee802
+
+ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
+ {
+- DEBUGFS_ADD(drop_unencrypted);
+- DEBUGFS_ADD(flags);
+- DEBUGFS_ADD(state);
+- DEBUGFS_ADD(channel_type);
+- DEBUGFS_ADD(rc_rateidx_mask_2ghz);
+- DEBUGFS_ADD(rc_rateidx_mask_5ghz);
+- DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
+- DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
+-
+ DEBUGFS_ADD(num_sta_authorized);
+ DEBUGFS_ADD(num_sta_ps);
+ DEBUGFS_ADD(dtim_count);
+@@ -493,48 +481,14 @@ static void add_ap_files(struct ieee8021
+
+ static void add_ibss_files(struct ieee80211_sub_if_data *sdata)
+ {
+- DEBUGFS_ADD(channel_type);
+- DEBUGFS_ADD(rc_rateidx_mask_2ghz);
+- DEBUGFS_ADD(rc_rateidx_mask_5ghz);
+- DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
+- DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
+-
+ DEBUGFS_ADD_MODE(tsf, 0600);
+ }
+
+ static void add_wds_files(struct ieee80211_sub_if_data *sdata)
+ {
+- DEBUGFS_ADD(drop_unencrypted);
+- DEBUGFS_ADD(flags);
+- DEBUGFS_ADD(state);
+- DEBUGFS_ADD(channel_type);
+- DEBUGFS_ADD(rc_rateidx_mask_2ghz);
+- DEBUGFS_ADD(rc_rateidx_mask_5ghz);
+- DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
+- DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
+-
+ DEBUGFS_ADD(peer);
+ }
+
+-static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
+-{
+- DEBUGFS_ADD(drop_unencrypted);
+- DEBUGFS_ADD(flags);
+- DEBUGFS_ADD(state);
+- DEBUGFS_ADD(channel_type);
+- DEBUGFS_ADD(rc_rateidx_mask_2ghz);
+- DEBUGFS_ADD(rc_rateidx_mask_5ghz);
+- DEBUGFS_ADD(rc_rateidx_mcs_mask_2ghz);
+- DEBUGFS_ADD(rc_rateidx_mcs_mask_5ghz);
+-}
+-
+-static void add_monitor_files(struct ieee80211_sub_if_data *sdata)
+-{
+- DEBUGFS_ADD(flags);
+- DEBUGFS_ADD(state);
+- DEBUGFS_ADD(channel_type);
+-}
+-
+ #ifdef CONFIG_MAC80211_MESH
+
+ static void add_mesh_stats(struct ieee80211_sub_if_data *sdata)
+@@ -590,6 +544,13 @@ static void add_files(struct ieee80211_s
+ if (!sdata->debugfs.dir)
+ return;
+
++ DEBUGFS_ADD(flags);
++ DEBUGFS_ADD(state);
++ DEBUGFS_ADD(channel_type);
++
++ if (sdata->vif.type != NL80211_IFTYPE_MONITOR)
++ add_common_files(sdata);
++
+ switch (sdata->vif.type) {
+ case NL80211_IFTYPE_MESH_POINT:
+ #ifdef CONFIG_MAC80211_MESH
+@@ -609,12 +570,6 @@ static void add_files(struct ieee80211_s
+ case NL80211_IFTYPE_WDS:
+ add_wds_files(sdata);
+ break;
+- case NL80211_IFTYPE_MONITOR:
+- add_monitor_files(sdata);
+- break;
+- case NL80211_IFTYPE_AP_VLAN:
+- add_vlan_files(sdata);
+- break;
+ default:
+ break;
+ }