summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell/mwifiex/cmdevt.c
diff options
context:
space:
mode:
authorGanapathi Bhat <gbhat@marvell.com>2016-07-25 21:21:11 +0530
committerKalle Valo <kvalo@codeaurora.org>2016-09-03 12:57:18 +0300
commit441756b6a6e3818dc6f2e76b9526558d450ce778 (patch)
treeb0aa91badf43f8abdea54a665f04712cc81d5dff /drivers/net/wireless/marvell/mwifiex/cmdevt.c
parent432da7d243da32651e1fae677f3a83c16b346d47 (diff)
downloadop-kernel-dev-441756b6a6e3818dc6f2e76b9526558d450ce778.zip
op-kernel-dev-441756b6a6e3818dc6f2e76b9526558d450ce778.tar.gz
mwifiex: fix radar detection issue
It's been observed that firmware sends RADAR detected event without specifying bss_num/bss_type. Also, the event body is empty. Currently the event is being ignored by driver. This patch checks on which interface 11H is active, accordingly fills bss_num/bss_type and handles the event. Condition "if (le32_to_cpu(rdr_event->passed))" which always fails is also removed. Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/cmdevt.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/cmdevt.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
index c29f26d..d433aa0 100644
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
@@ -480,13 +480,27 @@ int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter)
*/
int mwifiex_process_event(struct mwifiex_adapter *adapter)
{
- int ret;
+ int ret, i;
struct mwifiex_private *priv =
mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
struct sk_buff *skb = adapter->event_skb;
- u32 eventcause = adapter->event_cause;
+ u32 eventcause;
struct mwifiex_rxinfo *rx_info;
+ if ((adapter->event_cause & EVENT_ID_MASK) == EVENT_RADAR_DETECTED) {
+ for (i = 0; i < adapter->priv_num; i++) {
+ priv = adapter->priv[i];
+ if (priv && mwifiex_is_11h_active(priv)) {
+ adapter->event_cause |=
+ ((priv->bss_num & 0xff) << 16) |
+ ((priv->bss_type & 0xff) << 24);
+ break;
+ }
+ }
+ }
+
+ eventcause = adapter->event_cause;
+
/* Save the last event to debug log */
adapter->dbg.last_event_index =
(adapter->dbg.last_event_index + 1) % DBG_CMD_NUM;
OpenPOWER on IntegriCloud