qcacld-3.0: Replace channel id with frequency for monitor mode

Replace channel ID with channel frequency in
wlan_hdd_change_hw_mode_for_given_chnl.

Change-Id: If1583dae2f13c5e5553d916befb186de00840345
CRs-Fixed: 2584776
This commit is contained in:
Tushnim Bhattacharyya
2019-12-11 17:11:10 -08:00
committed by nshrivas
parent d5c0e02813
commit c682bfb442
2 changed files with 10 additions and 11 deletions

View File

@@ -9889,7 +9889,7 @@ static int __wlan_hdd_cfg80211_set_probable_oper_channel(struct wiphy *wiphy,
int ret = 0;
enum policy_mgr_con_mode intf_mode;
struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_MAX + 1];
uint32_t ch_freq, channel_hint;
uint32_t ch_freq;
hdd_enter_dev(ndev);
@@ -9925,7 +9925,6 @@ static int __wlan_hdd_cfg80211_set_probable_oper_channel(struct wiphy *wiphy,
ch_freq = nla_get_u32(tb[
QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_FREQ]);
channel_hint = cds_freq_to_chan(ch_freq);
/* check pcl table */
if (!policy_mgr_allow_concurrency(hdd_ctx->psoc, intf_mode,
ch_freq, HW_MODE_20_MHZ)) {
@@ -9936,7 +9935,7 @@ static int __wlan_hdd_cfg80211_set_probable_oper_channel(struct wiphy *wiphy,
if (0 != wlan_hdd_check_remain_on_channel(adapter))
hdd_warn("Remain On Channel Pending");
if (wlan_hdd_change_hw_mode_for_given_chnl(adapter, channel_hint,
if (wlan_hdd_change_hw_mode_for_given_chnl(adapter, ch_freq,
POLICY_MGR_UPDATE_REASON_SET_OPER_CHAN)) {
hdd_err("Failed to change hw mode");
return -EINVAL;
@@ -22452,8 +22451,8 @@ static int wlan_hdd_cfg80211_channel_switch(struct wiphy *wiphy,
#endif
int wlan_hdd_change_hw_mode_for_given_chnl(struct hdd_adapter *adapter,
uint8_t channel,
enum policy_mgr_conn_update_reason reason)
uint32_t chan_freq,
enum policy_mgr_conn_update_reason reason)
{
QDF_STATUS status;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
@@ -22466,7 +22465,7 @@ int wlan_hdd_change_hw_mode_for_given_chnl(struct hdd_adapter *adapter,
status = policy_mgr_current_connections_update(
hdd_ctx->psoc, adapter->vdev_id,
wlan_chan_to_freq(channel), reason);
chan_freq, reason);
switch (status) {
case QDF_STATUS_E_FAILURE:
/*
@@ -22488,7 +22487,7 @@ int wlan_hdd_change_hw_mode_for_given_chnl(struct hdd_adapter *adapter,
return -EINVAL;
}
if (QDF_MONITOR_MODE == adapter->device_mode)
hdd_info("Monitor mode:channel:%d (SMM->DBS)", channel);
hdd_info("Monitor mode:channel freq:%d (SMM->DBS)", chan_freq);
break;
default:

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -496,7 +496,7 @@ wlan_hdd_inform_bss_frame(struct hdd_adapter *adapter,
/**
* wlan_hdd_change_hw_mode_for_given_chnl() - change HW mode for given channel
* @adapter: pointer to adapter
* @channel: given channel number
* @chan_freq: given channel frequency
* @reason: reason for HW mode change is needed
*
* This API decides and sets hardware mode to DBS based on given channel.
@@ -506,8 +506,8 @@ wlan_hdd_inform_bss_frame(struct hdd_adapter *adapter,
* Return: 0 for success and non-zero for failure
*/
int wlan_hdd_change_hw_mode_for_given_chnl(struct hdd_adapter *adapter,
uint8_t channel,
enum policy_mgr_conn_update_reason reason);
uint32_t chan_freq,
enum policy_mgr_conn_update_reason reason);
/**
* hdd_rate_info_bw: an HDD internal rate bandwidth representation