mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacld-3.0: Replace channel num with freq in wlan_hdd_set_channel api
Currently api wlan_hdd_set_channel is using channel number to validate requested frequency, this function converts center frequency to channel number and again converts this channel number to frequency to validate this channel, which may cause issues when 6GHz SAP tries to come up. For example if center freq is 6015 and current country is set to US, with current logic first this frequency is converted to channel number which comes to be channel number 13 and then this channel number is converted back to freq and gets validated. As channel 13 is invalid in US this validation fails even though freq 6015 is valid frequency in US. TO address above issue, remove this converion of center freq to chan num and chan num to freq, instead used center frequency directly for any kind of validatoin. Change-Id: Iec86c7f42e3f7e786f89df28f53ca71f67defc24 CRs-Fixed: 2970037
This commit is contained in:
parent
d9ace944d2
commit
2e155a88b8
1 changed files with 2 additions and 4 deletions
|
|
@ -3861,7 +3861,6 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
|
|||
{
|
||||
struct hdd_adapter *adapter = NULL;
|
||||
uint32_t num_ch = 0;
|
||||
int channel = 0;
|
||||
int channel_seg2 = 0;
|
||||
struct hdd_context *hdd_ctx;
|
||||
int status;
|
||||
|
|
@ -3900,7 +3899,6 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
channel = ieee80211_frequency_to_channel(chandef->chan->center_freq);
|
||||
|
||||
if (NL80211_CHAN_WIDTH_80P80 == chandef->width) {
|
||||
if ((wlan_reg_min_chan_freq() > chandef->center_freq2) ||
|
||||
|
|
@ -3920,8 +3918,8 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
|
|||
num_ch = CFG_VALID_CHANNEL_LIST_LEN;
|
||||
|
||||
if (QDF_STATUS_SUCCESS != wlan_hdd_validate_operation_channel(
|
||||
adapter, wlan_reg_chan_to_freq(hdd_ctx->pdev, channel))) {
|
||||
hdd_err("Invalid Channel: %d", channel);
|
||||
adapter, chandef->chan->center_freq)) {
|
||||
hdd_err("Invalid freq: %d", chandef->chan->center_freq);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue