mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacmn: Rectify logic for disabling indoor channels on SAP start
Currently the logic present for disabling the indoor channels during SAP start is not complete. The way of using the two ini deviates the driver from the expected behavior. Mark the indoor channels correctly during SAP start and SAP stop as per the expected behavior. Change-Id: Ia136dcbc4f20ad72812f096531863aeb5fbe66fb CRs-Fixed: 2368218
This commit is contained in:
parent
9cc562c53b
commit
2cd5c4ca25
1 changed files with 13 additions and 26 deletions
|
|
@ -2183,16 +2183,27 @@ static void reg_modify_chan_list_for_dfs_channels(struct regulatory_channel
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void reg_modify_chan_list_for_indoor_channels(
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj)
|
||||
{
|
||||
enum channel_enum chan_enum;
|
||||
struct regulatory_channel *chan_list = pdev_priv_obj->cur_chan_list;
|
||||
|
||||
if (pdev_priv_obj->indoor_chan_enabled)
|
||||
return;
|
||||
if (!pdev_priv_obj->indoor_chan_enabled) {
|
||||
for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) {
|
||||
if (REGULATORY_CHAN_INDOOR_ONLY &
|
||||
chan_list[chan_enum].chan_flags) {
|
||||
chan_list[chan_enum].state =
|
||||
CHANNEL_STATE_DFS;
|
||||
chan_list[chan_enum].chan_flags |=
|
||||
REGULATORY_CHAN_NO_IR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!pdev_priv_obj->force_ssc_disable_indoor_channel) {
|
||||
if (pdev_priv_obj->force_ssc_disable_indoor_channel &&
|
||||
pdev_priv_obj->sap_state) {
|
||||
for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) {
|
||||
if (REGULATORY_CHAN_INDOOR_ONLY &
|
||||
chan_list[chan_enum].chan_flags) {
|
||||
|
|
@ -2202,30 +2213,6 @@ static void reg_modify_chan_list_for_indoor_channels(
|
|||
REGULATORY_CHAN_DISABLED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) {
|
||||
|
||||
if (pdev_priv_obj->sap_state) {
|
||||
|
||||
if (REGULATORY_CHAN_INDOOR_ONLY &
|
||||
chan_list[chan_enum].chan_flags) {
|
||||
chan_list[chan_enum].state =
|
||||
CHANNEL_STATE_DISABLE;
|
||||
chan_list[chan_enum].chan_flags |=
|
||||
REGULATORY_CHAN_DISABLED;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (REGULATORY_CHAN_INDOOR_ONLY &
|
||||
chan_list[chan_enum].chan_flags) {
|
||||
chan_list[chan_enum].state =
|
||||
CHANNEL_STATE_DFS;
|
||||
chan_list[chan_enum].chan_flags |=
|
||||
REGULATORY_CHAN_NO_IR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue