qcacld-3.0: Remove channel and rename freq in hdd_connection_info
Convert channel to freq in hdd_connection_info, so
remove unused 'channel' and rename 'freq' to 'chan_freq'.
Change-Id: I0d3fd39f9ac3c2303729b27b7c97385097c82104
CRs-Fixed: 2508791
diff --git a/core/hdd/inc/wlan_hdd_assoc.h b/core/hdd/inc/wlan_hdd_assoc.h
index 3a82875..ad4993b 100644
--- a/core/hdd/inc/wlan_hdd_assoc.h
+++ b/core/hdd/inc/wlan_hdd_assoc.h
@@ -146,7 +146,6 @@
* @auth_type: Auth Type
* @uc_encrypt_type: Unicast Encryption Type
* @mc_encrypt_type: Multicast Encryption Type
- * @channel: Operation Channel
* @is_authenticated: Remembers authenticated state
* @dot11mode: dot11mode
* @proxy_arp_service: proxy arp service
@@ -154,7 +153,7 @@
* @gtk_installed: gtk installed state
* @nss: number of spatial streams negotiated
* @rate_flags: rate flags for current connection
- * @freq: channel frequency
+ * @chan_freq: channel frequency
* @txrate: txrate structure holds nss & datarate info
* @rxrate: rx rate info
* @noise: holds noise information
@@ -183,7 +182,6 @@
enum csr_akm_type auth_type;
eCsrEncryptionType uc_encrypt_type;
eCsrEncryptionType mc_encrypt_type;
- uint8_t channel;
uint8_t is_authenticated;
uint32_t dot11mode;
uint8_t proxy_arp_service;
@@ -191,7 +189,7 @@
bool gtk_installed;
uint8_t nss;
uint32_t rate_flags;
- uint32_t freq;
+ uint32_t chan_freq;
struct rate_info txrate;
struct rate_info rxrate;
int8_t noise;
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index f4d72c8..76cae0b 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -340,7 +340,7 @@
uint32_t sta_freq = 0;
if (eConnectionState_Associated == sta_ctx->conn_info.conn_state)
- sta_freq = sta_ctx->conn_info.freq;
+ sta_freq = sta_ctx->conn_info.chan_freq;
if (wlan_reg_is_24ghz_ch_freq(sta_freq))
return BAND_2G;
@@ -959,7 +959,6 @@
{
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
eCsrEncryptionType encrypt_type = eCSR_ENCRYPT_TYPE_NONE;
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
QDF_ASSERT(roam_info);
@@ -1012,12 +1011,7 @@
sta_ctx->conn_info.last_auth_type =
sta_ctx->conn_info.auth_type;
- sta_ctx->conn_info.channel =
- wlan_reg_freq_to_chan(
- hdd_ctx->pdev,
- roam_info->u.pConnectedProfile->op_freq);
-
- sta_ctx->conn_info.freq =
+ sta_ctx->conn_info.chan_freq =
roam_info->u.pConnectedProfile->op_freq;
/* Save the ssid for the connection */
@@ -1641,8 +1635,8 @@
uint32_t *cap_info;
hdd_debug("WIFI DATA LOGGER");
- hdd_debug("channel: %d",
- hdd_sta_ctx->conn_info.freq);
+ hdd_debug("chan_freq: %d",
+ hdd_sta_ctx->conn_info.chan_freq);
hdd_debug("dot11mode: %d",
hdd_sta_ctx->conn_info.dot11mode);
hdd_debug("AKM: %d",
@@ -2921,20 +2915,20 @@
conn_info_channel =
wlan_reg_freq_to_chan(hdd_ctx->pdev,
- sta_ctx->conn_info.freq);
+ sta_ctx->conn_info.chan_freq);
hdd_debug("check if STA chan ok for DNBS");
if (policy_mgr_is_chan_ok_for_dnbs(hdd_ctx->psoc,
conn_info_channel,
&ok)) {
hdd_err("Unable to check DNBS eligibility for chan(freq):%u",
- sta_ctx->conn_info.freq);
+ sta_ctx->conn_info.chan_freq);
return QDF_STATUS_E_FAILURE;
}
if (!ok) {
hdd_err("Chan(freq):%u not suitable for DNBS",
- sta_ctx->conn_info.freq);
+ sta_ctx->conn_info.chan_freq);
wlan_hdd_netif_queue_control(adapter,
WLAN_NETIF_CARRIER_OFF,
WLAN_CONTROL_PATH);
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index e8c9149..048d449 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -4381,7 +4381,7 @@
conn_info_channel =
wlan_reg_freq_to_chan(
hdd_ctx->pdev,
- sta_ctx->conn_info.freq);
+ sta_ctx->conn_info.chan_freq);
/*
* if STA is already connected on DFS channel,
* do not disable scan on dfs channels
@@ -8878,7 +8878,7 @@
}
nss = hdd_sta_ctx->conn_info.nss;
- freq = hdd_sta_ctx->conn_info.freq;
+ freq = hdd_sta_ctx->conn_info.chan_freq;
rate_flags = hdd_sta_ctx->conn_info.rate_flags;
} else if (adapter->device_mode == QDF_P2P_GO_MODE ||
adapter->device_mode == QDF_SAP_MODE) {
@@ -19186,12 +19186,11 @@
/* Set the Operational Channel */
hdd_debug("set channel %d", channelNum);
roam_profile->ChannelInfo.numOfChannels = 1;
- sta_ctx->conn_info.channel = channelNum;
- sta_ctx->conn_info.freq =
+ sta_ctx->conn_info.chan_freq =
wlan_reg_chan_to_freq(hdd_ctx->pdev,
channelNum);
roam_profile->ChannelInfo.freq_list =
- &sta_ctx->conn_info.freq;
+ &sta_ctx->conn_info.chan_freq;
}
/* Initialize security parameters */
@@ -19204,7 +19203,7 @@
conn_info_channel =
wlan_reg_freq_to_chan(
hdd_ctx->pdev,
- sta_ctx->conn_info.freq);
+ sta_ctx->conn_info.chan_freq);
/* Issue connect start */
status = wlan_hdd_cfg80211_connect_start(adapter, params->ssid,
params->ssid_len,
diff --git a/core/hdd/src/wlan_hdd_debugfs_connect.c b/core/hdd/src/wlan_hdd_debugfs_connect.c
index f673b14..2de9bf1 100644
--- a/core/hdd/src/wlan_hdd_debugfs_connect.c
+++ b/core/hdd/src/wlan_hdd_debugfs_connect.c
@@ -374,7 +374,7 @@
QDF_MAC_ADDR_ARRAY(conn_info->bssid.bytes),
conn_info->connect_time,
conn_info->auth_time,
- conn_info->freq,
+ conn_info->chan_freq,
hdd_ch_width_str(conn_info->ch_width),
conn_info->signal,
tx_bit_rate,
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 8fc284d..d8a6d15 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -3165,7 +3165,7 @@
policy_mgr_valid_sap_conc_channel_check(
hdd_ctx->psoc, &intf_ch, sap_ch, vdev_id))) {
hdd_debug("can't move sap to chan(freq): %u",
- hdd_sta_ctx->conn_info.freq);
+ hdd_sta_ctx->conn_info.chan_freq);
return QDF_STATUS_E_FAILURE;
}
}
@@ -3687,12 +3687,9 @@
roam_profile = hdd_roam_profile(adapter);
num_ch = roam_profile->ChannelInfo.numOfChannels = 1;
- sta_ctx->conn_info.channel = channel;
- sta_ctx->conn_info.freq =
- wlan_reg_chan_to_freq(hdd_ctx->pdev,
- channel);
+ sta_ctx->conn_info.chan_freq = chandef->chan->center_freq;
roam_profile->ChannelInfo.freq_list =
- &sta_ctx->conn_info.freq;
+ &sta_ctx->conn_info.chan_freq;
} else if ((adapter->device_mode == QDF_SAP_MODE)
|| (adapter->device_mode == QDF_P2P_GO_MODE)
) {
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index 4338315..2ae8656 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -747,7 +747,7 @@
QDF_MAC_ADDR_SIZE)) {
hdd_warn("Reassoc BSSID is same as currently associated AP bssid");
channel = wlan_reg_freq_to_chan(hdd_ctx->pdev,
- sta_ctx->conn_info.freq);
+ sta_ctx->conn_info.chan_freq);
}
/* Check channel number is a valid channel number */
@@ -965,7 +965,7 @@
if (!qdf_mem_cmp(vendor->Oui, oui, 3)) {
conn_info_channel = wlan_reg_freq_to_chan(
hdd_ctx->pdev,
- sta_ctx->conn_info.freq);
+ sta_ctx->conn_info.chan_freq);
/*
* if the channel number is different from operating
* channel then no need to send action frame
@@ -993,7 +993,7 @@
* 0 is accepted as current home channel,
* delayed transmission of action frame is ok.
*/
- chan.center_freq = sta_ctx->conn_info.freq;
+ chan.center_freq = sta_ctx->conn_info.chan_freq;
}
}
}
@@ -4368,7 +4368,7 @@
if (roaming_offload_enabled(hdd_ctx)) {
channel = wlan_reg_freq_to_chan(
hdd_ctx->pdev,
- sta_ctx->conn_info.freq);
+ sta_ctx->conn_info.chan_freq);
hdd_wma_send_fastreassoc_cmd(adapter, bssid,
channel);
} else {
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 3c2e4db..4fe7c0a 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -78,7 +78,7 @@
sta_ctx->conn_info.conn_state) {
staChannel = wlan_reg_freq_to_chan(
hdd_ctx->pdev,
- sta_ctx->conn_info.freq);
+ sta_ctx->conn_info.chan_freq);
qdf_copy_macaddr(&staBssid,
&sta_ctx->conn_info.bssid);
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
@@ -92,7 +92,7 @@
sta_ctx->conn_info.conn_state) {
p2pChannel = wlan_reg_freq_to_chan(
hdd_ctx->pdev,
- sta_ctx->conn_info.freq);
+ sta_ctx->conn_info.chan_freq);
qdf_copy_macaddr(&p2pBssid,
&sta_ctx->conn_info.bssid);
p2pMode = "CLI";
diff --git a/core/hdd/src/wlan_hdd_lpass.c b/core/hdd/src/wlan_hdd_lpass.c
index 27bf520..58b67c6 100644
--- a/core/hdd/src/wlan_hdd_lpass.c
+++ b/core/hdd/src/wlan_hdd_lpass.c
@@ -140,7 +140,7 @@
if (sta_ctx) {
data->is_connected = is_connected;
data->rssi = adapter->rssi;
- data->freq = sta_ctx->conn_info.freq;
+ data->freq = sta_ctx->conn_info.chan_freq;
if (WLAN_SVC_MAX_SSID_LEN >=
sta_ctx->conn_info.ssid.SSID.length) {
data->ssid_len = sta_ctx->conn_info.ssid.SSID.length;
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index f8ee7ee..97e0c40 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -915,7 +915,7 @@
home_channel =
wlan_reg_freq_to_chan(
hdd_ctx->pdev,
- adapter->session.station.conn_info.freq);
+ adapter->session.station.conn_info.chan_freq);
}
return home_channel;
@@ -4683,9 +4683,7 @@
status = sme_config_fast_roaming(mac_handle, adapter->vdev_id,
true);
/* Set the default operation channel */
- sta_ctx->conn_info.channel =
- hdd_ctx->config->operating_channel;
- sta_ctx->conn_info.freq =
+ sta_ctx->conn_info.chan_freq =
wlan_reg_chan_to_freq(
hdd_ctx->pdev,
hdd_ctx->config->operating_channel);
@@ -7346,33 +7344,8 @@
hdd_for_each_adapter(hdd_ctx, adapter) {
if (mode == adapter->device_mode) {
- switch (adapter->device_mode) {
- case QDF_STA_MODE:
- case QDF_P2P_CLIENT_MODE:
- if (hdd_conn_is_connected
- (WLAN_HDD_GET_STATION_CTX_PTR
- (adapter))) {
- operatingChannel =
- (WLAN_HDD_GET_STATION_CTX_PTR
- (adapter))->conn_info.
- channel;
- }
- break;
- case QDF_SAP_MODE:
- case QDF_P2P_GO_MODE:
- /* softap connection info */
- if (test_bit
- (SOFTAP_BSS_STARTED,
- &adapter->event_flags))
- operatingChannel =
- (WLAN_HDD_GET_AP_CTX_PTR
- (adapter))->operating_channel;
- break;
- default:
- break;
- }
-
- /* Found the device of interest. break the loop */
+ operatingChannel =
+ hdd_get_adapter_home_channel(adapter);
break;
}
}
diff --git a/core/hdd/src/wlan_hdd_station_info.c b/core/hdd/src/wlan_hdd_station_info.c
index 4e68b56..601fcd1 100644
--- a/core/hdd/src/wlan_hdd_station_info.c
+++ b/core/hdd/src/wlan_hdd_station_info.c
@@ -469,7 +469,7 @@
if (!nla_attr)
goto fail;
if (nla_put_u32(skb, NL80211_SURVEY_INFO_FREQUENCY,
- hdd_sta_ctx->cache_conn_info.freq) ||
+ hdd_sta_ctx->cache_conn_info.chan_freq) ||
nla_put_u8(skb, NL80211_SURVEY_INFO_NOISE,
(hdd_sta_ctx->cache_conn_info.noise + 100))) {
hdd_err("put fail");
@@ -594,7 +594,7 @@
nl_buf_len += sizeof(hdd_sta_ctx->
cache_conn_info.last_ssid.SSID.length) +
QDF_MAC_ADDR_SIZE +
- sizeof(hdd_sta_ctx->cache_conn_info.freq) +
+ sizeof(hdd_sta_ctx->cache_conn_info.chan_freq) +
sizeof(hdd_sta_ctx->cache_conn_info.noise) +
sizeof(hdd_sta_ctx->cache_conn_info.signal) +
(sizeof(uint32_t) * 2) +
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 5eaf0c6..2b8dd8c 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -7442,7 +7442,7 @@
uint8_t operating_ch =
wlan_reg_freq_to_chan(
hdd_ctx->pdev,
- adapter->session.station.conn_info.freq);
+ adapter->session.station.conn_info.chan_freq);
tCsrRoamModifyProfileFields mod_fields;
sme_get_modify_profile_fields(mac_handle, adapter->vdev_id,