Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare()
@ 2025-01-15 17:17 Dmitry Antipov
  2025-01-15 17:17 ` [PATCH 2/2] wifi: ath9k: use unsigned long for activity check timestamp Dmitry Antipov
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Dmitry Antipov @ 2025-01-15 17:17 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen
  Cc: Kalle Valo, linux-wireless, Dmitry Antipov

After switching to mac80211 software queues, pointer to 'struct ath_node'
in 'struct ath_tx_control' is still assigned but not actually used. So drop
it and cleanup related things in 'ath_tx_prepare()'. Compile tested only.

Fixes: 50f08edf9809 ("ath9k: Switch to using mac80211 intermediate software queues.")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/ath/ath9k/ath9k.h | 1 -
 drivers/net/wireless/ath/ath9k/xmit.c  | 9 ---------
 2 files changed, 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index bcfc8df0efe5..65c2250db33d 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -274,7 +274,6 @@ struct ath_node {
 
 struct ath_tx_control {
 	struct ath_txq *txq;
-	struct ath_node *an;
 	struct ieee80211_sta *sta;
 	u8 paprd;
 };
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 0a24439dd30d..84f8c28b038b 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2295,19 +2295,10 @@ static int ath_tx_prepare(struct ieee80211_hw *hw, struct sk_buff *skb,
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_sta *sta = txctl->sta;
 	struct ieee80211_vif *vif = info->control.vif;
-	struct ath_vif *avp;
 	struct ath_softc *sc = hw->priv;
 	int frmlen = skb->len + FCS_LEN;
 	int padpos, padsize;
 
-	/* NOTE:  sta can be NULL according to net/mac80211.h */
-	if (sta)
-		txctl->an = (struct ath_node *)sta->drv_priv;
-	else if (vif && ieee80211_is_data(hdr->frame_control)) {
-		avp = (void *)vif->drv_priv;
-		txctl->an = &avp->mcast_node;
-	}
-
 	if (info->control.hw_key)
 		frmlen += info->control.hw_key->icv_len;
 
-- 
2.48.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] wifi: ath9k: use unsigned long for activity check timestamp
  2025-01-15 17:17 [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare() Dmitry Antipov
@ 2025-01-15 17:17 ` Dmitry Antipov
  2025-01-16 11:05   ` Toke Høiland-Jørgensen
  2025-01-16 11:20   ` Kalle Valo
  2025-01-16 11:05 ` [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare() Toke Høiland-Jørgensen
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 9+ messages in thread
From: Dmitry Antipov @ 2025-01-15 17:17 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen
  Cc: Kalle Valo, linux-wireless, Dmitry Antipov

Since 'rx_active_check_time' of 'struct ath_softc' is in jiffies,
prefer 'unsigned long' over 'u32' to avoid possible truncation in
'ath_hw_rx_inactive_check()'. Found with clang's -Wshorten-64-to-32,
compile tested only.

Fixes: b5f871ab4913 ("wifi: ath9k: Add RX inactivity detection and reset chip when it occurs")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/ath/ath9k/ath9k.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 65c2250db33d..62442be6dd56 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -1017,7 +1017,7 @@ struct ath_softc {
 
 	u8 gtt_cnt;
 	u32 intrstatus;
-	u32 rx_active_check_time;
+	unsigned long rx_active_check_time;
 	u32 rx_active_count;
 	u16 ps_flags; /* PS_* */
 	bool ps_enabled;
-- 
2.48.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare()
  2025-01-15 17:17 [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare() Dmitry Antipov
  2025-01-15 17:17 ` [PATCH 2/2] wifi: ath9k: use unsigned long for activity check timestamp Dmitry Antipov
@ 2025-01-16 11:05 ` Toke Høiland-Jørgensen
  2025-01-16 11:19 ` Kalle Valo
  2025-01-17 23:41 ` Jeff Johnson
  3 siblings, 0 replies; 9+ messages in thread
From: Toke Høiland-Jørgensen @ 2025-01-16 11:05 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: Kalle Valo, linux-wireless, Dmitry Antipov

Dmitry Antipov <dmantipov@yandex.ru> writes:

> After switching to mac80211 software queues, pointer to 'struct ath_node'
> in 'struct ath_tx_control' is still assigned but not actually used. So drop
> it and cleanup related things in 'ath_tx_prepare()'. Compile tested only.
>
> Fixes: 50f08edf9809 ("ath9k: Switch to using mac80211 intermediate software queues.")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] wifi: ath9k: use unsigned long for activity check timestamp
  2025-01-15 17:17 ` [PATCH 2/2] wifi: ath9k: use unsigned long for activity check timestamp Dmitry Antipov
@ 2025-01-16 11:05   ` Toke Høiland-Jørgensen
  2025-01-16 11:20   ` Kalle Valo
  1 sibling, 0 replies; 9+ messages in thread
From: Toke Høiland-Jørgensen @ 2025-01-16 11:05 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: Kalle Valo, linux-wireless, Dmitry Antipov

Dmitry Antipov <dmantipov@yandex.ru> writes:

> Since 'rx_active_check_time' of 'struct ath_softc' is in jiffies,
> prefer 'unsigned long' over 'u32' to avoid possible truncation in
> 'ath_hw_rx_inactive_check()'. Found with clang's -Wshorten-64-to-32,
> compile tested only.
>
> Fixes: b5f871ab4913 ("wifi: ath9k: Add RX inactivity detection and reset chip when it occurs")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare()
  2025-01-15 17:17 [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare() Dmitry Antipov
  2025-01-15 17:17 ` [PATCH 2/2] wifi: ath9k: use unsigned long for activity check timestamp Dmitry Antipov
  2025-01-16 11:05 ` [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare() Toke Høiland-Jørgensen
@ 2025-01-16 11:19 ` Kalle Valo
  2025-01-16 17:42   ` Jeff Johnson
  2025-01-17 23:41 ` Jeff Johnson
  3 siblings, 1 reply; 9+ messages in thread
From: Kalle Valo @ 2025-01-16 11:19 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: Toke Høiland-Jørgensen, linux-wireless

Dmitry Antipov <dmantipov@yandex.ru> writes:

> After switching to mac80211 software queues, pointer to 'struct ath_node'
> in 'struct ath_tx_control' is still assigned but not actually used. So drop
> it and cleanup related things in 'ath_tx_prepare()'. Compile tested only.
>
> Fixes: 50f08edf9809 ("ath9k: Switch to using mac80211 intermediate software queues.")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

I don't think cleanup patches should have a Fixes tag. This is not
fixing a user visible issue.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] wifi: ath9k: use unsigned long for activity check timestamp
  2025-01-15 17:17 ` [PATCH 2/2] wifi: ath9k: use unsigned long for activity check timestamp Dmitry Antipov
  2025-01-16 11:05   ` Toke Høiland-Jørgensen
@ 2025-01-16 11:20   ` Kalle Valo
  2025-01-16 17:41     ` Jeff Johnson
  1 sibling, 1 reply; 9+ messages in thread
From: Kalle Valo @ 2025-01-16 11:20 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: Toke Høiland-Jørgensen, linux-wireless

Dmitry Antipov <dmantipov@yandex.ru> writes:

> Since 'rx_active_check_time' of 'struct ath_softc' is in jiffies,
> prefer 'unsigned long' over 'u32' to avoid possible truncation in
> 'ath_hw_rx_inactive_check()'. Found with clang's -Wshorten-64-to-32,
> compile tested only.
>
> Fixes: b5f871ab4913 ("wifi: ath9k: Add RX inactivity detection and reset chip when it occurs")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

I don't think this should have a Fixes either. Jeff, can you remove
these during commit?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] wifi: ath9k: use unsigned long for activity check timestamp
  2025-01-16 11:20   ` Kalle Valo
@ 2025-01-16 17:41     ` Jeff Johnson
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Johnson @ 2025-01-16 17:41 UTC (permalink / raw)
  To: Kalle Valo, Dmitry Antipov
  Cc: Toke Høiland-Jørgensen, linux-wireless

On 1/16/2025 3:20 AM, Kalle Valo wrote:
> Dmitry Antipov <dmantipov@yandex.ru> writes:
> 
>> Since 'rx_active_check_time' of 'struct ath_softc' is in jiffies,
>> prefer 'unsigned long' over 'u32' to avoid possible truncation in
>> 'ath_hw_rx_inactive_check()'. Found with clang's -Wshorten-64-to-32,
>> compile tested only.
>>
>> Fixes: b5f871ab4913 ("wifi: ath9k: Add RX inactivity detection and reset chip when it occurs")
>> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> 
> I don't think this should have a Fixes either. Jeff, can you remove
> these during commit?
> 
ACK

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare()
  2025-01-16 11:19 ` Kalle Valo
@ 2025-01-16 17:42   ` Jeff Johnson
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Johnson @ 2025-01-16 17:42 UTC (permalink / raw)
  To: Kalle Valo, Dmitry Antipov
  Cc: Toke Høiland-Jørgensen, linux-wireless

On 1/16/2025 3:19 AM, Kalle Valo wrote:
> Dmitry Antipov <dmantipov@yandex.ru> writes:
> 
>> After switching to mac80211 software queues, pointer to 'struct ath_node'
>> in 'struct ath_tx_control' is still assigned but not actually used. So drop
>> it and cleanup related things in 'ath_tx_prepare()'. Compile tested only.
>>
>> Fixes: 50f08edf9809 ("ath9k: Switch to using mac80211 intermediate software queues.")
>> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> 
> I don't think cleanup patches should have a Fixes tag. This is not
> fixing a user visible issue.
> 

ACK

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare()
  2025-01-15 17:17 [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare() Dmitry Antipov
                   ` (2 preceding siblings ...)
  2025-01-16 11:19 ` Kalle Valo
@ 2025-01-17 23:41 ` Jeff Johnson
  3 siblings, 0 replies; 9+ messages in thread
From: Jeff Johnson @ 2025-01-17 23:41 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, Dmitry Antipov
  Cc: Kalle Valo, linux-wireless


On Wed, 15 Jan 2025 20:17:49 +0300, Dmitry Antipov wrote:
> After switching to mac80211 software queues, pointer to 'struct ath_node'
> in 'struct ath_tx_control' is still assigned but not actually used. So drop
> it and cleanup related things in 'ath_tx_prepare()'. Compile tested only.
> 
> 

Applied, thanks!

[1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare()
      commit: 7f2e104f2eebc2c3e15ae34740c7b05d0362040a
[2/2] wifi: ath9k: use unsigned long for activity check timestamp
      commit: 8fe64b0fedcb7348080529c46c71ae23f60c9d3e

Best regards,
-- 
Jeff Johnson <jeff.johnson@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-01-17 23:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-15 17:17 [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare() Dmitry Antipov
2025-01-15 17:17 ` [PATCH 2/2] wifi: ath9k: use unsigned long for activity check timestamp Dmitry Antipov
2025-01-16 11:05   ` Toke Høiland-Jørgensen
2025-01-16 11:20   ` Kalle Valo
2025-01-16 17:41     ` Jeff Johnson
2025-01-16 11:05 ` [PATCH 1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare() Toke Høiland-Jørgensen
2025-01-16 11:19 ` Kalle Valo
2025-01-16 17:42   ` Jeff Johnson
2025-01-17 23:41 ` Jeff Johnson

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