From 2b89f8b8bd01bad255b113f81bf00beeeb91074e Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 14 Mar 2018 12:37:14 -0700 Subject: [PATCH] qcacld-3.0: Use roam profile accessor in wlan_hdd_hostapd.c Update wlan_hdd_hostapd.c to use the recently introduced roam profile accessor function hdd_roam_profile(). Change-Id: Ieb772ec0b851d9a036f01f5002f35033c628d8db CRs-Fixed: 2207890 --- core/hdd/src/wlan_hdd_hostapd.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index e2a6e81fab6f..a805bee2d524 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -6661,13 +6661,9 @@ int wlan_hdd_set_channel(struct wiphy *wiphy, adapter->device_mode); } - if ((adapter->device_mode == QDF_STA_MODE) - || (adapter->device_mode == QDF_P2P_CLIENT_MODE) - ) { - struct hdd_wext_state *pWextState = - WLAN_HDD_GET_WEXT_STATE_PTR(adapter); - struct csr_roam_profile *roam_profile = - &pWextState->roamProfile; + if ((adapter->device_mode == QDF_STA_MODE) || + (adapter->device_mode == QDF_P2P_CLIENT_MODE)) { + struct csr_roam_profile *roam_profile; struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); @@ -6678,6 +6674,7 @@ int wlan_hdd_set_channel(struct wiphy *wiphy, return -EINVAL; } + roam_profile = hdd_roam_profile(adapter); num_ch = roam_profile->ChannelInfo.numOfChannels = 1; sta_ctx->conn_info.operationChannel = channel; roam_profile->ChannelInfo.ChannelList =