diff options
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 37ba53ae5ccd..c5bfe0ff7ee7 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5582,8 +5582,6 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param) hdd_avoid_freq_list.avoidFreqRangeCount = ch_avoid_indi->avoid_range_count; - wlan_hdd_send_avoid_freq_event(hdd_ctxt, &hdd_avoid_freq_list); - /* clear existing unsafe channel cache */ hdd_ctxt->unsafe_channel_count = 0; qdf_mem_zero(hdd_ctxt->unsafe_channel_list, @@ -5674,6 +5672,12 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param) hdd_ctxt->unsafe_channel_list[channel_loop]); } + /* + * first update the unsafe channel list to the platform driver and + * send the avoid freq event to the application + */ + wlan_hdd_send_avoid_freq_event(hdd_ctxt, &hdd_avoid_freq_list); + if (!hdd_ctxt->unsafe_channel_count) { hdd_info("no unsafe channels - not restarting SAP"); return; |
