wil6210: send connect request IEs to FW also for non-secure connection
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Wed, 10 Sep 2014 13:34:43 +0000 (16:34 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 11 Sep 2014 19:27:38 +0000 (15:27 -0400)
Driver is sending connect request IEs to FW only for secure connection and
ignores them for non-secure connection.
This is fixed by always sending the IEs to FW upon connect request

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/wil6210/cfg80211.c
drivers/net/wireless/ath/wil6210/wmi.c

index c8c9852c81a74f56f11419161a05ddf1e1b1d214..c1ff3307e4f10ecea4b235f5f12b30245e17734e 100644 (file)
@@ -379,22 +379,22 @@ static int wil_cfg80211_connect(struct wiphy *wiphy,
                                sme->ie_len);
                        goto out;
                }
-               /*
-                * For secure assoc, send:
-                * (1) WMI_DELETE_CIPHER_KEY_CMD
-                * (2) WMI_SET_APPIE_CMD
-                */
+               /* For secure assoc, send WMI_DELETE_CIPHER_KEY_CMD */
                rc = wmi_del_cipher_key(wil, 0, bss->bssid);
                if (rc) {
                        wil_err(wil, "WMI_DELETE_CIPHER_KEY_CMD failed\n");
                        goto out;
                }
-               /* WMI_SET_APPIE_CMD */
-               rc = wmi_set_ie(wil, WMI_FRAME_ASSOC_REQ, sme->ie_len, sme->ie);
-               if (rc) {
-                       wil_err(wil, "WMI_SET_APPIE_CMD failed\n");
-                       goto out;
-               }
+       }
+
+       /* WMI_SET_APPIE_CMD. ie may contain rsn info as well as other info
+        * elements. Send it also in case it's empty, to erase previously set
+        * ies in FW.
+        */
+       rc = wmi_set_ie(wil, WMI_FRAME_ASSOC_REQ, sme->ie_len, sme->ie);
+       if (rc) {
+               wil_err(wil, "WMI_SET_APPIE_CMD failed\n");
+               goto out;
        }
 
        /* WMI_CONNECT_CMD */
index c3682c3ae89651b331bf570cf2a0688b983288c6..789c316d0ce65511e0420e70dd7832303712e78a 100644 (file)
@@ -972,6 +972,8 @@ int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie)
 
        if (!cmd)
                return -ENOMEM;
+       if (!ie)
+               ie_len = 0;
 
        cmd->mgmt_frm_type = type;
        /* BUG: FW API define ieLen as u8. Will fix FW */