Revert "qcacld-3.0: Allow Re-assoc to same AP only in open security mode"

Change-Id I35d802f564e41ee0b30386ee7b74d2b44eb80ecf

Revert this change to allow re-association to same AP which is
required for HS certification.

Change-Id: I75114b5e36b4ce6def602b9054481845ac09c56a
CRs-Fixed: 936342
This commit is contained in:
Deepak Dhamdhere 2016-06-24 18:30:02 +05:30 • committed by Vishwajith Upendra
commit 5fda0e46fb
2 changed files with 29 additions and 26 deletions

View file

@ -4428,6 +4428,13 @@ static int drv_cmd_fast_reassoc(hdd_adapter_t *adapter,
goto exit;
}
/* Check channel number is a valid channel number */
if (QDF_STATUS_SUCCESS !=
wlan_hdd_validate_operation_channel(adapter, channel)) {
hdd_err("Invalid Channel [%d]", channel);
return -EINVAL;
}
/*
* if the target bssid is same as currently associated AP,
* issue reassoc to same AP
@ -4435,26 +4442,20 @@ static int drv_cmd_fast_reassoc(hdd_adapter_t *adapter,
if (true != qdf_mem_cmp(targetApBssid,
pHddStaCtx->conn_info.bssId.bytes,
QDF_MAC_ADDR_SIZE)) {
/* Reassoc to same AP, only supported for Open Security*/
if ((pHddStaCtx->conn_info.ucEncryptionType ||
pHddStaCtx->conn_info.mcEncryptionType)) {
hdd_err("Reassoc to same AP, only supported for Open Security");
return -ENOTSUPP;
}
hdd_info("Reassoc BSSID is same as currently associated AP bssid");
sme_get_modify_profile_fields(hdd_ctx->hHal, adapter->sessionId,
if (roaming_offload_enabled(hdd_ctx)) {
hdd_wma_send_fastreassoc_cmd((int)adapter->sessionId,
targetApBssid, (int)channel);
} else {
sme_get_modify_profile_fields(hdd_ctx->hHal,
adapter->sessionId,
&modProfileFields);
sme_roam_reassoc(hdd_ctx->hHal, adapter->sessionId,
NULL, modProfileFields, &roamId, 1);
sme_roam_reassoc(hdd_ctx->hHal, adapter->sessionId,
NULL, modProfileFields, &roamId, 1);
}
return 0;
}
/* Check channel number is a valid channel number */
if (QDF_STATUS_SUCCESS !=
wlan_hdd_validate_operation_channel(adapter, channel)) {
hdd_err("Invalid Channel [%d]", channel);
return -EINVAL;
}
if (roaming_offload_enabled(hdd_ctx)) {
hdd_wma_send_fastreassoc_cmd((int)adapter->sessionId,
targetApBssid, (int)channel);

View file

@ -7567,22 +7567,24 @@ static int __iw_setnone_getnone(struct net_device *dev,
{
hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter);
tSirMacAddr bssid;
uint32_t roamId = 0;
uint8_t operating_ch =
adapter->sessionCtx.station.conn_info.operationChannel;
tCsrRoamModifyProfileFields modProfileFields;
hdd_station_ctx_t *hdd_sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
/* Reassoc to same AP, only supported for Open Security*/
if ((hdd_sta_ctx->conn_info.ucEncryptionType ||
hdd_sta_ctx->conn_info.mcEncryptionType)) {
hdd_err("Reassoc to same AP, only supported for Open Security");
return -ENOTSUPP;
}
sme_get_modify_profile_fields(hHal, adapter->sessionId,
&modProfileFields);
sme_roam_reassoc(hHal, adapter->sessionId,
NULL, modProfileFields, &roamId, 1);
if (roaming_offload_enabled(hdd_ctx)) {
qdf_mem_copy(bssid,
&adapter->sessionCtx.station.conn_info.bssId,
sizeof(bssid));
hdd_wma_send_fastreassoc_cmd((int)adapter->sessionId,
bssid, operating_ch);
} else {
sme_roam_reassoc(hdd_ctx->hHal, adapter->sessionId,
NULL, modProfileFields, &roamId, 1);
}
return 0;
}