Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH wireless-drivers] rtlwifi: rtl8723ae: Fix missing break in switch statement
From: Gustavo A. R. Silva @ 2019-04-16  0:36 UTC (permalink / raw)
  To: Ping-Ke Shih, Kalle Valo, David S. Miller
  Cc: linux-wireless, netdev, linux-kernel, Gustavo A. R. Silva,
	Kees Cook

Add missing break statement in order to prevent the code from falling
through to case 0x1025, and erroneously setting rtlhal->oem_id to
RT_CID_819X_ACER when rtlefuse->eeprom_svid is equal to 0x10EC and
none of the cases in switch (rtlefuse->eeprom_smid) match.

This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.

Fixes: 238ad2ddf34b ("rtlwifi: rtl8723ae: Clean up the hardware info routine")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
index 6bab162e1bb8..655460f61bbc 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
@@ -1675,6 +1675,7 @@ static void _rtl8723e_read_adapter_info(struct ieee80211_hw *hw,
 					rtlhal->oem_id = RT_CID_819X_LENOVO;
 					break;
 				}
+				break;
 			case 0x1025:
 				rtlhal->oem_id = RT_CID_819X_ACER;
 				break;
-- 
2.21.0


^ permalink raw reply related

* Re: [RFC PATCH v3 07/12] iwlwifi: Extended Key ID support (NATIVE)
From: Alexander Wetzel @ 2019-04-15 20:09 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <84694a97bf884985afd49d93e28b309a92801916.camel@sipsolutions.net>

Am 15.04.19 um 10:44 schrieb Johannes Berg:
>> But for my understanding the driver could also set A-MPDU to
>> only one frame, forcing the firmware to flush all A-MPDUs under
>> construction and then set it back to the normal value. (Or that is how
>> I've planned to test that in that way with your tips in the past and
>> what's documented of the mvm/dvm firmware API.)
> It's probably getting more complicated with newer versions of the API,
> but yes, I guess it should be doable to suspend aggregation.

Honestly I don't like my own patch for the KeyId border signal, too 
complex and not intuitive at all. But I wanted to have some code for 
discussion and then got carried away a bit in what may have been not the 
right direction.

Could we not simply ask (at least) the drivers supporting Extended Key 
IDs to implement a special for the remote STA invisible A-MPDU "stop" mode?
In this new mode each A-MPDU would simply be build out of a single MPDU. 
We then could keep Block-Ack active and we don't have to tell the remote 
STA anything about that decision. After all a A-MPDU with only one MPDU 
is allowed...
We then could tell the driver to switch to this mode when installing the 
new key and out of it again when we have activated the new key for Tx.
That should be perfectly fine to run only in the control path and 
comparable simple to set up, too.

That also sounds like something all drivers supporting A-MPDU should be 
able to pull off somehow. (But then I've never even looked at more than 
ath9k and iwlwifi so far for A-MPDU, and at those not close, yet.)
Do you see any problems with that solution and/or a better idea?

Also would you prefer we first sort out the A-MPDU issue prior I adding 
test cases to the hostapd/wpa_supplicant or the other way round?

Looks like I'll have some time at Easter to (start) looking into one or 
the other.
I'm currently trending to the A-MPDU issue, as it's the more fundamental 
of the two immediate topics. (And the captures are pretty clear, this 
explains so far every corrupted packet captured.)


Regards,
Alexander

^ permalink raw reply

* Re: pull-request: wireless-drivers 2019-04-15
From: David Miller @ 2019-04-15 19:03 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <87ef63crto.fsf@kamboji.qca.qualcomm.com>

From: Kalle Valo <kvalo@codeaurora.org>
Date: Mon, 15 Apr 2019 16:37:39 +0300

> here's a pull request to net tree for v5.1, more info below. Please let
> me know if there are any problems.

Pulled, thanks Kalle.

^ permalink raw reply

* Re: [PATCH] wil6210: fix potential out-of-bounds read
From: Gustavo A. R. Silva @ 2019-04-15 17:29 UTC (permalink / raw)
  To: merez
  Cc: Kalle Valo, David S. Miller, Vladimir Kondratiev, linux-wireless,
	wil6210, netdev, linux-kernel, linux-wireless-owner
In-Reply-To: <514f4e102c3cbbd59f4ba0805b091b36@codeaurora.org>



On 4/15/19 12:24 PM, merez@codeaurora.org wrote:
> On 2019-04-15 17:56, Gustavo A. R. Silva wrote:
>> Notice that *rc* can evaluate to up to 5, include/linux/netdevice.h:
>>
>> enum gro_result {
>>         GRO_MERGED,
>>         GRO_MERGED_FREE,
>>         GRO_HELD,
>>         GRO_NORMAL,
>>         GRO_DROP,
>>         GRO_CONSUMED,
>> };
>> typedef enum gro_result gro_result_t;
>>
>> In case *rc* evaluates to 5, we end up having an out-of-bounds read
>> at drivers/net/wireless/ath/wil6210/txrx.c:821:
>>
>>     wil_dbg_txrx(wil, "Rx complete %d bytes => %s\n",
>>              len, gro_res_str[rc]);
>>
>> Fix this by adding element "GRO_CONSUMED" to array gro_res_str.
>>
>> Addresses-Coverity-ID: 1444666 ("Out-of-bounds read")
>> Fixes: 194b482b5055 ("wil6210: Debug print GRO Rx result")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>>  drivers/net/wireless/ath/wil6210/txrx.c | 1 +
>>  1 file changed, 1 insertion(+)
> 
> Reviewed-by: Maya Erez <merez@codeaurora.org>
> 

Thanks, Maya.
--
Gustavo

^ permalink raw reply

* Re: [PATCH] wil6210: fix potential out-of-bounds read
From: merez @ 2019-04-15 17:24 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kalle Valo, David S. Miller, Vladimir Kondratiev, linux-wireless,
	wil6210, netdev, linux-kernel, linux-wireless-owner
In-Reply-To: <20190415145646.GA16597@embeddedor>

On 2019-04-15 17:56, Gustavo A. R. Silva wrote:
> Notice that *rc* can evaluate to up to 5, include/linux/netdevice.h:
> 
> enum gro_result {
>         GRO_MERGED,
>         GRO_MERGED_FREE,
>         GRO_HELD,
>         GRO_NORMAL,
>         GRO_DROP,
>         GRO_CONSUMED,
> };
> typedef enum gro_result gro_result_t;
> 
> In case *rc* evaluates to 5, we end up having an out-of-bounds read
> at drivers/net/wireless/ath/wil6210/txrx.c:821:
> 
> 	wil_dbg_txrx(wil, "Rx complete %d bytes => %s\n",
> 		     len, gro_res_str[rc]);
> 
> Fix this by adding element "GRO_CONSUMED" to array gro_res_str.
> 
> Addresses-Coverity-ID: 1444666 ("Out-of-bounds read")
> Fixes: 194b482b5055 ("wil6210: Debug print GRO Rx result")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/net/wireless/ath/wil6210/txrx.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Maya Erez <merez@codeaurora.org>

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

^ permalink raw reply

* [PATCH-v3 2/2] mac80211:  add assoc-at-ms support.
From: greearb @ 2019-04-15 17:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ben Greear
In-Reply-To: <20190415172123.6532-1-greearb@candelatech.com>

From: Ben Greear <greearb@candelatech.com>

Report when sta becomes associated.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 net/mac80211/sta_info.c | 3 +++
 net/mac80211/sta_info.h | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 044120c45950..918ca9475fec 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1968,6 +1968,7 @@ int sta_info_move_state(struct sta_info *sta,
 	case IEEE80211_STA_ASSOC:
 		if (sta->sta_state == IEEE80211_STA_AUTH) {
 			set_bit(WLAN_STA_ASSOC, &sta->_flags);
+			sta->assoc_at_ms = ktime_to_ms(ktime_get_real());
 			ieee80211_recalc_min_chandef(sta->sdata);
 			if (!sta->sta.support_p2p_ps)
 				ieee80211_recalc_p2p_go_ps_allowed(sta->sdata);
@@ -2197,6 +2198,7 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
 			 BIT_ULL(NL80211_STA_INFO_STA_FLAGS) |
 			 BIT_ULL(NL80211_STA_INFO_BSS_PARAM) |
 			 BIT_ULL(NL80211_STA_INFO_CONNECTED_TIME) |
+			 BIT_ULL(NL80211_STA_INFO_ASSOC_AT_MS) |
 			 BIT_ULL(NL80211_STA_INFO_RX_DROP_MISC);
 
 	if (sdata->vif.type == NL80211_IFTYPE_STATION) {
@@ -2205,6 +2207,7 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
 	}
 
 	sinfo->connected_time = ktime_get_seconds() - sta->last_connected;
+	sinfo->assoc_at_ms = sta->assoc_at_ms;
 	sinfo->inactive_time =
 		jiffies_to_msecs(jiffies - ieee80211_sta_last_active(sta));
 
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index c5d557032be5..e94b942cd564 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -455,6 +455,7 @@ struct ieee80211_sta_rx_stats {
  *	the station when it leaves powersave or polls for frames
  * @driver_buffered_tids: bitmap of TIDs the driver has data buffered on
  * @txq_buffered_tids: bitmap of TIDs that mac80211 has txq data buffered on
+ * @assoc_at_ms: time (in ms) of last association
  * @last_connected: time (in seconds) when a station got connected
  * @last_seq_ctrl: last received seq/frag number from this STA (per TID
  *	plus one for non-QoS frames)
@@ -531,6 +532,7 @@ struct sta_info {
 	unsigned long driver_buffered_tids;
 	unsigned long txq_buffered_tids;
 
+	unsigned long assoc_at_ms;
 	long last_connected;
 
 	/* Updated from RX path only, no locking requirements */
-- 
2.20.1


^ permalink raw reply related

* [PATCH-v3 1/2] wireless:  Support assoc-at-ms timer in sta-info
From: greearb @ 2019-04-15 17:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech.com>

Report time stamp of when sta became associated.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 include/net/cfg80211.h       | 2 ++
 include/uapi/linux/nl80211.h | 2 ++
 net/wireless/nl80211.c       | 1 +
 3 files changed, 5 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f49eb1464b7a..a3ad78b9d9f4 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1268,6 +1268,7 @@ struct cfg80211_tid_stats {
  *	indicate the relevant values in this struct for them
  * @connected_time: time(in secs) since a station is last connected
  * @inactive_time: time since last station activity (tx/rx) in milliseconds
+ * @assoc_at_ms: time in ms of the last association
  * @rx_bytes: bytes (size of MPDUs) received from this station
  * @tx_bytes: bytes (size of MPDUs) transmitted to this station
  * @llid: mesh local link id
@@ -1324,6 +1325,7 @@ struct station_info {
 	u64 filled;
 	u32 connected_time;
 	u32 inactive_time;
+	u64 assoc_at_ms;
 	u64 rx_bytes;
 	u64 tx_bytes;
 	u16 llid;
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 0f03cfcda965..0fcedde890e7 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -3079,6 +3079,7 @@ enum nl80211_sta_bss_param {
  * @NL80211_STA_INFO_TX_DURATION: aggregate PPDU duration for all frames
  *	sent to the station (u64, usec)
  * @NL80211_STA_INFO_AIRTIME_WEIGHT: current airtime weight for station (u16)
+ * @NL80211_STA_INFO_ASSOC_AT_MS: Timestamp of last association
  * @__NL80211_STA_INFO_AFTER_LAST: internal
  * @NL80211_STA_INFO_MAX: highest possible station info attribute
  */
@@ -3124,6 +3125,7 @@ enum nl80211_sta_info {
 	NL80211_STA_INFO_CONNECTED_TO_GATE,
 	NL80211_STA_INFO_TX_DURATION,
 	NL80211_STA_INFO_AIRTIME_WEIGHT,
+	NL80211_STA_INFO_ASSOC_AT_MS,
 
 	/* keep last */
 	__NL80211_STA_INFO_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index bcb432815c64..cb5acf026900 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4763,6 +4763,7 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
 
 	PUT_SINFO(CONNECTED_TIME, connected_time, u32);
 	PUT_SINFO(INACTIVE_TIME, inactive_time, u32);
+	PUT_SINFO_U64(ASSOC_AT_MS, assoc_at_ms);
 
 	if (sinfo->filled & (BIT_ULL(NL80211_STA_INFO_RX_BYTES) |
 			     BIT_ULL(NL80211_STA_INFO_RX_BYTES64)) &&
-- 
2.20.1


^ permalink raw reply related

* Re: [PATCH-v2 2/2] mac80211: add assoc-at-ms support.
From: Ben Greear @ 2019-04-15 17:08 UTC (permalink / raw)
  To: linux-wireless
In-Reply-To: <20190415170543.21728-2-greearb@candelatech.com>

Please ignore, I edited the wrong files.

Go Monday!

Ben

On 4/15/19 10:05 AM, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> Report when sta becomes associated.
> 
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
>   net/mac80211/sta_info.c | 3 +++
>   net/mac80211/sta_info.h | 2 ++
>   2 files changed, 5 insertions(+)
> 
> diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
> index 044120c45950..6dab7abe1603 100644
> --- a/net/mac80211/sta_info.c
> +++ b/net/mac80211/sta_info.c
> @@ -1980,6 +1980,7 @@ int sta_info_move_state(struct sta_info *sta,
>   		break;
>   	case IEEE80211_STA_AUTHORIZED:
>   		if (sta->sta_state == IEEE80211_STA_ASSOC) {
> +			sta->auth_at_ms = ktime_to_ms(ktime_get_real());
>   			ieee80211_vif_inc_num_mcast(sta->sdata);
>   			set_bit(WLAN_STA_AUTHORIZED, &sta->_flags);
>   			ieee80211_check_fast_xmit(sta);
> @@ -2197,6 +2198,7 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
>   			 BIT_ULL(NL80211_STA_INFO_STA_FLAGS) |
>   			 BIT_ULL(NL80211_STA_INFO_BSS_PARAM) |
>   			 BIT_ULL(NL80211_STA_INFO_CONNECTED_TIME) |
> +			 BIT_ULL(NL80211_STA_INFO_AUTH_AT_MS) |
>   			 BIT_ULL(NL80211_STA_INFO_RX_DROP_MISC);
>   
>   	if (sdata->vif.type == NL80211_IFTYPE_STATION) {
> @@ -2205,6 +2207,7 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
>   	}
>   
>   	sinfo->connected_time = ktime_get_seconds() - sta->last_connected;
> +	sinfo->auth_at_ms = sta->auth_at_ms;
>   	sinfo->inactive_time =
>   		jiffies_to_msecs(jiffies - ieee80211_sta_last_active(sta));
>   
> diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
> index c5d557032be5..97777978b8f5 100644
> --- a/net/mac80211/sta_info.h
> +++ b/net/mac80211/sta_info.h
> @@ -455,6 +455,7 @@ struct ieee80211_sta_rx_stats {
>    *	the station when it leaves powersave or polls for frames
>    * @driver_buffered_tids: bitmap of TIDs the driver has data buffered on
>    * @txq_buffered_tids: bitmap of TIDs that mac80211 has txq data buffered on
> + * @auth_at_ms: time (in ms) of last assoc -> auth transition
>    * @last_connected: time (in seconds) when a station got connected
>    * @last_seq_ctrl: last received seq/frag number from this STA (per TID
>    *	plus one for non-QoS frames)
> @@ -531,6 +532,7 @@ struct sta_info {
>   	unsigned long driver_buffered_tids;
>   	unsigned long txq_buffered_tids;
>   
> +	unsigned long auth_at_ms;
>   	long last_connected;
>   
>   	/* Updated from RX path only, no locking requirements */
> 


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply

* [PATCH-v2 2/2] mac80211:  add assoc-at-ms support.
From: greearb @ 2019-04-15 17:05 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ben Greear
In-Reply-To: <20190415170543.21728-1-greearb@candelatech.com>

From: Ben Greear <greearb@candelatech.com>

Report when sta becomes associated.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 net/mac80211/sta_info.c | 3 +++
 net/mac80211/sta_info.h | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 044120c45950..6dab7abe1603 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1980,6 +1980,7 @@ int sta_info_move_state(struct sta_info *sta,
 		break;
 	case IEEE80211_STA_AUTHORIZED:
 		if (sta->sta_state == IEEE80211_STA_ASSOC) {
+			sta->auth_at_ms = ktime_to_ms(ktime_get_real());
 			ieee80211_vif_inc_num_mcast(sta->sdata);
 			set_bit(WLAN_STA_AUTHORIZED, &sta->_flags);
 			ieee80211_check_fast_xmit(sta);
@@ -2197,6 +2198,7 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
 			 BIT_ULL(NL80211_STA_INFO_STA_FLAGS) |
 			 BIT_ULL(NL80211_STA_INFO_BSS_PARAM) |
 			 BIT_ULL(NL80211_STA_INFO_CONNECTED_TIME) |
+			 BIT_ULL(NL80211_STA_INFO_AUTH_AT_MS) |
 			 BIT_ULL(NL80211_STA_INFO_RX_DROP_MISC);
 
 	if (sdata->vif.type == NL80211_IFTYPE_STATION) {
@@ -2205,6 +2207,7 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
 	}
 
 	sinfo->connected_time = ktime_get_seconds() - sta->last_connected;
+	sinfo->auth_at_ms = sta->auth_at_ms;
 	sinfo->inactive_time =
 		jiffies_to_msecs(jiffies - ieee80211_sta_last_active(sta));
 
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index c5d557032be5..97777978b8f5 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -455,6 +455,7 @@ struct ieee80211_sta_rx_stats {
  *	the station when it leaves powersave or polls for frames
  * @driver_buffered_tids: bitmap of TIDs the driver has data buffered on
  * @txq_buffered_tids: bitmap of TIDs that mac80211 has txq data buffered on
+ * @auth_at_ms: time (in ms) of last assoc -> auth transition
  * @last_connected: time (in seconds) when a station got connected
  * @last_seq_ctrl: last received seq/frag number from this STA (per TID
  *	plus one for non-QoS frames)
@@ -531,6 +532,7 @@ struct sta_info {
 	unsigned long driver_buffered_tids;
 	unsigned long txq_buffered_tids;
 
+	unsigned long auth_at_ms;
 	long last_connected;
 
 	/* Updated from RX path only, no locking requirements */
-- 
2.20.1


^ permalink raw reply related

* [PATCH-v2 1/2] wireless:  Support assoc-at-ms timer in sta-info
From: greearb @ 2019-04-15 17:05 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech.com>

Report time stamp of when sta became associated.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 include/net/cfg80211.h       | 2 ++
 include/uapi/linux/nl80211.h | 2 ++
 net/wireless/nl80211.c       | 1 +
 3 files changed, 5 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f49eb1464b7a..430501c09c01 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1268,6 +1268,7 @@ struct cfg80211_tid_stats {
  *	indicate the relevant values in this struct for them
  * @connected_time: time(in secs) since a station is last connected
  * @inactive_time: time since last station activity (tx/rx) in milliseconds
+ * @auth_at_ms: time in ms of the last assoc -> auth transition.
  * @rx_bytes: bytes (size of MPDUs) received from this station
  * @tx_bytes: bytes (size of MPDUs) transmitted to this station
  * @llid: mesh local link id
@@ -1324,6 +1325,7 @@ struct station_info {
 	u64 filled;
 	u32 connected_time;
 	u32 inactive_time;
+	u64 auth_at_ms;
 	u64 rx_bytes;
 	u64 tx_bytes;
 	u16 llid;
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 0f03cfcda965..8d0b7a88877c 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -3079,6 +3079,7 @@ enum nl80211_sta_bss_param {
  * @NL80211_STA_INFO_TX_DURATION: aggregate PPDU duration for all frames
  *	sent to the station (u64, usec)
  * @NL80211_STA_INFO_AIRTIME_WEIGHT: current airtime weight for station (u16)
+ * @NL80211_STA_INFO_AUTH_AT_MS: Timestamp of last assoc -> auth transition, in ms
  * @__NL80211_STA_INFO_AFTER_LAST: internal
  * @NL80211_STA_INFO_MAX: highest possible station info attribute
  */
@@ -3124,6 +3125,7 @@ enum nl80211_sta_info {
 	NL80211_STA_INFO_CONNECTED_TO_GATE,
 	NL80211_STA_INFO_TX_DURATION,
 	NL80211_STA_INFO_AIRTIME_WEIGHT,
+	NL80211_STA_INFO_AUTH_AT_MS,
 
 	/* keep last */
 	__NL80211_STA_INFO_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index bcb432815c64..74be48c1ae02 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4763,6 +4763,7 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
 
 	PUT_SINFO(CONNECTED_TIME, connected_time, u32);
 	PUT_SINFO(INACTIVE_TIME, inactive_time, u32);
+	PUT_SINFO_U64(AUTH_AT_MS, auth_at_ms);
 
 	if (sinfo->filled & (BIT_ULL(NL80211_STA_INFO_RX_BYTES) |
 			     BIT_ULL(NL80211_STA_INFO_RX_BYTES64)) &&
-- 
2.20.1


^ permalink raw reply related

* Re: [PATCH 1/2] wireless: Support auth-at-ms timer in sta-info
From: Johannes Berg @ 2019-04-15 17:03 UTC (permalink / raw)
  To: Ben Greear, linux-wireless
In-Reply-To: <a8865096-f19e-608f-13c2-08036876d316@candelatech.com>

On Mon, 2019-04-15 at 09:32 -0700, Ben Greear wrote:
> On 4/15/19 4:15 AM, Johannes Berg wrote:
> > On Fri, 2019-04-12 at 14:37 -0700, greearb@candelatech.com wrote:
> > > From: Ben Greear <greearb@candelatech.com>
> > > 
> > > Report time stamp of when sta became authenticated.
> > 
> > You didn't actually implement this ;-)
> > 
> > Did you mean associated?
> > 
> > > + * @auth_at_ms: time in ms of the last assoc -> auth transition.
> > 
> > There's commonly not really such a transition?
> 
> Oh, I guess AUTHORIZED is only when doing .1x authentication?  My test case
> was (luckly?) doing that, so I didn't notice the bug.

Oh, you meant *authorized*... Most of the code uses "auth" ==
"authenticated" :-)

johannes


^ permalink raw reply

* [PATCH] staging: wilc1000: fix spelling mistake "dissconect" -> "disconnect"
From: Colin King @ 2019-04-15 16:33 UTC (permalink / raw)
  To: Adham Abozaeid, Ajay Singh, Greg Kroah-Hartman, linux-wireless,
	devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

There is a spelling mistake in a netdev_err error message, fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index e1a35bb426f9..ed15bd1bcd56 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -774,7 +774,7 @@ int wilc_disconnect(struct wilc_vif *vif)
 	result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result) {
-		netdev_err(vif->ndev, "Failed to send dissconect\n");
+		netdev_err(vif->ndev, "Failed to send disconnect\n");
 		return result;
 	}
 
-- 
2.20.1


^ permalink raw reply related

* Re: [PATCH 1/2] wireless: Support auth-at-ms timer in sta-info
From: Ben Greear @ 2019-04-15 16:32 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless
In-Reply-To: <cf95c43bcfe1bd4d8fbc8aca8ecc65dac9eeae0c.camel@sipsolutions.net>

On 4/15/19 4:15 AM, Johannes Berg wrote:
> On Fri, 2019-04-12 at 14:37 -0700, greearb@candelatech.com wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> Report time stamp of when sta became authenticated.
> 
> You didn't actually implement this ;-)
> 
> Did you mean associated?
> 
>> + * @auth_at_ms: time in ms of the last assoc -> auth transition.
> 
> There's commonly not really such a transition?

Oh, I guess AUTHORIZED is only when doing .1x authentication?  My test case
was (luckly?) doing that, so I didn't notice the bug.

I'll change to setting the timer in the ASSOC state instead.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply

* [PATCH] wil6210: fix potential out-of-bounds read
From: Gustavo A. R. Silva @ 2019-04-15 14:56 UTC (permalink / raw)
  To: Maya Erez, Kalle Valo, David S. Miller, Vladimir Kondratiev
  Cc: linux-wireless, wil6210, netdev, linux-kernel,
	Gustavo A. R. Silva

Notice that *rc* can evaluate to up to 5, include/linux/netdevice.h:

enum gro_result {
        GRO_MERGED,
        GRO_MERGED_FREE,
        GRO_HELD,
        GRO_NORMAL,
        GRO_DROP,
        GRO_CONSUMED,
};
typedef enum gro_result gro_result_t;

In case *rc* evaluates to 5, we end up having an out-of-bounds read
at drivers/net/wireless/ath/wil6210/txrx.c:821:

	wil_dbg_txrx(wil, "Rx complete %d bytes => %s\n",
		     len, gro_res_str[rc]);

Fix this by adding element "GRO_CONSUMED" to array gro_res_str.

Addresses-Coverity-ID: 1444666 ("Out-of-bounds read")
Fixes: 194b482b5055 ("wil6210: Debug print GRO Rx result")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ath/wil6210/txrx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c
index 4ccfd1404458..d74837cce67f 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -750,6 +750,7 @@ void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev)
 		[GRO_HELD]		= "GRO_HELD",
 		[GRO_NORMAL]		= "GRO_NORMAL",
 		[GRO_DROP]		= "GRO_DROP",
+		[GRO_CONSUMED]		= "GRO_CONSUMED",
 	};
 
 	wil->txrx_ops.get_netif_rx_params(skb, &cid, &security);
-- 
2.21.0


^ permalink raw reply related

* Re: [PATCH 6/6] ath10k: sdio: replace skb_trim with explicit set of skb->len
From: Erik Stromdahl @ 2019-04-15 15:11 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k
In-Reply-To: <87zhovcqhl.fsf@kamboji.qca.qualcomm.com>



On 4/12/19 3:17 PM, Kalle Valo wrote:
> Erik Stromdahl <erik.stromdahl@gmail.com> writes:
> 
>> This patch fixes a bug with padding of the skb data buffer.
>> Since skb_trim can only be used to reduce the skb len, it is useless when
>> we pad (increase the length of) the skb. Instead we must set skb->len
>> directly.
>>
>> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
>> ---
>>   drivers/net/wireless/ath/ath10k/sdio.c | 7 ++++++-
>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
>> index 3eb241cb8a25..989e3f563f3d 100644
>> --- a/drivers/net/wireless/ath/ath10k/sdio.c
>> +++ b/drivers/net/wireless/ath/ath10k/sdio.c
>> @@ -1496,7 +1496,12 @@ static int ath10k_sdio_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
>>   		skb = items[i].transfer_context;
>>   		padded_len = ath10k_sdio_calc_txrx_padded_len(ar_sdio,
>>   							      skb->len);
>> -		skb_trim(skb, padded_len);
>> +		/* FIXME: unsure if just extending the skb len is the right
>> +		 * thing to do since we might read outside the skb->data
>> +		 * buffer. But we really don't want to realloc the skb just to
>> +		 * pad the length.
>> +		 */
>> +		skb->len = padded_len;
> 
> Good catch! But I don't think you can modify skb->len directly like
> that. There is skb_pad() but that doesn't change skb->len, so that most
> likely needs more changes. So maybe skb_put() is the safest here?
> 
I have tried a few different solutions for this, but none seems to be
bullet proof.

skb_pad() raises a BUG() if there is not enough space in skb->data.

The best candidate so far has been skb_put_padto(). It pads and reallocates
the skb if needed.

The problem is that it also cause a panic if there is more than one reference
to the skb (skb_shared() returns true).

Some of the management frames via nl80211 have a refcount of 2.
In this case it is not possible to free and allocate the skb since there are
other users/references.

I think I will have to make some kind of solution where I copy the content of
the skb to an internal buffer instead.

^ permalink raw reply

* Re: [PATCH] mt76: usb: fix possible memory leak during suspend/resume
From: Lorenzo Bianconi @ 2019-04-15 15:04 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: Lorenzo Bianconi, nbd, linux-wireless
In-Reply-To: <20190415115352.GA4143@redhat.com>

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

> On Sat, Apr 13, 2019 at 12:10:59PM +0200, Lorenzo Bianconi wrote:
> > > On Fri, Apr 12, 2019 at 06:27:48PM +0200, Lorenzo Bianconi wrote:
> > > > > > On Fri, Apr 12, 2019 at 02:27:16PM +0200, Lorenzo Bianconi wrote:
> > > > > > > Disable mt76u_tx_tasklet at the end of mt76u_stop_queues in order to
> > > > > > > properly deallocate all pending skbs during suspend/resume phase
> > > > > > 
> > > > > > On suspend/resume tx skb's are processed after tasklet_enable()
> > > > > > in resume callback. There is issue with device removal though
> > > > > > (during suspend or otherwise).
> > > > > 
> > > > > Hi Stanislaw,
> > > > > 
> > > > > I guess the right moment to deallocate the skbs is during suspend since resume
> > > > > can happen in very far future
> > > 
> > > Yes, it's better to free on suspend, but in practice does not really matter since
> > > system is disabled till resume.
> > > 
> > > > > > > Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer")
> > > > > > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > > > > > > ---
> > > > > > >  drivers/net/wireless/mediatek/mt76/usb.c | 4 ++--
> > > > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > > > 
> > > > > > > diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
> > > > > > > index a3acc070063a..575207133775 100644
> > > > > > > --- a/drivers/net/wireless/mediatek/mt76/usb.c
> > > > > > > +++ b/drivers/net/wireless/mediatek/mt76/usb.c
> > > > > > > @@ -842,10 +842,10 @@ static void mt76u_stop_tx(struct mt76_dev *dev)
> > > > > > >  void mt76u_stop_queues(struct mt76_dev *dev)
> > > > > > >  {
> > > > > > >  	tasklet_disable(&dev->usb.rx_tasklet);
> > > > > > > -	tasklet_disable(&dev->usb.tx_tasklet);
> > > > > > > -
> > > > > > >  	mt76u_stop_rx(dev);
> > > > > > > +
> > > > > > >  	mt76u_stop_tx(dev);
> > > > > > > +	tasklet_disable(&dev->usb.tx_tasklet);
> > > > > > 
> > > > > > If tasklet is scheduled and we disable it and never enable, we end up
> > > > > > with infinite loop in tasklet_action_common(). This patch make the
> > > > > > problem less reproducible since tasklet_disable() is moved after
> > > > > > usb_kill_urb() -> tasklet_schedule(), but it is still possible.
> > > > > 
> > > > > I can see the point here. Maybe we can just run tasklet_kill instead of
> > > > > tasklet_disable here (at least for tx one)
> > > 
> > > I think you have right as tasklet_kill() will wait for scheduled tasklet .
> > > Originally in my patch (see below) I used wait_event as I thought
> > > tasklet_kill() may prevent scheduled tasklet to be executed (hence cause
> > > leak) but that seems to be not true.
> > 
> > I agree with rx side (good catch!!), but on tx one I guess usb_kill_urb()
> > is already waiting for tx pending so we just need to use tasklet_kill
> > at the end of mt76u_stop_queues, in this way we will free pending skbs during
> > suspend
> 
> I looked more into that and there are some issues with this approach.
> tx_tasklet do mt76_txq_schedule() which can queue tx frames. Also we
> do not free skb's that require status check and dev->usb.stat_work 
> is already (correctly) stopped on mac80211.stop. 

right

> 
> I'll use wait_event(dev->tx_wait) on mac80211 stop to handle those
> issues correctly.

ack

> 
> Stanislaw

during device removal I guess we should also flush skbs in status queue, doing
something like (after commit 0b5f71304cd9 (mt76: introduce mt76_free_device
routine))

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
index 1ef00e971cfa..d4d1eb003148 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
@@ -299,7 +299,7 @@ static void mt76x0_disconnect(struct usb_interface *usb_intf)
 	if (!initalized)
 		return;
 
-	ieee80211_unregister_hw(dev->mt76.hw);
+	mt76_unregister_device(&dev->mt76);
 	mt76x0u_cleanup(dev);
 
 	usb_set_intfdata(usb_intf, NULL);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
index d08bb964966b..4394c7c10535 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
@@ -94,7 +94,7 @@ static void mt76x2u_disconnect(struct usb_interface *intf)
 	struct ieee80211_hw *hw = mt76_hw(dev);
 
 	set_bit(MT76_REMOVED, &dev->mt76.state);
-	ieee80211_unregister_hw(hw);
+	mt76_unregister_device(&dev->mt76);
 	mt76x2u_cleanup(dev);
 
 	ieee80211_free_hw(hw);

Regards,
Lorenzo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply related

* [PATCH] mwifiex: fix spelling mistake "capabilties" -> "capabilities"
From: Colin King @ 2019-04-15 14:26 UTC (permalink / raw)
  To: Amitkumar Karwar, Nishant Sarmukadam, Ganapathi Bhat, Xinming Hu,
	Kalle Valo, David S . Miller, linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

There various spelling mistakes in function names and in message
text. Fix these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/marvell/mwifiex/sta_event.c | 12 ++++++------
 drivers/net/wireless/marvell/mwifiex/uap_event.c |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/sta_event.c b/drivers/net/wireless/marvell/mwifiex/sta_event.c
index a327fc5b36e3..8b3123cb84c8 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_event.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c
@@ -27,9 +27,9 @@
 
 #define MWIFIEX_IBSS_CONNECT_EVT_FIX_SIZE    12
 
-static int mwifiex_check_ibss_peer_capabilties(struct mwifiex_private *priv,
-					       struct mwifiex_sta_node *sta_ptr,
-					       struct sk_buff *event)
+static int mwifiex_check_ibss_peer_capabilities(struct mwifiex_private *priv,
+					        struct mwifiex_sta_node *sta_ptr,
+					        struct sk_buff *event)
 {
 	int evt_len, ele_len;
 	u8 *curr;
@@ -42,7 +42,7 @@ static int mwifiex_check_ibss_peer_capabilties(struct mwifiex_private *priv,
 	evt_len = event->len;
 	curr = event->data;
 
-	mwifiex_dbg_dump(priv->adapter, EVT_D, "ibss peer capabilties:",
+	mwifiex_dbg_dump(priv->adapter, EVT_D, "ibss peer capabilities:",
 			 event->data, event->len);
 
 	skb_push(event, MWIFIEX_IBSS_CONNECT_EVT_FIX_SIZE);
@@ -937,8 +937,8 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
 			    ibss_sta_addr);
 		sta_ptr = mwifiex_add_sta_entry(priv, ibss_sta_addr);
 		if (sta_ptr && adapter->adhoc_11n_enabled) {
-			mwifiex_check_ibss_peer_capabilties(priv, sta_ptr,
-							    adapter->event_skb);
+			mwifiex_check_ibss_peer_capabilities(priv, sta_ptr,
+							     adapter->event_skb);
 			if (sta_ptr->is_11n_enabled)
 				for (i = 0; i < MAX_NUM_TID; i++)
 					sta_ptr->ampdu_sta[i] =
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_event.c b/drivers/net/wireless/marvell/mwifiex/uap_event.c
index ca759d9c0253..86bfa1b9ef9d 100644
--- a/drivers/net/wireless/marvell/mwifiex/uap_event.c
+++ b/drivers/net/wireless/marvell/mwifiex/uap_event.c
@@ -23,8 +23,8 @@
 
 #define MWIFIEX_BSS_START_EVT_FIX_SIZE    12
 
-static int mwifiex_check_uap_capabilties(struct mwifiex_private *priv,
-					 struct sk_buff *event)
+static int mwifiex_check_uap_capabilities(struct mwifiex_private *priv,
+					  struct sk_buff *event)
 {
 	int evt_len;
 	u8 *curr;
@@ -38,7 +38,7 @@ static int mwifiex_check_uap_capabilties(struct mwifiex_private *priv,
 	evt_len = event->len;
 	curr = event->data;
 
-	mwifiex_dbg_dump(priv->adapter, EVT_D, "uap capabilties:",
+	mwifiex_dbg_dump(priv->adapter, EVT_D, "uap capabilities:",
 			 event->data, event->len);
 
 	skb_push(event, MWIFIEX_BSS_START_EVT_FIX_SIZE);
@@ -201,7 +201,7 @@ int mwifiex_process_uap_event(struct mwifiex_private *priv)
 		       ETH_ALEN);
 		if (priv->hist_data)
 			mwifiex_hist_data_reset(priv);
-		mwifiex_check_uap_capabilties(priv, adapter->event_skb);
+		mwifiex_check_uap_capabilities(priv, adapter->event_skb);
 		break;
 	case EVENT_UAP_MIC_COUNTERMEASURES:
 		/* For future development */
-- 
2.20.1


^ permalink raw reply related

* pull-request: wireless-drivers 2019-04-15
From: Kalle Valo @ 2019-04-15 13:37 UTC (permalink / raw)
  To: David Miller; +Cc: linux-wireless, netdev, linux-kernel

Hi Dave,

here's a pull request to net tree for v5.1, more info below. Please let
me know if there are any problems.

Kalle

The following changes since commit 22bdf7d459ceff6eb06a99364b1d75ecb2fcafe5:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf (2019-03-29 21:00:28 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git tags/wireless-drivers-for-davem-2019-04-15

for you to fetch changes up to 832bc250d71ff28b1addcc0796cd220ca4c03026:

  Merge tag 'iwlwifi-for-kalle-2019-04-03' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes (2019-04-12 21:34:27 +0300)

----------------------------------------------------------------
wireless-drivers fixes for 5.1

Second set of fixes for 5.1.

iwlwifi

* add some new PCI IDs (plus a struct name change they depend on)

* fix crypto with new devices, namely 22560 and above

* fix for a potential deadlock in the TX path

* a fix for offloaded rate-control

* support new PCI HW IDs which use a new FW

mt76

* fix lock initialisation and a possible deadlock

* aggregation fixes

rt2x00

* fix sequence numbering during retransmits

----------------------------------------------------------------
Felix Fietkau (3):
      mt76: mt7603: add missing initialization for dev->ps_lock
      mt76: mt7603: fix sequence number assignment
      mt76: mt7603: send BAR after powersave wakeup

Ihab Zhaika (2):
      iwlwifi: rename structs to fit the new names
      iwlwifi: add new 0x2723/0x2080 card for 22000

Johannes Berg (3):
      iwlwifi: mvm: fix TX crypto on 22560+ devices
      iwlwifi: mvm: avoid possible deadlock in TX path
      iwlwifi: mvm: update offloaded rate control on changes

Kalle Valo (2):
      Merge tag 'iwlwifi-for-kalle-2019-03-22' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes
      Merge tag 'iwlwifi-for-kalle-2019-04-03' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes

Luca Coelho (1):
      iwlwifi: add support for quz firmwares

Shahar S Matityahu (4):
      iwlwifi: add sync_nmi to trans ops
      iwlwifi: dbg_ini: in case of region dump failure set memory to 0
      iwlwifi: dbg_ini: fix bad dump size calculation
      iwlwifi: use sync nmi in case of init flow failure

Stanislaw Gruszka (1):
      mt76x02: avoid status_list.lock and sta->rate_ctrl_lock dependency

Vijayakumar Durai (1):
      rt2x00: do not increment sequence number while re-transmitting

 drivers/net/wireless/intel/iwlwifi/cfg/22000.c     | 30 ++++++---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c        | 34 +++--------
 drivers/net/wireless/intel/iwlwifi/fw/init.c       |  1 -
 drivers/net/wireless/intel/iwlwifi/iwl-config.h    |  3 +-
 drivers/net/wireless/intel/iwlwifi/iwl-csr.h       |  1 +
 drivers/net/wireless/intel/iwlwifi/iwl-trans.h     | 12 ++--
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  | 71 +++++++---------------
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h       |  1 -
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c       | 43 ++-----------
 drivers/net/wireless/intel/iwlwifi/mvm/sta.h       |  7 +--
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c      | 13 ++--
 drivers/net/wireless/intel/iwlwifi/pcie/internal.h |  2 +-
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c    | 11 +++-
 drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c  |  2 +-
 drivers/net/wireless/intel/iwlwifi/pcie/tx.c       |  2 +-
 drivers/net/wireless/mediatek/mt76/mt7603/init.c   |  2 +
 drivers/net/wireless/mediatek/mt76/mt7603/mac.c    | 53 +++++-----------
 drivers/net/wireless/mediatek/mt76/mt7603/main.c   |  8 +--
 drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h |  2 +-
 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c   | 14 +++--
 drivers/net/wireless/ralink/rt2x00/rt2x00.h        |  1 -
 drivers/net/wireless/ralink/rt2x00/rt2x00mac.c     | 10 ---
 drivers/net/wireless/ralink/rt2x00/rt2x00queue.c   | 15 +++--
 23 files changed, 123 insertions(+), 215 deletions(-)

-- 
Kalle Valo

^ permalink raw reply

* Re: wil6210 new features support
From: meneghello @ 2019-04-15 12:10 UTC (permalink / raw)
  To: s.gottschall; +Cc: linux-wireless

Thank you.
Do you know if a new wil6210 firmware version is ready to be shared by  
Qualcomm?


On Wed, Apr 10, 2019 at 12:15 AM Sebastian Gottschall  
<s.gottschall@newmedia-net.de> wrote:

its constantly developed for latest chipset support. there is no  
direct versioning.

see https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/ for  
ongoing development on this driver (and others)

Am 05.04.2019 um 16:10 schrieb meneghello@dei.unipd.it:

Thank you for the answer.
However, is there the project to deliver a new version of wil6210  
driver in a short time?

Francesca Meneghello

On Sun, Mar 31, 2019 at 2:23 PM Sebastian Gottschall  
<s.gottschall@newmedia-net.de> wrote:

radar detection on a 60 ghz card?  there is no requirement for it. radar
is not operating at that frequencies


^ permalink raw reply

* Re: [PATCH] mt76: usb: fix possible memory leak during suspend/resume
From: Stanislaw Gruszka @ 2019-04-15 11:53 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: Lorenzo Bianconi, nbd, linux-wireless
In-Reply-To: <20190413101056.GA7940@localhost.localdomain>

On Sat, Apr 13, 2019 at 12:10:59PM +0200, Lorenzo Bianconi wrote:
> > On Fri, Apr 12, 2019 at 06:27:48PM +0200, Lorenzo Bianconi wrote:
> > > > > On Fri, Apr 12, 2019 at 02:27:16PM +0200, Lorenzo Bianconi wrote:
> > > > > > Disable mt76u_tx_tasklet at the end of mt76u_stop_queues in order to
> > > > > > properly deallocate all pending skbs during suspend/resume phase
> > > > > 
> > > > > On suspend/resume tx skb's are processed after tasklet_enable()
> > > > > in resume callback. There is issue with device removal though
> > > > > (during suspend or otherwise).
> > > > 
> > > > Hi Stanislaw,
> > > > 
> > > > I guess the right moment to deallocate the skbs is during suspend since resume
> > > > can happen in very far future
> > 
> > Yes, it's better to free on suspend, but in practice does not really matter since
> > system is disabled till resume.
> > 
> > > > > > Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer")
> > > > > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > > > > > ---
> > > > > >  drivers/net/wireless/mediatek/mt76/usb.c | 4 ++--
> > > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > > > 
> > > > > > diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
> > > > > > index a3acc070063a..575207133775 100644
> > > > > > --- a/drivers/net/wireless/mediatek/mt76/usb.c
> > > > > > +++ b/drivers/net/wireless/mediatek/mt76/usb.c
> > > > > > @@ -842,10 +842,10 @@ static void mt76u_stop_tx(struct mt76_dev *dev)
> > > > > >  void mt76u_stop_queues(struct mt76_dev *dev)
> > > > > >  {
> > > > > >  	tasklet_disable(&dev->usb.rx_tasklet);
> > > > > > -	tasklet_disable(&dev->usb.tx_tasklet);
> > > > > > -
> > > > > >  	mt76u_stop_rx(dev);
> > > > > > +
> > > > > >  	mt76u_stop_tx(dev);
> > > > > > +	tasklet_disable(&dev->usb.tx_tasklet);
> > > > > 
> > > > > If tasklet is scheduled and we disable it and never enable, we end up
> > > > > with infinite loop in tasklet_action_common(). This patch make the
> > > > > problem less reproducible since tasklet_disable() is moved after
> > > > > usb_kill_urb() -> tasklet_schedule(), but it is still possible.
> > > > 
> > > > I can see the point here. Maybe we can just run tasklet_kill instead of
> > > > tasklet_disable here (at least for tx one)
> > 
> > I think you have right as tasklet_kill() will wait for scheduled tasklet .
> > Originally in my patch (see below) I used wait_event as I thought
> > tasklet_kill() may prevent scheduled tasklet to be executed (hence cause
> > leak) but that seems to be not true.
> 
> I agree with rx side (good catch!!), but on tx one I guess usb_kill_urb()
> is already waiting for tx pending so we just need to use tasklet_kill
> at the end of mt76u_stop_queues, in this way we will free pending skbs during
> suspend

I looked more into that and there are some issues with this approach.
tx_tasklet do mt76_txq_schedule() which can queue tx frames. Also we
do not free skb's that require status check and dev->usb.stat_work 
is already (correctly) stopped on mac80211.stop. 

I'll use wait_event(dev->tx_wait) on mac80211 stop to handle those
issues correctly.

Stanislaw

^ permalink raw reply

* Re: [PATCHv3 2/2] mac80211: Implement API to configure station specific rssi threshold
From: Johannes Berg @ 2019-04-15 11:18 UTC (permalink / raw)
  To: Tamizh chelvam; +Cc: linux-wireless
In-Reply-To: <1554831488-27065-3-git-send-email-tamizhr@codeaurora.org>


> +	if (sta->rssi_config) {
> +		old_rssi_config = sta->rssi_config;
> +		RCU_INIT_POINTER(sta->rssi_config, NULL);

Looks like you need an __rcu annotation somewhere to make this compile
sparse-warnings-free.

johannes



^ permalink raw reply

* Re: [PATCH 1/2] wireless:  Support auth-at-ms timer in sta-info
From: Johannes Berg @ 2019-04-15 11:15 UTC (permalink / raw)
  To: greearb, linux-wireless
In-Reply-To: <20190412213710.17292-1-greearb@candelatech.com>

On Fri, 2019-04-12 at 14:37 -0700, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> Report time stamp of when sta became authenticated.

You didn't actually implement this ;-)

Did you mean associated?

> + * @auth_at_ms: time in ms of the last assoc -> auth transition.

There's commonly not really such a transition?

johannes


^ permalink raw reply

* RE: [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags
From: Alastair D'Silva @ 2019-04-15 11:12 UTC (permalink / raw)
  To: 'David Laight', 'Petr Mladek'
  Cc: 'Alastair D'Silva', 'Jani Nikula',
	'Joonas Lahtinen', 'Rodrigo Vivi',
	'David Airlie', 'Daniel Vetter',
	'Karsten Keil', 'Jassi Brar',
	'Tom Lendacky', 'David S. Miller',
	'Jose Abreu', 'Kalle Valo',
	'Stanislaw Gruszka', 'Benson Leung',
	'Enric Balletbo i Serra', 'James E.J. Bottomley',
	'Martin K. Petersen', 'Greg Kroah-Hartman',
	'Alexander Viro', 'Sergey Senozhatsky',
	'Steven Rostedt', 'Andrew Morton', intel-gfx,
	dri-devel, linux-kernel, netdev, ath10k, linux-wireless,
	linux-scsi, linux-fbdev, devel, linux-fsdevel
In-Reply-To: <42fb90eb9c8f4ede8a56a09be90218e3@AcuMS.aculab.com>

> -----Original Message-----
> From: David Laight <David.Laight@ACULAB.COM>
> Sent: Monday, 15 April 2019 9:04 PM
> To: 'Alastair D'Silva' <alastair@d-silva.org>; 'Petr Mladek'
> <pmladek@suse.com>
> Cc: 'Alastair D'Silva' <alastair@au1.ibm.com>; 'Jani Nikula'
> <jani.nikula@linux.intel.com>; 'Joonas Lahtinen'
> <joonas.lahtinen@linux.intel.com>; 'Rodrigo Vivi' <rodrigo.vivi@intel.com>;
> 'David Airlie' <airlied@linux.ie>; 'Daniel Vetter' <daniel@ffwll.ch>; 'Karsten
> Keil' <isdn@linux-pingi.de>; 'Jassi Brar' <jassisinghbrar@gmail.com>; 'Tom
> Lendacky' <thomas.lendacky@amd.com>; 'David S. Miller'
> <davem@davemloft.net>; 'Jose Abreu' <Jose.Abreu@synopsys.com>; 'Kalle
> Valo' <kvalo@codeaurora.org>; 'Stanislaw Gruszka' <sgruszka@redhat.com>;
> 'Benson Leung' <bleung@chromium.org>; 'Enric Balletbo i Serra'
> <enric.balletbo@collabora.com>; 'James E.J. Bottomley'
> <jejb@linux.ibm.com>; 'Martin K. Petersen' <martin.petersen@oracle.com>;
> 'Greg Kroah-Hartman' <gregkh@linuxfoundation.org>; 'Alexander Viro'
> <viro@zeniv.linux.org.uk>; 'Sergey Senozhatsky'
> <sergey.senozhatsky@gmail.com>; 'Steven Rostedt'
> <rostedt@goodmis.org>; 'Andrew Morton' <akpm@linux-foundation.org>;
> intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-
> kernel@vger.kernel.org; netdev@vger.kernel.org;
> ath10k@lists.infradead.org; linux-wireless@vger.kernel.org; linux-
> scsi@vger.kernel.org; linux-fbdev@vger.kernel.org;
> devel@driverdev.osuosl.org; linux-fsdevel@vger.kernel.org
> Subject: RE: [PATCH 3/4] lib/hexdump.c: Replace ascii bool in
> hex_dump_to_buffer with flags
> 
> From: Alastair D'Silva
> > Sent: 15 April 2019 11:45
> ...
> > > Although I think you'd want a 'no hex' flag to suppress the hex.
> > >
> > > Probably more useful flags are ones to suppress the address column.
> >
> > This is already supported by the prefix_type parameter - are you
> > proposing that we eliminate the parameter & combine it with flags?
> 
> I was looking at the flags on one of my hexdump() functions...
> 
> > > I've also used flags to enable (or disable) suppression of multiple
> > > lines of zeros of constant bytes.
> > > In that case you may want hexdump to return the flags for the next
> > > call when a large buffer is being dumped in fragments.
> >
> > I'm afraid I don't quite follow here, hex_dump_to_buffer doesn't alter
> > the flags, so the caller already knows it.
> 
> If you are suppressing lines of zeros and dumping a buffer in several blocks
> then subsequent calls need to know that the last line of the previous call was
> suppressed zeros - and carry on with the same suppressed block.

Why wouldn't you do this with a single call to print_hex_dump? (that is where the repeated lines are suppressed)

That will already take chunks of the buffer until the whole thing is output, in what situation do you see a caller chunking the access themselves?

-- 
Alastair D'Silva           mob: 0423 762 819
skype: alastair_dsilva     msn: alastair@d-silva.org
blog: http://alastair.d-silva.org    Twitter: @EvilDeece




^ permalink raw reply

* RE: [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags
From: David Laight @ 2019-04-15 11:03 UTC (permalink / raw)
  To: 'Alastair D'Silva', 'Petr Mladek'
  Cc: 'Alastair D'Silva', 'Jani Nikula',
	'Joonas Lahtinen', 'Rodrigo Vivi',
	'David Airlie', 'Daniel Vetter',
	'Karsten Keil', 'Jassi Brar',
	'Tom Lendacky', 'David S. Miller',
	'Jose Abreu', 'Kalle Valo',
	'Stanislaw Gruszka', 'Benson Leung',
	'Enric Balletbo i Serra', 'James E.J. Bottomley',
	'Martin K. Petersen', 'Greg Kroah-Hartman',
	'Alexander Viro', 'Sergey Senozhatsky',
	'Steven Rostedt', 'Andrew Morton',
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	ath10k@lists.infradead.org, linux-wireless@vger.kernel.org,
	linux-scsi@vger.kernel.org, linux-fbdev@vger.kernel.org,
	devel@driverdev.osuosl.org, linux-fsdevel@vger.kernel.org
In-Reply-To: <0db501d4f378$3bd50bb0$b37f2310$@d-silva.org>

From: Alastair D'Silva
> Sent: 15 April 2019 11:45
...
> > Although I think you'd want a 'no hex' flag to suppress the hex.
> >
> > Probably more useful flags are ones to suppress the address column.
> 
> This is already supported by the prefix_type parameter - are you proposing that we eliminate the
> parameter & combine it with flags?

I was looking at the flags on one of my hexdump() functions...

> > I've also used flags to enable (or disable) suppression of multiple lines of
> > zeros of constant bytes.
> > In that case you may want hexdump to return the flags for the next call when
> > a large buffer is being dumped in fragments.
> 
> I'm afraid I don't quite follow here, hex_dump_to_buffer doesn't alter the flags,
> so the caller already knows it.

If you are suppressing lines of zeros and dumping a buffer in several blocks
then subsequent calls need to know that the last line of the previous call
was suppressed zeros - and carry on with the same suppressed block.

I've not looked to see if it does support suppressing lines of zeros/0xff.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

^ permalink raw reply

* RE: [PATCH 1/4] lib/hexdump.c: Allow 64 bytes per line
From: Alastair D'Silva @ 2019-04-15 10:59 UTC (permalink / raw)
  To: 'David Laight', 'Petr Mladek'
  Cc: 'Jani Nikula', 'Joonas Lahtinen',
	'Rodrigo Vivi', 'David Airlie',
	'Daniel Vetter', 'Karsten Keil',
	'Jassi Brar', 'Tom Lendacky',
	'David S. Miller', 'Jose Abreu',
	'Kalle Valo', 'Stanislaw Gruszka',
	'Benson Leung', 'Enric Balletbo i Serra',
	'James E.J. Bottomley', 'Martin K. Petersen',
	'Greg Kroah-Hartman', 'Alexander Viro',
	'Sergey Senozhatsky', 'Steven Rostedt',
	'Andrew Morton', intel-gfx, dri-devel, linux-kernel,
	netdev, ath10k, linux-wireless, linux-scsi, linux-fbdev, devel,
	linux-fsdevel
In-Reply-To: <6912ef2d83d34c9299d5a5ad120c276f@AcuMS.aculab.com>

> From: Alastair D'Silva
> > Sent: 15 April 2019 11:29
> ...
> > I do, and I believe the choice of the output length should be in the
> > hands of the caller.
> >
> > On further thought, it would make more sense to remove the hardcoded
> > list of sizes and just enforce a power of 2. The function shouldn't
> > dictate what the caller can and can't do beyond the technical limits of it's
> implementation.
> 
> Why powers of two?
> You may want the length to match sizeof (struct foo).
> You might even want the address increment to be larger that the number of
> lines dumped.

Good point, the base requirement is that it should be a multiple of groupsize.

-- 
Alastair D'Silva           mob: 0423 762 819
skype: alastair_dsilva     msn: alastair@d-silva.org
blog: http://alastair.d-silva.org    Twitter: @EvilDeece




^ permalink raw reply


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