qcacld-3.0: Rename pHddStaCtx

The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename pHddStaCtx to align with the Coding
Style.

Change-Id: I508816b354eb592305cb238f7604ef39586c19b2
CRs-Fixed: 2121162
This commit is contained in:
Jeff Johnson 2017-10-04 10:32:42 -07:00 • committed by Nandini Suresh
commit d377dce175
12 changed files with 424 additions and 423 deletions

View file

@ -226,20 +226,20 @@ bool hdd_is_connecting(struct hdd_station_ctx *hdd_sta_ctx);
/**
* hdd_conn_is_connected() - Function to check connection status
* @pHddStaCtx: pointer to global HDD Station context
* @sta_ctx: pointer to global HDD Station context
*
* Return: false if any errors encountered, true otherwise
*/
bool hdd_conn_is_connected(struct hdd_station_ctx *pHddStaCtx);
bool hdd_conn_is_connected(struct hdd_station_ctx *sta_ctx);
/**
* hdd_conn_get_connected_band() - get current connection radio band
* @pHddStaCtx: pointer to global HDD Station context
* @sta_ctx: pointer to global HDD Station context
*
* Return: BAND_2G or BAND_5G based on current AP connection
* BAND_ALL if not connected
*/
enum band_info hdd_conn_get_connected_band(struct hdd_station_ctx *pHddStaCtx);
enum band_info hdd_conn_get_connected_band(struct hdd_station_ctx *sta_ctx);
/**
* hdd_sme_roam_callback() - hdd sme roam callback

View file

@ -43,6 +43,7 @@
#define pAdapter
#define pHostapdAdapter
#define pHddApCtx
#define pHddStaCtx
#define pHostapdState
/*

File diff suppressed because it is too large Load diff

View file

@ -13230,7 +13230,7 @@ void wlan_hdd_cfg80211_set_key_wapi(struct hdd_adapter *adapter, uint8_t key_ind
const uint8_t *mac_addr, const uint8_t *key,
int key_Len)
{
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
tCsrRoamSetKey setKey;
bool isConnected = true;
int status = 0;
@ -13257,14 +13257,14 @@ void wlan_hdd_cfg80211_set_key_wapi(struct hdd_adapter *adapter, uint8_t key_ind
hdd_debug("WAPI KEY LENGTH:0x%04x", key_Len);
pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY;
sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY;
if (isConnected) {
status = sme_roam_set_key(WLAN_HDD_GET_HAL_CTX(adapter),
adapter->sessionId, &setKey, &roamId);
}
if (status != 0) {
hdd_err("sme_roam_set_key failed status: %d", status);
pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_NONE;
sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_NONE;
}
}
#endif /* FEATURE_WLAN_WAPI */
@ -13804,7 +13804,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy,
QDF_STATUS status = QDF_STATUS_SUCCESS;
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_context *hdd_ctx;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
struct qdf_mac_addr STAMacAddress;
int ret;
@ -13829,7 +13829,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy,
if (0 != ret)
return ret;
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
qdf_mem_copy(STAMacAddress.bytes, mac, QDF_MAC_ADDR_SIZE);
@ -14106,12 +14106,12 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
(adapter->device_mode == QDF_P2P_CLIENT_MODE)) {
struct hdd_wext_state *pWextState =
WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (!pairwise) {
/* set group key */
if (pHddStaCtx->roam_info.deferKeyComplete) {
if (sta_ctx->roam_info.deferKeyComplete) {
hdd_debug("%s- %d: Perform Set key Complete",
__func__, __LINE__);
hdd_perform_roam_set_key_complete(adapter);
@ -14127,7 +14127,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
KeyMaterial[key_index][0], params->key,
params->key_len);
pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY;
sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY;
hdd_debug("Set key for peerMac "MAC_ADDRESS_STR" direction %d",
MAC_ADDR_ARRAY(setKey.peerMac.bytes),
@ -14153,7 +14153,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
if (0 != status) {
hdd_err("sme_roam_set_key failed, status: %d", status);
pHddStaCtx->roam_info.roamingState =
sta_ctx->roam_info.roamingState =
HDD_ROAM_STATE_NONE;
return -EINVAL;
}
@ -14169,7 +14169,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
!((IW_AUTH_KEY_MGMT_802_1X ==
(pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X))
&& (eCSR_AUTH_TYPE_OPEN_SYSTEM ==
pHddStaCtx->conn_info.authType)
sta_ctx->conn_info.authType)
)
&& ((WLAN_CIPHER_SUITE_WEP40 == params->cipher)
|| (WLAN_CIPHER_SUITE_WEP104 == params->cipher)
@ -14188,7 +14188,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
if (0 != status) {
hdd_err("sme_roam_set_key failed for group key (IBSS), returned %d", status);
pHddStaCtx->roam_info.roamingState =
sta_ctx->roam_info.roamingState =
HDD_ROAM_STATE_NONE;
return -EINVAL;
}
@ -14400,7 +14400,7 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(ndev);
struct hdd_wext_state *pWextState =
WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_context *hdd_ctx;
int status;
@ -14439,15 +14439,15 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
if ((adapter->device_mode == QDF_STA_MODE) ||
(adapter->device_mode == QDF_P2P_CLIENT_MODE)) {
if ((eCSR_ENCRYPT_TYPE_TKIP !=
pHddStaCtx->conn_info.ucEncryptionType) &&
sta_ctx->conn_info.ucEncryptionType) &&
!hdd_is_wapi_enc_type(
pHddStaCtx->conn_info.ucEncryptionType) &&
sta_ctx->conn_info.ucEncryptionType) &&
(eCSR_ENCRYPT_TYPE_AES !=
pHddStaCtx->conn_info.ucEncryptionType) &&
sta_ctx->conn_info.ucEncryptionType) &&
(eCSR_ENCRYPT_TYPE_AES_GCMP !=
pHddStaCtx->conn_info.ucEncryptionType) &&
sta_ctx->conn_info.ucEncryptionType) &&
(eCSR_ENCRYPT_TYPE_AES_GCMP_256 !=
pHddStaCtx->conn_info.ucEncryptionType)) {
sta_ctx->conn_info.ucEncryptionType)) {
/* If default key index is not same as previous one,
* then update the default key index
*/
@ -14470,7 +14470,7 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
setKey.keyDirection = eSIR_TX_RX;
qdf_copy_macaddr(&setKey.peerMac,
&pHddStaCtx->conn_info.bssId);
&sta_ctx->conn_info.bssId);
if (Keys->KeyLength[key_index] == CSR_WEP40_KEY_LEN &&
pWextState->roamProfile.EncryptionType.
@ -15386,9 +15386,9 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
sizeof(hdd_sta_ctx->conn_info.conn_flag));
if (pRoamProfile) {
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
/* Restart the opportunistic timer
*
@ -15700,46 +15700,46 @@ static int wlan_hdd_cfg80211_set_auth_type(struct hdd_adapter *adapter,
{
struct hdd_wext_state *pWextState =
WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
/*set authentication type */
switch (auth_type) {
case NL80211_AUTHTYPE_AUTOMATIC:
hdd_debug("set authentication type to AUTOSWITCH");
pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_AUTOSWITCH;
sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_AUTOSWITCH;
break;
case NL80211_AUTHTYPE_OPEN_SYSTEM:
case NL80211_AUTHTYPE_FT:
hdd_debug("set authentication type to OPEN");
pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
break;
case NL80211_AUTHTYPE_SHARED_KEY:
hdd_debug("set authentication type to SHARED");
pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_SHARED_KEY;
sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_SHARED_KEY;
break;
#ifdef FEATURE_WLAN_ESE
case NL80211_AUTHTYPE_NETWORK_EAP:
hdd_debug("set authentication type to CCKM WPA");
pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_CCKM_WPA;
sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_CCKM_WPA;
break;
#endif
#if defined(WLAN_FEATURE_FILS_SK) && defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT)
case NL80211_AUTHTYPE_FILS_SK:
hdd_notice("set authentication type to FILS SHARED");
pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
break;
#endif
default:
hdd_err("Unsupported authentication type: %d", auth_type);
pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_UNKNOWN;
sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_UNKNOWN;
return -EINVAL;
}
pWextState->roamProfile.AuthType.authType[0] =
pHddStaCtx->conn_info.authType;
sta_ctx->conn_info.authType;
return 0;
}
@ -15890,7 +15890,7 @@ static int wlan_hdd_cfg80211_set_cipher(struct hdd_adapter *adapter,
eCsrEncryptionType encryptionType = eCSR_ENCRYPT_TYPE_NONE;
struct hdd_wext_state *pWextState =
WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (!cipher) {
@ -15949,13 +15949,13 @@ static int wlan_hdd_cfg80211_set_cipher(struct hdd_adapter *adapter,
if (ucast) {
hdd_debug("setting unicast cipher type to %d", encryptionType);
pHddStaCtx->conn_info.ucEncryptionType = encryptionType;
sta_ctx->conn_info.ucEncryptionType = encryptionType;
pWextState->roamProfile.EncryptionType.numEntries = 1;
pWextState->roamProfile.EncryptionType.encryptionType[0] =
encryptionType;
} else {
hdd_debug("setting mcast cipher type to %d", encryptionType);
pHddStaCtx->conn_info.mcEncryptionType = encryptionType;
sta_ctx->conn_info.mcEncryptionType = encryptionType;
pWextState->roamProfile.mcEncryptionType.numEntries = 1;
pWextState->roamProfile.mcEncryptionType.encryptionType[0] =
encryptionType;
@ -16605,11 +16605,11 @@ static int wlan_hdd_cfg80211_set_privacy(struct hdd_adapter *adapter,
int wlan_hdd_try_disconnect(struct hdd_adapter *adapter)
{
unsigned long rc;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
int status, result = 0;
tHalHandle hal;
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
hal = WLAN_HDD_GET_HAL_CTX(adapter);
if (adapter->device_mode == QDF_STA_MODE) {
sme_indicate_disconnect_inprogress(hal, adapter->sessionId);
@ -16639,9 +16639,9 @@ int wlan_hdd_try_disconnect(struct hdd_adapter *adapter)
}
if ((QDF_IBSS_MODE == adapter->device_mode) ||
(eConnectionState_Associated == pHddStaCtx->conn_info.connState) ||
(eConnectionState_Connecting == pHddStaCtx->conn_info.connState) ||
(eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState)) {
(eConnectionState_Associated == sta_ctx->conn_info.connState) ||
(eConnectionState_Connecting == sta_ctx->conn_info.connState) ||
(eConnectionState_IbssConnected == sta_ctx->conn_info.connState)) {
hdd_conn_set_connection_state(adapter,
eConnectionState_Disconnecting);
/* Issue disconnect to CSR */
@ -16661,7 +16661,7 @@ int wlan_hdd_try_disconnect(struct hdd_adapter *adapter)
} else if (0 != status) {
hdd_err("sme_roam_disconnect failure, status: %d",
(int)status);
pHddStaCtx->staDebugState = status;
sta_ctx->staDebugState = status;
result = -EINVAL;
goto disconnected;
}
@ -16671,16 +16671,16 @@ int wlan_hdd_try_disconnect(struct hdd_adapter *adapter)
msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
if (!rc && (QDF_STATUS_CMD_NOT_QUEUED != status)) {
hdd_err("Sme disconnect event timed out session Id: %d staDebugState: %d",
adapter->sessionId, pHddStaCtx->staDebugState);
adapter->sessionId, sta_ctx->staDebugState);
result = -ETIMEDOUT;
}
} else if (eConnectionState_Disconnecting ==
pHddStaCtx->conn_info.connState) {
sta_ctx->conn_info.connState) {
rc = wait_for_completion_timeout(&adapter->disconnect_comp_var,
msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
if (!rc) {
hdd_err("Disconnect event timed out session Id: %d staDebugState: %d",
adapter->sessionId, pHddStaCtx->staDebugState);
adapter->sessionId, sta_ctx->staDebugState);
result = -ETIMEDOUT;
}
}
@ -16997,7 +16997,7 @@ static int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason)
{
int status, result = 0;
unsigned long rc;
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
eConnectionState prev_conn_state;
tHalHandle hal = WLAN_HDD_GET_HAL_CTX(adapter);
@ -17040,7 +17040,7 @@ static int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason)
}
}
prev_conn_state = pHddStaCtx->conn_info.connState;
prev_conn_state = sta_ctx->conn_info.connState;
/*stop tx queues */
hdd_info("Disabling queues");
wlan_hdd_netif_queue_control(adapter,
@ -17069,7 +17069,7 @@ static int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason)
hdd_debug("Already disconnected or connect was in sme/roam pending list and removed by disconnect");
} else if (0 != status) {
hdd_err("csr_roam_disconnect failure, status: %d", (int)status);
pHddStaCtx->staDebugState = status;
sta_ctx->staDebugState = status;
result = -EINVAL;
goto disconnected;
}
@ -17175,7 +17175,7 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
int status;
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
@ -17204,8 +17204,8 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
return status;
/* Issue disconnect request to SME, if station is in connected state */
if ((pHddStaCtx->conn_info.connState == eConnectionState_Associated) ||
(pHddStaCtx->conn_info.connState == eConnectionState_Connecting)) {
if ((sta_ctx->conn_info.connState == eConnectionState_Associated) ||
(sta_ctx->conn_info.connState == eConnectionState_Connecting)) {
eCsrRoamDisconnectReason reasonCode =
eCSR_DISCONNECT_REASON_UNSPECIFIED;
struct hdd_scan_info *pScanInfo;
@ -17265,7 +17265,7 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
}
} else {
hdd_err("Unexpected cfg disconnect called while in state: %d",
pHddStaCtx->conn_info.connState);
sta_ctx->conn_info.connState);
}
return status;
@ -17308,14 +17308,14 @@ static int wlan_hdd_cfg80211_set_privacy_ibss(struct hdd_adapter *adapter,
struct hdd_wext_state *pWextState =
WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
eCsrEncryptionType encryptionType = eCSR_ENCRYPT_TYPE_NONE;
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
ENTER();
pWextState->wpaVersion = IW_AUTH_WPA_VERSION_DISABLED;
qdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey));
pHddStaCtx->ibss_enc_key_installed = 0;
qdf_mem_zero(&sta_ctx->ibss_enc_key, sizeof(tCsrRoamSetKey));
sta_ctx->ibss_enc_key_installed = 0;
if (params->ie_len && (NULL != params->ie)) {
if (wlan_get_ie_ptr_from_eid(WLAN_EID_RSN, params->ie,
@ -17363,7 +17363,7 @@ static int wlan_hdd_cfg80211_set_privacy_ibss(struct hdd_adapter *adapter,
}
pWextState->roamProfile.AuthType.authType[0] =
pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
if (params->privacy) {
/* Security enabled IBSS, At this time there is no information
@ -17377,7 +17377,7 @@ static int wlan_hdd_cfg80211_set_privacy_ibss(struct hdd_adapter *adapter,
encryptionType = eCSR_ENCRYPT_TYPE_WEP40_STATICKEY;
}
hdd_debug("encryptionType=%d", encryptionType);
pHddStaCtx->conn_info.ucEncryptionType = encryptionType;
sta_ctx->conn_info.ucEncryptionType = encryptionType;
pWextState->roamProfile.EncryptionType.numEntries = 1;
pWextState->roamProfile.EncryptionType.encryptionType[0] =
encryptionType;
@ -17403,7 +17403,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
tCsrRoamProfile *pRoamProfile;
int status;
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct qdf_mac_addr bssid;
@ -17544,9 +17544,9 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
/* Set the Operational Channel */
hdd_debug("set channel %d", channelNum);
pRoamProfile->ChannelInfo.numOfChannels = 1;
pHddStaCtx->conn_info.operationChannel = channelNum;
sta_ctx->conn_info.operationChannel = channelNum;
pRoamProfile->ChannelInfo.ChannelList =
&pHddStaCtx->conn_info.operationChannel;
&sta_ctx->conn_info.operationChannel;
}
/* Initialize security parameters */
@ -17560,7 +17560,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
status = wlan_hdd_cfg80211_connect_start(adapter, params->ssid,
params->ssid_len,
bssid.bytes, NULL,
pHddStaCtx->conn_info.
sta_ctx->conn_info.
operationChannel,
params->chandef.width);
@ -18613,7 +18613,7 @@ __wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy,
{
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
int status;
ENTER();
@ -18634,9 +18634,9 @@ __wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy,
MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_UPDATE_FT_IES,
adapter->sessionId, pHddStaCtx->conn_info.connState));
adapter->sessionId, sta_ctx->conn_info.connState));
/* Added for debug on reception of Re-assoc Req. */
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
hdd_err("Called with Ie of length = %zu when not associated",
ftie->ie_len);
hdd_err("Should be Re-assoc Req IEs");

View file

@ -6546,20 +6546,20 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
struct hdd_wext_state *pWextState =
WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
tCsrRoamProfile *pRoamProfile = &pWextState->roamProfile;
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (eConnectionState_IbssConnected ==
pHddStaCtx->conn_info.connState) {
sta_ctx->conn_info.connState) {
/* Link is up then return cant set channel */
hdd_err("IBSS Associated, can't set the channel");
return -EINVAL;
}
num_ch = pRoamProfile->ChannelInfo.numOfChannels = 1;
pHddStaCtx->conn_info.operationChannel = channel;
sta_ctx->conn_info.operationChannel = channel;
pRoamProfile->ChannelInfo.ChannelList =
&pHddStaCtx->conn_info.operationChannel;
&sta_ctx->conn_info.operationChannel;
} else if ((adapter->device_mode == QDF_SAP_MODE)
|| (adapter->device_mode == QDF_P2P_GO_MODE)
) {

View file

@ -830,7 +830,7 @@ void hdd_wma_send_fastreassoc_cmd(struct hdd_adapter *adapter,
int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
uint8_t channel, const handoff_src src)
{
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
int ret = 0;
@ -846,10 +846,10 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
return -EINVAL;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
/* if not associated, no need to proceed with reassoc */
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
hdd_warn("Not associated");
ret = -EINVAL;
goto exit;
@ -859,10 +859,10 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
* if the target bssid is same as currently associated AP,
* use the current connections's channel.
*/
if (!memcmp(bssid, pHddStaCtx->conn_info.bssId.bytes,
if (!memcmp(bssid, sta_ctx->conn_info.bssId.bytes,
QDF_MAC_ADDR_SIZE)) {
hdd_warn("Reassoc BSSID is same as currently associated AP bssid");
channel = pHddStaCtx->conn_info.operationChannel;
channel = sta_ctx->conn_info.operationChannel;
}
/* Check channel number is a valid channel number */
@ -1030,7 +1030,7 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid,
uint8_t *frame;
struct ieee80211_hdr_3addr *hdr;
u64 cookie;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
struct hdd_context *hdd_ctx;
tpSirMacVendorSpecificFrameHdr pVendorSpecific =
(tpSirMacVendorSpecificFrameHdr) payload;
@ -1045,11 +1045,11 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid,
return -EINVAL;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
/* if not associated, no need to send action frame */
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
hdd_warn("Not associated");
ret = -EINVAL;
goto exit;
@ -1059,7 +1059,7 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid,
* if the target bssid is different from currently associated AP,
* then no need to send action frame
*/
if (memcmp(bssid, pHddStaCtx->conn_info.bssId.bytes,
if (memcmp(bssid, sta_ctx->conn_info.bssId.bytes,
QDF_MAC_ADDR_SIZE)) {
hdd_warn("STA is not associated to this AP");
ret = -EINVAL;
@ -1079,10 +1079,10 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid,
*/
if (channel != 0) {
if (channel !=
pHddStaCtx->conn_info.operationChannel) {
sta_ctx->conn_info.operationChannel) {
hdd_warn("channel(%d) is different from operating channel(%d)",
channel,
pHddStaCtx->conn_info.
sta_ctx->conn_info.
operationChannel);
ret = -EINVAL;
goto exit;
@ -1103,7 +1103,7 @@ hdd_sendactionframe(struct hdd_adapter *adapter, const uint8_t *bssid,
* delayed transmission of action frame is ok.
*/
chan.center_freq =
sme_chn_to_freq(pHddStaCtx->conn_info.
sme_chn_to_freq(sta_ctx->conn_info.
operationChannel);
}
}
@ -2376,7 +2376,7 @@ static void hdd_get_link_status_cb(uint8_t status, void *context)
static int wlan_hdd_get_link_status(struct hdd_adapter *adapter)
{
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
QDF_STATUS hstatus;
int ret;
@ -2402,8 +2402,8 @@ static int wlan_hdd_get_link_status(struct hdd_adapter *adapter)
return 0;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
/* If not associated, then expected link status return
* value is 0
*/
@ -4361,7 +4361,7 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter,
uint32_t roamId = INVALID_ROAM_ID;
tCsrRoamModifyProfileFields modProfileFields;
tCsrHandoffRequest handoffInfo;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
if (QDF_STA_MODE != adapter->device_mode) {
hdd_warn("Unsupported in mode %s(%d)",
@ -4370,10 +4370,10 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter,
return -EINVAL;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
/* if not associated, no need to proceed with reassoc */
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
hdd_warn("Not associated!");
ret = -EINVAL;
goto exit;
@ -4391,13 +4391,13 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter,
* issue reassoc to same AP
*/
if (!qdf_mem_cmp(targetApBssid,
pHddStaCtx->conn_info.bssId.bytes,
sta_ctx->conn_info.bssId.bytes,
QDF_MAC_ADDR_SIZE)) {
hdd_warn("Reassoc BSSID is same as currently associated AP bssid");
if (roaming_offload_enabled(hdd_ctx)) {
hdd_wma_send_fastreassoc_cmd(adapter,
targetApBssid,
pHddStaCtx->conn_info.operationChannel);
sta_ctx->conn_info.operationChannel);
} else {
sme_get_modify_profile_fields(hdd_ctx->hHal,
adapter->sessionId,
@ -4969,7 +4969,7 @@ static int drv_cmd_get_ibss_peer_info_all(struct hdd_adapter *adapter,
{
int ret = 0;
int status = QDF_STATUS_SUCCESS;
struct hdd_station_ctx *pHddStaCtx = NULL;
struct hdd_station_ctx *sta_ctx = NULL;
char *extra = NULL;
int idx = 0;
int length = 0;
@ -4983,7 +4983,7 @@ static int drv_cmd_get_ibss_peer_info_all(struct hdd_adapter *adapter,
return -EINVAL;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
hdd_debug("Received GETIBSSPEERINFOALL Command");
/* Handle the command */
@ -5005,26 +5005,26 @@ static int drv_cmd_get_ibss_peer_info_all(struct hdd_adapter *adapter,
/* Copy number of stations */
length = scnprintf(extra, WLAN_MAX_BUF_SIZE, "%d ",
pHddStaCtx->ibss_peer_info.numPeers);
sta_ctx->ibss_peer_info.numPeers);
numOfBytestoPrint = length;
for (idx = 0; idx < pHddStaCtx->ibss_peer_info.numPeers;
for (idx = 0; idx < sta_ctx->ibss_peer_info.numPeers;
idx++) {
int8_t rssi;
uint32_t tx_rate;
qdf_mem_copy(mac_addr,
pHddStaCtx->ibss_peer_info.peerInfoParams[idx].
sta_ctx->ibss_peer_info.peerInfoParams[idx].
mac_addr, sizeof(mac_addr));
tx_rate =
pHddStaCtx->ibss_peer_info.peerInfoParams[idx].
sta_ctx->ibss_peer_info.peerInfoParams[idx].
txRate;
/*
* Only lower 3 bytes are rate info. Mask of the MSByte
*/
tx_rate &= 0x00FFFFFF;
rssi = pHddStaCtx->ibss_peer_info.peerInfoParams[idx].
rssi = sta_ctx->ibss_peer_info.peerInfoParams[idx].
rssi;
length += scnprintf((extra + length),
@ -5097,7 +5097,7 @@ static int drv_cmd_get_ibss_peer_info(struct hdd_adapter *adapter,
int ret = 0;
uint8_t *value = command;
QDF_STATUS status;
struct hdd_station_ctx *pHddStaCtx = NULL;
struct hdd_station_ctx *sta_ctx = NULL;
char extra[128] = { 0 };
uint32_t length = 0;
uint8_t staIdx = 0;
@ -5110,13 +5110,13 @@ static int drv_cmd_get_ibss_peer_info(struct hdd_adapter *adapter,
return -EINVAL;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
hdd_debug("Received GETIBSSPEERINFO Command");
/* if there are no peers, no need to continue with the command */
if (eConnectionState_IbssConnected !=
pHddStaCtx->conn_info.connState) {
sta_ctx->conn_info.connState) {
hdd_err("No IBSS Peers coalesced");
ret = -EINVAL;
goto exit;
@ -5131,7 +5131,7 @@ static int drv_cmd_get_ibss_peer_info(struct hdd_adapter *adapter,
}
/* Get station index for the peer mac address and sanitize it */
hdd_get_peer_sta_id(pHddStaCtx, &peerMacAddr, &staIdx);
hdd_get_peer_sta_id(sta_ctx, &peerMacAddr, &staIdx);
if (staIdx > MAX_PEERS) {
hdd_err("Invalid StaIdx %d returned", staIdx);
@ -5143,13 +5143,13 @@ static int drv_cmd_get_ibss_peer_info(struct hdd_adapter *adapter,
status = hdd_cfg80211_get_ibss_peer_info(adapter, staIdx);
if (QDF_STATUS_SUCCESS == status) {
uint32_t txRate =
pHddStaCtx->ibss_peer_info.peerInfoParams[0].txRate;
sta_ctx->ibss_peer_info.peerInfoParams[0].txRate;
/* Only lower 3 bytes are rate info. Mask of the MSByte */
txRate &= 0x00FFFFFF;
length = scnprintf(extra, sizeof(extra), "%d %d",
(int)txRate,
(int)pHddStaCtx->ibss_peer_info.
(int)sta_ctx->ibss_peer_info.
peerInfoParams[0].rssi);
/* Copy the data back into buffer */
@ -5328,7 +5328,7 @@ static int drv_cmd_get_tsm_stats(struct hdd_adapter *adapter,
char extra[128] = { 0 };
int len = 0;
uint8_t tid = 0;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
tAniTrafStrmMetrics tsm_metrics = {0};
if ((QDF_STA_MODE != adapter->device_mode) &&
@ -5339,10 +5339,10 @@ static int drv_cmd_get_tsm_stats(struct hdd_adapter *adapter,
return -EINVAL;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
/* if not associated, return error */
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
hdd_err("Not associated!");
ret = -EINVAL;
goto exit;

View file

@ -1323,7 +1323,7 @@ void hdd_ipa_set_tx_flow_info(void)
hdd_adapter_list_node_t *adapterNode = NULL, *pNext = NULL;
QDF_STATUS status;
struct hdd_adapter *adapter;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
struct hdd_ap_ctx *hdd_ap_ctx;
struct hdd_hostapd_state *hostapd_state;
struct qdf_mac_addr staBssid = QDF_MAC_ADDR_ZERO_INITIALIZER;
@ -1363,26 +1363,26 @@ void hdd_ipa_set_tx_flow_info(void)
adapter = adapterNode->adapter;
switch (adapter->device_mode) {
case QDF_STA_MODE:
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (eConnectionState_Associated ==
pHddStaCtx->conn_info.connState) {
sta_ctx->conn_info.connState) {
staChannel =
pHddStaCtx->conn_info.operationChannel;
sta_ctx->conn_info.operationChannel;
qdf_copy_macaddr(&staBssid,
&pHddStaCtx->conn_info.bssId);
&sta_ctx->conn_info.bssId);
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
targetChannel = staChannel;
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
}
break;
case QDF_P2P_CLIENT_MODE:
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (eConnectionState_Associated ==
pHddStaCtx->conn_info.connState) {
sta_ctx->conn_info.connState) {
p2pChannel =
pHddStaCtx->conn_info.operationChannel;
sta_ctx->conn_info.operationChannel;
qdf_copy_macaddr(&p2pBssid,
&pHddStaCtx->conn_info.bssId);
&sta_ctx->conn_info.bssId);
p2pMode = "CLI";
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
targetChannel = p2pChannel;
@ -3058,15 +3058,15 @@ static int hdd_ipa_uc_disconnect_ap(struct hdd_adapter *adapter)
*/
static int hdd_ipa_uc_disconnect_sta(struct hdd_adapter *adapter)
{
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
struct hdd_ipa_priv *hdd_ipa = ghdd_ipa;
int ret = 0;
if (hdd_ipa_uc_sta_is_enabled(hdd_ipa->hdd_ctx) &&
hdd_ipa->sta_connected) {
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
hdd_ipa_uc_send_evt(adapter, WLAN_STA_DISCONNECT,
pHddStaCtx->conn_info.bssId.bytes);
sta_ctx->conn_info.bssId.bytes);
}
return ret;

View file

@ -3400,7 +3400,7 @@ hdd_vdev_destroy:
QDF_STATUS hdd_init_station_mode(struct hdd_adapter *adapter)
{
struct hdd_station_ctx *pHddStaCtx = &adapter->sessionCtx.station;
struct hdd_station_ctx *sta_ctx = &adapter->sessionCtx.station;
struct hdd_context *hdd_ctx;
QDF_STATUS status;
int ret_val;
@ -3424,18 +3424,18 @@ QDF_STATUS hdd_init_station_mode(struct hdd_adapter *adapter)
}
hdd_conn_set_connection_state(adapter, eConnectionState_NotConnected);
qdf_mem_set(pHddStaCtx->conn_info.staId,
sizeof(pHddStaCtx->conn_info.staId), HDD_WLAN_INVALID_STA_ID);
qdf_mem_set(sta_ctx->conn_info.staId,
sizeof(sta_ctx->conn_info.staId), HDD_WLAN_INVALID_STA_ID);
/* set fast roaming capability in sme session */
status = sme_config_fast_roaming(hdd_ctx->hHal, adapter->sessionId,
adapter->fast_roaming_allowed);
/* Set the default operation channel */
pHddStaCtx->conn_info.operationChannel =
sta_ctx->conn_info.operationChannel =
hdd_ctx->config->OperatingChannel;
/* Make the default Auth Type as OPEN */
pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
status = hdd_init_tx_rx(adapter);
if (QDF_STATUS_SUCCESS != status) {
@ -4234,9 +4234,9 @@ void wlan_hdd_reset_prob_rspies(struct hdd_adapter *adapter)
case QDF_STA_MODE:
case QDF_P2P_CLIENT_MODE:
{
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
bssid = &pHddStaCtx->conn_info.bssId;
bssid = &sta_ctx->conn_info.bssId;
break;
}
case QDF_SAP_MODE:
@ -4524,7 +4524,7 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx)
hdd_adapter_list_node_t *adapterNode = NULL, *pNext = NULL;
QDF_STATUS status;
struct hdd_adapter *adapter;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
struct qdf_mac_addr peerMacAddr;
ENTER();
@ -4589,9 +4589,9 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx)
/* Delete peers if any for STA and P2P client modes */
if (adapter->device_mode == QDF_STA_MODE ||
adapter->device_mode == QDF_P2P_CLIENT_MODE) {
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
qdf_copy_macaddr(&peerMacAddr,
&pHddStaCtx->conn_info.bssId);
&sta_ctx->conn_info.bssId);
hdd_objmgr_remove_peer_object(adapter->hdd_vdev,
peerMacAddr.bytes);

View file

@ -233,7 +233,7 @@ static int hdd_ocb_register_sta(struct hdd_adapter *adapter)
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
struct ol_txrx_desc_type sta_desc = {0};
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
uint8_t peer_id;
struct ol_txrx_ops txrx_ops;
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
@ -269,13 +269,13 @@ static int hdd_ocb_register_sta(struct hdd_adapter *adapter)
return -EINVAL;
}
if (pHddStaCtx->conn_info.staId[0] != HDD_WLAN_INVALID_STA_ID &&
pHddStaCtx->conn_info.staId[0] != peer_id) {
if (sta_ctx->conn_info.staId[0] != HDD_WLAN_INVALID_STA_ID &&
sta_ctx->conn_info.staId[0] != peer_id) {
hdd_err("The ID for the OCB station has changed.");
}
pHddStaCtx->conn_info.staId[0] = peer_id;
qdf_copy_macaddr(&pHddStaCtx->conn_info.peerMacAddress[0],
sta_ctx->conn_info.staId[0] = peer_id;
qdf_copy_macaddr(&sta_ctx->conn_info.peerMacAddress[0],
&adapter->macAddressCurrent);
return 0;

View file

@ -482,7 +482,7 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter,
tpSirWifiInterfaceInfo pInfo)
{
uint8_t *staMac = NULL;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter);
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
@ -493,20 +493,20 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter,
if (((QDF_STA_MODE == adapter->device_mode) ||
(QDF_P2P_CLIENT_MODE == adapter->device_mode) ||
(QDF_P2P_DEVICE_MODE == adapter->device_mode))) {
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (eConnectionState_NotConnected ==
pHddStaCtx->conn_info.connState) {
sta_ctx->conn_info.connState) {
pInfo->state = WIFI_DISCONNECTED;
}
if (eConnectionState_Connecting ==
pHddStaCtx->conn_info.connState) {
sta_ctx->conn_info.connState) {
hdd_err("Session ID %d, Connection is in progress",
adapter->sessionId);
pInfo->state = WIFI_ASSOCIATING;
}
if ((eConnectionState_Associated ==
pHddStaCtx->conn_info.connState)
&& (false == pHddStaCtx->conn_info.uIsAuthenticated)) {
sta_ctx->conn_info.connState)
&& (false == sta_ctx->conn_info.uIsAuthenticated)) {
staMac =
(uint8_t *) &(adapter->macAddressCurrent.
bytes[0]);
@ -516,17 +516,17 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter,
pInfo->state = WIFI_AUTHENTICATING;
}
if (eConnectionState_Associated ==
pHddStaCtx->conn_info.connState) {
sta_ctx->conn_info.connState) {
pInfo->state = WIFI_ASSOCIATED;
qdf_copy_macaddr(&pInfo->bssid,
&pHddStaCtx->conn_info.bssId);
&sta_ctx->conn_info.bssId);
qdf_mem_copy(pInfo->ssid,
pHddStaCtx->conn_info.SSID.SSID.ssId,
pHddStaCtx->conn_info.SSID.SSID.length);
sta_ctx->conn_info.SSID.SSID.ssId,
sta_ctx->conn_info.SSID.SSID.length);
/*
* NULL Terminate the string
*/
pInfo->ssid[pHddStaCtx->conn_info.SSID.SSID.length] = 0;
pInfo->ssid[sta_ctx->conn_info.SSID.SSID.length] = 0;
}
}
@ -3886,8 +3886,8 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
struct station_info *sinfo)
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
int ssidlen = pHddStaCtx->conn_info.SSID.SSID.length;
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
int ssidlen = sta_ctx->conn_info.SSID.SSID.length;
uint8_t rate_flags;
uint8_t mcs_index;
@ -3938,7 +3938,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
if (adapter->device_mode == QDF_SAP_MODE)
return wlan_hdd_get_sap_stats(adapter, sinfo);
if ((eConnectionState_Associated != pHddStaCtx->conn_info.connState) ||
if ((eConnectionState_Associated != sta_ctx->conn_info.connState) ||
(0 == ssidlen)) {
hdd_debug("Not associated or Invalid ssidlen, %d",
ssidlen);
@ -3946,7 +3946,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
return 0;
}
if (true == pHddStaCtx->hdd_ReassocScenario) {
if (true == sta_ctx->hdd_ReassocScenario) {
hdd_debug("Roaming is in progress, cannot continue with this request");
/*
* supplicant reports very low rssi to upper layer
@ -3966,7 +3966,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
/* for new connection there might be no valid previous RSSI */
if (!adapter->rssi) {
hdd_get_rssi_snr_by_bssid(adapter,
pHddStaCtx->conn_info.bssId.bytes,
sta_ctx->conn_info.bssId.bytes,
&adapter->rssi, NULL);
}
@ -3975,9 +3975,9 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
hdd_debug("snr: %d, rssi: %d",
adapter->hdd_stats.summary_stat.snr,
adapter->hdd_stats.summary_stat.rssi);
pHddStaCtx->conn_info.signal = sinfo->signal;
pHddStaCtx->conn_info.noise =
pHddStaCtx->conn_info.signal - snr;
sta_ctx->conn_info.signal = sinfo->signal;
sta_ctx->conn_info.noise =
sta_ctx->conn_info.signal - snr;
wlan_hdd_fill_station_info_signal(sinfo);
@ -4332,7 +4332,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
sinfo->rx_bytes = adapter->stats.rx_bytes;
sinfo->rx_packets = adapter->stats.rx_packets;
qdf_mem_copy(&pHddStaCtx->conn_info.txrate,
qdf_mem_copy(&sta_ctx->conn_info.txrate,
&sinfo->txrate, sizeof(sinfo->txrate));
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
@ -4600,7 +4600,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_context *hdd_ctx;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
int status;
bool filled = false;
@ -4625,12 +4625,12 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
return -EINVAL;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (hdd_ctx->config->fEnableSNRMonitoring == 0)
return -ENONET;
if (pHddStaCtx->hdd_ReassocScenario) {
if (sta_ctx->hdd_ReassocScenario) {
hdd_info("Roaming in progress, hence return");
return -ENONET;
}

View file

@ -564,7 +564,7 @@ static int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
bool granted;
uint8_t STAId;
struct hdd_station_ctx *pHddStaCtx = &adapter->sessionCtx.station;
struct hdd_station_ctx *sta_ctx = &adapter->sessionCtx.station;
struct qdf_mac_addr *mac_addr;
bool pkt_proto_logged = false;
#ifdef QCA_PKT_PROTO_TRACE
@ -645,7 +645,7 @@ static int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (((adapter->psbChanged & (1 << ac)) &&
likely(adapter->hddWmmStatus.wmmAcStatus[ac].
wmmAcAccessAllowed)) ||
((pHddStaCtx->conn_info.uIsAuthenticated == false) &&
((sta_ctx->conn_info.uIsAuthenticated == false) &&
(QDF_NBUF_CB_PACKET_TYPE_EAPOL ==
QDF_NBUF_CB_GET_PACKET_TYPE(skb) ||
QDF_NBUF_CB_PACKET_TYPE_WAPI ==
@ -823,22 +823,22 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
/**
* hdd_get_peer_sta_id() - Get the StationID using the Peer Mac address
* @pHddStaCtx: pointer to HDD Station Context
* @sta_ctx: pointer to HDD Station Context
* @pMacAddress: pointer to Peer Mac address
* @staID: pointer to returned Station Index
*
* Return: QDF_STATUS_SUCCESS/QDF_STATUS_E_FAILURE
*/
QDF_STATUS hdd_get_peer_sta_id(struct hdd_station_ctx *pHddStaCtx,
QDF_STATUS hdd_get_peer_sta_id(struct hdd_station_ctx *sta_ctx,
struct qdf_mac_addr *pMacAddress, uint8_t *staId)
{
uint8_t idx;
for (idx = 0; idx < MAX_PEERS; idx++) {
if (!qdf_mem_cmp(&pHddStaCtx->conn_info.peerMacAddress[idx],
if (!qdf_mem_cmp(&sta_ctx->conn_info.peerMacAddress[idx],
pMacAddress, QDF_MAC_ADDR_SIZE)) {
*staId = pHddStaCtx->conn_info.staId[idx];
*staId = sta_ctx->conn_info.staId[idx];
return QDF_STATUS_SUCCESS;
}
}
@ -1167,7 +1167,7 @@ QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf)
int rxstat;
struct sk_buff *skb = NULL;
struct sk_buff *next = NULL;
struct hdd_station_ctx *pHddStaCtx = NULL;
struct hdd_station_ctx *sta_ctx = NULL;
unsigned int cpu_index;
struct qdf_mac_addr *mac_addr;
bool wake_lock = false;
@ -1209,8 +1209,8 @@ QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf)
"%s: skb %pK skb->len %d\n", __func__, skb, skb->len);
#endif
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if ((pHddStaCtx->conn_info.proxyARPService) &&
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if ((sta_ctx->conn_info.proxyARPService) &&
cfg80211_is_gratuitous_arp_unsolicited_na(skb)) {
uint32_t rx_dropped;
@ -1278,7 +1278,7 @@ QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf)
/* hold configurable wakelock for unicast traffic */
if (hdd_ctx->config->rx_wakelock_timeout &&
pHddStaCtx->conn_info.uIsAuthenticated)
sta_ctx->conn_info.uIsAuthenticated)
wake_lock = hdd_is_rx_wake_lock_needed(skb);
if (wake_lock) {

View file

@ -3311,13 +3311,13 @@ hdd_wlan_get_ibss_mac_addr_from_staid(struct hdd_adapter *adapter,
uint8_t staIdx)
{
uint8_t idx;
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
for (idx = 0; idx < MAX_PEERS; idx++) {
if (HDD_WLAN_INVALID_STA_ID !=
pHddStaCtx->conn_info.staId[idx] &&
staIdx == pHddStaCtx->conn_info.staId[idx]) {
return &pHddStaCtx->conn_info.peerMacAddress[idx];
sta_ctx->conn_info.staId[idx] &&
staIdx == sta_ctx->conn_info.staId[idx]) {
return &sta_ctx->conn_info.peerMacAddress[idx];
}
}
return NULL;
@ -3554,7 +3554,7 @@ static void hdd_get_rssi_cb(int8_t rssi, uint32_t sta_id, void *context)
QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value)
{
struct hdd_context *hdd_ctx;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
QDF_STATUS hstatus;
int ret;
void *cookie;
@ -3578,16 +3578,16 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value)
}
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
hdd_debug("Not associated!, rssi on disconnect %d",
adapter->rssi_on_disconnect);
*rssi_value = adapter->rssi_on_disconnect;
return QDF_STATUS_SUCCESS;
}
if (pHddStaCtx->hdd_ReassocScenario) {
if (sta_ctx->hdd_ReassocScenario) {
hdd_debug("Roaming in progress, return cached RSSI");
*rssi_value = adapter->rssi;
return QDF_STATUS_SUCCESS;
@ -3602,8 +3602,8 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value)
cookie = hdd_request_cookie(request);
hstatus = sme_get_rssi(hdd_ctx->hHal, hdd_get_rssi_cb,
pHddStaCtx->conn_info.staId[0],
pHddStaCtx->conn_info.bssId, adapter->rssi,
sta_ctx->conn_info.staId[0],
sta_ctx->conn_info.bssId, adapter->rssi,
cookie);
if (QDF_STATUS_SUCCESS != hstatus) {
hdd_err("Unable to retrieve RSSI");
@ -3630,7 +3630,7 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value)
*/
if (!adapter->rssi) {
hdd_get_rssi_snr_by_bssid(adapter,
pHddStaCtx->conn_info.bssId.bytes,
sta_ctx->conn_info.bssId.bytes,
&adapter->rssi, NULL);
}
}
@ -3690,7 +3690,7 @@ static void hdd_get_snr_cb(int8_t snr, uint32_t sta_id, void *context)
QDF_STATUS wlan_hdd_get_snr(struct hdd_adapter *adapter, int8_t *snr)
{
struct hdd_context *hdd_ctx;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
QDF_STATUS hstatus;
int valid;
int ret;
@ -3715,7 +3715,7 @@ QDF_STATUS wlan_hdd_get_snr(struct hdd_adapter *adapter, int8_t *snr)
if (0 != valid)
return QDF_STATUS_E_FAULT;
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
request = hdd_request_alloc(&params);
if (!request) {
@ -3725,8 +3725,8 @@ QDF_STATUS wlan_hdd_get_snr(struct hdd_adapter *adapter, int8_t *snr)
cookie = hdd_request_cookie(request);
hstatus = sme_get_snr(hdd_ctx->hHal, hdd_get_snr_cb,
pHddStaCtx->conn_info.staId[0],
pHddStaCtx->conn_info.bssId, cookie);
sta_ctx->conn_info.staId[0],
sta_ctx->conn_info.bssId, cookie);
if (QDF_STATUS_SUCCESS != hstatus) {
hdd_err("Unable to retrieve RSSI");
/* we'll returned a cached value below */
@ -4841,7 +4841,7 @@ static int __iw_set_freq(struct net_device *dev, struct iw_request_info *info,
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_context *hdd_ctx;
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
tCsrRoamProfile *pRoamProfile;
ENTER_DEV(dev);
@ -4860,8 +4860,8 @@ static int __iw_set_freq(struct net_device *dev, struct iw_request_info *info,
pRoamProfile = &pWextState->roamProfile;
/* Link is up then return cant set channel */
if (eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState ||
eConnectionState_Associated == pHddStaCtx->conn_info.connState) {
if (eConnectionState_IbssConnected == sta_ctx->conn_info.connState ||
eConnectionState_Associated == sta_ctx->conn_info.connState) {
hdd_debug("IBSS Associated");
return -EOPNOTSUPP;
}
@ -4914,9 +4914,9 @@ static int __iw_set_freq(struct net_device *dev, struct iw_request_info *info,
/* Set the Operational Channel */
numChans = pRoamProfile->ChannelInfo.numOfChannels = 1;
pHddStaCtx->conn_info.operationChannel = wrqu->freq.m;
sta_ctx->conn_info.operationChannel = wrqu->freq.m;
pRoamProfile->ChannelInfo.ChannelList =
&pHddStaCtx->conn_info.operationChannel;
&sta_ctx->conn_info.operationChannel;
hdd_debug("pRoamProfile->operationChannel = %d", wrqu->freq.m);
@ -4963,7 +4963,7 @@ static int __iw_get_freq(struct net_device *dev, struct iw_request_info *info,
tHalHandle hHal;
struct hdd_wext_state *pWextState;
tCsrRoamProfile *pRoamProfile;
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_context *hdd_ctx;
int ret;
@ -4983,7 +4983,7 @@ static int __iw_get_freq(struct net_device *dev, struct iw_request_info *info,
pRoamProfile = &pWextState->roamProfile;
if (pHddStaCtx->conn_info.connState == eConnectionState_Associated) {
if (sta_ctx->conn_info.connState == eConnectionState_Associated) {
if (sme_get_operation_channel(hHal, &channel,
adapter->sessionId) != QDF_STATUS_SUCCESS) {
hdd_err("failed to get operating channel %u",
@ -5049,7 +5049,7 @@ static int __iw_get_tx_power(struct net_device *dev,
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
int ret;
ENTER_DEV(dev);
@ -5062,7 +5062,7 @@ static int __iw_get_tx_power(struct net_device *dev,
if (0 != ret)
return ret;
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
wrqu->txpower.value = 0;
return 0;
}
@ -5172,7 +5172,7 @@ static int __iw_get_bitrate(struct net_device *dev,
QDF_STATUS status;
struct hdd_wext_state *pWextState;
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_context *hdd_ctx;
int ret;
@ -5187,7 +5187,7 @@ static int __iw_get_bitrate(struct net_device *dev,
if (0 != ret)
return ret;
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
wrqu->bitrate.value = 0;
} else {
status =
@ -5197,7 +5197,7 @@ static int __iw_get_bitrate(struct net_device *dev,
SME_GLOBAL_CLASSA_STATS |
SME_GLOBAL_CLASSD_STATS,
hdd_statistics_cb,
pHddStaCtx->conn_info.staId[0],
sta_ctx->conn_info.staId[0],
adapter, adapter->sessionId);
if (QDF_STATUS_SUCCESS != status) {
@ -5262,7 +5262,7 @@ static int __iw_set_bitrate(struct net_device *dev,
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_wext_state *pWextState;
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
uint8_t supp_rates[WNI_CFG_SUPPORTED_RATES_11A_LEN];
uint32_t a_len = WNI_CFG_SUPPORTED_RATES_11A_LEN;
uint32_t b_len = WNI_CFG_SUPPORTED_RATES_11B_LEN;
@ -5284,7 +5284,7 @@ static int __iw_set_bitrate(struct net_device *dev,
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState)
if (eConnectionState_Associated != sta_ctx->conn_info.connState)
return -ENXIO;
rate = wrqu->bitrate.value;
@ -5563,7 +5563,7 @@ static int __iw_get_genie(struct net_device *dev,
{
struct hdd_wext_state *pWextState;
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
QDF_STATUS status;
uint32_t length = DOT11F_IE_RSN_MAX_LEN;
uint8_t genIeBytes[DOT11F_IE_RSN_MAX_LEN];
@ -5585,7 +5585,7 @@ static int __iw_get_genie(struct net_device *dev,
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
if (pHddStaCtx->conn_info.connState == eConnectionState_NotConnected)
if (sta_ctx->conn_info.connState == eConnectionState_NotConnected)
return -ENXIO;
/* Return something ONLY if we are associated with an RSN or
@ -6334,7 +6334,7 @@ static void hdd_get_class_a_statistics_cb(void *stats, void *context)
*/
QDF_STATUS wlan_hdd_get_class_astats(struct hdd_adapter *adapter)
{
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
QDF_STATUS hstatus;
int ret;
void *cookie;
@ -6366,7 +6366,7 @@ QDF_STATUS wlan_hdd_get_class_astats(struct hdd_adapter *adapter)
hstatus = sme_get_statistics(WLAN_HDD_GET_HAL_CTX(adapter),
eCSR_HDD, SME_GLOBAL_CLASSA_STATS,
hdd_get_class_a_statistics_cb,
pHddStaCtx->conn_info.staId[0],
sta_ctx->conn_info.staId[0],
cookie, adapter->sessionId);
if (QDF_STATUS_SUCCESS != hstatus) {
hdd_warn("Unable to retrieve Class A statistics");
@ -6452,7 +6452,7 @@ static void hdd_get_station_statistics_cb(void *stats, void *context)
*/
QDF_STATUS wlan_hdd_get_station_stats(struct hdd_adapter *adapter)
{
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
QDF_STATUS status;
int errno;
void *cookie;
@ -6482,7 +6482,7 @@ QDF_STATUS wlan_hdd_get_station_stats(struct hdd_adapter *adapter)
SME_GLOBAL_CLASSA_STATS |
SME_PER_CHAIN_RSSI_STATS,
hdd_get_station_statistics_cb,
pHddStaCtx->conn_info.staId[0],
sta_ctx->conn_info.staId[0],
cookie,
adapter->sessionId);
if (QDF_IS_STATUS_ERROR(status)) {
@ -6723,7 +6723,7 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_wext_state *pWextState =
WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
@ -6765,18 +6765,18 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info,
qdf_mem_zero(pWextState->roamProfile.Keys.KeyLength,
CSR_MAX_NUM_KEY);
}
pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
sta_ctx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
pWextState->wpaVersion = IW_AUTH_WPA_VERSION_DISABLED;
pWextState->roamProfile.EncryptionType.encryptionType[0] =
eCSR_ENCRYPT_TYPE_NONE;
pWextState->roamProfile.mcEncryptionType.encryptionType[0] =
eCSR_ENCRYPT_TYPE_NONE;
pHddStaCtx->conn_info.ucEncryptionType = eCSR_ENCRYPT_TYPE_NONE;
pHddStaCtx->conn_info.mcEncryptionType = eCSR_ENCRYPT_TYPE_NONE;
sta_ctx->conn_info.ucEncryptionType = eCSR_ENCRYPT_TYPE_NONE;
sta_ctx->conn_info.mcEncryptionType = eCSR_ENCRYPT_TYPE_NONE;
if (eConnectionState_Associated ==
pHddStaCtx->conn_info.connState) {
sta_ctx->conn_info.connState) {
INIT_COMPLETION(adapter->disconnect_comp_var);
status =
sme_roam_disconnect(WLAN_HDD_GET_HAL_CTX(adapter),
@ -6801,7 +6801,7 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info,
if (wrqu->data.flags & (IW_ENCODE_OPEN | IW_ENCODE_RESTRICTED)) {
hdd_debug("iwconfig wlan0 key on");
pHddStaCtx->conn_info.authType =
sta_ctx->conn_info.authType =
(encoderq->flags & IW_ENCODE_RESTRICTED) ?
eCSR_AUTH_TYPE_SHARED_KEY :
eCSR_AUTH_TYPE_OPEN_SYSTEM;
@ -6824,7 +6824,7 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info,
if ((IW_AUTH_KEY_MGMT_802_1X == pWextState->authKeyMgmt)
&& (eCSR_AUTH_TYPE_OPEN_SYSTEM ==
pHddStaCtx->conn_info.authType)) {
sta_ctx->conn_info.authType)) {
encryptionType = eCSR_ENCRYPT_TYPE_WEP40;
} else {
encryptionType =
@ -6836,7 +6836,7 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info,
if ((IW_AUTH_KEY_MGMT_802_1X == pWextState->authKeyMgmt)
&& (eCSR_AUTH_TYPE_OPEN_SYSTEM ==
pHddStaCtx->conn_info.authType)) {
sta_ctx->conn_info.authType)) {
encryptionType = eCSR_ENCRYPT_TYPE_WEP104;
} else {
encryptionType =
@ -6847,8 +6847,8 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info,
return -EINVAL;
}
pHddStaCtx->conn_info.ucEncryptionType = encryptionType;
pHddStaCtx->conn_info.mcEncryptionType = encryptionType;
sta_ctx->conn_info.ucEncryptionType = encryptionType;
sta_ctx->conn_info.mcEncryptionType = encryptionType;
pWextState->roamProfile.EncryptionType.numEntries = 1;
pWextState->roamProfile.EncryptionType.encryptionType[0] =
encryptionType;
@ -6857,12 +6857,12 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info,
encryptionType;
if ((eConnectionState_NotConnected ==
pHddStaCtx->conn_info.connState)
sta_ctx->conn_info.connState)
&&
((eCSR_AUTH_TYPE_OPEN_SYSTEM ==
pHddStaCtx->conn_info.authType)
sta_ctx->conn_info.authType)
|| (eCSR_AUTH_TYPE_SHARED_KEY ==
pHddStaCtx->conn_info.authType))) {
sta_ctx->conn_info.authType))) {
qdf_mem_copy(&pWextState->roamProfile.Keys.
KeyMaterial[keyId][0], extra, key_length);
@ -7014,7 +7014,7 @@ static int __iw_set_encodeext(struct net_device *dev,
union iwreq_data *wrqu, char *extra)
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_wext_state *pWextState =
WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
@ -7054,7 +7054,7 @@ static int __iw_set_encodeext(struct net_device *dev,
return ret;
}
if (eConnectionState_NotConnected == pHddStaCtx->conn_info.connState &&
if (eConnectionState_NotConnected == sta_ctx->conn_info.connState &&
(IW_ENCODE_ALG_WEP == ext->alg)) {
if (IW_AUTH_KEY_MGMT_802_1X == pWextState->authKeyMgmt) {
@ -7178,7 +7178,7 @@ static int __iw_set_encodeext(struct net_device *dev,
return -EINVAL;
}
pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY;
sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY;
qdf_ret_status = sme_roam_set_key(WLAN_HDD_GET_HAL_CTX(adapter),
adapter->sessionId,
@ -7188,7 +7188,7 @@ static int __iw_set_encodeext(struct net_device *dev,
hdd_err("[%4d] sme_roam_set_key returned ERROR status= %d",
__LINE__, qdf_ret_status);
pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_NONE;
sta_ctx->roam_info.roamingState = HDD_ROAM_STATE_NONE;
}
return qdf_ret_status;
@ -7397,7 +7397,7 @@ static int __iw_set_mlme(struct net_device *dev,
union iwreq_data *wrqu, char *extra)
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct iw_mlme *mlme = (struct iw_mlme *)extra;
QDF_STATUS status = QDF_STATUS_SUCCESS;
struct hdd_context *hdd_ctx;
@ -7421,7 +7421,7 @@ static int __iw_set_mlme(struct net_device *dev,
case IW_MLME_DISASSOC:
case IW_MLME_DEAUTH:
if (pHddStaCtx->conn_info.connState ==
if (sta_ctx->conn_info.connState ==
eConnectionState_Associated) {
eCsrRoamDisconnectReason reason =
eCSR_DISCONNECT_REASON_UNSPECIFIED;
@ -7918,7 +7918,7 @@ static int __iw_setint_getnone(struct net_device *dev,
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_context *hdd_ctx;
tSmeConfigParams *sme_config;
int *value = (int *)extra;
@ -8098,7 +8098,7 @@ static int __iw_setint_getnone(struct net_device *dev,
if (!hHal)
return -EINVAL;
qdf_copy_macaddr(&bssid, &pHddStaCtx->conn_info.bssId);
qdf_copy_macaddr(&bssid, &sta_ctx->conn_info.bssId);
if (sme_set_tx_power
(hHal, adapter->sessionId, bssid,
adapter->device_mode,
@ -8119,8 +8119,8 @@ static int __iw_setint_getnone(struct net_device *dev,
hdd_debug("Setting maximum tx power %d dBm",
set_value);
qdf_copy_macaddr(&bssid, &pHddStaCtx->conn_info.bssId);
qdf_copy_macaddr(&selfMac, &pHddStaCtx->conn_info.bssId);
qdf_copy_macaddr(&bssid, &sta_ctx->conn_info.bssId);
qdf_copy_macaddr(&selfMac, &sta_ctx->conn_info.bssId);
if (sme_set_max_tx_power(hHal, bssid, selfMac, set_value)
!= QDF_STATUS_SUCCESS) {
@ -10196,7 +10196,7 @@ static int __iw_get_char_setnone(struct net_device *dev,
tHalHandle hHal = NULL;
tpAniSirGlobal pMac = NULL;
struct hdd_station_ctx *pHddStaCtx = NULL;
struct hdd_station_ctx *sta_ctx = NULL;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct hdd_adapter *useAdapter = NULL;
@ -10265,7 +10265,7 @@ static int __iw_get_char_setnone(struct net_device *dev,
len += buf;
break;
}
pHddStaCtx =
sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(useAdapter);
@ -10277,7 +10277,7 @@ static int __iw_get_char_setnone(struct net_device *dev,
"\n CSR State - %s"
"\n CSR Substate - %s",
hdd_connection_state_string
(pHddStaCtx->conn_info.connState),
(sta_ctx->conn_info.connState),
mac_trace_get_neighbour_roam_state
(sme_get_neighbor_roam_state
(hHal, useAdapter->sessionId)),
@ -10488,30 +10488,30 @@ static int __iw_get_char_setnone(struct net_device *dev,
#endif
case WE_GET_IBSS_STA_INFO:
{
struct hdd_station_ctx *pHddStaCtx =
struct hdd_station_ctx *sta_ctx =
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
int idx = 0;
int length = 0, buf = 0;
for (idx = 0; idx < MAX_PEERS; idx++) {
if (HDD_WLAN_INVALID_STA_ID !=
pHddStaCtx->conn_info.staId[idx]) {
sta_ctx->conn_info.staId[idx]) {
buf = snprintf
((extra + length),
WE_MAX_STR_LEN - length,
"\n%d .%02x:%02x:%02x:%02x:%02x:%02x\n",
pHddStaCtx->conn_info.staId[idx],
pHddStaCtx->conn_info.
sta_ctx->conn_info.staId[idx],
sta_ctx->conn_info.
peerMacAddress[idx].bytes[0],
pHddStaCtx->conn_info.
sta_ctx->conn_info.
peerMacAddress[idx].bytes[1],
pHddStaCtx->conn_info.
sta_ctx->conn_info.
peerMacAddress[idx].bytes[2],
pHddStaCtx->conn_info.
sta_ctx->conn_info.
peerMacAddress[idx].bytes[3],
pHddStaCtx->conn_info.
sta_ctx->conn_info.
peerMacAddress[idx].bytes[4],
pHddStaCtx->conn_info.
sta_ctx->conn_info.
peerMacAddress[idx].bytes[5]
);
length += buf;
@ -10644,20 +10644,20 @@ static int __iw_get_char_setnone(struct net_device *dev,
int8_t s7snr = 0;
int status = 0;
struct hdd_context *hdd_ctx;
struct hdd_station_ctx *pHddStaCtx;
struct hdd_station_ctx *sta_ctx;
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
status = wlan_hdd_validate_context(hdd_ctx);
if (status)
return status;
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
if (0 == hdd_ctx->config->fEnableSNRMonitoring ||
eConnectionState_Associated !=
pHddStaCtx->conn_info.connState) {
sta_ctx->conn_info.connState) {
hdd_err("getSNR failed: Enable SNR Monitoring-%d, ConnectionState-%d",
hdd_ctx->config->fEnableSNRMonitoring,
pHddStaCtx->conn_info.connState);
sta_ctx->conn_info.connState);
return -ENONET;
}
wlan_hdd_get_snr(adapter, &s7snr);
@ -11352,7 +11352,7 @@ static int __iw_add_tspec(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
hdd_wlan_wmm_status_e *pStatus = (hdd_wlan_wmm_status_e *) extra;
int params[HDD_WLAN_WMM_PARAM_COUNT];
struct sme_qos_wmmtspecinfo tSpec;
@ -11380,7 +11380,7 @@ static int __iw_add_tspec(struct net_device *dev, struct iw_request_info *info,
return -EPERM;
/* we must be associated in order to add a tspec */
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
*pStatus = HDD_WLAN_WMM_STATUS_SETUP_FAILED_BAD_PARAM;
return 0;
}
@ -11660,7 +11660,7 @@ static int __iw_set_fties(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_context *hdd_ctx;
int ret;
@ -11684,7 +11684,7 @@ static int __iw_set_fties(struct net_device *dev, struct iw_request_info *info,
return -EINVAL;
}
/* Added for debug on reception of Re-assoc Req. */
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
if (eConnectionState_Associated != sta_ctx->conn_info.connState) {
hdd_debug("Called with Ie of length = %d when not associated",
wrqu->data.length);
hdd_debug("Should be Re-assoc Req IEs");
@ -14421,7 +14421,7 @@ const struct iw_handler_def we_handler_def = {
static int hdd_set_wext(struct hdd_adapter *adapter)
{
struct hdd_wext_state *pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
struct hdd_station_ctx *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
ENTER();
@ -14430,17 +14430,17 @@ static int hdd_set_wext(struct hdd_adapter *adapter)
return QDF_STATUS_E_FAILURE;
}
if (!pHddStaCtx) {
hdd_err("ERROR: pHddStaCtx is NULL");
if (!sta_ctx) {
hdd_err("ERROR: sta_ctx is NULL");
return QDF_STATUS_E_FAILURE;
}
/* Now configure the roaming profile links. To SSID and bssid. */
pwextBuf->roamProfile.SSIDs.numOfSSIDs = 0;
pwextBuf->roamProfile.SSIDs.SSIDList = &pHddStaCtx->conn_info.SSID;
pwextBuf->roamProfile.SSIDs.SSIDList = &sta_ctx->conn_info.SSID;
pwextBuf->roamProfile.BSSIDs.numOfBSSIDs = 0;
pwextBuf->roamProfile.BSSIDs.bssid = &pHddStaCtx->conn_info.bssId;
pwextBuf->roamProfile.BSSIDs.bssid = &sta_ctx->conn_info.bssId;
/*Set the numOfChannels to zero to scan all the channels */
pwextBuf->roamProfile.ChannelInfo.numOfChannels = 0;