qcacld-3.0: Incorporate hdd_wext_state into hdd_station_ctx

None of the data items contained in struct hdd_wext_state is actually
unique to wireless extensions(wext) -- cfg80211 also uses these data
items. Since all of these data items are now being accessed by
accessor functions, rename and relocate them to struct
hdd_station_ctx.

Change-Id: Icfdde73ed3f01fb1c48105e0728f610fe1d94717
CRs-Fixed: 2208687
This commit is contained in:
Jeff Johnson 2018-03-19 15:17:29 -07:00 • committed by nshrivas
commit fd9928af95
3 changed files with 26 additions and 31 deletions

View file

@ -693,7 +693,9 @@ struct hdd_mon_set_ch_info {
/**
* struct hdd_station_ctx -- STA-specific information
* @wext_state: wireless extensions state
* @roam_profile: current roaming profile
* @security_ie: WPA or RSN IE used by the @roam_profile
* @assoc_additional_ie: association additional IE used by the @roam_profile
* @wpa_versions: bitmap of supported WPA versions
* @auth_key_mgmt: bitmap of supported auth key mgmt protocols
* @requested_bssid: Specific BSSID to which to connect
@ -716,7 +718,9 @@ struct hdd_mon_set_ch_info {
* to immediately go into power save?
*/
struct hdd_station_ctx {
struct hdd_wext_state wext_state;
struct csr_roam_profile roam_profile;
uint8_t security_ie[MAX_WPA_RSN_IE_LEN];
tSirAddie assoc_additional_ie;
enum nl80211_wpa_versions wpa_versions;
enum hdd_auth_key_mgmt auth_key_mgmt;
struct qdf_mac_addr requested_bssid;
@ -1318,8 +1322,6 @@ struct hdd_adapter {
#define WLAN_HDD_GET_STATION_CTX_PTR(adapter) (&(adapter)->session.station)
#define WLAN_HDD_GET_AP_CTX_PTR(adapter) (&(adapter)->session.ap)
#define WLAN_HDD_GET_WEXT_STATE_PTR(adapter) \
(&(adapter)->session.station.wext_state)
#define WLAN_HDD_GET_CTX(adapter) ((adapter)->hdd_ctx)
#define WLAN_HDD_GET_HAL_CTX(adapter) ((adapter)->hdd_ctx->hHal)
#define WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter) \
@ -2650,11 +2652,11 @@ static inline int wlan_hdd_validate_session_id(u8 session_id)
static inline
struct csr_roam_profile *hdd_roam_profile(struct hdd_adapter *adapter)
{
struct hdd_wext_state *wext_state;
struct hdd_station_ctx *sta_ctx;
wext_state = WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
return &wext_state->roamProfile;
return &sta_ctx->roam_profile;
}
/**
@ -2674,11 +2676,11 @@ struct csr_roam_profile *hdd_roam_profile(struct hdd_adapter *adapter)
static inline
uint8_t *hdd_security_ie(struct hdd_adapter *adapter)
{
struct hdd_wext_state *wext_state;
struct hdd_station_ctx *sta_ctx;
wext_state = WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
return wext_state->WPARSNIE;
return sta_ctx->security_ie;
}
/**
@ -2698,11 +2700,11 @@ uint8_t *hdd_security_ie(struct hdd_adapter *adapter)
static inline
tSirAddie *hdd_assoc_additional_ie(struct hdd_adapter *adapter)
{
struct hdd_wext_state *wext_state;
struct hdd_station_ctx *sta_ctx;
wext_state = WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
return &wext_state->assocAddIE;
return &sta_ctx->assoc_additional_ie;
}
bool hdd_is_roaming_in_progress(struct hdd_adapter *adapter);

View file

@ -199,21 +199,6 @@ enum hdd_wlan_wmm_ts_info_ack_policy {
#define QCN_OUI_TYPE "\x8c\xfd\xf0\x01"
#define QCN_OUI_TYPE_SIZE 4
/*
* This structure contains the interface level (granularity)
* configuration information in support of wireless extensions.
*/
struct hdd_wext_state {
/** The CSR "desired" Profile */
struct csr_roam_profile roamProfile;
/**WPA or RSN IE*/
uint8_t WPARSNIE[MAX_WPA_RSN_IE_LEN];
/**Additional IE for assoc */
tSirAddie assocAddIE;
};
struct ccp_freq_chan_map {
/* List of frequencies */
uint32_t freq;

View file

@ -12137,13 +12137,21 @@ static void hdd_initialize_fils_info(struct hdd_adapter *adapter)
int hdd_register_wext(struct net_device *dev)
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_wext_state *pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
struct csr_roam_profile *roam_profile;
uint8_t *security_ie;
tSirAddie *assoc_additional_ie;
QDF_STATUS status;
hdd_enter();
/* Zero the memory. This zeros the profile structure */
memset(pwextBuf, 0, sizeof(struct hdd_wext_state));
roam_profile = hdd_roam_profile(adapter);
qdf_mem_zero(roam_profile, sizeof(*roam_profile));
security_ie = hdd_security_ie(adapter);
qdf_mem_zero(security_ie, MAX_WPA_RSN_IE_LEN);
assoc_additional_ie = hdd_assoc_additional_ie(adapter);
qdf_mem_zero(assoc_additional_ie, sizeof(*assoc_additional_ie));
status = hdd_set_wext(adapter);