From 034f3c92a8d1358650d69971f16991dc99fc055c Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Fri, 9 Nov 2018 10:46:21 -0800 Subject: [PATCH] qcacld-3.0: Replace tpAniSirGlobal in HDD Typedef tpAniSirGlobal is obsolete, so replace it with the underlying struct pointer or handle conversion function as appropriate. Change-Id: I4dd5d91f54bfb57d6322a5e3c91795b80393da8a CRs-Fixed: 2347908 --- core/hdd/src/wlan_hdd_assoc.c | 5 +++-- core/hdd/src/wlan_hdd_cfg80211.c | 2 +- core/hdd/src/wlan_hdd_hostapd.c | 7 ++++--- core/hdd/src/wlan_hdd_stats.c | 6 +++--- core/hdd/src/wlan_hdd_wext.c | 5 +++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 91d1fb609e35..c87e1e85ef3b 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -5228,8 +5228,9 @@ 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)mac_handle, - pRsnIe, RSNIeLen, &dot11WPAIE, false); + parse_status = dot11f_unpack_ie_wpa(MAC_CONTEXT(mac_handle), + pRsnIe, RSNIeLen, + &dot11WPAIE, false); if (!DOT11F_SUCCEEDED(parse_status)) { hdd_err("Invalid WPA IE: parse status %d", parse_status); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 390207370b2f..2f6977253cdf 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -17291,7 +17291,7 @@ static int wlan_hdd_cfg80211_set_privacy_ibss(struct hdd_adapter *adapter, return -EINVAL; } ret = dot11f_unpack_ie_wpa( - (tpAniSirGlobal) mac_handle, + MAC_CONTEXT(mac_handle), (uint8_t *)&ie[2 + 4], ie[1] - 4, &dot11WPAIE, false); if (DOT11F_FAILED(ret)) { diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 222991944e9c..5cea9f6a15c7 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2667,8 +2667,9 @@ static int hdd_softap_unpack_ie(mac_handle_t mac_handle, RSNIeLen = gen_ie_len - (2 + 4); /* Unpack the WPA IE */ memset(&dot11WPAIE, 0, sizeof(tDot11fIEWPA)); - ret = dot11f_unpack_ie_wpa((tpAniSirGlobal) mac_handle, - pRsnIe, RSNIeLen, &dot11WPAIE, false); + ret = dot11f_unpack_ie_wpa(MAC_CONTEXT(mac_handle), + pRsnIe, RSNIeLen, + &dot11WPAIE, false); if (DOT11F_FAILED(ret)) { hdd_err("unpack failed, ret: 0x%x", ret); return -EINVAL; @@ -3305,7 +3306,7 @@ static bool wlan_hdd_get_sap_obss(struct hdd_adapter *adapter) beacon->tail, beacon->tail_len); if (ie && ie[1]) { qdf_mem_copy(ht_cap_ie, &ie[2], DOT11F_IE_HTCAPS_MAX_LEN); - ret = dot11f_unpack_ie_ht_caps((tpAniSirGlobal)mac_handle, + ret = dot11f_unpack_ie_ht_caps(MAC_CONTEXT(mac_handle), ht_cap_ie, ie[1], &dot11_ht_cap_ie, false); if (DOT11F_FAILED(ret)) { diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index daba6c6d2519..21c34c1d755b 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -541,7 +541,7 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter, struct hdd_station_ctx *sta_ctx; mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle; /* pre-existing layering violation */ - tpAniSirGlobal pMac = MAC_CONTEXT(mac_handle); + struct mac_context *mac = MAC_CONTEXT(mac_handle); pInfo->mode = hdd_map_device_to_ll_iface_mode(adapter->device_mode); @@ -588,10 +588,10 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter, } qdf_mem_copy(pInfo->countryStr, - pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); + mac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); qdf_mem_copy(pInfo->apCountryStr, - pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); + mac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); return true; } diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 2f3e2baa62df..3fb1c2928ef7 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -4161,7 +4161,7 @@ static int hdd_we_set_data_inactivity_timeout(struct hdd_adapter *adapter, { struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); mac_handle_t mac_handle = hdd_ctx->mac_handle; - tpAniSirGlobal mac_ctx; + struct mac_context *mac_ctx; if (!mac_handle) return -EINVAL; @@ -4171,7 +4171,8 @@ static int hdd_we_set_data_inactivity_timeout(struct hdd_adapter *adapter, return -EINVAL; } - mac_ctx = PMAC_STRUCT(mac_handle); + /* pre-existing layering violation */ + mac_ctx = MAC_CONTEXT(mac_handle); mac_ctx->mlme_cfg->timeouts.ps_data_inactivity_timeout = value; return 0;