qcacld-3.0: Use mac_handle_t in wlan_hdd_assoc

Change "qcacld-3.0: Introduce mac_handle_t" introduced a modern
name for what was previously called the tHalHandle. Transition
wlan_hdd_assoc to use the new naming.

Change-Id: I33e58d6c51124036d00e37fa3018379b7f99105a
CRs-Fixed: 2266433
This commit is contained in:
Jeff Johnson 2018-06-13 22:02:19 -07:00 • committed by nshrivas
commit f7187f24e1

View file

@ -378,7 +378,8 @@ struct hdd_adapter *hdd_get_sta_connection_in_progress(
} else if ((eConnectionState_Associated ==
hdd_sta_ctx->conn_info.connState) &&
sme_is_sta_key_exchange_in_progress(
hdd_ctx->hHal, adapter->session_id)) {
hdd_ctx->mac_handle,
adapter->session_id)) {
hdd_debug("session_id %d: Key exchange is in progress",
adapter->session_id);
return adapter;
@ -399,8 +400,8 @@ static int hdd_remove_beacon_filter(struct hdd_adapter *adapter)
QDF_STATUS status;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
status = sme_remove_beacon_filter(hdd_ctx->hHal,
adapter->session_id);
status = sme_remove_beacon_filter(hdd_ctx->mac_handle,
adapter->session_id);
if (!QDF_IS_STATUS_SUCCESS(status)) {
hdd_err("sme_remove_beacon_filter() failed");
return -EFAULT;
@ -426,8 +427,8 @@ static int hdd_add_beacon_filter(struct hdd_adapter *adapter)
qdf_set_bit((beacon_filter_table[i]),
(unsigned long int *)ie_map);
status = sme_add_beacon_filter(hdd_ctx->hHal,
adapter->session_id, ie_map);
status = sme_add_beacon_filter(hdd_ctx->mac_handle,
adapter->session_id, ie_map);
if (!QDF_IS_STATUS_SUCCESS(status)) {
hdd_err("sme_add_beacon_filter() failed");
return -EFAULT;
@ -1086,6 +1087,7 @@ static void hdd_send_ft_event(struct hdd_adapter *adapter)
uint16_t auth_resp_len = 0;
uint32_t ric_ies_length = 0;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
mac_handle_t mac_handle;
#if defined(KERNEL_SUPPORT_11R_CFG80211)
struct cfg80211_ft_event_params ftEvent;
@ -1098,11 +1100,12 @@ static void hdd_send_ft_event(struct hdd_adapter *adapter)
uint16_t str_len;
#endif
mac_handle = hdd_ctx->mac_handle;
#if defined(KERNEL_SUPPORT_11R_CFG80211)
qdf_mem_zero(ftIe, DOT11F_IE_FTINFO_MAX_LEN);
qdf_mem_zero(ricIe, DOT11F_IE_RICDESCRIPTOR_MAX_LEN);
sme_get_rici_es(hdd_ctx->hHal, adapter->session_id, (u8 *) ricIe,
sme_get_rici_es(mac_handle, adapter->session_id, (u8 *) ricIe,
DOT11F_IE_RICDESCRIPTOR_MAX_LEN, &ric_ies_length);
if (ric_ies_length == 0)
hdd_warn("Do not send RIC IEs as length is 0");
@ -1111,7 +1114,7 @@ static void hdd_send_ft_event(struct hdd_adapter *adapter)
ftEvent.ric_ies_len = ric_ies_length;
hdd_debug("RIC IEs is of length %d", (int)ric_ies_length);
sme_get_ft_pre_auth_response(hdd_ctx->hHal, adapter->session_id,
sme_get_ft_pre_auth_response(mac_handle, adapter->session_id,
(u8 *) ftIe, DOT11F_IE_FTINFO_MAX_LEN,
&auth_resp_len);
@ -1120,7 +1123,7 @@ static void hdd_send_ft_event(struct hdd_adapter *adapter)
return;
}
sme_set_ft_pre_auth_state(hdd_ctx->hHal, adapter->session_id, true);
sme_set_ft_pre_auth_state(mac_handle, adapter->session_id, true);
ftEvent.target_ap = ftIe;
@ -1146,7 +1149,7 @@ static void hdd_send_ft_event(struct hdd_adapter *adapter)
/* Sme needs to send the RIC IEs first */
str_len = strlcpy(buff, "RIC=", IW_CUSTOM_MAX);
sme_get_rici_es(hdd_ctx->hHal, adapter->session_id,
sme_get_rici_es(mac_handle, adapter->session_id,
(u8 *) &(buff[str_len]), (IW_CUSTOM_MAX - str_len),
&ric_ies_length);
if (ric_ies_length == 0) {
@ -1159,7 +1162,7 @@ static void hdd_send_ft_event(struct hdd_adapter *adapter)
/* Sme needs to provide the Auth Resp */
qdf_mem_zero(buff, IW_CUSTOM_MAX);
str_len = strlcpy(buff, "AUTH=", IW_CUSTOM_MAX);
sme_get_ft_pre_auth_response(hdd_ctx->hHal, adapter->session_id,
sme_get_ft_pre_auth_response(mac_handle, adapter->session_id,
(u8 *) &buff[str_len],
(IW_CUSTOM_MAX - str_len), &auth_resp_len);
@ -1675,6 +1678,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
uint8_t sta_id;
bool sendDisconInd = true;
mac_handle_t mac_handle;
if (dev == NULL) {
hdd_err("net_dev is released return");
@ -1767,7 +1771,8 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
}
hdd_wmm_adapter_clear(adapter);
sme_ft_reset(WLAN_HDD_GET_HAL_CTX(adapter), adapter->session_id);
mac_handle = hdd_ctx->mac_handle;
sme_ft_reset(mac_handle, adapter->session_id);
if (hdd_remove_beacon_filter(adapter) != 0)
hdd_err("hdd_remove_beacon_filter() failed");
@ -1820,7 +1825,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
eCSR_ROAM_LOSTLINK == roamStatus) {
wlan_hdd_cfg80211_update_bss_list(adapter,
sta_ctx->conn_info.bssId.bytes);
sme_remove_bssid_from_scan_list(hdd_ctx->hHal,
sme_remove_bssid_from_scan_list(mac_handle,
sta_ctx->conn_info.bssId.bytes);
}
if (sta_id < HDD_MAX_ADAPTERS)
@ -1841,10 +1846,9 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
pmo_ucfg_flush_gtk_offload_req(adapter->hdd_vdev);
if ((QDF_STA_MODE == adapter->device_mode) ||
(QDF_P2P_CLIENT_MODE == adapter->device_mode)) {
sme_ps_disable_auto_ps_timer(WLAN_HDD_GET_HAL_CTX
(adapter),
adapter->session_id);
(QDF_P2P_CLIENT_MODE == adapter->device_mode)) {
sme_ps_disable_auto_ps_timer(mac_handle,
adapter->session_id);
}
wlan_hdd_clear_link_layer_stats(adapter);
@ -1862,7 +1866,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
hdd_print_bss_info(sta_ctx);
if (policy_mgr_is_sta_active_connection_exists(hdd_ctx->hdd_psoc))
sme_enable_roaming_on_connected_sta(hdd_ctx->hHal);
sme_enable_roaming_on_connected_sta(mac_handle);
return status;
}
@ -2242,7 +2246,6 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
struct cfg80211_bss *bss = NULL;
uint8_t *final_req_ie = NULL;
tCsrRoamConnectedProfile roam_profile;
tHalHandle hal_handle = WLAN_HDD_GET_HAL_CTX(adapter);
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
int chan_no;
int freq;
@ -2311,8 +2314,8 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
NL80211_BAND_5GHZ);
chan = ieee80211_get_channel(adapter->wdev.wiphy, freq);
sme_roam_get_connect_profile(hal_handle, adapter->session_id,
&roam_profile);
sme_roam_get_connect_profile(hdd_ctx->mac_handle, adapter->session_id,
&roam_profile);
bss = hdd_cfg80211_get_bss(adapter->wdev.wiphy,
chan, pCsrRoamInfo->bssid.bytes,
@ -2465,11 +2468,10 @@ static int hdd_change_sta_state_authenticated(struct hdd_adapter *adapter,
hdd_objmgr_set_peer_mlme_auth_state(adapter->hdd_vdev, true);
if ((QDF_STA_MODE == adapter->device_mode) ||
(QDF_P2P_CLIENT_MODE == adapter->device_mode)) {
sme_ps_enable_auto_ps_timer(
WLAN_HDD_GET_HAL_CTX(adapter),
adapter->session_id,
timeout);
(QDF_P2P_CLIENT_MODE == adapter->device_mode)) {
sme_ps_enable_auto_ps_timer(hdd_ctx->mac_handle,
adapter->session_id,
timeout);
}
return qdf_status_to_os_return(status);
@ -2539,7 +2541,7 @@ static void hdd_change_peer_state_after_set_key(struct hdd_adapter *adapter,
* ptk_installed is true. So, make ptk_installed to true in
* case of 11R roaming.
*/
if (sme_neighbor_roam_is11r_assoc(WLAN_HDD_GET_HAL_CTX(adapter),
if (sme_neighbor_roam_is11r_assoc(adapter->hdd_ctx->mac_handle,
adapter->session_id))
hdd_sta_ctx->conn_info.ptk_installed = true;
} else {
@ -2701,6 +2703,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
unsigned long rc;
tSirResultCodes timeout_reason = 0;
bool ok;
mac_handle_t mac_handle;
if (!hdd_ctx) {
hdd_err("HDD context is NULL");
@ -2735,6 +2738,8 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
hddDisconInProgress = true;
}
mac_handle = hdd_ctx->mac_handle;
if (eCSR_ROAM_RESULT_ASSOCIATED == roamResult) {
if (NULL == roam_info) {
hdd_err("roam_info is NULL");
@ -2862,7 +2867,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
if (!hddDisconInProgress) {
hdd_err("Disconnecting...");
sme_roam_disconnect(
WLAN_HDD_GET_HAL_CTX(adapter),
mac_handle,
adapter->session_id,
eCSR_DISCONNECT_REASON_UNSPECIFIED);
}
@ -2911,7 +2916,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
*/
hdd_debug("Disconnecting...");
sme_roam_disconnect(
WLAN_HDD_GET_HAL_CTX(adapter),
mac_handle,
adapter->session_id,
eCSR_DISCONNECT_REASON_UNSPECIFIED);
}
@ -3053,11 +3058,10 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
roam_info);
}
if (sme_get_ftptk_state
(WLAN_HDD_GET_HAL_CTX(adapter),
(mac_handle,
adapter->session_id)) {
sme_set_ftptk_state
(WLAN_HDD_GET_HAL_CTX
(adapter),
(mac_handle,
adapter->session_id,
false);
roam_info->fAuthRequired =
@ -3099,14 +3103,12 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
* wpa supplicant expecting WPA/RSN IE in
* connect result.
*/
sme_roam_get_wpa_rsn_req_ie(WLAN_HDD_GET_HAL_CTX
(adapter),
sme_roam_get_wpa_rsn_req_ie(mac_handle,
adapter->session_id,
&reqRsnLength,
reqRsnIe);
sme_roam_get_wpa_rsn_rsp_ie(WLAN_HDD_GET_HAL_CTX
(adapter),
sme_roam_get_wpa_rsn_rsp_ie(mac_handle,
adapter->session_id,
&rspRsnLength,
rspRsnIe);
@ -3169,7 +3171,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
* supplicant.
*/
sme_roam_get_wpa_rsn_req_ie(
WLAN_HDD_GET_HAL_CTX(adapter),
mac_handle,
adapter->session_id,
&reqRsnLength, reqRsnIe);
@ -3271,7 +3273,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
roam_info ?
roam_info->bssid.bytes :
sta_ctx->requested_bssid.bytes);
sme_remove_bssid_from_scan_list(hdd_ctx->hHal,
sme_remove_bssid_from_scan_list(mac_handle,
roam_info ?
roam_info->bssid.bytes :
sta_ctx->requested_bssid.bytes);
@ -3809,8 +3811,7 @@ roam_roam_connect_status_update_handler(struct hdd_adapter *adapter,
encr_type);
qdf_status =
sme_roam_set_key(WLAN_HDD_GET_HAL_CTX
(adapter),
sme_roam_set_key(hdd_ctx->mac_handle,
adapter->session_id,
&sta_ctx->ibss_enc_key,
&roamId);
@ -5087,7 +5088,7 @@ static int32_t hdd_process_genie(struct hdd_adapter *adapter,
#endif
uint16_t gen_ie_len, uint8_t *gen_ie)
{
tHalHandle halHandle = WLAN_HDD_GET_HAL_CTX(adapter);
mac_handle_t mac_handle = hdd_adapter_get_mac_handle(adapter);
tDot11fIERSN dot11RSNIE = {0};
tDot11fIEWPA dot11WPAIE = {0};
uint8_t *pRsnIe;
@ -5114,8 +5115,8 @@ static int32_t hdd_process_genie(struct hdd_adapter *adapter,
pRsnIe = gen_ie + 2;
RSNIeLen = gen_ie_len - 2;
/* Unpack the RSN IE */
parse_status = sme_unpack_rsn_ie(halHandle, pRsnIe, RSNIeLen,
&dot11RSNIE, false);
parse_status = sme_unpack_rsn_ie(mac_handle, pRsnIe, RSNIeLen,
&dot11RSNIE, false);
if (!DOT11F_SUCCEEDED(parse_status)) {
hdd_err("Invalid RSN IE: parse status %d",
parse_status);
@ -5157,7 +5158,7 @@ static int32_t hdd_process_genie(struct hdd_adapter *adapter,
pRsnIe = gen_ie + 2 + 4;
RSNIeLen = gen_ie_len - (2 + 4);
/* Unpack the WPA IE */
parse_status = dot11f_unpack_ie_wpa((tpAniSirGlobal) halHandle,
parse_status = dot11f_unpack_ie_wpa((tpAniSirGlobal)mac_handle,
pRsnIe, RSNIeLen, &dot11WPAIE, false);
if (!DOT11F_SUCCEEDED(parse_status)) {
hdd_err("Invalid WPA IE: parse status %d",