|
@@ -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);
|
|
|
}
|
|
|
|
|
|
/**
|