linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: cjhuang@codeaurora.org
To: Brian Norris <briannorris@chromium.org>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] ath10k: support MAC address randomization in scan
Date: Fri, 13 Apr 2018 14:53:25 +0800	[thread overview]
Message-ID: <e16557d0891352ae0b83902faee97023@codeaurora.org> (raw)
In-Reply-To: <20180412205954.GA34456@rodete-desktop-imager.corp.google.com>

On 2018-04-13 04:59, Brian Norris wrote:
> Hi Carl,
> 
> On Fri, Mar 30, 2018 at 11:14:00AM +0800, Carl Huang wrote:
>> The ath10k reports the random_mac_addr capability to upper layer
>> based on the service bit firmware reported. Driver sets the
>> spoofed flag in scan_ctrl_flag to firmware if upper layer has
>> enabled this feature in scan request.
>> 
>> Test with QCA6174 hw3.0 and 
>> firmware-6.bin_WLAN.RM.4.4.1-00102-QCARMSWP-1,
>> but QCA9377 is also affected.
>> 
>> Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
>> ---
>>  drivers/net/wireless/ath/ath10k/mac.c     | 17 +++++++++++++++++
>>  drivers/net/wireless/ath/ath10k/wmi-ops.h | 22 ++++++++++++++++++++++
>>  drivers/net/wireless/ath/ath10k/wmi-tlv.c | 25 
>> +++++++++++++++++++++++++
>>  drivers/net/wireless/ath/ath10k/wmi-tlv.h | 11 +++++++++++
>>  drivers/net/wireless/ath/ath10k/wmi.c     |  5 +++++
>>  drivers/net/wireless/ath/ath10k/wmi.h     |  9 +++++++++
>>  6 files changed, 89 insertions(+)
>> 
>> diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
>> b/drivers/net/wireless/ath/ath10k/mac.c
>> index ebb3f1b..c5cd5e5 100644
>> --- a/drivers/net/wireless/ath/ath10k/mac.c
>> +++ b/drivers/net/wireless/ath/ath10k/mac.c
>> @@ -5699,6 +5699,12 @@ static int ath10k_hw_scan(struct ieee80211_hw 
>> *hw,
>>  		arg.scan_ctrl_flags |= WMI_SCAN_FLAG_PASSIVE;
>>  	}
>> 
>> +	if (req->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
>> +		arg.scan_ctrl_flags |=  WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ;
>> +		ether_addr_copy(arg.mac_addr.addr, req->mac_addr);
>> +		ether_addr_copy(arg.mac_mask.addr, req->mac_addr_mask);
>> +	}
>> +
>>  	if (req->n_channels) {
>>  		arg.n_channels = req->n_channels;
>>  		for (i = 0; i < arg.n_channels; i++)
>> @@ -8397,6 +8403,17 @@ int ath10k_mac_register(struct ath10k *ar)
>>  		goto err_dfs_detector_exit;
>>  	}
>> 
>> +	if (test_bit(WMI_SERVICE_SPOOF_MAC_SUPPORT, ar->wmi.svc_map)) {
>> +		ret = ath10k_wmi_scan_prob_req_oui(ar, ar->mac_addr);
>> +		if (ret) {
>> +			ath10k_err(ar, "failed to set prob req oui: %i\n", ret);
>> +			goto err_dfs_detector_exit;
>> +		}
>> +
>> +		ar->hw->wiphy->features |=
>> +			NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR;
> 
> Do you support NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR too?

I'll add this flag too.

> 
>> +	}
>> +
> 
> 
> Brian

  reply	other threads:[~2018-04-13  6:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-30  3:13 [PATCH 0/2] ath10k: support MAC address randomization in scan Carl Huang
2018-03-30  3:13 ` [PATCH 1/2] ath10k: Add WMI_SERVICE_AVAILABLE_EVENT support Carl Huang
2018-04-16 13:40   ` [1/2] " Kalle Valo
2018-04-24  5:46   ` Kalle Valo
2018-03-30  3:14 ` [PATCH 2/2] ath10k: support MAC address randomization in scan Carl Huang
2018-04-12 20:59   ` Brian Norris
2018-04-13  6:53     ` cjhuang [this message]
2018-04-13 11:28       ` Kalle Valo
2018-04-13 21:13         ` Arend van Spriel
2018-04-16  5:16           ` cjhuang
2018-04-16 11:32             ` Kalle Valo
2018-04-17  0:28               ` Brian Norris
2018-04-17  8:22                 ` Arend van Spriel
2018-04-17 16:07                   ` Brian Norris
2018-04-17 21:49                     ` Arend van Spriel
2018-04-17 22:26                       ` Brian Norris
2018-04-18  2:35                         ` Dan Williams
2018-04-18  8:29                           ` Arend van Spriel
2018-04-18  9:58                             ` Johannes Berg
2018-04-16  5:17         ` cjhuang
2018-04-16 13:42   ` [2/2] " Kalle Valo
     [not found]   ` <20180416134238.B16596076A@smtp.codeaurora.org>
2018-04-17  7:29     ` cjhuang
2018-04-20 10:30       ` Kalle Valo

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=e16557d0891352ae0b83902faee97023@codeaurora.org \
    --to=cjhuang@codeaurora.org \
    --cc=ath10k@lists.infradead.org \
    --cc=briannorris@chromium.org \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).