mwifiex: process remain on channel expired event
authorStone Piao <piaoyun@marvell.com>
Wed, 26 Sep 2012 03:23:37 +0000 (20:23 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 28 Sep 2012 17:54:04 +0000 (13:54 -0400)
Process remain on channel expired event, and notify cfg80211.

Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/fw.h
drivers/net/wireless/mwifiex/sta_event.c

index 9818cae7faf75cba5e982cd7be33f4783c9f183e..b8a07ade2e686c415ea5b535abd1107d00e1df8c 100644 (file)
@@ -392,6 +392,7 @@ enum ENH_PS_MODES {
 #define EVENT_BW_CHANGE                 0x00000048
 #define EVENT_UAP_MIC_COUNTERMEASURES   0x0000004c
 #define EVENT_HOSTWAKE_STAIE           0x0000004d
+#define EVENT_REMAIN_ON_CHAN_EXPIRED    0x0000005f
 
 #define EVENT_ID_MASK                   0xffff
 #define BSS_NUM_MASK                    0xf
index dff51d55271c20267097245b079235f5882a1522..aafde30e714aa97e40ecbbedc86a39fb08b26866 100644 (file)
@@ -410,6 +410,18 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
                dev_dbg(adapter->dev, "event: HOSTWAKE_STAIE %d\n", eventcause);
                break;
 
+       case EVENT_REMAIN_ON_CHAN_EXPIRED:
+               dev_dbg(adapter->dev, "event: Remain on channel expired\n");
+               cfg80211_remain_on_channel_expired(priv->wdev,
+                                                  priv->roc_cfg.cookie,
+                                                  &priv->roc_cfg.chan,
+                                                  priv->roc_cfg.chan_type,
+                                                  GFP_ATOMIC);
+
+               memset(&priv->roc_cfg, 0x00, sizeof(struct mwifiex_roc_cfg));
+
+               break;
+
        default:
                dev_dbg(adapter->dev, "event: unknown event id: %#x\n",
                        eventcause);