diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2014-03-18 18:55:54 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2014-03-18 18:55:54 +0000 |
commit | 567cc1ee179f5b28b840ecc62f2058c3dbda2848 (patch) | |
tree | 2559a20fed9cca97addaeeb1a9f3a2948311b424 /package/kernel/mac80211/patches/901-wlcore-memset-wl--rx_filter_enabled-to-zero-after-recovery.patch | |
parent | 7777f1ed2c60c4642014270860907e59647baf00 (diff) | |
download | master-187ad058-567cc1ee179f5b28b840ecc62f2058c3dbda2848.tar.gz master-187ad058-567cc1ee179f5b28b840ecc62f2058c3dbda2848.tar.bz2 master-187ad058-567cc1ee179f5b28b840ecc62f2058c3dbda2848.zip |
[mac80211]: add add new firmware support and additional fixes for wl18xx
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39947 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/patches/901-wlcore-memset-wl--rx_filter_enabled-to-zero-after-recovery.patch')
-rw-r--r-- | package/kernel/mac80211/patches/901-wlcore-memset-wl--rx_filter_enabled-to-zero-after-recovery.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/901-wlcore-memset-wl--rx_filter_enabled-to-zero-after-recovery.patch b/package/kernel/mac80211/patches/901-wlcore-memset-wl--rx_filter_enabled-to-zero-after-recovery.patch new file mode 100644 index 0000000000..df2a6e9448 --- /dev/null +++ b/package/kernel/mac80211/patches/901-wlcore-memset-wl--rx_filter_enabled-to-zero-after-recovery.patch @@ -0,0 +1,73 @@ +zero rx_filter_enabled array after recovery to avoid +cases were the driver will keep trying to clear a +filter which is not configured in FW. + +Such case will cause consecutive recoveries due to +command execution failures. + +While on it, convert rx_filter_enabled to bitmap, +to save some memory and make sparse happy (it +doesn't like sizeof(bool array)). + +Signed-off-by: Nadim Zubidat <nadimz@ti.com> +Signed-off-by: Eliad Peller <eliad@wizery.com> + +--- +drivers/net/wireless/ti/wlcore/main.c | 1 + + drivers/net/wireless/ti/wlcore/rx.c | 9 ++++++--- + drivers/net/wireless/ti/wlcore/wlcore.h | 2 +- + 3 files changed, 8 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireless/ti/wlcore/main.c ++++ b/drivers/net/wireless/ti/wlcore/main.c +@@ -1914,6 +1914,7 @@ static void wlcore_op_stop_locked(struct + memset(wl->links_map, 0, sizeof(wl->links_map)); + memset(wl->roc_map, 0, sizeof(wl->roc_map)); + memset(wl->session_ids, 0, sizeof(wl->session_ids)); ++ memset(wl->rx_filter_enabled, 0, sizeof(wl->rx_filter_enabled)); + wl->active_sta_count = 0; + wl->active_link_count = 0; + +--- a/drivers/net/wireless/ti/wlcore/rx.c ++++ b/drivers/net/wireless/ti/wlcore/rx.c +@@ -302,7 +302,7 @@ int wl1271_rx_filter_enable(struct wl127 + { + int ret; + +- if (wl->rx_filter_enabled[index] == enable) { ++ if (!!test_bit(index, wl->rx_filter_enabled) == enable) { + wl1271_warning("Request to enable an already " + "enabled rx filter %d", index); + return 0; +@@ -316,7 +316,10 @@ int wl1271_rx_filter_enable(struct wl127 + return ret; + } + +- wl->rx_filter_enabled[index] = enable; ++ if (enable) ++ __set_bit(index, wl->rx_filter_enabled); ++ else ++ __clear_bit(index, wl->rx_filter_enabled); + + return 0; + } +@@ -326,7 +329,7 @@ int wl1271_rx_filter_clear_all(struct wl + int i, ret = 0; + + for (i = 0; i < WL1271_MAX_RX_FILTERS; i++) { +- if (!wl->rx_filter_enabled[i]) ++ if (!test_bit(i, wl->rx_filter_enabled)) + continue; + ret = wl1271_rx_filter_enable(wl, i, 0, NULL); + if (ret) +--- a/drivers/net/wireless/ti/wlcore/wlcore.h ++++ b/drivers/net/wireless/ti/wlcore/wlcore.h +@@ -453,7 +453,7 @@ struct wl1271 { + size_t fw_status_priv_len; + + /* RX Data filter rule state - enabled/disabled */ +- bool rx_filter_enabled[WL1271_MAX_RX_FILTERS]; ++ unsigned long rx_filter_enabled[BITS_TO_LONGS(WL1271_MAX_RX_FILTERS)]; + + /* size of the private static data */ + size_t static_data_priv_len; |