Linux wireless drivers development
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven.eckelmann@openmesh.com>
To: ath10k@lists.infradead.org
Cc: simon.wunderlich@openmesh.com, linux-wireless@vger.kernel.org,
	Kalle Valo <kvalo@qca.qualcomm.com>
Subject: ath10k: Non-passive scan on DFS channels
Date: Thu, 05 Jul 2018 14:32:16 +0200	[thread overview]
Message-ID: <43739898.vuglHYUBSu@bentobox> (raw)

[-- 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 --]

                 reply	other threads:[~2018-07-05 12:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43739898.vuglHYUBSu@bentobox \
    --to=sven.eckelmann@openmesh.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=simon.wunderlich@openmesh.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox