aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorSunil Dutt <usdutt@qti.qualcomm.com>2017-09-27 10:43:11 (GMT)
committerJouni Malinen <j@w1.fi>2017-10-11 19:36:48 (GMT)
commitc5aeb4343e82610844c550544de94be8d36f2a96 (patch)
treefee79da0ca3f56b63eddf02ab19de9407e493877 /wpa_supplicant
parent58efbcbcd457eddb3e5f6704e6f19d7327d09915 (diff)
downloadhostap-c5aeb4343e82610844c550544de94be8d36f2a96.zip
hostap-c5aeb4343e82610844c550544de94be8d36f2a96.tar.gz
hostap-c5aeb4343e82610844c550544de94be8d36f2a96.tar.bz2
P2P: Do not mark DFS channel as invalid if DFS is offloaded to driver
While considering the movement of P2P GO from its current operating channel, do not mark a DFS channel as invalid if DFS is offloaded to the driver. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/p2p_supplicant.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index fd6a1a2..3d75be1 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -9073,16 +9073,20 @@ static void wpas_p2p_consider_moving_one_go(struct wpa_supplicant *wpa_s,
unsigned int i, invalid_freq = 0, policy_move = 0, flags = 0;
unsigned int timeout;
int freq;
+ int dfs_offload;
wpas_p2p_go_update_common_freqs(wpa_s);
freq = wpa_s->current_ssid->frequency;
+ dfs_offload = (wpa_s->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD) &&
+ ieee80211_is_dfs(freq);
for (i = 0, invalid_freq = 0; i < num; i++) {
if (freqs[i].freq == freq) {
flags = freqs[i].flags;
/* The channel is invalid, must change it */
- if (!p2p_supported_freq_go(wpa_s->global->p2p, freq)) {
+ if (!p2p_supported_freq_go(wpa_s->global->p2p, freq) &&
+ !dfs_offload) {
wpa_dbg(wpa_s, MSG_DEBUG,
"P2P: Freq=%d MHz no longer valid for GO",
freq);
@@ -9092,7 +9096,7 @@ static void wpas_p2p_consider_moving_one_go(struct wpa_supplicant *wpa_s,
/* Freq is not used by any other station interface */
continue;
} else if (!p2p_supported_freq(wpa_s->global->p2p,
- freqs[i].freq)) {
+ freqs[i].freq) && !dfs_offload) {
/* Freq is not valid for P2P use cases */
continue;
} else if (wpa_s->conf->p2p_go_freq_change_policy ==