|
@@ -17710,8 +17710,6 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
|
|
|
struct wlan_objmgr_vdev *vdev;
|
|
|
uint32_t channel_bonding_mode;
|
|
|
|
|
|
- hdd_enter();
|
|
|
-
|
|
|
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
|
|
|
|
@@ -17819,7 +17817,6 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
|
|
|
*/
|
|
|
qdf_mem_copy(sta_ctx->requested_bssid.bytes,
|
|
|
bssid, QDF_MAC_ADDR_SIZE);
|
|
|
- hdd_debug("bssid is given by upper layer %pM", bssid);
|
|
|
} else if (bssid_hint) {
|
|
|
qdf_mem_copy(roam_profile->bssid_hint.bytes,
|
|
|
bssid_hint, QDF_MAC_ADDR_SIZE);
|
|
@@ -17831,34 +17828,23 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
|
|
|
*/
|
|
|
qdf_mem_copy(sta_ctx->requested_bssid.bytes,
|
|
|
bssid_hint, QDF_MAC_ADDR_SIZE);
|
|
|
- hdd_debug("bssid_hint is given by upper layer %pM",
|
|
|
- bssid_hint);
|
|
|
}
|
|
|
|
|
|
- hdd_debug("Connect to SSID: %.*s operating Ch freq: %u",
|
|
|
- roam_profile->SSIDs.SSIDList->SSID.length,
|
|
|
- roam_profile->SSIDs.SSIDList->SSID.ssId, oper_freq);
|
|
|
-
|
|
|
if (hdd_sta_ctx->wpa_versions) {
|
|
|
hdd_set_genie_to_csr(adapter, &rsn_auth_type);
|
|
|
hdd_set_csr_auth_type(adapter, rsn_auth_type);
|
|
|
}
|
|
|
#ifdef FEATURE_WLAN_WAPI
|
|
|
if (adapter->wapi_info.wapi_mode) {
|
|
|
- hdd_debug("Setting WAPI AUTH Type and Encryption Mode values");
|
|
|
switch (adapter->wapi_info.wapi_auth_mode) {
|
|
|
case WAPI_AUTH_MODE_PSK:
|
|
|
{
|
|
|
- hdd_debug("WAPI AUTH TYPE: PSK: %d",
|
|
|
- adapter->wapi_info.wapi_auth_mode);
|
|
|
roam_profile->AuthType.authType[0] =
|
|
|
eCSR_AUTH_TYPE_WAPI_WAI_PSK;
|
|
|
break;
|
|
|
}
|
|
|
case WAPI_AUTH_MODE_CERT:
|
|
|
{
|
|
|
- hdd_debug("WAPI AUTH TYPE: CERT: %d",
|
|
|
- adapter->wapi_info.wapi_auth_mode);
|
|
|
roam_profile->AuthType.authType[0] =
|
|
|
eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE;
|
|
|
break;
|
|
@@ -17870,7 +17856,6 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
|
|
|
WAPI_AUTH_MODE_PSK
|
|
|
|| adapter->wapi_info.wapi_auth_mode ==
|
|
|
WAPI_AUTH_MODE_CERT) {
|
|
|
- hdd_debug("WAPI PAIRWISE/GROUP ENCRYPTION: WPI");
|
|
|
roam_profile->AuthType.numEntries = 1;
|
|
|
roam_profile->EncryptionType.numEntries = 1;
|
|
|
roam_profile->EncryptionType.encryptionType[0] =
|
|
@@ -18022,9 +18007,8 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
|
|
|
if ((QDF_STATUS_SUCCESS != qdf_status) &&
|
|
|
(QDF_STA_MODE == adapter->device_mode ||
|
|
|
QDF_P2P_CLIENT_MODE == adapter->device_mode)) {
|
|
|
- hdd_err("sme_roam_connect (session %d) failed with "
|
|
|
- "qdf_status %d. -> NotConnected",
|
|
|
- adapter->vdev_id, qdf_status);
|
|
|
+ hdd_err("Vdev %d connect failed with status %d",
|
|
|
+ adapter->vdev_id, qdf_status);
|
|
|
/* change back to NotAssociated */
|
|
|
hdd_conn_set_connection_state(adapter,
|
|
|
eConnectionState_NotConnected);
|
|
@@ -18056,7 +18040,6 @@ ret_status:
|
|
|
if (status)
|
|
|
wlan_hdd_enable_roaming(adapter, RSO_CONNECT_START);
|
|
|
|
|
|
- hdd_exit();
|
|
|
return status;
|
|
|
}
|
|
|
|
|
@@ -18079,23 +18062,19 @@ static int wlan_hdd_cfg80211_set_auth_type(struct hdd_adapter *adapter,
|
|
|
/*set authentication type */
|
|
|
switch (auth_type) {
|
|
|
case NL80211_AUTHTYPE_AUTOMATIC:
|
|
|
- hdd_debug("set authentication type to AUTOSWITCH");
|
|
|
sta_ctx->conn_info.auth_type = eCSR_AUTH_TYPE_AUTOSWITCH;
|
|
|
break;
|
|
|
|
|
|
case NL80211_AUTHTYPE_OPEN_SYSTEM:
|
|
|
case NL80211_AUTHTYPE_FT:
|
|
|
- hdd_debug("set authentication type to OPEN");
|
|
|
sta_ctx->conn_info.auth_type = eCSR_AUTH_TYPE_OPEN_SYSTEM;
|
|
|
break;
|
|
|
|
|
|
case NL80211_AUTHTYPE_SHARED_KEY:
|
|
|
- hdd_debug("set authentication type to SHARED");
|
|
|
sta_ctx->conn_info.auth_type = eCSR_AUTH_TYPE_SHARED_KEY;
|
|
|
break;
|
|
|
#ifdef FEATURE_WLAN_ESE
|
|
|
case NL80211_AUTHTYPE_NETWORK_EAP:
|
|
|
- hdd_debug("set authentication type to CCKM WPA");
|
|
|
sta_ctx->conn_info.auth_type = eCSR_AUTH_TYPE_CCKM_WPA;
|
|
|
break;
|
|
|
#endif
|
|
@@ -18103,12 +18082,10 @@ static int wlan_hdd_cfg80211_set_auth_type(struct hdd_adapter *adapter,
|
|
|
(defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT) || \
|
|
|
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)))
|
|
|
case NL80211_AUTHTYPE_FILS_SK:
|
|
|
- hdd_debug("set authentication type to FILS SHARED");
|
|
|
sta_ctx->conn_info.auth_type = eCSR_AUTH_TYPE_OPEN_SYSTEM;
|
|
|
break;
|
|
|
#endif
|
|
|
case NL80211_AUTHTYPE_SAE:
|
|
|
- hdd_debug("set authentication type to SAE");
|
|
|
sta_ctx->conn_info.auth_type = eCSR_AUTH_TYPE_SAE;
|
|
|
break;
|
|
|
default:
|
|
@@ -18311,7 +18288,6 @@ static bool wlan_hdd_is_conn_type_fils(struct cfg80211_connect_params *req)
|
|
|
enum eAniAuthType fils_auth_type =
|
|
|
wlan_hdd_get_fils_auth_type(req->auth_type);
|
|
|
|
|
|
- hdd_debug("Num of AKM suites = %d", num_akm_suites);
|
|
|
if (num_akm_suites <= 0)
|
|
|
return false;
|
|
|
|
|
@@ -18319,16 +18295,13 @@ static bool wlan_hdd_is_conn_type_fils(struct cfg80211_connect_params *req)
|
|
|
* Auth type will be either be OPEN or FILS type for a FILS connection
|
|
|
*/
|
|
|
if ((auth_type != NL80211_AUTHTYPE_OPEN_SYSTEM) &&
|
|
|
- (fils_auth_type == eSIR_DONOT_USE_AUTH_TYPE)) {
|
|
|
- hdd_debug("Not a FILS auth type, auth = %d, fils auth = %d",
|
|
|
- auth_type, fils_auth_type);
|
|
|
+ (fils_auth_type == eSIR_DONOT_USE_AUTH_TYPE))
|
|
|
return false;
|
|
|
- }
|
|
|
|
|
|
- if (!wlan_hdd_is_akm_suite_fils(key_mgmt)) {
|
|
|
- hdd_debug("Not a FILS AKM SUITE %d", key_mgmt);
|
|
|
+ if (!wlan_hdd_is_akm_suite_fils(key_mgmt))
|
|
|
return false;
|
|
|
- }
|
|
|
+
|
|
|
+ hdd_debug("Fils Auth %d AKM %d", fils_auth_type, key_mgmt);
|
|
|
|
|
|
return true;
|
|
|
}
|
|
@@ -18390,20 +18363,17 @@ static int wlan_hdd_set_akm_suite(struct hdd_adapter *adapter, u32 key_mgmt)
|
|
|
case WLAN_AKM_SUITE_PSK_SHA256:
|
|
|
case WLAN_AKM_SUITE_FT_PSK:
|
|
|
case WLAN_AKM_SUITE_DPP_RSN:
|
|
|
- hdd_debug("setting key mgmt type to PSK");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_PSK;
|
|
|
break;
|
|
|
|
|
|
case WLAN_AKM_SUITE_8021X_SHA256:
|
|
|
case WLAN_AKM_SUITE_8021X:
|
|
|
case WLAN_AKM_SUITE_FT_8021X:
|
|
|
- hdd_debug("setting key mgmt type to 8021x");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
break;
|
|
|
#ifdef FEATURE_WLAN_ESE
|
|
|
#define WLAN_AKM_SUITE_CCKM 0x00409600 /* Should be in ieee802_11_defs.h */
|
|
|
case WLAN_AKM_SUITE_CCKM:
|
|
|
- hdd_debug("setting key mgmt type to CCKM");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_CCKM;
|
|
|
break;
|
|
|
#endif
|
|
@@ -18411,35 +18381,30 @@ static int wlan_hdd_set_akm_suite(struct hdd_adapter *adapter, u32 key_mgmt)
|
|
|
#define WLAN_AKM_SUITE_OSEN 0x506f9a01 /* Should be in ieee802_11_defs.h */
|
|
|
#endif
|
|
|
case WLAN_AKM_SUITE_OSEN:
|
|
|
- hdd_debug("setting key mgmt type to OSEN");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
break;
|
|
|
#if defined(WLAN_FEATURE_FILS_SK) && \
|
|
|
(defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT) || \
|
|
|
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)))
|
|
|
case WLAN_AKM_SUITE_FILS_SHA256:
|
|
|
- hdd_debug("setting key mgmt type to FILS SHA256");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
roam_profile->fils_con_info->akm_type =
|
|
|
eCSR_AUTH_TYPE_FILS_SHA256;
|
|
|
break;
|
|
|
|
|
|
case WLAN_AKM_SUITE_FILS_SHA384:
|
|
|
- hdd_debug("setting key mgmt type to FILS SHA384");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
roam_profile->fils_con_info->akm_type =
|
|
|
eCSR_AUTH_TYPE_FILS_SHA384;
|
|
|
break;
|
|
|
|
|
|
case WLAN_AKM_SUITE_FT_FILS_SHA256:
|
|
|
- hdd_debug("setting key mgmt type to FILS FT SHA256");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
roam_profile->fils_con_info->akm_type =
|
|
|
eCSR_AUTH_TYPE_FT_FILS_SHA256;
|
|
|
break;
|
|
|
|
|
|
case WLAN_AKM_SUITE_FT_FILS_SHA384:
|
|
|
- hdd_debug("setting key mgmt type to FILS FT SHA384");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
roam_profile->fils_con_info->akm_type =
|
|
|
eCSR_AUTH_TYPE_FT_FILS_SHA384;
|
|
@@ -18447,31 +18412,25 @@ static int wlan_hdd_set_akm_suite(struct hdd_adapter *adapter, u32 key_mgmt)
|
|
|
#endif
|
|
|
|
|
|
case WLAN_AKM_SUITE_OWE:
|
|
|
- hdd_debug("setting key mgmt type to OWE");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
break;
|
|
|
|
|
|
case WLAN_AKM_SUITE_EAP_SHA256:
|
|
|
- hdd_debug("setting key mgmt type to EAP_SHA256");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
break;
|
|
|
case WLAN_AKM_SUITE_EAP_SHA384:
|
|
|
- hdd_debug("setting key mgmt type to EAP_SHA384");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
break;
|
|
|
|
|
|
case WLAN_AKM_SUITE_SAE:
|
|
|
- hdd_debug("setting key mgmt type to SAE");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
break;
|
|
|
|
|
|
case WLAN_AKM_SUITE_FT_SAE:
|
|
|
- hdd_debug("setting key mgmt type to FT-SAE");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
break;
|
|
|
|
|
|
case WLAN_AKM_SUITE_FT_EAP_SHA_384:
|
|
|
- hdd_debug("setting key mgmt type to FT-EAP-SHA384");
|
|
|
sta_ctx->auth_key_mgmt |= HDD_AUTH_KEY_MGMT_802_1X;
|
|
|
break;
|
|
|
|
|
@@ -18502,7 +18461,6 @@ static int wlan_hdd_cfg80211_set_cipher(struct hdd_adapter *adapter,
|
|
|
struct csr_roam_profile *roam_profile;
|
|
|
|
|
|
if (!cipher) {
|
|
|
- hdd_debug("received cipher %d - considering none", cipher);
|
|
|
encryptionType = eCSR_ENCRYPT_TYPE_NONE;
|
|
|
} else {
|
|
|
|
|
@@ -18557,13 +18515,11 @@ static int wlan_hdd_cfg80211_set_cipher(struct hdd_adapter *adapter,
|
|
|
|
|
|
roam_profile = hdd_roam_profile(adapter);
|
|
|
if (ucast) {
|
|
|
- hdd_debug("setting unicast cipher type to %d", encryptionType);
|
|
|
sta_ctx->conn_info.uc_encrypt_type = encryptionType;
|
|
|
roam_profile->EncryptionType.numEntries = 1;
|
|
|
roam_profile->EncryptionType.encryptionType[0] =
|
|
|
encryptionType;
|
|
|
} else {
|
|
|
- hdd_debug("setting mcast cipher type to %d", encryptionType);
|
|
|
sta_ctx->conn_info.mc_encrypt_type = encryptionType;
|
|
|
roam_profile->mcEncryptionType.numEntries = 1;
|
|
|
roam_profile->mcEncryptionType.encryptionType[0] =
|
|
@@ -18672,7 +18628,6 @@ static void hdd_populate_crypto_auth_type(struct wlan_objmgr_vdev *vdev,
|
|
|
wlan_crypto_auth_mode crypto_auth_type =
|
|
|
osif_nl_to_crypto_auth_type(auth_type);
|
|
|
|
|
|
- hdd_debug("set auth type %d to crypto component", crypto_auth_type);
|
|
|
HDD_SET_BIT(set_val, crypto_auth_type);
|
|
|
status = wlan_crypto_set_vdev_param(vdev,
|
|
|
WLAN_CRYPTO_PARAM_AUTH_MODE,
|
|
@@ -18700,7 +18655,6 @@ static void hdd_populate_crypto_akm_type(struct wlan_objmgr_vdev *vdev,
|
|
|
wlan_crypto_key_mgmt crypto_akm_type =
|
|
|
osif_nl_to_crypto_akm_type(key_mgmt);
|
|
|
|
|
|
- hdd_debug("set akm type %d to crypto component", crypto_akm_type);
|
|
|
HDD_SET_BIT(set_val, crypto_akm_type);
|
|
|
|
|
|
status = wlan_crypto_set_vdev_param(vdev,
|
|
@@ -18732,8 +18686,6 @@ static void hdd_populate_crypto_cipher_type(u32 cipher,
|
|
|
wlan_crypto_cipher_type crypto_cipher_type =
|
|
|
osif_nl_to_crypto_cipher_type(cipher);
|
|
|
|
|
|
- hdd_debug("set cipher params %d type %d to crypto",
|
|
|
- cipher_param_type, crypto_cipher_type);
|
|
|
HDD_SET_BIT(set_val, crypto_cipher_type);
|
|
|
status = wlan_crypto_set_vdev_param(vdev, cipher_param_type, set_val);
|
|
|
if (QDF_IS_STATUS_ERROR(status))
|
|
@@ -18758,19 +18710,15 @@ static void hdd_populate_crypto_params(struct wlan_objmgr_vdev *vdev,
|
|
|
if (req->crypto.n_akm_suites)
|
|
|
hdd_populate_crypto_akm_type(vdev, req->crypto.akm_suites[0]);
|
|
|
|
|
|
- if (req->crypto.n_ciphers_pairwise) {
|
|
|
+ if (req->crypto.n_ciphers_pairwise)
|
|
|
hdd_populate_crypto_cipher_type(req->crypto.ciphers_pairwise[0],
|
|
|
vdev,
|
|
|
WLAN_CRYPTO_PARAM_UCAST_CIPHER);
|
|
|
- } else {
|
|
|
- /* Reset previous cipher suite to none */
|
|
|
- hdd_populate_crypto_cipher_type(0, vdev,
|
|
|
- WLAN_CRYPTO_PARAM_UCAST_CIPHER);
|
|
|
- }
|
|
|
|
|
|
- hdd_populate_crypto_cipher_type(req->crypto.cipher_group,
|
|
|
- vdev,
|
|
|
- WLAN_CRYPTO_PARAM_MCAST_CIPHER);
|
|
|
+ if (req->crypto.cipher_group)
|
|
|
+ hdd_populate_crypto_cipher_type(req->crypto.cipher_group,
|
|
|
+ vdev,
|
|
|
+ WLAN_CRYPTO_PARAM_MCAST_CIPHER);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -18852,18 +18800,16 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- hdd_debug("IE[0x%X], LEN[%d]", elementId, eLen);
|
|
|
-
|
|
|
switch (elementId) {
|
|
|
case DOT11F_EID_WPA:
|
|
|
if (4 > eLen) { /* should have at least OUI which is 4 bytes so extra 2 bytes not needed */
|
|
|
- hdd_err("Invalid WPA IE");
|
|
|
+ hdd_err("Invalid vendor ie");
|
|
|
return -EINVAL;
|
|
|
} else if (0 ==
|
|
|
memcmp(&genie[0], "\x00\x50\xf2\x04", 4)) {
|
|
|
uint16_t curAddIELen = assoc_add_ie->length;
|
|
|
|
|
|
- hdd_debug("Set WPS IE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("WPS IE(len %d)", eLen + 2);
|
|
|
|
|
|
if (SIR_MAC_MAX_ADD_IE_LENGTH <
|
|
|
(assoc_add_ie->length + eLen)) {
|
|
@@ -18888,7 +18834,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
QDF_ASSERT(0);
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
- hdd_debug("Set WPA IE (len %d)", eLen + 2);
|
|
|
+ hdd_debug("WPA IE (len %d)", eLen + 2);
|
|
|
memset(security_ie, 0, WLAN_MAX_IE_LEN);
|
|
|
memcpy(security_ie, genie - 2, (eLen + 2));
|
|
|
roam_profile->pWPAReqIE = security_ie;
|
|
@@ -18897,7 +18843,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
P2P_OUI_TYPE_SIZE))) {
|
|
|
uint16_t curAddIELen =
|
|
|
assoc_add_ie->length;
|
|
|
- hdd_debug("Set P2P IE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("P2P IE(len %d)", eLen + 2);
|
|
|
|
|
|
if (SIR_MAC_MAX_ADD_IE_LENGTH <
|
|
|
(assoc_add_ie->length + eLen)) {
|
|
@@ -18923,7 +18869,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
adapter->device_mode)) {
|
|
|
uint16_t curAddIELen =
|
|
|
assoc_add_ie->length;
|
|
|
- hdd_debug("Set WFD IE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("WFD IE(len %d)", eLen + 2);
|
|
|
|
|
|
if (SIR_MAC_MAX_ADD_IE_LENGTH <
|
|
|
(assoc_add_ie->length + eLen)) {
|
|
@@ -18950,7 +18896,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
HS20_OUI_TYPE_SIZE))) {
|
|
|
uint16_t curAddIELen =
|
|
|
assoc_add_ie->length;
|
|
|
- hdd_debug("Set HS20 IE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("HS20 IE(len %d)", eLen + 2);
|
|
|
|
|
|
if (SIR_MAC_MAX_ADD_IE_LENGTH <
|
|
|
(assoc_add_ie->length + eLen)) {
|
|
@@ -18972,7 +18918,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
OSEN_OUI_TYPE_SIZE))) {
|
|
|
uint16_t curAddIELen =
|
|
|
assoc_add_ie->length;
|
|
|
- hdd_debug("Set OSEN IE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("OSEN IE(len %d)", eLen + 2);
|
|
|
|
|
|
if (SIR_MAC_MAX_ADD_IE_LENGTH <
|
|
|
(assoc_add_ie->length + eLen)) {
|
|
@@ -19000,7 +18946,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
uint16_t add_ie_len =
|
|
|
assoc_add_ie->length;
|
|
|
|
|
|
- hdd_debug("Set OSEN IE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("Additional IE(len %d)", eLen + 2);
|
|
|
|
|
|
if (SIR_MAC_MAX_ADD_IE_LENGTH <
|
|
|
(assoc_add_ie->length + eLen)) {
|
|
@@ -19029,7 +18975,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
memcpy(security_ie, genie - 2, (eLen + 2));
|
|
|
roam_profile->pRSNReqIE = security_ie;
|
|
|
roam_profile->nRSNReqIELength = eLen + 2; /* ie_len; */
|
|
|
- hdd_debug("Set RSN IE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("RSN IE(len %d)", eLen + 2);
|
|
|
break;
|
|
|
/*
|
|
|
* Appending Extended Capabilities with Interworking bit set
|
|
@@ -19046,7 +18992,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
{
|
|
|
uint16_t curAddIELen =
|
|
|
assoc_add_ie->length;
|
|
|
- hdd_debug("Set Extended CAPS IE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("Extended CAPS IE(len %d)", eLen + 2);
|
|
|
|
|
|
if (SIR_MAC_MAX_ADD_IE_LENGTH <
|
|
|
(assoc_add_ie->length + eLen)) {
|
|
@@ -19113,7 +19059,8 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
#endif
|
|
|
case DOT11F_EID_SUPPOPERATINGCLASSES:
|
|
|
{
|
|
|
- hdd_debug("Set Supported Operating Classes IE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("Supported Operating Classes IE(len %d)",
|
|
|
+ eLen + 2);
|
|
|
status = wlan_hdd_add_assoc_ie(adapter,
|
|
|
genie - 2, eLen + 2);
|
|
|
if (status)
|
|
@@ -19123,7 +19070,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
case WLAN_REQUEST_IE_MAX_LEN:
|
|
|
{
|
|
|
if (genie[0] == SIR_FILS_HLP_EXT_EID) {
|
|
|
- hdd_debug("Set HLP EXT IE(len %d)",
|
|
|
+ hdd_debug("HLP EXT IE(len %d)",
|
|
|
eLen + 2);
|
|
|
wlan_hdd_save_hlp_ie(roam_profile,
|
|
|
genie - 2, eLen + 2,
|
|
@@ -19135,7 +19082,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
return status;
|
|
|
} else if (genie[0] ==
|
|
|
SIR_DH_PARAMETER_ELEMENT_EXT_EID) {
|
|
|
- hdd_debug("Set DH EXT IE(len %d)",
|
|
|
+ hdd_debug("DH EXT IE(len %d)",
|
|
|
eLen + 2);
|
|
|
status = wlan_hdd_add_assoc_ie(
|
|
|
adapter, genie - 2,
|
|
@@ -19149,7 +19096,7 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
}
|
|
|
case DOT11F_EID_FRAGMENT_IE:
|
|
|
{
|
|
|
- hdd_debug("Set Fragment IE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("Fragment IE(len %d)", eLen + 2);
|
|
|
wlan_hdd_save_hlp_ie(roam_profile,
|
|
|
genie - 2, eLen + 2,
|
|
|
false);
|
|
@@ -19160,14 +19107,14 @@ static int wlan_hdd_cfg80211_set_ie(struct hdd_adapter *adapter,
|
|
|
break;
|
|
|
}
|
|
|
case WLAN_ELEMID_RSNXE:
|
|
|
- hdd_debug("Set RSNXE(len %d)", eLen + 2);
|
|
|
+ hdd_debug("RSNXE(len %d)", eLen + 2);
|
|
|
status = wlan_hdd_add_assoc_ie(adapter, genie - 2,
|
|
|
eLen + 2);
|
|
|
if (status)
|
|
|
return status;
|
|
|
break;
|
|
|
default:
|
|
|
- hdd_err("Set UNKNOWN IE: %X", elementId);
|
|
|
+ hdd_err("UNKNOWN IE: %X", elementId);
|
|
|
/* when Unknown IE is received we break
|
|
|
* and continue to the next IE in the buffer
|
|
|
*/
|
|
@@ -19722,12 +19669,8 @@ static int wlan_hdd_cfg80211_set_privacy(struct hdd_adapter *adapter,
|
|
|
struct csr_roam_profile *roam_profile;
|
|
|
struct wlan_objmgr_vdev *vdev;
|
|
|
|
|
|
- hdd_enter();
|
|
|
-
|
|
|
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
|
|
sta_ctx->wpa_versions = req->crypto.wpa_versions;
|
|
|
- hdd_debug("set wpa version to %d", sta_ctx->wpa_versions);
|
|
|
-
|
|
|
roam_profile = hdd_roam_profile(adapter);
|
|
|
|
|
|
/* populate auth,akm and cipher params for crypto */
|
|
@@ -19946,12 +19889,17 @@ static void wlan_hdd_wait_for_roaming(mac_handle_t mac_handle,
|
|
|
{
|
|
|
struct hdd_context *hdd_ctx;
|
|
|
unsigned long rc;
|
|
|
+ struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
|
|
|
|
|
if (adapter->device_mode != QDF_STA_MODE)
|
|
|
return;
|
|
|
|
|
|
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
- hdd_debug("Stop firmware roaming");
|
|
|
+
|
|
|
+ /* Return if not in connected state */
|
|
|
+ if (sta_ctx->conn_info.conn_state != eConnectionState_Associated)
|
|
|
+ return;
|
|
|
+
|
|
|
sme_stop_roaming(mac_handle, adapter->vdev_id,
|
|
|
REASON_DRIVER_DISABLED,
|
|
|
RSO_INVALID_REQUESTOR);
|
|
@@ -20038,10 +19986,10 @@ static int wlan_hdd_reassoc_bssid_hint(struct hdd_adapter *adapter,
|
|
|
|
|
|
status = hdd_reassoc(adapter, bssid, ch_freq,
|
|
|
CONNECT_CMD_USERSPACE);
|
|
|
- if (QDF_IS_STATUS_ERROR(status))
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
hdd_set_roaming_in_progress(false);
|
|
|
-
|
|
|
- hdd_debug("hdd_reassoc: status: %d", status);
|
|
|
+ hdd_debug("Failed with status: %d", status);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return status;
|
|
@@ -20088,9 +20036,8 @@ wlan_hdd_check_ht20_ht40_ind(struct hdd_context *hdd_ctx,
|
|
|
!(req->ht_capa.cap_info & IEEE80211_HT_CAP_SUP_WIDTH_20_40))
|
|
|
roam_profile->force_24ghz_in_ht20 = true;
|
|
|
|
|
|
- hdd_debug("req->ht_capa.cap_info %x override_ht20_40_24g %d",
|
|
|
- req->ht_capa.cap_info,
|
|
|
- is_override_ht20_40_24g);
|
|
|
+ if (is_override_ht20_40_24g)
|
|
|
+ hdd_nofl_debug("HT cap %x", req->ht_capa.cap_info);
|
|
|
}
|
|
|
#else
|
|
|
static inline void
|
|
@@ -20106,6 +20053,35 @@ wlan_hdd_check_ht20_ht40_ind(struct hdd_context *hdd_ctx,
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
+static inline void hdd_dump_connect_req(struct hdd_adapter *adapter,
|
|
|
+ struct net_device *ndev,
|
|
|
+ struct cfg80211_connect_params *req)
|
|
|
+{
|
|
|
+ uint32_t i;
|
|
|
+
|
|
|
+ hdd_nofl_debug("cfg80211_connect req for %s(vdevid-%d): mode %d freq %d SSID %.*s auth type %d WPA ver %d n_akm %d n_cipher %d grp_cipher %x mfp %d freq hint %d",
|
|
|
+ ndev->name, adapter->vdev_id, adapter->device_mode,
|
|
|
+ req->channel ? req->channel->center_freq : 0,
|
|
|
+ (int)req->ssid_len, req->ssid, req->auth_type,
|
|
|
+ req->crypto.wpa_versions,
|
|
|
+ req->crypto.n_akm_suites, req->crypto.n_ciphers_pairwise,
|
|
|
+ req->crypto.cipher_group, req->mfp,
|
|
|
+ req->channel_hint ? req->channel_hint->center_freq : 0);
|
|
|
+ if (req->bssid)
|
|
|
+ hdd_nofl_debug("BSSID %pM", req->bssid);
|
|
|
+ if (req->bssid_hint)
|
|
|
+ hdd_nofl_debug("BSSID hint %pM", req->bssid_hint);
|
|
|
+ if (req->prev_bssid)
|
|
|
+ hdd_nofl_debug("prev BSSID %pM", req->prev_bssid);
|
|
|
+
|
|
|
+ for (i = 0; i < req->crypto.n_akm_suites; i++)
|
|
|
+ hdd_nofl_debug("akm[%d] = %x", i, req->crypto.akm_suites[i]);
|
|
|
+
|
|
|
+ for (i = 0; i < req->crypto.n_ciphers_pairwise; i++)
|
|
|
+ hdd_nofl_debug("cipher_pairwise[%d] = %x", i,
|
|
|
+ req->crypto.ciphers_pairwise[i]);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* __wlan_hdd_cfg80211_connect() - cfg80211 connect api
|
|
|
* @wiphy: Pointer to wiphy
|
|
@@ -20145,10 +20121,6 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|
|
TRACE_CODE_HDD_CFG80211_CONNECT,
|
|
|
adapter->vdev_id, adapter->device_mode);
|
|
|
|
|
|
- hdd_debug("%s(vdevid-%d): Device_mode %s(%d)",
|
|
|
- ndev->name, adapter->vdev_id,
|
|
|
- qdf_opmode_str(adapter->device_mode), adapter->device_mode);
|
|
|
-
|
|
|
if (adapter->device_mode != QDF_STA_MODE &&
|
|
|
adapter->device_mode != QDF_P2P_CLIENT_MODE) {
|
|
|
hdd_err("Device_mode %s(%d) is not supported",
|
|
@@ -20167,6 +20139,19 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|
|
if (0 != status)
|
|
|
return status;
|
|
|
|
|
|
+ if (req->bssid)
|
|
|
+ bssid = req->bssid;
|
|
|
+ else if (bssid_hint)
|
|
|
+ bssid = bssid_hint;
|
|
|
+
|
|
|
+ if (bssid && hdd_get_adapter_by_macaddr(hdd_ctx, (uint8_t *)bssid)) {
|
|
|
+ hdd_err("adapter exist with same mac address " QDF_MAC_ADDR_STR,
|
|
|
+ QDF_MAC_ADDR_ARRAY(bssid));
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ hdd_dump_connect_req(adapter, ndev, req);
|
|
|
+
|
|
|
/*
|
|
|
* Disable NAN Discovery if incoming connection is P2P or if a STA
|
|
|
* connection already exists and if this is a case of STA+STA
|
|
@@ -20189,17 +20174,6 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|
|
*/
|
|
|
ucfg_nan_check_and_disable_unsupported_ndi(hdd_ctx->psoc, false);
|
|
|
|
|
|
- if (req->bssid)
|
|
|
- bssid = req->bssid;
|
|
|
- else if (bssid_hint)
|
|
|
- bssid = bssid_hint;
|
|
|
-
|
|
|
- if (bssid && hdd_get_adapter_by_macaddr(hdd_ctx, (uint8_t *)bssid)) {
|
|
|
- hdd_err("adapter exist with same mac address " QDF_MAC_ADDR_STR,
|
|
|
- QDF_MAC_ADDR_ARRAY(bssid));
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
/*
|
|
|
* In STA + STA roaming scenario, connection to same ssid but different
|
|
|
* bssid is allowed on both vdevs. So there could be a race where the
|
|
@@ -20235,71 +20209,11 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|
|
|
|
|
/*initialise security parameters */
|
|
|
status = wlan_hdd_cfg80211_set_privacy(adapter, req);
|
|
|
-
|
|
|
if (status < 0) {
|
|
|
hdd_err("Failed to set security params");
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- * Check for max concurrent connections after doing disconnect if any,
|
|
|
- * must be called after the invocation of wlan_hdd_cfg80211_set_privacy
|
|
|
- * so privacy is already set for the current adapter before it's
|
|
|
- * checked against concurrency.
|
|
|
- */
|
|
|
- if (req->channel) {
|
|
|
- bool ok = false;
|
|
|
-
|
|
|
- if (req->channel->center_freq && policy_mgr_is_chan_ok_for_dnbs(
|
|
|
- hdd_ctx->psoc,
|
|
|
- req->channel->center_freq,
|
|
|
- &ok)) {
|
|
|
- hdd_warn("Unable to get ch freq:%d eligibility for DNBS",
|
|
|
- req->channel->center_freq);
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
- /**
|
|
|
- * Send connection timedout, so that Android framework does not
|
|
|
- * blacklist us.
|
|
|
- */
|
|
|
- if (!ok) {
|
|
|
- struct ieee80211_channel *chan = ieee80211_get_channel(
|
|
|
- wiphy, req->channel->center_freq);
|
|
|
- struct cfg80211_bss *bss;
|
|
|
-
|
|
|
- hdd_warn("Ch freq:%d not OK for DNBS",
|
|
|
- req->channel->center_freq);
|
|
|
- if (chan) {
|
|
|
- bss = wlan_cfg80211_get_bss(wiphy, chan,
|
|
|
- req->bssid,
|
|
|
- req->ssid,
|
|
|
- req->ssid_len);
|
|
|
- if (bss) {
|
|
|
- cfg80211_assoc_timeout(ndev, bss);
|
|
|
- return -ETIMEDOUT;
|
|
|
- }
|
|
|
- }
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- if (!policy_mgr_allow_concurrency(hdd_ctx->psoc,
|
|
|
- policy_mgr_convert_device_mode_to_qdf_type(
|
|
|
- adapter->device_mode),
|
|
|
- req->channel->center_freq, HW_MODE_20_MHZ)) {
|
|
|
- hdd_warn("This concurrency combination is not allowed");
|
|
|
- status = -ECONNREFUSED;
|
|
|
- goto con_chk_failed;
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (!policy_mgr_allow_concurrency(hdd_ctx->psoc,
|
|
|
- policy_mgr_convert_device_mode_to_qdf_type(
|
|
|
- adapter->device_mode), 0, HW_MODE_20_MHZ)) {
|
|
|
- hdd_warn("This concurrency combination is not allowed");
|
|
|
- status = -ECONNREFUSED;
|
|
|
- goto con_chk_failed;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if (req->channel)
|
|
|
ch_freq = req->channel->center_freq;
|
|
|
else
|
|
@@ -20310,14 +20224,13 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|
|
status = wlan_hdd_cfg80211_connect_start(adapter, req->ssid,
|
|
|
req->ssid_len, req->bssid,
|
|
|
bssid_hint, ch_freq, 0);
|
|
|
- if (0 > status)
|
|
|
+ if (status) {
|
|
|
+ wlan_hdd_cfg80211_clear_privacy(adapter);
|
|
|
hdd_err("connect failed");
|
|
|
+ }
|
|
|
|
|
|
- return status;
|
|
|
-
|
|
|
-con_chk_failed:
|
|
|
- wlan_hdd_cfg80211_clear_privacy(adapter);
|
|
|
hdd_exit();
|
|
|
+
|
|
|
return status;
|
|
|
}
|
|
|
|