Add kernel parameters to set default values for debugfs disable_*_ba values
This provides a method for setting default values for the debugfs parameters for all phyNs at boot time, while continuing to allow runtime per-phy modifications. This is needed because debugfs parameters cannot easily be statically pushed onto a phy that may or may not yet be loaded, since an init script would have to mount the debugfs then monitor the directory until the phyN parameter appears.
BUG=none
TEST=rebooted with various config options
Review URL: http://codereview.chromium.org/2887009
diff --git a/chromeos/compat-wireless/net/mac80211/main.c b/chromeos/compat-wireless/net/mac80211/main.c
index 1eecab6..7042de5 100644
--- a/chromeos/compat-wireless/net/mac80211/main.c
+++ b/chromeos/compat-wireless/net/mac80211/main.c
@@ -40,6 +40,18 @@
MODULE_PARM_DESC(ieee80211_disable_40mhz_24ghz,
"Disable 40MHz support in the 2.4GHz band");
+#ifdef CONFIG_MAC80211_DEBUGFS
+static bool ieee80211_default_disable_rx_ba = 0;
+module_param(ieee80211_default_disable_rx_ba, bool, 0644);
+MODULE_PARM_DESC(ieee80211_default_disable_rx_ba,
+ "Disable received HT aggregation requests by default");
+
+static bool ieee80211_default_disable_tx_ba = 0;
+module_param(ieee80211_default_disable_tx_ba, bool, 0644);
+MODULE_PARM_DESC(ieee80211_default_disable_tx_ba,
+ "Disable transmitted HT aggregation requests by default");
+#endif
+
void ieee80211_configure_filter(struct ieee80211_local *local)
{
u64 mc;
@@ -389,6 +401,11 @@
local->uapsd_queues = IEEE80211_DEFAULT_UAPSD_QUEUES;
local->uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;
+#ifdef CONFIG_MAC80211_DEBUGFS
+ local->debug_disable_rx_ba = ieee80211_default_disable_rx_ba;
+ local->debug_disable_tx_ba = ieee80211_default_disable_tx_ba;
+#endif
+
INIT_LIST_HEAD(&local->interfaces);
mutex_init(&local->iflist_mtx);
mutex_init(&local->scan_mtx);