|
@@ -2973,28 +2973,28 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
- if (req->chan == 0) {
|
|
|
- WMA_LOGE("%s: invalid channel: %d", __func__, req->chan);
|
|
|
+ if (req->op_freq == 0) {
|
|
|
+ WMA_LOGE("invalid operating frequency");
|
|
|
QDF_ASSERT(0);
|
|
|
return QDF_STATUS_E_INVAL;
|
|
|
}
|
|
|
|
|
|
- params.channel.cfreq1 = cds_chan_to_freq(req->chan);
|
|
|
+ params.channel.cfreq1 = req->op_freq;
|
|
|
ch_width = req->chan_width;
|
|
|
bw_val = wlan_reg_get_bw_value(req->chan_width);
|
|
|
- if (20 < bw_val) {
|
|
|
+ if (bw_val > 20) {
|
|
|
if (req->ch_center_freq_seg0) {
|
|
|
params.channel.cfreq1 =
|
|
|
cds_chan_to_freq(req->ch_center_freq_seg0);
|
|
|
} else {
|
|
|
WMA_LOGE("%s: invalid cntr_freq for bw %d, drop to 20",
|
|
|
__func__, bw_val);
|
|
|
- params.channel.cfreq1 = cds_chan_to_freq(req->chan);
|
|
|
+ params.channel.cfreq1 = req->op_freq;
|
|
|
ch_width = CH_WIDTH_20MHZ;
|
|
|
bw_val = 20;
|
|
|
}
|
|
|
}
|
|
|
- if (80 < bw_val) {
|
|
|
+ if (bw_val > 80) {
|
|
|
if (req->ch_center_freq_seg1) {
|
|
|
params.channel.cfreq2 =
|
|
|
cds_chan_to_freq(req->ch_center_freq_seg1);
|
|
@@ -3007,8 +3007,7 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
|
|
|
} else {
|
|
|
params.channel.cfreq2 = 0;
|
|
|
}
|
|
|
- chan_mode = wma_chan_phy_mode(req->chan, ch_width,
|
|
|
- req->dot11_mode);
|
|
|
+ chan_mode = wma_chan_phy_mode(req->op_freq, ch_width, req->dot11_mode);
|
|
|
|
|
|
if (chan_mode == MODE_UNKNOWN) {
|
|
|
WMA_LOGE("%s: invalid phy mode!", __func__);
|
|
@@ -3026,7 +3025,7 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
/* Fill channel info */
|
|
|
- params.channel.mhz = cds_chan_to_freq(req->chan);
|
|
|
+ params.channel.mhz = req->op_freq;
|
|
|
params.channel.phy_mode = chan_mode;
|
|
|
|
|
|
/* For Rome, only supports LFR2, not LFR3, for reassoc, need send vdev
|
|
@@ -3071,7 +3070,8 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
|
|
|
CFG_TGT_DEFAULT_GTX_BW_MASK;
|
|
|
intr[params.vdev_id].mhz = params.channel.mhz;
|
|
|
intr[params.vdev_id].chan_width = ch_width;
|
|
|
- intr[params.vdev_id].channel = req->chan;
|
|
|
+ intr[params.vdev_id].channel = wlan_reg_freq_to_chan(wma->pdev,
|
|
|
+ req->op_freq);
|
|
|
|
|
|
temp_chan_info &= 0xffffffc0;
|
|
|
temp_chan_info |= params.channel.phy_mode;
|
|
@@ -4087,7 +4087,8 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, struct bss_params *add_bss)
|
|
|
|
|
|
qdf_mem_zero(&req, sizeof(req));
|
|
|
req.vdev_id = vdev_id;
|
|
|
- req.chan = add_bss->currentOperChannel;
|
|
|
+ req.op_freq = wlan_reg_chan_to_freq(wma->pdev,
|
|
|
+ add_bss->currentOperChannel);
|
|
|
req.chan_width = add_bss->ch_width;
|
|
|
req.dot11_mode = add_bss->dot11_mode;
|
|
|
|
|
@@ -4245,7 +4246,8 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, struct bss_params *add_bss)
|
|
|
|
|
|
qdf_mem_zero(&req, sizeof(req));
|
|
|
req.vdev_id = vdev_id;
|
|
|
- req.chan = add_bss->currentOperChannel;
|
|
|
+ req.op_freq = wlan_reg_chan_to_freq(wma->pdev,
|
|
|
+ add_bss->currentOperChannel);
|
|
|
req.chan_width = add_bss->ch_width;
|
|
|
req.ch_center_freq_seg0 = add_bss->ch_center_freq_seg0;
|
|
|
req.ch_center_freq_seg1 = add_bss->ch_center_freq_seg1;
|
|
@@ -4273,7 +4275,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, struct bss_params *add_bss)
|
|
|
req.preferred_tx_streams = 1;
|
|
|
}
|
|
|
|
|
|
- WMA_LOGD("%s: chan %d chan_width %d", __func__, req.chan,
|
|
|
+ WMA_LOGD("%s: op_freq %d chan_width %d", __func__, req.op_freq,
|
|
|
req.chan_width);
|
|
|
WMA_LOGD("%s: ssid = %s", __func__, req.ssid.ssId);
|
|
|
|
|
@@ -4421,7 +4423,9 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, struct bss_params *add_bss)
|
|
|
|
|
|
qdf_mem_zero(&req, sizeof(req));
|
|
|
req.vdev_id = vdev_id;
|
|
|
- req.chan = add_bss->currentOperChannel;
|
|
|
+ req.op_freq =
|
|
|
+ wlan_reg_chan_to_freq(wma->pdev,
|
|
|
+ add_bss->currentOperChannel);
|
|
|
req.chan_width = add_bss->ch_width;
|
|
|
|
|
|
if (add_bss->ch_width == CH_WIDTH_10MHZ)
|