Linux wireless drivers development
 help / color / mirror / Atom feed
* ath10k: Non-passive scan on DFS channels
@ 2018-07-05 12:32 Sven Eckelmann
  0 siblings, 0 replies; only message in thread
From: Sven Eckelmann @ 2018-07-05 12:32 UTC (permalink / raw)
  To: ath10k; +Cc: simon.wunderlich, linux-wireless, Kalle Valo

[-- Attachment #1: Type: text/plain, Size: 2071 bytes --]

Hi,

it was noticed that ath10k is actively scanning on DFS channels. This seems to 
be a bad idea.

It looks like the passive flag [1] is only specified when no ssid was 
requested or when the channel is marked as NO_IR [2]. But interestingly, the 
channel information for the scan also contains a setting chan_radar. And both 
information is given to the firmware.

How does the firmware react here? Does it really try to stop scanning actively 
on DFS channels or should the ath10k driver make sure to mark DFS channels 
also as NO_IR for the scan? At least I would guess that the WMI_CHAN_FLAG_DFS 
is completely ignored by the scan code of the QCA firmware.

    diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
    index 541bc1c4b2f7..2e4111040eb4 100644
    --- a/drivers/net/wireless/ath/ath10k/mac.c
    +++ b/drivers/net/wireless/ath/ath10k/mac.c
    @@ -3083,6 +3083,8 @@ static int ath10k_update_channel_list(struct ath10k *ar)
     				!!(channel->flags & IEEE80211_CHAN_RADAR);
     
     			passive = channel->flags & IEEE80211_CHAN_NO_IR;
    +			passive |= ch->chan_radar;
    +
     			ch->passive = passive;
     
     			ch->freq = channel->center_freq;

At least mac80211 actually handles both flags the same when it decides for 
probe vs. simple delay [4] during the scan of a channel


Simon can most likely provide more details about the problem.

Kind regards,
	Sven

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/ath/ath10k/mac.c?id=fc36def997cfd6cbff3eda4f82853a5c311c5466#n5737
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/ath/ath10k/mac.c?id=fc36def997cfd6cbff3eda4f82853a5c311c5466#n3086
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/ath/ath10k/wmi.c?id=fc36def997cfd6cbff3eda4f82853a5c311c5466#n1661
[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/mac80211/scan.c?id=fc36def997cfd6cbff3eda4f82853a5c311c5466#n846

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-05 12:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-05 12:32 ath10k: Non-passive scan on DFS channels Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox