qcacld-3.0: Remove channel from struct hdd_mon_set_ch_info
1) Remove channel from struct hdd_mon_set_ch_info. All client code will use freq within the same struct from now on. 2) Replace the usage of channel ID(op_chan) with channel frequency(op_freq) in function hdd_mon_select_cbmode's parameter list. 3) Fix a number of camel cases detected in function hdd_select_cbmode. Change-Id: Ib7c1ee453b34647e983749a713b33017b92103ac CRs-Fixed: 2504779
This commit is contained in:
@@ -675,14 +675,12 @@ struct hdd_beacon_data {
|
||||
|
||||
/**
|
||||
* struct hdd_mon_set_ch_info - Holds monitor mode channel switch params
|
||||
* @channel: Channel number.
|
||||
* @freq: Channel frequency.
|
||||
* @cb_mode: Channel bonding
|
||||
* @channel_width: Channel width 0/1/2 for 20/40/80MHz respectively.
|
||||
* @phy_mode: PHY mode
|
||||
*/
|
||||
struct hdd_mon_set_ch_info {
|
||||
uint8_t channel;
|
||||
uint32_t freq;
|
||||
uint8_t cb_mode;
|
||||
uint32_t channel_width;
|
||||
|
@@ -16035,12 +16035,11 @@ wlan_hdd_cfg80211_roam_metrics_handover(struct hdd_adapter *adapter,
|
||||
#ifdef FEATURE_MONITOR_MODE_SUPPORT
|
||||
static
|
||||
void hdd_mon_select_cbmode(struct hdd_adapter *adapter,
|
||||
uint8_t op_chan,
|
||||
uint32_t op_freq,
|
||||
struct ch_params *ch_params)
|
||||
{
|
||||
struct hdd_station_ctx *station_ctx =
|
||||
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
struct hdd_mon_set_ch_info *ch_info = &station_ctx->ch_info;
|
||||
enum hdd_dot11_mode hdd_dot11_mode;
|
||||
uint8_t ini_dot11_mode =
|
||||
@@ -16076,8 +16075,7 @@ void hdd_mon_select_cbmode(struct hdd_adapter *adapter,
|
||||
ch_info->channel_width = ch_params->ch_width;
|
||||
ch_info->phy_mode =
|
||||
hdd_cfg_xlate_to_csr_phy_mode(hdd_dot11_mode);
|
||||
ch_info->channel = op_chan;
|
||||
ch_info->freq = wlan_reg_chan_to_freq(hdd_ctx->pdev, op_chan);
|
||||
ch_info->freq = op_freq;
|
||||
ch_info->cb_mode = ch_params->ch_width;
|
||||
hdd_debug("ch_info width %d, phymode %d channel freq %d",
|
||||
ch_info->channel_width, ch_info->phy_mode,
|
||||
@@ -16086,7 +16084,7 @@ void hdd_mon_select_cbmode(struct hdd_adapter *adapter,
|
||||
#else
|
||||
static
|
||||
void hdd_mon_select_cbmode(struct hdd_adapter *adapter,
|
||||
uint8_t op_chan,
|
||||
uint32_t op_freq,
|
||||
struct ch_params *ch_params)
|
||||
{
|
||||
}
|
||||
@@ -16100,8 +16098,8 @@ void hdd_mon_select_cbmode(struct hdd_adapter *adapter,
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hdd_select_cbmode(struct hdd_adapter *adapter, uint8_t operationChannel,
|
||||
struct ch_params *ch_params)
|
||||
void hdd_select_cbmode(struct hdd_adapter *adapter, uint8_t op_chan,
|
||||
struct ch_params *ch_params)
|
||||
{
|
||||
uint8_t sec_ch = 0;
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
@@ -16109,21 +16107,22 @@ void hdd_select_cbmode(struct hdd_adapter *adapter, uint8_t operationChannel,
|
||||
WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
eConnectionState connstate;
|
||||
bool cbmode_select = false;
|
||||
uint32_t op_freq = wlan_reg_chan_to_freq(hdd_ctx->pdev, op_chan);
|
||||
|
||||
/*
|
||||
* CDS api expects secondary channel for calculating
|
||||
* the channel params
|
||||
*/
|
||||
if ((ch_params->ch_width == CH_WIDTH_40MHZ) &&
|
||||
(WLAN_REG_IS_24GHZ_CH(operationChannel))) {
|
||||
if (operationChannel >= 1 && operationChannel <= 5)
|
||||
sec_ch = operationChannel + 4;
|
||||
else if (operationChannel >= 6 && operationChannel <= 13)
|
||||
sec_ch = operationChannel - 4;
|
||||
(WLAN_REG_IS_24GHZ_CH(op_chan))) {
|
||||
if (op_chan >= 1 && op_chan <= 5)
|
||||
sec_ch = op_chan + 4;
|
||||
else if (op_chan >= 6 && op_chan <= 13)
|
||||
sec_ch = op_chan - 4;
|
||||
}
|
||||
|
||||
/* This call decides required channel bonding mode */
|
||||
wlan_reg_set_channel_params(hdd_ctx->pdev, operationChannel,
|
||||
wlan_reg_set_channel_params(hdd_ctx->pdev, op_chan,
|
||||
sec_ch, ch_params);
|
||||
|
||||
if (adapter->device_mode == QDF_STA_MODE &&
|
||||
@@ -16136,7 +16135,7 @@ void hdd_select_cbmode(struct hdd_adapter *adapter, uint8_t operationChannel,
|
||||
}
|
||||
|
||||
if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE || cbmode_select)
|
||||
hdd_mon_select_cbmode(adapter, operationChannel, ch_params);
|
||||
hdd_mon_select_cbmode(adapter, op_freq, ch_params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -319,7 +319,7 @@ void hdd_reg_notifier(struct wiphy *wiphy,
|
||||
QDF_STATUS wlan_hdd_validate_operation_channel(struct hdd_adapter *adapter,
|
||||
int channel);
|
||||
|
||||
void hdd_select_cbmode(struct hdd_adapter *adapter, uint8_t operationChannel,
|
||||
void hdd_select_cbmode(struct hdd_adapter *adapter, uint8_t op_chan,
|
||||
struct ch_params *ch_params);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user