summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Xu <pxu@qca.qualcomm.com>2014-01-06 10:28:31 -0800
committerPrakash Dhavali <pdhavali@qca.qualcomm.com>2014-01-11 15:17:10 -0800
commitf5cb66c579ed5c64689816f236a882e2dadff9b5 (patch)
tree39ea851f86dfb1979c972b5a73fb34c1daead5f9
parentff7f88aece560c63112abf73914cf9144b0eb489 (diff)
qcacld: hdd: Fix unsupported auth algorithm
Currently the SAP allows OPEN_SYSTEM authentication even its authentication type is SHARED KEY. This is fixed by setting the authType of the SAP to the value passed by hostapd before starting the SAP. SAP will reject the authentication request if it is unsupported auth algorithm. Change-Id: I4ff262e4de964eb1545bcc960fac844cffb93d00 CRs-fixed: 594780
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index c56ca3c84c27..6bfa05319375 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -1897,7 +1897,6 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
{
pConfig->ieee80211d = 0;
}
- pConfig->authType = eSAP_AUTO_SWITCH;
capab_info = pMgmt_frame->u.beacon.capab_info;
@@ -2570,6 +2569,19 @@ static int wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
params->chandef.chan, cfg80211_get_chandef_type(&(params->chandef)));
#endif
#endif
+ /* set authentication type */
+ switch ( params->auth_type )
+ {
+ case NL80211_AUTHTYPE_OPEN_SYSTEM:
+ pAdapter->sessionCtx.ap.sapConfig.authType = eSAP_OPEN_SYSTEM;
+ break;
+ case NL80211_AUTHTYPE_SHARED_KEY:
+ pAdapter->sessionCtx.ap.sapConfig.authType = eSAP_SHARED_KEY;
+ break;
+ default:
+ pAdapter->sessionCtx.ap.sapConfig.authType = eSAP_AUTO_SWITCH;
+ }
+
status = wlan_hdd_cfg80211_start_bss(pAdapter, &params->beacon, params->ssid,
params->ssid_len, params->hidden_ssid);
}