瀏覽代碼

qca-wifi: Fix FIND_IF_OVERLAP_WITH_WEATHER_RANGE API

While checking if the current channel overlaps with the
weather channel range, the first sub channel was checked if it is to
the left of weather channel start and the last sub channel was
checked if it is to the right of the weather channel end.

By the above logic, the API returns true only if the entire
weather channel range is within the current channel.

Fix the formula by checking if the first sub channel of the current
channel is to the left of the weather channel end and the last sub
channel is to the right of the weather channel start to find if any
of the current channel is a weather channel.

CRs-Fixed: 2515365
Change-Id: I8ca779f6dd8116a85121185e3ea71bca610f9ba4
Vignesh Mohan 5 年之前
父節點
當前提交
e1b684588c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      umac/dfs/core/src/misc/dfs_zero_cac.c

+ 1 - 1
umac/dfs/core/src/misc/dfs_zero_cac.c

@@ -1655,7 +1655,7 @@ void dfs_cancel_precac_timer(struct wlan_dfs *dfs)
  * return true, else false.
  */
 #define FIND_IF_OVERLAP_WITH_WEATHER_RANGE(first_ch, last_ch) \
-((first_ch <= WEATHER_CHAN_START) && (WEATHER_CHAN_END <= last_ch))
+((first_ch <= WEATHER_CHAN_END) && (WEATHER_CHAN_START <= last_ch))
 
 /* dfs_is_precac_on_weather_channel() - Given a channel number, find if
  * it's a weather radar channel.