Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [PATCH 3/5] nl80211: add support for gscan
From: kbuild test robot @ 2016-11-17 12:10 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: kbuild-all, Johannes Berg, linux-wireless, Arend van Spriel
In-Reply-To: <1479382792-13131-4-git-send-email-arend.vanspriel@broadcom.com>

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

Hi Arend,

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on next-20161117]
[cannot apply to v4.9-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Arend-van-Spriel/nl80211-add-support-for-g-scan/20161117-194818
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: i386-randconfig-x004-201646 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: the linux-review/Arend-van-Spriel/nl80211-add-support-for-g-scan/20161117-194818 HEAD 407f604bb543a049c99ae0f9974943f1c64ea880 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   net/wireless/scan.c: In function '__cfg80211_stop_gscan':
>> net/wireless/scan.c:358:2: error: implicit declaration of function 'nl80211_send_scan_event' [-Werror=implicit-function-declaration]
     nl80211_send_scan_event(rdev, dev, NL80211_CMD_GSCAN_STOPPED);
     ^~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   net/wireless/nl80211.c: In function 'nl80211_start_gscan':
>> net/wireless/nl80211.c:12167:2: error: implicit declaration of function 'nl80211_send_scan_event' [-Werror=implicit-function-declaration]
     nl80211_send_scan_event(rdev, dev,
     ^~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/nl80211_send_scan_event +358 net/wireless/scan.c

   352		if (!driver_initiated) {
   353			int err = rdev_stop_gscan(rdev, dev);
   354			if (err)
   355				return err;
   356		}
   357	
 > 358		nl80211_send_scan_event(rdev, dev, NL80211_CMD_GSCAN_STOPPED);
   359	
   360		RCU_INIT_POINTER(rdev->gscan_req, NULL);
   361		kfree_rcu(gscan_req, rcu_head);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24258 bytes --]

^ permalink raw reply

* [PATCH V2] cfg80211: get rid of name indirection trick for ieee80211_get_channel()
From: Arend van Spriel @ 2016-11-17 12:48 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Arend van Spriel

The comment on the name indirection suggested an issue but turned out
to be untrue. Digging in older kernel version showed issue with ipw2x00
but that is no longer true so get rid on the name indirection.

Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 drivers/net/wireless/ath/ath10k/htt_rx.c        |  3 +--
 drivers/net/wireless/marvell/mwifiex/cfg80211.c |  2 +-
 include/net/cfg80211.h                          | 17 +++--------------
 net/wireless/util.c                             |  5 ++---
 4 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 0b4c156..01f3803 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -2329,8 +2329,7 @@ bool ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb)
 		u32 phymode = __le32_to_cpu(resp->chan_change.phymode);
 		u32 freq = __le32_to_cpu(resp->chan_change.freq);
 
-		ar->tgt_oper_chan =
-			__ieee80211_get_channel(ar->hw->wiphy, freq);
+		ar->tgt_oper_chan = ieee80211_get_channel(ar->hw->wiphy, freq);
 		ath10k_dbg(ar, ATH10K_DBG_HTT,
 			   "htt chan change freq %u phymode %s\n",
 			   freq, ath10k_wmi_phymode_str(phymode));
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 39ce76a..9efc3d9 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -2072,7 +2072,7 @@ static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv)
 	ie_len = ie_buf[1] + sizeof(struct ieee_types_header);
 
 	band = mwifiex_band_to_radio_type(priv->curr_bss_params.band);
-	chan = __ieee80211_get_channel(priv->wdev.wiphy,
+	chan = ieee80211_get_channel(priv->wdev.wiphy,
 			ieee80211_channel_to_frequency(bss_info.bss_chan,
 						       band));
 
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 2019310..ef42749 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3955,26 +3955,15 @@ static inline void *wdev_priv(struct wireless_dev *wdev)
  */
 int ieee80211_frequency_to_channel(int freq);
 
-/*
- * Name indirection necessary because the ieee80211 code also has
- * a function named "ieee80211_get_channel", so if you include
- * cfg80211's header file you get cfg80211's version, if you try
- * to include both header files you'll (rightfully!) get a symbol
- * clash.
- */
-struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
-						  int freq);
 /**
  * ieee80211_get_channel - get channel struct from wiphy for specified frequency
+ *
  * @wiphy: the struct wiphy to get the channel for
  * @freq: the center frequency of the channel
+ *
  * Return: The channel struct from @wiphy at @freq.
  */
-static inline struct ieee80211_channel *
-ieee80211_get_channel(struct wiphy *wiphy, int freq)
-{
-	return __ieee80211_get_channel(wiphy, freq);
-}
+struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy, int freq);
 
 /**
  * ieee80211_get_response_rate - get basic rate for a given rate
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 88725f8..f717694 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -114,8 +114,7 @@ int ieee80211_frequency_to_channel(int freq)
 }
 EXPORT_SYMBOL(ieee80211_frequency_to_channel);
 
-struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
-						  int freq)
+struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy, int freq)
 {
 	enum nl80211_band band;
 	struct ieee80211_supported_band *sband;
@@ -135,7 +134,7 @@ struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
 
 	return NULL;
 }
-EXPORT_SYMBOL(__ieee80211_get_channel);
+EXPORT_SYMBOL(ieee80211_get_channel);
 
 static void set_mandatory_flags_band(struct ieee80211_supported_band *sband,
 				     enum nl80211_band band)
-- 
1.9.1

^ permalink raw reply related

* Re: [PATCH 1/5] nl80211: allow reporting RTT information in scan results
From: Dan Williams @ 2016-11-17 16:15 UTC (permalink / raw)
  To: Arend van Spriel, Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1479382792-13131-2-git-send-email-arend.vanspriel@broadcom.com>

On Thu, 2016-11-17 at 11:39 +0000, Arend van Spriel wrote:
> Add distance and its variance to the BSS structure so drivers
> may provide RTT information for BSS instances found during
> scanning.
> 
> Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.co
> m>
> Reviewed-by: Franky Lin <franky.lin@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> ---
>  include/net/cfg80211.h       | 11 +++++++++++
>  include/uapi/linux/nl80211.h |  6 ++++++
>  net/wireless/nl80211.c       |  8 ++++++++
>  net/wireless/scan.c          |  2 ++
>  4 files changed, 27 insertions(+)
> 
> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
> index 2019310..d1217da 100644
> --- a/include/net/cfg80211.h
> +++ b/include/net/cfg80211.h
> @@ -1675,6 +1675,9 @@ enum cfg80211_signal_type {
>   * @scan_width: scan width that was used
>   * @signal: signal strength value, according to the wiphy's
>   *	signal type
> + * @distance: distance to AP with %parent_bssid in centimeters. Zero
> + *	value indicates this is undetermined.
> + * @var_distance: variance of %distance indicating accurracy.

"accuracy" without the second 'r'.

Also, what unit is the variance in?  Needs more documentation.

Dan

>   * @boottime_ns: timestamp (CLOCK_BOOTTIME) when the information was
>   *	received; should match the time when the frame was
> actually
>   *	received by the device (not just by the host, in case it
> was
> @@ -1691,6 +1694,8 @@ struct cfg80211_inform_bss {
>  	struct ieee80211_channel *chan;
>  	enum nl80211_bss_scan_width scan_width;
>  	s32 signal;
> +	u32 distance;
> +	u32 var_distance;
>  	u64 boottime_ns;
>  	u64 parent_tsf;
>  	u8 parent_bssid[ETH_ALEN] __aligned(2);
> @@ -1737,6 +1742,9 @@ struct cfg80211_bss_ies {
>   *	that holds the beacon data. @beacon_ies is still valid, of
> course, and
>   *	points to the same data as hidden_beacon_bss->beacon_ies
> in that case.
>   * @signal: signal strength value (type depends on the wiphy's
> signal_type)
> + * @distance: distance to AP with %parent_bssid in centimeters. Zero
> + *	value indicates this is undetermined.
> + * @var_distance: variance of %distance indicating accurracy.
>   * @priv: private area for driver use, has at least wiphy-
> >bss_priv_size bytes
>   */
>  struct cfg80211_bss {
> @@ -1756,6 +1764,9 @@ struct cfg80211_bss {
>  
>  	u8 bssid[ETH_ALEN];
>  
> +	u32 distance;
> +	u32 var_distance;
> +
>  	u8 priv[0] __aligned(sizeof(void *));
>  };
>  
> diff --git a/include/uapi/linux/nl80211.h
> b/include/uapi/linux/nl80211.h
> index 259c9c7..7e935f6 100644
> --- a/include/uapi/linux/nl80211.h
> +++ b/include/uapi/linux/nl80211.h
> @@ -3651,6 +3651,10 @@ enum nl80211_bss_scan_width {
>   *	@NL80211_BSS_PARENT_BSSID. (u64).
>   * @NL80211_BSS_PARENT_BSSID: the BSS according to which
> @NL80211_BSS_PARENT_TSF
>   *	is set.
> + * @NL80211_BSS_DISTANCE: distance to AP with
> @NL80211_BSS_PARENT_BSSID in
> + *	centimeters (u32).
> + * @NL80211_BSS_VARIANCE_DISTANCE: variance of @NL80211_BSS_DISTANCE
> value (u32).
> + *
>   * @__NL80211_BSS_AFTER_LAST: internal
>   * @NL80211_BSS_MAX: highest BSS attribute
>   */
> @@ -3674,6 +3678,8 @@ enum nl80211_bss {
>  	NL80211_BSS_PAD,
>  	NL80211_BSS_PARENT_TSF,
>  	NL80211_BSS_PARENT_BSSID,
> +	NL80211_BSS_DISTANCE,
> +	NL80211_BSS_VARIANCE_DISTANCE,
>  
>  	/* keep last */
>  	__NL80211_BSS_AFTER_LAST,
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 24ab199..ffce566 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -7515,6 +7515,14 @@ static int nl80211_send_bss(struct sk_buff
> *msg, struct netlink_callback *cb,
>  			      intbss->ts_boottime, NL80211_BSS_PAD))
>  		goto nla_put_failure;
>  
> +	if (res->distance && nla_put_u32(msg, NL80211_BSS_DISTANCE,
> +					 res->distance))
> +		goto nla_put_failure;
> +
> +	if (res->var_distance && nla_put_u32(msg,
> NL80211_BSS_VARIANCE_DISTANCE,
> +					     res->var_distance))
> +		goto nla_put_failure;
> +
>  	switch (rdev->wiphy.signal_type) {
>  	case CFG80211_SIGNAL_TYPE_MBM:
>  		if (nla_put_u32(msg, NL80211_BSS_SIGNAL_MBM, res-
> >signal))
> diff --git a/net/wireless/scan.c b/net/wireless/scan.c
> index b5bd58d..afda1f9 100644
> --- a/net/wireless/scan.c
> +++ b/net/wireless/scan.c
> @@ -973,6 +973,8 @@ struct cfg80211_bss *
>  	tmp.pub.signal = data->signal;
>  	tmp.pub.beacon_interval = beacon_interval;
>  	tmp.pub.capability = capability;
> +	tmp.pub.distance = data->distance;
> +	tmp.pub.var_distance = data->var_distance;
>  	tmp.ts_boottime = data->boottime_ns;
>  
>  	/*

^ permalink raw reply

* Re: [TEST, V2, GIT-SEND-EMAIL, 01/11] mwifiex: fix power save issue when suspend
From: Kalle Valo @ 2016-11-17 12:44 UTC (permalink / raw)
  To: Xinming Hu; +Cc: linux-wireless, Shengzhen Li
In-Reply-To: <1477899763-10273-1-git-send-email-huxinming820@gmail.com>

Xinming Hu <huxinming820@gmail.com> wrote:
> From: Shengzhen Li <szli@marvell.com>
> 
> This patch fixes a corner case for "FROMLIST: mwifiex: fix corner case
> power save issue", main process will check the power save condition in
> PS_PRE_SLEEP status so the sleep handshake could continue.
> 
> Signed-off-by: Shengzhen Li <szli@marvell.com>

Seems to be a test mail of some sort so I'll just drop this.

Patch set to Not Applicable.

-- 
https://patchwork.kernel.org/patch/9405111/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply

* Re: [PATCH v3 01/11] mwifiex: check tx_hw_pending before downloading sleep confirm
From: Kalle Valo @ 2016-11-17 12:41 UTC (permalink / raw)
  To: Brian Norris
  Cc: Amitkumar Karwar, linux-wireless, Cathy Luo, Nishant Sarmukadam,
	rajatja, dmitry.torokhov, Shengzhen Li
In-Reply-To: <20161114194049.GA131593@google.com>

Brian Norris <briannorris@chromium.org> writes:

> On Fri, Nov 11, 2016 at 06:40:08PM +0530, Amitkumar Karwar wrote:
>
>> There are multiple mwifiex patches under review. I want you consider them
>> in following sequence(first being oldest) to avoid conflicts
>
> Thanks for doing this! It's a little confusing about what's outstanding
> at the moment (and I think I was just confused on a review a bit ago; I
> wasn't 100% sure what it was based on), so this listing helps.
>
> If it helps, I'll put my comments here, since I've reviewed most of
> these:
>
>> [v3] mwifiex: report wakeup for wowlan
>
> Reviewed, SGMT.
>
>> mwifiex: add power save parameters in hs_cfg cmd
>
> Didn't review. No comment.
>
>> [2/2] mwifiex: ignore calibration data failure (Note: 1/2 has dropped)
>
> Didn't review. But FWIW, Kalle expressed a preference for full series,
> not partial.

You are correct, but dropping patches in patchwork is easy so I usually
can do that myself. Changing or adding patches to a patchset is the
difficult part.

So I dropped patch 1 now.

>> [v6] mwifiex: parse device tree node for PCIe
>
> This one is marked Deferred in patchwork, and I had some comments about
> it, since it introduced a double-free issue. I'd prefer it get fixed and
> resent, and I expect Kalle is also waiting for this.

Correct, I dropped v6.

>> [v2,1/3] mwifiex: Allow mwifiex early access to device structure
>> [v2,2/3] mwifiex: Introduce mwifiex_probe_of() to parse common properties
>> [v2,3/3] mwifiex: Enable WoWLAN for both sdio and pcie
>
> You sent v3 for the above, and those LGTM (I provided my review). I was
> probably also confused because they were based on the above "[v6]
> mwifiex: parse device tree node for PCIe", which was not completely
> correct.

v4 of this patchset is now "Under Review", which in practise means that
the patches are pending for commit. (Too bad that patchwork doesn't have
a "Pending" state, so I have to use "Under Review" instead)

>> mwifiex: don't do unbalanced free()'ing in cleanup_if()
>> mwifiex: printk() overflow with 32-byte SSIDs
>> mwifiex: fix memory leak in mwifiex_save_hidden_ssid_channels()
>
> I wrote or reviewed the above 3. LGTM.

The first is now "Under Review" and the last two I have already applied.

>> [v3,01/11] mwifiex: check tx_hw_pending before downloading sleep confirm
>> [v3,02/11] mwifiex: complete blocked power save handshake in main process
>> [v3,03/11] mwifiex: resolve races between async FW init (failure) and device removal
>> [v3,04/11] mwifiex: remove redundant pdev check in suspend/resume handlers
>> [v3,05/11] mwifiex: don't pretend to resume while remove()'ing
>> [v3,06/11] mwifiex: resolve suspend() race with async FW init failure
>> [v3,07/11] mwifiex: reset card->adapter during device unregister
>> [v3,08/11] mwifiex: usb: handle HS failures
>> [v3,09/11] mwifiex: sdio: don't check for NULL sdio_func
>> [v3,10/11] mwifiex: stop checking for NULL drvata/intfdata
>> [v3,11/11] mwifiex: pcie: stop checking for NULL adapter->card
>
> For this entire series, I looked over them again (and I wrote several in
> the first place), so for all 11:
>
> Reviewed-by: Brian Norris <briannorris@chromium.org>

These 11 are now "Under Review".

So to summarise, this is what I'm planning to commit (it's sorted by
date but I try to follow the order Amit specified when I commit these):

[  1] mwifiex: add power save parameters in hs_cfg cmd             2016-10-14 Amitkumar Ka Under Review
[  2] [2/2] mwifiex: ignore calibration data failure               2016-10-21 Amitkumar Ka Under Review
[  3] mwifiex: don't do unbalanced free()'ing in cleanup_if()      2016-10-26 Brian Norris Under Review
[  4] [v3,01/11] mwifiex: check tx_hw_pending before downloadin... 2016-11-11 Amitkumar Ka Under Review
[  5] [v3,02/11] mwifiex: complete blocked power save handshake... 2016-11-11 Amitkumar Ka Under Review
[  6] [v3,03/11] mwifiex: resolve races between async FW init (... 2016-11-11 Amitkumar Ka Under Review
[  7] [v3,04/11] mwifiex: remove redundant pdev check in suspen... 2016-11-11 Amitkumar Ka Under Review
[  8] [v3,05/11] mwifiex: don't pretend to resume while remove(... 2016-11-11 Amitkumar Ka Under Review
[  9] [v3,06/11] mwifiex: resolve suspend() race with async FW.... 2016-11-11 Amitkumar Ka Under Review
[ 10] [v3,07/11] mwifiex: reset card->adapter during device unr... 2016-11-11 Amitkumar Ka Under Review
[ 11] [v3,08/11] mwifiex: usb: handle HS failures                  2016-11-11 Amitkumar Ka Under Review
[ 12] [v3,09/11] mwifiex: sdio: don't check for NULL sdio_func     2016-11-11 Amitkumar Ka Under Review
[ 13] [v3,10/11] mwifiex: stop checking for NULL drvata/intfdata   2016-11-11 Amitkumar Ka Under Review
[ 14] [v3,11/11] mwifiex: pcie: stop checking for NULL adapter-... 2016-11-11 Amitkumar Ka Under Review
[ 15] [v3,1/3] mwifiex: Allow mwifiex early access to device st... 2016-11-14 Amitkumar Ka Under Review
[ 16] [v3,2/3] mwifiex: Introduce mwifiex_probe_of() to parse c... 2016-11-14 Amitkumar Ka Under Review
[ 17] [v3,3/3] mwifiex: Enable WoWLAN for both sdio and pcie       2016-11-14 Amitkumar Ka Under Review
[ 18] [v4,1/3] mwifiex: Allow mwifiex early access to device st... 2016-11-15 Amitkumar Ka Under Review
[ 19] [v4,2/3] mwifiex: Introduce mwifiex_probe_of() to parse c... 2016-11-15 Amitkumar Ka Under Review
[ 20] [v4,3/3] mwifiex: Enable WoWLAN for both sdio and pcie       2016-11-15 Amitkumar Ka Under Review

Patchwork link for the same:

https://patchwork.kernel.org/project/linux-wireless/list/?state=2&q=mwifiex

Does that look ok?

-- 
Kalle Valo

^ permalink raw reply

* Re: [RFC 04/12] ath10k: htc: refactorization
From: Erik Stromdahl @ 2016-11-17 16:32 UTC (permalink / raw)
  To: Michal Kazior; +Cc: Kalle Valo, linux-wireless, ath10k@lists.infradead.org
In-Reply-To: <CA+BoTQnTkwQjmNBdr8a+YauXffWGNBNyPTZ=RByoviTSp+1ZYQ@mail.gmail.com>



On 11/15/2016 11:19 AM, Michal Kazior wrote:
> On 14 November 2016 at 17:33, Erik Stromdahl <erik.stromdahl@gmail.com> wrote:
>> Code refactorization:
>>
>> Moved the code for ep 0 in ath10k_htc_rx_completion_handler
>> to ath10k_htc_control_rx_complete.
>>
>> This eases the implementation of SDIO/mbox significantly since
>> the ep_rx_complete cb is invoked directly from the SDIO/mbox
>> hif layer.
>>
>> Since the ath10k_htc_control_rx_complete already is present
>> (only containing a warning message) there is no reason for not
>> using it (instead of having a special case for ep 0 in
>> ath10k_htc_rx_completion_handler).
> 
> This should be squashed with Patch 3 since it's inseparable part of
> the same refactorization.
> 
> 
> Michał
> 


Hmm, I don't really see why this is an inseparable part of the previous
patch.

As far as I see this patch has nothing to do with patch 3, or am I
missing anything?

Are you really sure they should be squashed?

Erik

^ permalink raw reply

* Re: cfg80211: add set/get link loss profile
From: Lazar, Alexei Avshalom @ 2016-11-17 13:50 UTC (permalink / raw)
  To: Kalle Valo; +Cc: johannes, linux-wireless
In-Reply-To: <8737izqw0q.fsf@purkki.adurom.net>

Hi Kalle,

In this context the term "link" does mean connection to AP.
There are scenarios that require to lose connection faster once
reduced link quality detected in order maintain better user experience
(from both sides - AP and STA).
Example case is FST (Fast Session Transfer), where we have a fast 11ad
connection but close-range and a backup 11ac connection which is
"always on".
in such cases if we detect poor link quality in the active band we
prefer to disconnect and switch to the backup connection with the good
link quality.
This will be reached by setting "aggressive" profile that will cause
more rapid disconnect in such cases.

Alexei Lazar
Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum a Linux Foundation Collaborative Project


On 11/10/2016 3:55 PM, Kalle Valo wrote:
> "Lazar, Alexei Avshalom" <ailizaro@codeaurora.org> writes:
>
>> >From b739abb6f29dc43a86b8b2b60e893b4441f8aa1f Mon Sep 17 00:00:00 2001
>> From: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
>> Date: Sun, 6 Nov 2016 16:21:20 +0200
>> Subject: [PATCH] cfg80211: add set/get link loss profile
>>
>> Introduce NL80211_CMD_SET_LINK_LOSS_PROFILE and
>> NL80211_CMD_GET_LINK_LOSS_PROFILE as it required by the user space
>> to configure the link loss profile.
>> The link loss profile represents the priority of maintaining link up
>> in different link quality environments.
>> Three types of behavior for link loss defined:
>> LINK_LOSS_PROFILE_RELAXED: prefer maintaining link up even in poor
>> link quality environment.
>> LINK_LOSS_PROFILE_DEFAULT: The default behavior for maintaining link
>> up vs link quality.
>> LINK_LOSS_PROFILE_AGGRESSIVE: prefer losing link up in poor link
>> quality environment.
>> New cfg80211 API also been added, set/get_link_loss_profile.
>>
>> Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
> What does the term "link" mean in this context? A connection to the AP
> or something else? The documentation doesn't give me any detailed
> information nor any examples and lefts me guessing what this is supposed
> to do.
>

^ permalink raw reply

* Re: [v7] mwifiex: parse device tree node for PCIe
From: Kalle Valo @ 2016-11-17 12:39 UTC (permalink / raw)
  To: Amitkumar Karwar
  Cc: linux-wireless, Cathy Luo, Nishant Sarmukadam, rajatja,
	briannorris, dmitry.torokhov, Xinming Hu, Amitkumar Karwar
In-Reply-To: <1479215662-631-1-git-send-email-akarwar@marvell.com>

Amitkumar Karwar <akarwar@marvell.com> wrote:
> From: Xinming Hu <huxm@marvell.com>
> 
> This patch derives device tree node from pcie bus layer framework.
> Device tree bindings file has been renamed(marvell-sd8xxx.txt ->
> marvell-8xxx.txt) to accommodate PCIe changes.
> 
> Signed-off-by: Xinming Hu <huxm@marvell.com>
> Signed-off-by: Rajat Jain <rajatja@google.com>
> Reviewed-by: Brian Norris <briannorris@chromium.org>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>

You should CC the device tree list when making changes to the bindings.

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/patch/9429723/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply

* Re: [PATCH 8/8] Print frequency of radar events.
From: Benjamin Berg @ 2016-11-17 17:25 UTC (permalink / raw)
  To: Henrik Eriksson; +Cc: Johannes Berg, linux-wireless, sw
In-Reply-To: <20161117172134.GB14213@lnxhenriken2.se.axis.com>

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

On Thu, 2016-11-17 at 18:21 +0100, Henrik Eriksson wrote:
> On Mon, Nov 07, 2016 at 15:59:43 +0100, Benjamin Berg wrote:
> > > > +			if (!tb[NL80211_ATTR_RADAR_EVENT] || !tb[NL80211_ATTR_WIPHY_FREQ])
> > > > +				printf("BAD radar event");
> 
> Should not this end the parsing here or at least avoid getting the value of
> the NULL attributes below?  I do not know if libnl nla_get_u32() is
> intended to be NULL safe, but following
> https://www.infradead.org/~tgr/libnl/doc/api/attr_8c_source.html#l00624
> it seems like you will get whatever u32 value is at address
> (NULL+)NLA_HDRLEN, assuming it is readable.  The original behavior was to
> do nothing if tb[NL80211_ATTR_RADAR_EVENT] was not set.
> 
> > > > +			freq = nla_get_u32(tb[NL80211_ATTR_WIPHY_FREQ]);
> > > > +			event_type = nla_get_u32(tb[NL80211_ATTR_RADAR_EVENT]);

Yes, my version of the patch was somewhat broken in that regard.
Johannes fixed it before merging and it will now correctly print "BAD
radar event\n" and stop processing in case one of the entries is
missing.

Benjamin

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

^ permalink raw reply

* Re: [RFC 0/5] nl80211: add support for g-scan
From: Johannes Berg @ 2016-11-17 14:39 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: linux-wireless
In-Reply-To: <1479388726-3288-1-git-send-email-arend.vanspriel@broadcom.com>

On Thu, 2016-11-17 at 13:18 +0000, Arend van Spriel wrote:
> Android employs a Wifi-HAL layer in its wireless frame. It basically
> abstracts dealing with netlink messages from the framework. For some
> features it employs nl80211 vendor commands. The goal I set myself is
> to be able to have a generic nl80211 Wifi-HAL implementation. One of
> the features currently requiring the vendor commands is g-scan. We
> can only guess what the 'g' stands for ;-) This series converts the
> vendor command api into common nl80211 api.

Hehe :)
We also have gscan API. If you're interested, you can see it here:
https://git.kernel.org/cgit/linux/kernel/git/iwlwifi/backport-iwlwifi.git/tree/drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.h#n96


> Before making an attempt to explain more about the g-scan
> functionality first this. While I am still testing the driver
> implementation resulting in numerous questions Dmitry send the email
> below to bring a related discussion to the table..eh.. the linux-
> wireless list. This is probably a good thing as anyone can dive in
> and share their thoughts.


Yeah. How does this overlap? Have you looked at it already?

johannes

^ permalink raw reply

* Re: [PATCH 8/8] Print frequency of radar events.
From: Henrik Eriksson @ 2016-11-17 17:21 UTC (permalink / raw)
  To: Benjamin Berg; +Cc: Johannes Berg, linux-wireless, sw, Benjamin Berg
In-Reply-To: <20161107145943.16761-9-benjamin@sipsolutions.net>

On Mon, Nov 07, 2016 at 15:59:43 +0100, Benjamin Berg wrote:
> From: Benjamin Berg <benjamin.berg@open-mesh.com>
> 
> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com>
> ---
>  event.c | 48 +++++++++++++++++++++++++-----------------------
>  1 file changed, 25 insertions(+), 23 deletions(-)
> 
> diff --git a/event.c b/event.c
> index 446debb..8014d73 100644
> --- a/event.c
> +++ b/event.c
> @@ -584,30 +584,32 @@ static int print_event(struct nl_msg *msg, void *arg)
>  				   nla_data(tb[NL80211_ATTR_VENDOR_DATA]),
>  				   nla_len(tb[NL80211_ATTR_VENDOR_DATA]));
>  		break;
> -	case NL80211_CMD_RADAR_DETECT:
> -		printf("radar event ");
> -		if (tb[NL80211_ATTR_RADAR_EVENT]) {
> -			switch (nla_get_u32(tb[NL80211_ATTR_RADAR_EVENT])) {
> -				case NL80211_RADAR_DETECTED:
> -					printf("(radar detected)");
> -					break;
> -				case NL80211_RADAR_CAC_FINISHED:
> -					printf("(cac finished)");
> -					break;
> -				case NL80211_RADAR_CAC_ABORTED:
> -					printf("(cac aborted)");
> -					break;
> -				case NL80211_RADAR_NOP_FINISHED:
> -					printf("(nop finished)");
> -					break;
> -				default:
> -					printf("(unknown)");
> -					break;
> -			};
> -		} else {
> -			printf("(unknown)");
> +	case NL80211_CMD_RADAR_DETECT: {
> +			enum nl80211_radar_event event_type;
> +			uint32_t freq;
> +
> +			if (!tb[NL80211_ATTR_RADAR_EVENT] || !tb[NL80211_ATTR_WIPHY_FREQ])
> +				printf("BAD radar event");

Should not this end the parsing here or at least avoid getting the value of
the NULL attributes below?  I do not know if libnl nla_get_u32() is
intended to be NULL safe, but following
https://www.infradead.org/~tgr/libnl/doc/api/attr_8c_source.html#l00624
it seems like you will get whatever u32 value is at address
(NULL+)NLA_HDRLEN, assuming it is readable.  The original behavior was to
do nothing if tb[NL80211_ATTR_RADAR_EVENT] was not set.

> +			freq = nla_get_u32(tb[NL80211_ATTR_WIPHY_FREQ]);
> +			event_type = nla_get_u32(tb[NL80211_ATTR_RADAR_EVENT]);

br,
henrik

^ permalink raw reply

* Re: [PATCHv2 1/4] ath10k: Add support to enable or disable btcoex via nl80211
From: kbuild test robot @ 2016-11-17 13:51 UTC (permalink / raw)
  To: c_traja
  Cc: kbuild-all, ath10k, linux-wireless, tamizhchelvam, linux-kernel,
	devicetree, robh, Tamizh chelvam
In-Reply-To: <1479383064-25718-2-git-send-email-c_traja@qti.qualcomm.com>

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

Hi Tamizh,

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on v4.9-rc5 next-20161117]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/c_traja-qti-qualcomm-com/ath10k-Add-support-for-BTCOEX-feature/20161117-200322
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath10k/mac.c:7546:2: error: unknown field 'set_btcoex' specified in initializer
     .set_btcoex                     = ath10k_mac_op_set_btcoex,
     ^
>> drivers/net/wireless/ath/ath10k/mac.c:7546:36: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .set_btcoex                     = ath10k_mac_op_set_btcoex,
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:7546:36: note: (near initialization for 'ath10k_ops.reconfig_complete')
   cc1: some warnings being treated as errors

vim +/set_btcoex +7546 drivers/net/wireless/ath/ath10k/mac.c

  7540		.add_chanctx			= ath10k_mac_op_add_chanctx,
  7541		.remove_chanctx			= ath10k_mac_op_remove_chanctx,
  7542		.change_chanctx			= ath10k_mac_op_change_chanctx,
  7543		.assign_vif_chanctx		= ath10k_mac_op_assign_vif_chanctx,
  7544		.unassign_vif_chanctx		= ath10k_mac_op_unassign_vif_chanctx,
  7545		.switch_vif_chanctx		= ath10k_mac_op_switch_vif_chanctx,
> 7546		.set_btcoex                     = ath10k_mac_op_set_btcoex,
  7547	
  7548		CFG80211_TESTMODE_CMD(ath10k_tm_cmd)
  7549	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 56822 bytes --]

^ permalink raw reply

* Re: [PATCHv2 2/4] ath10k: Add support to update btcoex priority value via nl80211
From: kbuild test robot @ 2016-11-17 14:36 UTC (permalink / raw)
  To: c_traja
  Cc: kbuild-all, ath10k, linux-wireless, tamizhchelvam, linux-kernel,
	devicetree, robh, Tamizh chelvam
In-Reply-To: <1479383064-25718-3-git-send-email-c_traja@qti.qualcomm.com>

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

Hi Tamizh,

[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on next-20161117]
[cannot apply to v4.9-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/c_traja-qti-qualcomm-com/ath10k-Add-support-for-BTCOEX-feature/20161117-200322
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/net/wireless/ath/ath10k/mac.c:7506:35: warning: 'struct cfg80211_btcoex_priority' declared inside parameter list will not be visible outside of this definition or declaration
    ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority *btcoex_priority)
                                      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_get_btcoex_prio':
>> drivers/net/wireless/ath/ath10k/mac.c:7510:21: error: dereferencing pointer to incomplete type 'struct cfg80211_btcoex_priority'
     if (btcoex_priority->wlan_be_preferred)
                        ^~
>> drivers/net/wireless/ath/ath10k/mac.c:7511:18: error: 'WIPHY_WLAN_BE_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:7511:18: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/wireless/ath/ath10k/mac.c:7514:18: error: 'WIPHY_WLAN_BK_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath10k/mac.c:7517:18: error: 'WIPHY_WLAN_VI_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath10k/mac.c:7520:18: error: 'WIPHY_WLAN_VO_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath10k/mac.c:7523:18: error: 'WIPHY_WLAN_BEACON_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath10k/mac.c:7526:18: error: 'WIPHY_WLAN_MGMT_PREFERRED' undeclared (first use in this function)
      btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c: At top level:
   drivers/net/wireless/ath/ath10k/mac.c:7532:11: warning: 'struct cfg80211_btcoex_priority' declared inside parameter list will not be visible outside of this definition or declaration
       struct cfg80211_btcoex_priority *btcoex_priority)
              ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_op_set_btcoex_priority':
>> drivers/net/wireless/ath/ath10k/mac.c:7551:43: error: passing argument 1 of 'ath10k_mac_get_btcoex_prio' from incompatible pointer type [-Werror=incompatible-pointer-types]
     btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
                                              ^~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:7506:1: note: expected 'struct cfg80211_btcoex_priority *' but argument is of type 'struct cfg80211_btcoex_priority *'
    ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority *btcoex_priority)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c: At top level:
   drivers/net/wireless/ath/ath10k/mac.c:7611:2: error: unknown field 'set_btcoex' specified in initializer
     .set_btcoex                     = ath10k_mac_op_set_btcoex,
     ^
   drivers/net/wireless/ath/ath10k/mac.c:7611:36: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .set_btcoex                     = ath10k_mac_op_set_btcoex,
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:7611:36: note: (near initialization for 'ath10k_ops.reconfig_complete')
>> drivers/net/wireless/ath/ath10k/mac.c:7612:2: error: unknown field 'set_btcoex_priority' specified in initializer
     .set_btcoex_priority  = ath10k_mac_op_set_btcoex_priority,
     ^
   drivers/net/wireless/ath/ath10k/mac.c:7612:26: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .set_btcoex_priority  = ath10k_mac_op_set_btcoex_priority,
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:7612:26: note: (near initialization for 'ath10k_ops.ipv6_addr_change')
   drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_mac_register':
>> drivers/net/wireless/ath/ath10k/mac.c:8203:16: error: 'struct wiphy' has no member named 'btcoex_support_flags'
      ar->hw->wiphy->btcoex_support_flags =
                   ^~
   drivers/net/wireless/ath/ath10k/mac.c:8204:4: error: 'WIPHY_WLAN_BE_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_BE_PREFERRED |
       ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8205:4: error: 'WIPHY_WLAN_BK_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_BK_PREFERRED |
       ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8206:4: error: 'WIPHY_WLAN_VI_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_VI_PREFERRED |
       ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8207:4: error: 'WIPHY_WLAN_VO_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_VO_PREFERRED |
       ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8208:4: error: 'WIPHY_WLAN_BEACON_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_BEACON_PREFERRED |
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8209:4: error: 'WIPHY_WLAN_MGMT_PREFERRED' undeclared (first use in this function)
       WIPHY_WLAN_MGMT_PREFERRED;
       ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8211:20: error: 'struct wiphy' has no member named 'btcoex_support_flags'
          ar->hw->wiphy->btcoex_support_flags);
                       ^~
   cc1: some warnings being treated as errors

vim +7510 drivers/net/wireless/ath/ath10k/mac.c

  7500		mutex_unlock(&ar->conf_mutex);
  7501	
  7502		return ret;
  7503	}
  7504	
  7505	u32
> 7506	ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority *btcoex_priority)
  7507	{
  7508		u32 btcoex_prio = 0;
  7509	
> 7510		if (btcoex_priority->wlan_be_preferred)
> 7511			btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
  7512	
  7513		if (btcoex_priority->wlan_bk_preferred)
> 7514			btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
  7515	
  7516		if (btcoex_priority->wlan_vi_preferred)
> 7517			btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
  7518	
  7519		if (btcoex_priority->wlan_vo_preferred)
> 7520			btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
  7521	
  7522		if (btcoex_priority->wlan_beacon_preferred)
> 7523			btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
  7524	
  7525		if (btcoex_priority->wlan_mgmt_preferred)
> 7526			btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
  7527	
  7528		return btcoex_prio;
  7529	}
  7530	
  7531	static int ath10k_mac_op_set_btcoex_priority(struct ieee80211_hw *hw,
  7532				struct cfg80211_btcoex_priority *btcoex_priority)
  7533	{
  7534		u32 btcoex_prio;
  7535		struct ath10k *ar = hw->priv;
  7536		int ret;
  7537	
  7538		if (!(test_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags))) {
  7539			ret = -EINVAL;
  7540			goto exit;
  7541		}
  7542	
  7543		mutex_lock(&ar->conf_mutex);
  7544	
  7545		if (ar->state != ATH10K_STATE_ON &&
  7546		    ar->state != ATH10K_STATE_RESTARTED) {
  7547			ret = -ENETDOWN;
  7548			goto exit;
  7549		}
  7550	
> 7551		btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
  7552	
  7553		if (btcoex_prio > 0x3f) {
  7554			ret = -E2BIG;
  7555			goto exit;
  7556		}
  7557	
  7558		ret = ath10k_wmi_set_coex_param(ar, btcoex_prio);
  7559	
  7560		if (ret) {
  7561			ath10k_warn(ar, "failed to set btcoex priority: %d\n", ret);
  7562			goto exit;
  7563		}
  7564	
  7565	exit:
  7566		mutex_unlock(&ar->conf_mutex);
  7567		return ret;
  7568	}
  7569	
  7570	static const struct ieee80211_ops ath10k_ops = {
  7571		.tx				= ath10k_mac_op_tx,
  7572		.wake_tx_queue			= ath10k_mac_op_wake_tx_queue,
  7573		.start				= ath10k_start,
  7574		.stop				= ath10k_stop,
  7575		.config				= ath10k_config,
  7576		.add_interface			= ath10k_add_interface,
  7577		.remove_interface		= ath10k_remove_interface,
  7578		.configure_filter		= ath10k_configure_filter,
  7579		.bss_info_changed		= ath10k_bss_info_changed,
  7580		.set_coverage_class		= ath10k_mac_op_set_coverage_class,
  7581		.hw_scan			= ath10k_hw_scan,
  7582		.cancel_hw_scan			= ath10k_cancel_hw_scan,
  7583		.set_key			= ath10k_set_key,
  7584		.set_default_unicast_key        = ath10k_set_default_unicast_key,
  7585		.sta_state			= ath10k_sta_state,
  7586		.conf_tx			= ath10k_conf_tx,
  7587		.remain_on_channel		= ath10k_remain_on_channel,
  7588		.cancel_remain_on_channel	= ath10k_cancel_remain_on_channel,
  7589		.set_rts_threshold		= ath10k_set_rts_threshold,
  7590		.set_frag_threshold		= ath10k_mac_op_set_frag_threshold,
  7591		.flush				= ath10k_flush,
  7592		.tx_last_beacon			= ath10k_tx_last_beacon,
  7593		.set_antenna			= ath10k_set_antenna,
  7594		.get_antenna			= ath10k_get_antenna,
  7595		.reconfig_complete		= ath10k_reconfig_complete,
  7596		.get_survey			= ath10k_get_survey,
  7597		.set_bitrate_mask		= ath10k_mac_op_set_bitrate_mask,
  7598		.sta_rc_update			= ath10k_sta_rc_update,
  7599		.get_tsf			= ath10k_get_tsf,
  7600		.set_tsf			= ath10k_set_tsf,
  7601		.ampdu_action			= ath10k_ampdu_action,
  7602		.get_et_sset_count		= ath10k_debug_get_et_sset_count,
  7603		.get_et_stats			= ath10k_debug_get_et_stats,
  7604		.get_et_strings			= ath10k_debug_get_et_strings,
  7605		.add_chanctx			= ath10k_mac_op_add_chanctx,
  7606		.remove_chanctx			= ath10k_mac_op_remove_chanctx,
  7607		.change_chanctx			= ath10k_mac_op_change_chanctx,
  7608		.assign_vif_chanctx		= ath10k_mac_op_assign_vif_chanctx,
  7609		.unassign_vif_chanctx		= ath10k_mac_op_unassign_vif_chanctx,
  7610		.switch_vif_chanctx		= ath10k_mac_op_switch_vif_chanctx,
> 7611		.set_btcoex                     = ath10k_mac_op_set_btcoex,
> 7612		.set_btcoex_priority		= ath10k_mac_op_set_btcoex_priority,
  7613	
  7614		CFG80211_TESTMODE_CMD(ath10k_tm_cmd)
  7615	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 56822 bytes --]

^ permalink raw reply

* Re: [PATCH 3/5] nl80211: add support for gscan
From: kbuild test robot @ 2016-11-17 16:32 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: kbuild-all, Johannes Berg, linux-wireless, Arend van Spriel
In-Reply-To: <1479382792-13131-4-git-send-email-arend.vanspriel@broadcom.com>

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

Hi Arend,

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on next-20161117]
[cannot apply to v4.9-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Arend-van-Spriel/nl80211-add-support-for-g-scan/20161117-194818
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
reproduce: make htmldocs; make DOCBOOKS='' pdfdocs

All warnings (new ones prefixed by >>):

   make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:2469: warning: bad line: 
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_hashed_networks'
   include/net/cfg80211.h:3493: warning: No description found for parameter 'max_epno_exact_networks'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
   include/net/cfg80211.h:3493: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'

vim +2469 include/net/cfg80211.h

  2453		const u8 *srf_bf;
  2454		u8 srf_bf_len;
  2455		u8 srf_bf_idx;
  2456		struct mac_address *srf_macs;
  2457		int srf_num_macs;
  2458		struct cfg80211_nan_func_filter *rx_filters;
  2459		struct cfg80211_nan_func_filter *tx_filters;
  2460		u8 num_tx_filters;
  2461		u8 num_rx_filters;
  2462		u8 instance_id;
  2463		u64 cookie;
  2464	};
  2465	
  2466	/**
  2467	 * struct cfg80211_gscan_channel - GScan channel parameters.
  2468	 *
> 2469	
  2470	 * @ch: specific channel.
  2471	 * @dwell_time: hint for dwell time in milliseconds.
  2472	 * @passive: indicates passive scan is requested.
  2473	 */
  2474	struct cfg80211_gscan_channel {
  2475	    struct ieee80211_channel *ch;
  2476	    int dwell_time;
  2477	    bool passive;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 6425 bytes --]

^ permalink raw reply

* Re: [PATCH 1/2] cfg80211: get rid of name indirection trick for ieee80211_get_channel()
From: kbuild test robot @ 2016-11-17 12:32 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: kbuild-all, Johannes Berg, linux-wireless, Arend van Spriel
In-Reply-To: <1479373360-1398-1-git-send-email-arend.vanspriel@broadcom.com>

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

Hi Arend,

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on v4.9-rc5 next-20161117]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Arend-van-Spriel/cfg80211-get-rid-of-name-indirection-trick-for-ieee80211_get_channel/20161117-175449
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   drivers/net/wireless/ath/ath10k/htt_rx.c: In function 'ath10k_htt_t2h_msg_handler':
>> drivers/net/wireless/ath/ath10k/htt_rx.c:2333:4: error: implicit declaration of function '__ieee80211_get_channel' [-Werror=implicit-function-declaration]
       __ieee80211_get_channel(ar->hw->wiphy, freq);
       ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath10k/htt_rx.c:2332:21: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      ar->tgt_oper_chan =
                        ^
   cc1: some warnings being treated as errors

vim +/__ieee80211_get_channel +2333 drivers/net/wireless/ath/ath10k/htt_rx.c

c545070e Michal Kazior      2015-01-24  2326  	case HTT_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND:
8348db29 Rajkumar Manoharan 2015-03-25  2327  		break;
2ce9b25c Rajkumar Manoharan 2016-03-08  2328  	case HTT_T2H_MSG_TYPE_CHAN_CHANGE: {
2ce9b25c Rajkumar Manoharan 2016-03-08  2329  		u32 phymode = __le32_to_cpu(resp->chan_change.phymode);
2ce9b25c Rajkumar Manoharan 2016-03-08  2330  		u32 freq = __le32_to_cpu(resp->chan_change.freq);
2ce9b25c Rajkumar Manoharan 2016-03-08  2331  
2ce9b25c Rajkumar Manoharan 2016-03-08 @2332  		ar->tgt_oper_chan =
2ce9b25c Rajkumar Manoharan 2016-03-08 @2333  			__ieee80211_get_channel(ar->hw->wiphy, freq);
2ce9b25c Rajkumar Manoharan 2016-03-08  2334  		ath10k_dbg(ar, ATH10K_DBG_HTT,
2ce9b25c Rajkumar Manoharan 2016-03-08  2335  			   "htt chan change freq %u phymode %s\n",
2ce9b25c Rajkumar Manoharan 2016-03-08  2336  			   freq, ath10k_wmi_phymode_str(phymode));

:::::: The code at line 2333 was first introduced by commit
:::::: 2ce9b25cefa64f11bcb21b21cf4a5e8c58c6d0af ath10k: handle channel change htt event

:::::: TO: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
:::::: CC: Kalle Valo <kvalo@qca.qualcomm.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 56730 bytes --]

^ permalink raw reply

* Re: [PATCH 2/5] nl80211: add reporting of gscan capabilities
From: kbuild test robot @ 2016-11-17 14:20 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: kbuild-all, Johannes Berg, linux-wireless, Arend van Spriel,
	Arend van Spriel
In-Reply-To: <1479382792-13131-3-git-send-email-arend.vanspriel@broadcom.com>

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

Hi Arend,

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on next-20161117]
[cannot apply to v4.9-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Arend-van-Spriel/nl80211-add-support-for-g-scan/20161117-194818
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
reproduce: make htmldocs; make DOCBOOKS='' pdfdocs

All warnings (new ones prefixed by >>):

   make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
>> include/net/cfg80211.h:3406: warning: No description found for parameter 'max_epno_hashed_networks'
>> include/net/cfg80211.h:3406: warning: No description found for parameter 'max_epno_exact_networks'
>> include/net/cfg80211.h:3406: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:3406: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:3406: warning: No description found for parameter 'max_epno_hashed_networks'
>> include/net/cfg80211.h:3406: warning: No description found for parameter 'max_epno_exact_networks'
>> include/net/cfg80211.h:3406: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:3406: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:3406: warning: No description found for parameter 'max_epno_hashed_networks'
>> include/net/cfg80211.h:3406: warning: No description found for parameter 'max_epno_exact_networks'
>> include/net/cfg80211.h:3406: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:3406: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:3406: warning: No description found for parameter 'max_epno_hashed_networks'
>> include/net/cfg80211.h:3406: warning: No description found for parameter 'max_epno_exact_networks'
>> include/net/cfg80211.h:3406: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:3406: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:3406: warning: No description found for parameter 'max_epno_hashed_networks'
>> include/net/cfg80211.h:3406: warning: No description found for parameter 'max_epno_exact_networks'
>> include/net/cfg80211.h:3406: warning: Excess struct/union/enum/typedef member 'max_epno_networks' description in 'wiphy_gscan_caps'
>> include/net/cfg80211.h:3406: warning: Excess struct/union/enum/typedef member 'max_epno_networks_by_ssid' description in 'wiphy_gscan_caps'

vim +/max_epno_hashed_networks +3406 include/net/cfg80211.h

  3390	 *	exact match of SSID is required or which are hidded SSIDs.
  3391	 * @max_white_list_ssid: max number of white listed SSIDs.
  3392	 */
  3393	struct wiphy_gscan_caps {
  3394		u32 max_scan_cache_size;
  3395		u32 max_scan_buckets;
  3396		u32 max_ap_cache_per_scan;
  3397		u32 max_rssi_sample_size;
  3398		u32 max_scan_reporting_threshold;
  3399		u32 max_hotlist_bssids;
  3400		u32 max_hotlist_ssids;
  3401		u32 max_significant_wifi_change_aps;
  3402		u32 max_bssid_history_entries;
  3403		u32 max_epno_hashed_networks;
  3404		u32 max_epno_exact_networks;
  3405		u32 max_white_list_ssid;
> 3406	};
  3407	
  3408	/**
  3409	 * struct wiphy - wireless hardware description
  3410	 * @reg_notifier: the driver's regulatory notification callback,
  3411	 *	note that if your driver uses wiphy_apply_custom_regulatory()
  3412	 *	the reg_notifier's request can be passed as NULL
  3413	 * @regd: the driver's regulatory domain, if one was requested via
  3414	 * 	the regulatory_hint() API. This can be used by the driver

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 6425 bytes --]

^ permalink raw reply

* Re: [PATCH 3/5] nl80211: add support for gscan
From: Arend Van Spriel @ 2016-11-17 12:40 UTC (permalink / raw)
  To: Johannes Berg; +Cc: kbuild test robot, kbuild-all, linux-wireless
In-Reply-To: <201611172006.xRJ9na1r%fengguang.wu@intel.com>

On 17-11-2016 13:10, kbuild test robot wrote:
> Hi Arend,
> 
> [auto build test ERROR on mac80211-next/master]
> [also build test ERROR on next-20161117]
> [cannot apply to v4.9-rc5]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Arend-van-Spriel/nl80211-add-support-for-g-scan/20161117-194818
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
> config: i386-randconfig-x004-201646 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386 

Shuffled the patches while rebasing. Not nice. Will fix it.

Regards,
Arend

> Note: the linux-review/Arend-van-Spriel/nl80211-add-support-for-g-scan/20161117-194818 HEAD 407f604bb543a049c99ae0f9974943f1c64ea880 builds fine.
>       It only hurts bisectibility.
> 
> All errors (new ones prefixed by >>):
> 
>    net/wireless/scan.c: In function '__cfg80211_stop_gscan':
>>> net/wireless/scan.c:358:2: error: implicit declaration of function 'nl80211_send_scan_event' [-Werror=implicit-function-declaration]
>      nl80211_send_scan_event(rdev, dev, NL80211_CMD_GSCAN_STOPPED);
>      ^~~~~~~~~~~~~~~~~~~~~~~
>    cc1: some warnings being treated as errors
> --
>    net/wireless/nl80211.c: In function 'nl80211_start_gscan':
>>> net/wireless/nl80211.c:12167:2: error: implicit declaration of function 'nl80211_send_scan_event' [-Werror=implicit-function-declaration]
>      nl80211_send_scan_event(rdev, dev,
>      ^~~~~~~~~~~~~~~~~~~~~~~
>    cc1: some warnings being treated as errors
> 
> vim +/nl80211_send_scan_event +358 net/wireless/scan.c
> 
>    352		if (!driver_initiated) {
>    353			int err = rdev_stop_gscan(rdev, dev);
>    354			if (err)
>    355				return err;
>    356		}
>    357	
>  > 358		nl80211_send_scan_event(rdev, dev, NL80211_CMD_GSCAN_STOPPED);
>    359	
>    360		RCU_INIT_POINTER(rdev->gscan_req, NULL);
>    361		kfree_rcu(gscan_req, rcu_head);
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> 

^ permalink raw reply

* Re: [PATCH 1/2] cfg80211: get rid of name indirection trick for ieee80211_get_channel()
From: kbuild test robot @ 2016-11-17 11:54 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: kbuild-all, Johannes Berg, linux-wireless, Arend van Spriel
In-Reply-To: <1479373360-1398-1-git-send-email-arend.vanspriel@broadcom.com>

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

Hi Arend,

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on v4.9-rc5 next-20161117]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Arend-van-Spriel/cfg80211-get-rid-of-name-indirection-trick-for-ieee80211_get_channel/20161117-175449
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-allyesdebian (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   drivers/net/wireless/marvell/mwifiex/cfg80211.c: In function 'mwifiex_cfg80211_inform_ibss_bss':
>> drivers/net/wireless/marvell/mwifiex/cfg80211.c:2075:9: error: implicit declaration of function '__ieee80211_get_channel' [-Werror=implicit-function-declaration]
     chan = __ieee80211_get_channel(priv->wdev.wiphy,
            ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/marvell/mwifiex/cfg80211.c:2075:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     chan = __ieee80211_get_channel(priv->wdev.wiphy,
          ^
   cc1: some warnings being treated as errors

vim +/__ieee80211_get_channel +2075 drivers/net/wireless/marvell/mwifiex/cfg80211.c

5e6e3a92 drivers/net/wireless/mwifiex/cfg80211.c Bing Zhao          2011-03-21  2069  
5e6e3a92 drivers/net/wireless/mwifiex/cfg80211.c Bing Zhao          2011-03-21  2070  	memcpy(&ie_buf[sizeof(struct ieee_types_header)],
aea0701e drivers/net/wireless/mwifiex/cfg80211.c Yogesh Ashok Powar 2012-03-13  2071  	       &bss_info.ssid.ssid, bss_info.ssid.ssid_len);
5e6e3a92 drivers/net/wireless/mwifiex/cfg80211.c Bing Zhao          2011-03-21  2072  	ie_len = ie_buf[1] + sizeof(struct ieee_types_header);
5e6e3a92 drivers/net/wireless/mwifiex/cfg80211.c Bing Zhao          2011-03-21  2073  
4ed5d521 drivers/net/wireless/mwifiex/cfg80211.c Amitkumar Karwar   2011-09-21  2074  	band = mwifiex_band_to_radio_type(priv->curr_bss_params.band);
4facc34a drivers/net/wireless/mwifiex/cfg80211.c Avinash Patil      2015-01-28 @2075  	chan = __ieee80211_get_channel(priv->wdev.wiphy,
5e6e3a92 drivers/net/wireless/mwifiex/cfg80211.c Bing Zhao          2011-03-21  2076  			ieee80211_channel_to_frequency(bss_info.bss_chan,
4ed5d521 drivers/net/wireless/mwifiex/cfg80211.c Amitkumar Karwar   2011-09-21  2077  						       band));
5e6e3a92 drivers/net/wireless/mwifiex/cfg80211.c Bing Zhao          2011-03-21  2078  

:::::: The code at line 2075 was first introduced by commit
:::::: 4facc34a1f1d6ba8fafc9afdb84f9c6ed4334c4c mwifiex: do not declare wdev as pointer

:::::: TO: Avinash Patil <patila@marvell.com>
:::::: CC: Kalle Valo <kvalo@codeaurora.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37800 bytes --]

^ permalink raw reply

* [PATCHv2 4/4] ath10k: Add support to read btcoex related data from DT
From: c_traja @ 2016-11-17 11:44 UTC (permalink / raw)
  To: ath10k
  Cc: linux-wireless, tamizhchelvam, linux-kernel, devicetree, robh,
	Tamizh chelvam
In-Reply-To: <1479383064-25718-1-git-send-email-c_traja@qti.qualcomm.com>

From: Tamizh chelvam <c_traja@qti.qualcomm.com>

BTCOEX feature is not supported by all qca40xx chipsets.
Since btcoex enabled by default in firmware, host needs to
enable COEX support depends on the hardware. This patch is
used to read btcoex_support flag and btcoex gpio pin
number from DT. Depends on the btcoex_support flag value
host will expose BTCOEX support and btcoex gpio pin
number to target.

Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/core.c  |   44 ++++++++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath10k/core.h  |    9 +++++++
 drivers/net/wireless/ath/ath10k/debug.c |    3 +++
 drivers/net/wireless/ath/ath10k/mac.c   |    4 ++-
 drivers/net/wireless/ath/ath10k/wmi.c   |    1 +
 drivers/net/wireless/ath/ath10k/wmi.h   |    2 ++
 6 files changed, 61 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 7005e2a..eec2436 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1439,6 +1439,39 @@ static int ath10k_download_cal_data(struct ath10k *ar)
 	return 0;
 }
 
+static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar)
+{
+	struct device_node *node;
+	u32 btcoex_support = 0;
+	int ret;
+
+	node = ar->dev->of_node;
+	if (!node)
+		goto out;
+
+	ret = of_property_read_u32(node, "btcoex_support", &btcoex_support);
+	if (ret) {
+		ar->btcoex_support = ATH10K_DT_BTCOEX_NOT_FOUND;
+		goto out;
+	}
+
+	if (btcoex_support)
+		ar->btcoex_support = ATH10K_DT_BTCOEX_SUPPORTED;
+	else
+		ar->btcoex_support = ATH10K_DT_BTCOEX_NOT_SUPPORTED;
+
+	ret = of_property_read_u32(node, "btcoex_gpio_pin",
+				   &ar->btcoex_gpio_pin);
+	if (ret) {
+		ar->btcoex_gpio_pin = -1;
+		goto out;
+	}
+
+out:
+	ath10k_dbg(ar, ATH10K_DBG_BOOT, "btcoex support flag :%d gpio %d\n",
+		   ar->btcoex_support, ar->btcoex_gpio_pin);
+}
+
 static int ath10k_init_uart(struct ath10k *ar)
 {
 	int ret;
@@ -1920,14 +1953,23 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
 		if (test_bit(WMI_SERVICE_BSS_CHANNEL_INFO_64, ar->wmi.svc_map))
 			val |= WMI_10_4_BSS_CHANNEL_INFO_64;
 
+		ath10k_core_fetch_btcoex_dt(ar);
+
 		/* 10.4 firmware supports BT-Coex without reloading firmware
 		 * via pdev param. To support Bluetooth coexistence pdev param,
 		 * WMI_COEX_GPIO_SUPPORT of extended resource config should be
 		 * enabled always.
 		 */
+
+		/* we can still enable BTCOEX if firmware has the support
+		 * eventhough btceox_support value is
+		 * ATH10K_DT_BTCOEX_NOT_FOUND
+		 */
+
 		if (test_bit(WMI_SERVICE_COEX_GPIO, ar->wmi.svc_map) &&
 		    test_bit(ATH10K_FW_FEATURE_BTCOEX_PARAM,
-			     ar->running_fw->fw_file.fw_features))
+			     ar->running_fw->fw_file.fw_features) &&
+		    ar->btcoex_support != ATH10K_DT_BTCOEX_NOT_SUPPORTED)
 			val |= WMI_10_4_COEX_GPIO_SUPPORT;
 
 		status = ath10k_mac_ext_resource_config(ar, val);
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index e8decfa..440e41c 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -656,6 +656,12 @@ enum ath10k_tx_pause_reason {
 	ATH10K_TX_PAUSE_MAX,
 };
 
+enum ath10k_dt_btcoex_support_flag {
+	ATH10K_DT_BTCOEX_NOT_FOUND,
+	ATH10K_DT_BTCOEX_SUPPORTED,
+	ATH10K_DT_BTCOEX_NOT_SUPPORTED,
+};
+
 struct ath10k_fw_file {
 	const struct firmware *firmware;
 
@@ -924,6 +930,9 @@ struct ath10k {
 		u32 reg_ack_cts_timeout_orig;
 	} fw_coverage;
 
+	enum ath10k_dt_btcoex_support_flag btcoex_support;
+	int btcoex_gpio_pin;
+
 	/* must be last */
 	u8 drv_priv[0] __aligned(sizeof(void *));
 };
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index ea30fbe..e0e316c 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -2149,6 +2149,9 @@ static ssize_t ath10k_write_btcoex(struct file *file,
 	if (strtobool(buf, &val) != 0)
 		return -EINVAL;
 
+	if (ar->btcoex_support == ATH10K_DT_BTCOEX_NOT_SUPPORTED)
+		return -EOPNOTSUPP;
+
 	mutex_lock(&ar->conf_mutex);
 	ret = ath10k_mac_set_btcoex(ar, val);
 	if (!ret)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index ce5d529..25d6c0a 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4562,9 +4562,11 @@ static int ath10k_start(struct ieee80211_hw *hw)
 	}
 
 	param = ar->wmi.pdev_param->enable_btcoex;
+
 	if (test_bit(WMI_SERVICE_COEX_GPIO, ar->wmi.svc_map) &&
 	    test_bit(ATH10K_FW_FEATURE_BTCOEX_PARAM,
-		     ar->running_fw->fw_file.fw_features)) {
+		     ar->running_fw->fw_file.fw_features) &&
+	    ar->btcoex_support != ATH10K_DT_BTCOEX_NOT_SUPPORTED) {
 		ret = ath10k_wmi_pdev_set_param(ar, param, 0);
 		if (ret) {
 			ath10k_warn(ar,
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index de35c17..1eb5678 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -7811,6 +7811,7 @@ static int ath10k_wmi_10_4_op_get_vdev_subtype(struct ath10k *ar,
 	cmd = (struct wmi_ext_resource_config_10_4_cmd *)skb->data;
 	cmd->host_platform_config = __cpu_to_le32(type);
 	cmd->fw_feature_bitmap = __cpu_to_le32(fw_feature_bitmap);
+	cmd->btcoex_gpio_pin = __cpu_to_le32(ar->btcoex_gpio_pin);
 
 	ath10k_dbg(ar, ATH10K_DBG_WMI,
 		   "wmi ext resource config host type %d firmware feature bitmap %08x\n",
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 3a739e3..f83a21e 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -2734,6 +2734,8 @@ struct wmi_ext_resource_config_10_4_cmd {
 	__le32 host_platform_config;
 	/* see enum wmi_10_4_feature_mask */
 	__le32 fw_feature_bitmap;
+	/* Contains btcoex gpio pin number */
+	__le32 btcoex_gpio_pin;
 };
 
 struct wmi_set_coex_param_10_4_cmd {
-- 
1.7.9.5

^ permalink raw reply related

* [PATCHv2 3/4] dt: bindings: add new dt entry for BTCOEX feature in qcom,ath10k.txt
From: c_traja @ 2016-11-17 11:44 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, tamizhchelvam, linux-kernel, devicetree, robh
In-Reply-To: <1479383064-25718-1-git-send-email-c_traja@qti.qualcomm.com>

From: Tamizh chelvam <tamizhchelvam@codeaurora.org>

There two things done in this patch.

1) 'btcoex_support' flag for BTCOEX feature support by the hardware.
2) 'wlan_btcoex_gpio' is used to fill wlan priority pin number for
   BTCOEX priority feature support.

Signed-off-by: Tamizh chelvam <tamizhchelvam@codeaurora.org>
---
 .../bindings/net/wireless/qcom,ath10k.txt          |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
index 74d7f0a..08150e2d 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
@@ -46,6 +46,10 @@ Optional properties:
 				 hw versions.
 - qcom,ath10k-pre-calibration-data : pre calibration data as an array,
 				     the length can vary between hw versions.
+- btcoex_support  : should contain eithr "0" or "1" to indicate btcoex
+		    support by the hardware.
+- btcoex_gpio_pin :  btcoex gpio pin number for the device which
+		     supports BTCOEX.
 
 Example (to supply the calibration data alone):
 
-- 
1.7.9.5

^ permalink raw reply related

* [PATCHv2 2/4] ath10k: Add support to update btcoex priority value via nl80211
From: c_traja @ 2016-11-17 11:44 UTC (permalink / raw)
  To: ath10k
  Cc: linux-wireless, tamizhchelvam, linux-kernel, devicetree, robh,
	Tamizh chelvam
In-Reply-To: <1479383064-25718-1-git-send-email-c_traja@qti.qualcomm.com>

From: Tamizh chelvam <c_traja@qti.qualcomm.com>

This patch adds support to update btcoex priority value via nl80211.
Here driver will be exposing the supported frame format for this
feature via btcoex_support_flags which is a member of
wiphy structure. 10.4 based firmware support this feature.
WMI service WMI_SERVICE_BTCOEX is used to identify the firmware support
of this feature. BTCOEX needs to enable to modify this value.

This patch has dependency of
"cfg80211: Add new NL80211_CMD_SET_BTCOEX_PRIORITY to support BTCOEX"
patch.

Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/mac.c     |   78 +++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/wmi-ops.h |   19 +++++++
 drivers/net/wireless/ath/ath10k/wmi.c     |   19 +++++++
 drivers/net/wireless/ath/ath10k/wmi.h     |   18 +++++++
 4 files changed, 134 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index e7131b9..ce5d529 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -7502,6 +7502,71 @@ static int ath10k_mac_op_set_btcoex(struct ieee80211_hw *hw, bool enabled)
 	return ret;
 }
 
+u32
+ath10k_mac_get_btcoex_prio(struct cfg80211_btcoex_priority *btcoex_priority)
+{
+	u32 btcoex_prio = 0;
+
+	if (btcoex_priority->wlan_be_preferred)
+		btcoex_prio |= WIPHY_WLAN_BE_PREFERRED;
+
+	if (btcoex_priority->wlan_bk_preferred)
+		btcoex_prio |= WIPHY_WLAN_BK_PREFERRED;
+
+	if (btcoex_priority->wlan_vi_preferred)
+		btcoex_prio |= WIPHY_WLAN_VI_PREFERRED;
+
+	if (btcoex_priority->wlan_vo_preferred)
+		btcoex_prio |= WIPHY_WLAN_VO_PREFERRED;
+
+	if (btcoex_priority->wlan_beacon_preferred)
+		btcoex_prio |= WIPHY_WLAN_BEACON_PREFERRED;
+
+	if (btcoex_priority->wlan_mgmt_preferred)
+		btcoex_prio |= WIPHY_WLAN_MGMT_PREFERRED;
+
+	return btcoex_prio;
+}
+
+static int ath10k_mac_op_set_btcoex_priority(struct ieee80211_hw *hw,
+			struct cfg80211_btcoex_priority *btcoex_priority)
+{
+	u32 btcoex_prio;
+	struct ath10k *ar = hw->priv;
+	int ret;
+
+	if (!(test_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags))) {
+		ret = -EINVAL;
+		goto exit;
+	}
+
+	mutex_lock(&ar->conf_mutex);
+
+	if (ar->state != ATH10K_STATE_ON &&
+	    ar->state != ATH10K_STATE_RESTARTED) {
+		ret = -ENETDOWN;
+		goto exit;
+	}
+
+	btcoex_prio = ath10k_mac_get_btcoex_prio(btcoex_priority);
+
+	if (btcoex_prio > 0x3f) {
+		ret = -E2BIG;
+		goto exit;
+	}
+
+	ret = ath10k_wmi_set_coex_param(ar, btcoex_prio);
+
+	if (ret) {
+		ath10k_warn(ar, "failed to set btcoex priority: %d\n", ret);
+		goto exit;
+	}
+
+exit:
+	mutex_unlock(&ar->conf_mutex);
+	return ret;
+}
+
 static const struct ieee80211_ops ath10k_ops = {
 	.tx				= ath10k_mac_op_tx,
 	.wake_tx_queue			= ath10k_mac_op_wake_tx_queue,
@@ -7544,6 +7609,7 @@ static int ath10k_mac_op_set_btcoex(struct ieee80211_hw *hw, bool enabled)
 	.unassign_vif_chanctx		= ath10k_mac_op_unassign_vif_chanctx,
 	.switch_vif_chanctx		= ath10k_mac_op_switch_vif_chanctx,
 	.set_btcoex                     = ath10k_mac_op_set_btcoex,
+	.set_btcoex_priority		= ath10k_mac_op_set_btcoex_priority,
 
 	CFG80211_TESTMODE_CMD(ath10k_tm_cmd)
 
@@ -8134,6 +8200,18 @@ int ath10k_mac_register(struct ath10k *ar)
 	 */
 	ar->hw->offchannel_tx_hw_queue = IEEE80211_MAX_QUEUES - 1;
 
+	if (test_bit(WMI_SERVICE_BTCOEX, ar->wmi.svc_map)) {
+		ar->hw->wiphy->btcoex_support_flags =
+			WIPHY_WLAN_BE_PREFERRED |
+			WIPHY_WLAN_BK_PREFERRED |
+			WIPHY_WLAN_VI_PREFERRED |
+			WIPHY_WLAN_VO_PREFERRED |
+			WIPHY_WLAN_BEACON_PREFERRED |
+			WIPHY_WLAN_MGMT_PREFERRED;
+		ath10k_dbg(ar, ATH10K_DBG_BOOT, "btcoex supported mask :%u\n",
+			   ar->hw->wiphy->btcoex_support_flags);
+	}
+
 	switch (ar->running_fw->fw_file.wmi_op_version) {
 	case ATH10K_FW_WMI_OP_VERSION_MAIN:
 		ar->hw->wiphy->iface_combinations = ath10k_if_comb;
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index c9a8bb1..90c8390 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -197,6 +197,8 @@ struct wmi_ops {
 					(struct ath10k *ar,
 					 enum wmi_bss_survey_req_type type);
 	struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value);
+	struct sk_buff *(*gen_set_coex_param)(struct ath10k *ar,
+					      u32 btcoex_prio);
 };
 
 int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
@@ -1411,4 +1413,21 @@ struct wmi_ops {
 	return ath10k_wmi_cmd_send(ar, skb, wmi->cmd->echo_cmdid);
 }
 
+static inline int
+ath10k_wmi_set_coex_param(struct ath10k *ar, u32 btcoex_prio)
+{
+	struct sk_buff *skb;
+
+	if (!ar->wmi.ops->gen_set_coex_param)
+		return -EOPNOTSUPP;
+
+	skb = ar->wmi.ops->gen_set_coex_param(ar, btcoex_prio);
+
+	if (IS_ERR(skb))
+		return PTR_ERR(skb);
+
+	return ath10k_wmi_cmd_send(ar, skb,
+				   ar->wmi.cmd->set_coex_param_cmdid);
+}
+
 #endif
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 387c4ee..de35c17 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -710,6 +710,7 @@
 	.pdev_bss_chan_info_request_cmdid =
 			WMI_10_4_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
 	.ext_resource_cfg_cmdid = WMI_10_4_EXT_RESOURCE_CFG_CMDID,
+	.set_coex_param_cmdid = WMI_10_4_BTCOEX_CFG_CMDID,
 };
 
 /* MAIN WMI VDEV param map */
@@ -7859,6 +7860,23 @@ static int ath10k_wmi_10_4_op_get_vdev_subtype(struct ath10k *ar,
 	return 0;
 }
 
+static struct sk_buff *
+ath10k_wmi_10_4_op_gen_set_coex_param(struct ath10k *ar,
+				      u32 btcoex_prio)
+{
+	struct wmi_set_coex_param_10_4_cmd *cmd;
+	struct sk_buff *skb;
+
+	skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
+	if (!skb)
+		return ERR_PTR(-ENOMEM);
+
+	cmd = (struct wmi_set_coex_param_10_4_cmd *)skb->data;
+	cmd->btcoex_prio = __cpu_to_le32(btcoex_prio);
+
+	ath10k_dbg(ar, ATH10K_DBG_WMI, "BTCOEX priority :%u\n", btcoex_prio);
+	return skb;
+}
 static const struct wmi_ops wmi_ops = {
 	.rx = ath10k_wmi_op_rx,
 	.map_svc = wmi_main_svc_map,
@@ -8205,6 +8223,7 @@ static int ath10k_wmi_10_4_op_get_vdev_subtype(struct ath10k *ar,
 	.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
 	.gen_echo = ath10k_wmi_op_gen_echo,
 	.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
+	.gen_set_coex_param = ath10k_wmi_10_4_op_gen_set_coex_param,
 };
 
 int ath10k_wmi_attach(struct ath10k *ar)
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 1b243c8..3a739e3 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -184,6 +184,8 @@ enum wmi_service {
 	WMI_SERVICE_TX_MODE_PUSH_ONLY,
 	WMI_SERVICE_TX_MODE_PUSH_PULL,
 	WMI_SERVICE_TX_MODE_DYNAMIC,
+	WMI_SERVICE_VDEV_RX_FILTER,
+	WMI_SERVICE_BTCOEX,
 
 	/* keep last */
 	WMI_SERVICE_MAX,
@@ -310,6 +312,8 @@ enum wmi_10_4_service {
 	WMI_10_4_SERVICE_TX_MODE_PUSH_ONLY,
 	WMI_10_4_SERVICE_TX_MODE_PUSH_PULL,
 	WMI_10_4_SERVICE_TX_MODE_DYNAMIC,
+	WMI_10_4_SERVICE_VDEV_RX_FILTER,
+	WMI_10_4_SERVICE_BTCOEX,
 };
 
 static inline char *wmi_service_name(int service_id)
@@ -408,6 +412,7 @@ static inline char *wmi_service_name(int service_id)
 	SVCSTR(WMI_SERVICE_TX_MODE_PUSH_ONLY);
 	SVCSTR(WMI_SERVICE_TX_MODE_PUSH_PULL);
 	SVCSTR(WMI_SERVICE_TX_MODE_DYNAMIC);
+	SVCSTR(WMI_SERVICE_BTCOEX);
 	default:
 		return NULL;
 	}
@@ -663,6 +668,8 @@ static inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out,
 	       WMI_SERVICE_TX_MODE_PUSH_PULL, len);
 	SVCMAP(WMI_10_4_SERVICE_TX_MODE_DYNAMIC,
 	       WMI_SERVICE_TX_MODE_DYNAMIC, len);
+	SVCMAP(WMI_10_4_SERVICE_BTCOEX,
+	       WMI_SERVICE_BTCOEX, len);
 }
 
 #undef SVCMAP
@@ -837,6 +844,7 @@ struct wmi_cmd_map {
 	u32 pdev_bss_chan_info_request_cmdid;
 	u32 pdev_enable_adaptive_cca_cmdid;
 	u32 ext_resource_cfg_cmdid;
+	u32 set_coex_param_cmdid;
 };
 
 /*
@@ -1646,6 +1654,11 @@ enum wmi_10_4_cmd_id {
 	WMI_10_4_EXT_RESOURCE_CFG_CMDID,
 	WMI_10_4_VDEV_SET_IE_CMDID,
 	WMI_10_4_SET_LTEU_CONFIG_CMDID,
+	WMI_10_4_ATF_SSID_GROUPING_REQUEST_CMDID,
+	WMI_10_4_PEER_ATF_EXT_REQUEST_CMDID,
+	WMI_10_4_SET_PERIODIC_CHANNEL_STATS_CONFIG,
+	WMI_10_4_PEER_BWF_REQUEST_CMDID,
+	WMI_10_4_BTCOEX_CFG_CMDID,
 	WMI_10_4_PDEV_UTF_CMDID = WMI_10_4_END_CMDID - 1,
 };
 
@@ -2723,6 +2736,11 @@ struct wmi_ext_resource_config_10_4_cmd {
 	__le32 fw_feature_bitmap;
 };
 
+struct wmi_set_coex_param_10_4_cmd {
+	/* contains wlan priority frame type value preferred over bt */
+	__le32 btcoex_prio;
+};
+
 /* strucutre describing host memory chunk. */
 struct host_memory_chunk {
 	/* id of the request that is passed up in service ready */
-- 
1.7.9.5

^ permalink raw reply related

* [PATCHv2 1/4] ath10k: Add support to enable or disable btcoex via nl80211
From: c_traja @ 2016-11-17 11:44 UTC (permalink / raw)
  To: ath10k
  Cc: linux-wireless, tamizhchelvam, linux-kernel, devicetree, robh,
	Tamizh chelvam
In-Reply-To: <1479383064-25718-1-git-send-email-c_traja@qti.qualcomm.com>

From: Tamizh chelvam <c_traja@qti.qualcomm.com>

This patch add support to enable or disable btcoex via nl80211.
The firmware support this feature since 10.2.4.54 on 2G-only board,
dual band or 5G boards don't support this. WMI service
WMI_SERVICE_COEX_GPIO is used to identify the firmware support of this
feature.

Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/debug.c |   37 ++------------------
 drivers/net/wireless/ath/ath10k/mac.c   |   58 +++++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/mac.h   |    1 +
 3 files changed, 62 insertions(+), 34 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 82a4c67..ea30fbe 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -26,6 +26,7 @@
 #include "debug.h"
 #include "hif.h"
 #include "wmi-ops.h"
+#include "mac.h"
 
 /* ms */
 #define ATH10K_DEBUG_HTT_STATS_INTERVAL 1000
@@ -2138,7 +2139,6 @@ static ssize_t ath10k_write_btcoex(struct file *file,
 	size_t buf_size;
 	int ret;
 	bool val;
-	u32 pdev_param;
 
 	buf_size = min(count, (sizeof(buf) - 1));
 	if (copy_from_user(buf, ubuf, buf_size))
@@ -2150,40 +2150,9 @@ static ssize_t ath10k_write_btcoex(struct file *file,
 		return -EINVAL;
 
 	mutex_lock(&ar->conf_mutex);
-
-	if (ar->state != ATH10K_STATE_ON &&
-	    ar->state != ATH10K_STATE_RESTARTED) {
-		ret = -ENETDOWN;
-		goto exit;
-	}
-
-	if (!(test_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags) ^ val)) {
+	ret = ath10k_mac_set_btcoex(ar, val);
+	if (!ret)
 		ret = count;
-		goto exit;
-	}
-
-	pdev_param = ar->wmi.pdev_param->enable_btcoex;
-	if (test_bit(ATH10K_FW_FEATURE_BTCOEX_PARAM,
-		     ar->running_fw->fw_file.fw_features)) {
-		ret = ath10k_wmi_pdev_set_param(ar, pdev_param, val);
-		if (ret) {
-			ath10k_warn(ar, "failed to enable btcoex: %d\n", ret);
-			ret = count;
-			goto exit;
-		}
-	} else {
-		ath10k_info(ar, "restarting firmware due to btcoex change");
-		queue_work(ar->workqueue, &ar->restart_work);
-	}
-
-	if (val)
-		set_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags);
-	else
-		clear_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags);
-
-	ret = count;
-
-exit:
 	mutex_unlock(&ar->conf_mutex);
 
 	return ret;
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 717b2fa..e7131b9 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -7445,6 +7445,63 @@ struct ath10k_mac_change_chanctx_arg {
 	return 0;
 }
 
+static inline void ath10k_mac_update_btcoex_flag(struct ath10k *ar, bool val)
+{
+	if (val)
+		set_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags);
+	else
+		clear_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags);
+}
+
+int ath10k_mac_set_btcoex(struct ath10k *ar, bool val)
+{
+	u32 pdev_param;
+	int ret;
+
+	lockdep_assert_held(&ar->conf_mutex);
+
+	if (ar->state != ATH10K_STATE_ON &&
+	    ar->state != ATH10K_STATE_RESTARTED)
+		return -ENETDOWN;
+
+	if (!(test_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags) ^ val))
+		return 0;
+
+	pdev_param = ar->wmi.pdev_param->enable_btcoex;
+	if (test_bit(ATH10K_FW_FEATURE_BTCOEX_PARAM,
+		     ar->running_fw->fw_file.fw_features)) {
+		ret = ath10k_wmi_pdev_set_param(ar, pdev_param, val);
+
+		if (ret) {
+			ath10k_warn(ar,
+				    "failed to modify btcoex state: %d\n", ret);
+			return ret;
+		}
+		ath10k_mac_update_btcoex_flag(ar, val);
+	} else {
+		ath10k_info(ar, "restarting firmware due to btcoex change");
+		ath10k_mac_update_btcoex_flag(ar, val);
+		queue_work(ar->workqueue, &ar->restart_work);
+	}
+
+	return 0;
+}
+
+static int ath10k_mac_op_set_btcoex(struct ieee80211_hw *hw, bool enabled)
+{
+	int ret;
+	struct ath10k *ar = hw->priv;
+
+	if (!test_bit(WMI_SERVICE_COEX_GPIO, ar->wmi.svc_map))
+		return -EOPNOTSUPP;
+
+	mutex_lock(&ar->conf_mutex);
+	ret = ath10k_mac_set_btcoex(ar, enabled);
+	mutex_unlock(&ar->conf_mutex);
+
+	return ret;
+}
+
 static const struct ieee80211_ops ath10k_ops = {
 	.tx				= ath10k_mac_op_tx,
 	.wake_tx_queue			= ath10k_mac_op_wake_tx_queue,
@@ -7486,6 +7543,7 @@ struct ath10k_mac_change_chanctx_arg {
 	.assign_vif_chanctx		= ath10k_mac_op_assign_vif_chanctx,
 	.unassign_vif_chanctx		= ath10k_mac_op_unassign_vif_chanctx,
 	.switch_vif_chanctx		= ath10k_mac_op_switch_vif_chanctx,
+	.set_btcoex                     = ath10k_mac_op_set_btcoex,
 
 	CFG80211_TESTMODE_CMD(ath10k_tm_cmd)
 
diff --git a/drivers/net/wireless/ath/ath10k/mac.h b/drivers/net/wireless/ath/ath10k/mac.h
index 1bd29ec..de1fa72 100644
--- a/drivers/net/wireless/ath/ath10k/mac.h
+++ b/drivers/net/wireless/ath/ath10k/mac.h
@@ -82,6 +82,7 @@ struct ieee80211_txq *ath10k_mac_txq_lookup(struct ath10k *ar,
 					    u16 peer_id,
 					    u8 tid);
 int ath10k_mac_ext_resource_config(struct ath10k *ar, u32 val);
+int ath10k_mac_set_btcoex(struct ath10k *ar, bool val);
 
 static inline struct ath10k_vif *ath10k_vif_to_arvif(struct ieee80211_vif *vif)
 {
-- 
1.7.9.5

^ permalink raw reply related

* [PATCHv2 0/4] ath10k: Add support for BTCOEX feature.
From: c_traja @ 2016-11-17 11:44 UTC (permalink / raw)
  To: ath10k
  Cc: linux-wireless, tamizhchelvam, linux-kernel, devicetree, robh,
	Tamizh chelvam

From: Tamizh chelvam <c_traja@qti.qualcomm.com>

This patch set add support to enable/disable BTCOEX via nl80211,
also support to update BTCOEX priority value for 10.4 based firmware.
Document the dt entry in qcom,ath10k.txt and reads btcoex support
flag and btcoex gpio pin detail from dt.

Tamizh chelvam (4):
  ath10k: Add support to enable or disable btcoex via nl80211
  ath10k: Add support to update btcoex priority value via nl80211
  dt: bindings: add new dt entry for BTCOEX feature in qcom,ath10k.txt
  ath10k: Add support to read btcoex related data from DT

V2:

 * Added device tree list in CC
 * fixed mutex unlock issue in 
   "ath10k: Add support to update btcoex priority value via nl80211"

 .../bindings/net/wireless/qcom,ath10k.txt          |    4 +
 drivers/net/wireless/ath/ath10k/core.c             |   44 +++++-
 drivers/net/wireless/ath/ath10k/core.h             |    9 ++
 drivers/net/wireless/ath/ath10k/debug.c            |   40 +-----
 drivers/net/wireless/ath/ath10k/mac.c              |  140 +++++++++++++++++++-
 drivers/net/wireless/ath/ath10k/mac.h              |    1 +
 drivers/net/wireless/ath/ath10k/wmi-ops.h          |   19 +++
 drivers/net/wireless/ath/ath10k/wmi.c              |   20 +++
 drivers/net/wireless/ath/ath10k/wmi.h              |   20 +++
 9 files changed, 261 insertions(+), 36 deletions(-)

-- 
1.7.9.5

^ permalink raw reply

* [PATCH 5/5] nl80211: add driver api for gscan notifications
From: Arend van Spriel @ 2016-11-17 11:39 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Arend van Spriel
In-Reply-To: <1479382792-13131-1-git-send-email-arend.vanspriel@broadcom.com>

The driver can indicate gscan results are available or gscan operation
has stopped.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 include/net/cfg80211.h       | 28 ++++++++++++++++++++
 include/uapi/linux/nl80211.h |  2 ++
 net/wireless/core.c          |  2 ++
 net/wireless/core.h          |  2 ++
 net/wireless/nl80211.c       | 19 ++++++++++++++
 net/wireless/nl80211.h       |  2 ++
 net/wireless/scan.c          | 61 ++++++++++++++++++++++++++++++++++++++++++++
 net/wireless/trace.h         | 10 ++++++++
 8 files changed, 126 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index b4b0536..d85a439 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4570,6 +4570,34 @@ void cfg80211_scan_done(struct cfg80211_scan_request *request,
 void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy);
 
 /**
+ * cfg80211_gscan_results - notify that new scan results are available
+ *
+ * @wiphy: the wiphy which got GScan results
+ */
+void cfg80211_gscan_results(struct wiphy *wiphy);
+
+/**
+ * cfg80211_gscan_stopped - notify that the GScan has stopped
+ *
+ * @wiphy: the wiphy on which the GScan stopped.
+ *
+ * The driver can call this function to inform cfg80211 that the
+ * GScan had to be stopped, for whatever reason.
+ */
+void cfg80211_gscan_stopped(struct wiphy *wiphy);
+
+/**
+ * cfg80211_gscan_stopped_rtnl - notify that the GScan has stopped
+ *
+ * @wiphy: the wiphy on which the GScan stopped.
+ *
+ * The driver can call this function to inform cfg80211 that the
+ * GScan had to be stopped, for whatever reason.
+ * This function should be called with rtnl locked.
+ */
+void cfg80211_gscan_stopped_rtnl(struct wiphy *wiphy);
+
+/**
  * cfg80211_inform_bss_frame_data - inform cfg80211 of a received BSS frame
  * @wiphy: the wiphy reporting the BSS
  * @data: the BSS metadata
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 8071dae..c4c9005 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -896,6 +896,7 @@
  *
  * @NL80211_CMD_START_GSCAN: start GScan.
  * @NL80211_CMD_STOP_GSCAN: request to stop current GScan.
+ * @NL80211_CMD_GSCAN_RESULTS: indicates that there GScan results available.
  * @NL80211_CMD_GSCAN_STOPPED: indicates that the currently running GScan
  *	has stopped. This event is generated upon @NL80211_CMD_STOP_GSCAN and
  *	the driver may issue this event at any time when a GScan is running.
@@ -1101,6 +1102,7 @@ enum nl80211_commands {
 
 	NL80211_CMD_START_GSCAN,
 	NL80211_CMD_STOP_GSCAN,
+	NL80211_CMD_GSCAN_RESULTS,
 	NL80211_CMD_GSCAN_STOPPED,
 
 	/* add new commands above here */
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 760a2fb..69eea4c 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -453,6 +453,7 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
 	INIT_LIST_HEAD(&rdev->bss_list);
 	INIT_WORK(&rdev->scan_done_wk, __cfg80211_scan_done);
 	INIT_WORK(&rdev->sched_scan_results_wk, __cfg80211_sched_scan_results);
+	INIT_WORK(&rdev->gscan_results_wk, __cfg80211_gscan_results);
 	INIT_LIST_HEAD(&rdev->mlme_unreg);
 	spin_lock_init(&rdev->mlme_unreg_lock);
 	INIT_WORK(&rdev->mlme_unreg_wk, cfg80211_mlme_unreg_wk);
@@ -935,6 +936,7 @@ void wiphy_unregister(struct wiphy *wiphy)
 	cancel_delayed_work_sync(&rdev->dfs_update_channels_wk);
 	flush_work(&rdev->destroy_work);
 	flush_work(&rdev->sched_scan_stop_wk);
+	flush_work(&rdev->gscan_stop_wk);
 	flush_work(&rdev->mlme_unreg_wk);
 
 #ifdef CONFIG_PM
diff --git a/net/wireless/core.h b/net/wireless/core.h
index b0f2519..1d56ef4 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -78,6 +78,7 @@ struct cfg80211_registered_device {
 	unsigned long suspend_at;
 	struct work_struct scan_done_wk;
 	struct work_struct sched_scan_results_wk;
+	struct work_struct gscan_results_wk;
 
 	struct genl_info *cur_cmd_info;
 
@@ -423,6 +424,7 @@ void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev,
 void __cfg80211_sched_scan_results(struct work_struct *wk);
 int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev,
 			       bool driver_initiated);
+void __cfg80211_gscan_results(struct work_struct *wk);
 int __cfg80211_stop_gscan(struct cfg80211_registered_device *rdev,
 			  bool driver_initiated);
 void cfg80211_upload_connect_keys(struct wireless_dev *wdev);
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 5b22310..f0099ee 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -13304,6 +13304,25 @@ void nl80211_send_sched_scan_results(struct cfg80211_registered_device *rdev,
 				NL80211_MCGRP_SCAN, GFP_KERNEL);
 }
 
+void nl80211_send_gscan_results(struct cfg80211_registered_device *rdev,
+				struct net_device *netdev)
+{
+	struct sk_buff *msg;
+
+	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+	if (!msg)
+		return;
+
+	if (nl80211_send_scan_event_msg(msg, rdev, netdev, 0, 0, 0,
+					NL80211_CMD_GSCAN_RESULTS) < 0) {
+		nlmsg_free(msg);
+		return;
+	}
+
+	genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
+				NL80211_MCGRP_SCAN, GFP_KERNEL);
+}
+
 void nl80211_send_scan_event(struct cfg80211_registered_device *rdev,
 			     struct net_device *netdev, u32 cmd)
 {
diff --git a/net/wireless/nl80211.h b/net/wireless/nl80211.h
index fb304ce9..4eec856 100644
--- a/net/wireless/nl80211.h
+++ b/net/wireless/nl80211.h
@@ -20,6 +20,8 @@ void nl80211_send_scan_event(struct cfg80211_registered_device *rdev,
 			     struct net_device *netdev, u32 cmd);
 void nl80211_send_sched_scan_results(struct cfg80211_registered_device *rdev,
 				     struct net_device *netdev);
+void nl80211_send_gscan_results(struct cfg80211_registered_device *rdev,
+				     struct net_device *netdev);
 void nl80211_common_reg_change_event(enum nl80211_commands cmd_id,
 				     struct regulatory_request *request);
 
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 327b23c..f34d5d4 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -287,6 +287,47 @@ void cfg80211_sched_scan_results(struct wiphy *wiphy)
 }
 EXPORT_SYMBOL(cfg80211_sched_scan_results);
 
+void __cfg80211_gscan_results(struct work_struct *wk)
+{
+	struct cfg80211_registered_device *rdev;
+	struct cfg80211_gscan_request *request;
+
+	rdev = container_of(wk, struct cfg80211_registered_device,
+			    gscan_results_wk);
+
+	rtnl_lock();
+
+	request = rtnl_dereference(rdev->gscan_req);
+
+	/* we don't have sched_scan_req anymore if the scan is stopping */
+	if (request) {
+#if 0
+		/* TODO: how to deal with flush */
+		if (request->flags & NL80211_SCAN_FLAG_FLUSH) {
+			/* flush entries from previous scans */
+			spin_lock_bh(&rdev->bss_lock);
+			__cfg80211_bss_expire(rdev, request->scan_start);
+			spin_unlock_bh(&rdev->bss_lock);
+			request->scan_start = jiffies;
+		}
+#endif
+		nl80211_send_gscan_results(rdev, request->dev);
+	}
+
+	rtnl_unlock();
+}
+
+void cfg80211_gscan_results(struct wiphy *wiphy)
+{
+	trace_cfg80211_gscan_results(wiphy);
+	/* ignore if we're not scanning */
+
+	if (rcu_access_pointer(wiphy_to_rdev(wiphy)->gscan_req))
+		queue_work(cfg80211_wq,
+			   &wiphy_to_rdev(wiphy)->gscan_results_wk);
+}
+EXPORT_SYMBOL(cfg80211_gscan_results);
+
 void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy)
 {
 	struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
@@ -307,6 +348,26 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy)
 }
 EXPORT_SYMBOL(cfg80211_sched_scan_stopped);
 
+void cfg80211_gscan_stopped_rtnl(struct wiphy *wiphy)
+{
+	struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
+
+	ASSERT_RTNL();
+
+	trace_cfg80211_gscan_stopped(wiphy);
+
+	__cfg80211_stop_gscan(rdev, true);
+}
+EXPORT_SYMBOL(cfg80211_gscan_stopped_rtnl);
+
+void cfg80211_gscan_stopped(struct wiphy *wiphy)
+{
+	rtnl_lock();
+	cfg80211_gscan_stopped_rtnl(wiphy);
+	rtnl_unlock();
+}
+EXPORT_SYMBOL(cfg80211_gscan_stopped);
+
 int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev,
 			       bool driver_initiated)
 {
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 1d0fde9..f3f5d82 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -2799,6 +2799,16 @@
 	TP_ARGS(wiphy)
 );
 
+DEFINE_EVENT(wiphy_only_evt, cfg80211_gscan_results,
+	TP_PROTO(struct wiphy *wiphy),
+	TP_ARGS(wiphy)
+);
+
+DEFINE_EVENT(wiphy_only_evt, cfg80211_gscan_stopped,
+	TP_PROTO(struct wiphy *wiphy),
+	TP_ARGS(wiphy)
+);
+
 TRACE_EVENT(cfg80211_get_bss,
 	TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel,
 		 const u8 *bssid, const u8 *ssid, size_t ssid_len,
-- 
1.9.1

^ permalink raw reply related

* [PATCH 4/5] nl80211: rename some notification functions
From: Arend van Spriel @ 2016-11-17 11:39 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Arend van Spriel
In-Reply-To: <1479382792-13131-1-git-send-email-arend.vanspriel@broadcom.com>

The functions nl80211_send_sched_scan() and nl80211_send_sched_scan_msg()
take command as parameter, which strictly speaking makes them general
purpose and not directly related to scheduled scan functionality. The
message are sent to "scan" multicast group so renaming them to
nl80211_send_scan_event{,_msg}().

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 net/wireless/nl80211.c | 10 +++++-----
 net/wireless/nl80211.h |  2 +-
 net/wireless/scan.c    |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 8fc3cbe..5b22310 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7237,7 +7237,7 @@ static int nl80211_start_sched_scan(struct sk_buff *skb,
 
 	rcu_assign_pointer(rdev->sched_scan_req, sched_scan_req);
 
-	nl80211_send_sched_scan(rdev, dev,
+	nl80211_send_scan_event(rdev, dev,
 				NL80211_CMD_START_SCHED_SCAN);
 	return 0;
 
@@ -13214,7 +13214,7 @@ static int nl80211_send_scan_msg(struct sk_buff *msg,
 }
 
 static int
-nl80211_send_sched_scan_msg(struct sk_buff *msg,
+nl80211_send_scan_event_msg(struct sk_buff *msg,
 			    struct cfg80211_registered_device *rdev,
 			    struct net_device *netdev,
 			    u32 portid, u32 seq, int flags, u32 cmd)
@@ -13294,7 +13294,7 @@ void nl80211_send_sched_scan_results(struct cfg80211_registered_device *rdev,
 	if (!msg)
 		return;
 
-	if (nl80211_send_sched_scan_msg(msg, rdev, netdev, 0, 0, 0,
+	if (nl80211_send_scan_event_msg(msg, rdev, netdev, 0, 0, 0,
 					NL80211_CMD_SCHED_SCAN_RESULTS) < 0) {
 		nlmsg_free(msg);
 		return;
@@ -13304,7 +13304,7 @@ void nl80211_send_sched_scan_results(struct cfg80211_registered_device *rdev,
 				NL80211_MCGRP_SCAN, GFP_KERNEL);
 }
 
-void nl80211_send_sched_scan(struct cfg80211_registered_device *rdev,
+void nl80211_send_scan_event(struct cfg80211_registered_device *rdev,
 			     struct net_device *netdev, u32 cmd)
 {
 	struct sk_buff *msg;
@@ -13313,7 +13313,7 @@ void nl80211_send_sched_scan(struct cfg80211_registered_device *rdev,
 	if (!msg)
 		return;
 
-	if (nl80211_send_sched_scan_msg(msg, rdev, netdev, 0, 0, 0, cmd) < 0) {
+	if (nl80211_send_scan_event_msg(msg, rdev, netdev, 0, 0, 0, cmd) < 0) {
 		nlmsg_free(msg);
 		return;
 	}
diff --git a/net/wireless/nl80211.h b/net/wireless/nl80211.h
index 7e3821d..fb304ce9 100644
--- a/net/wireless/nl80211.h
+++ b/net/wireless/nl80211.h
@@ -16,7 +16,7 @@ struct sk_buff *nl80211_build_scan_msg(struct cfg80211_registered_device *rdev,
 				       struct wireless_dev *wdev, bool aborted);
 void nl80211_send_scan_result(struct cfg80211_registered_device *rdev,
 			      struct sk_buff *msg);
-void nl80211_send_sched_scan(struct cfg80211_registered_device *rdev,
+void nl80211_send_scan_event(struct cfg80211_registered_device *rdev,
 			     struct net_device *netdev, u32 cmd);
 void nl80211_send_sched_scan_results(struct cfg80211_registered_device *rdev,
 				     struct net_device *netdev);
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 8bd8290..327b23c 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -327,7 +327,7 @@ int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev,
 			return err;
 	}
 
-	nl80211_send_sched_scan(rdev, dev, NL80211_CMD_SCHED_SCAN_STOPPED);
+	nl80211_send_scan_event(rdev, dev, NL80211_CMD_SCHED_SCAN_STOPPED);
 
 	RCU_INIT_POINTER(rdev->sched_scan_req, NULL);
 	kfree_rcu(sched_scan_req, rcu_head);
@@ -1108,7 +1108,7 @@ struct cfg80211_bss *
 	else
 		rcu_assign_pointer(tmp.pub.beacon_ies, ies);
 	rcu_assign_pointer(tmp.pub.ies, ies);
-	
+
 	memcpy(tmp.pub.bssid, mgmt->bssid, ETH_ALEN);
 	tmp.pub.channel = channel;
 	tmp.pub.scan_width = data->scan_width;
-- 
1.9.1

^ permalink raw reply related


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