2016-01-05 10:35:57

by Janusz Dziedzic

[permalink] [raw]
Subject: [PATCH v2 1/2] mac80211: check requested flags in ieee80211_tx_prepare_skb()

In case driver already set info->flags (eg. IEEE80211_TX_CTL_NO_CCK_RATE
in ath9k driver), before this patch we skip this requested flags.

Signed-off-by: Janusz Dziedzic <[email protected]>
---
net/mac80211/tx.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index a512c4b..6ea1c65 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1532,6 +1532,7 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw,
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_tx_data tx;
struct sk_buff *skb2;
+ unsigned int flags = info->flags;

if (ieee80211_tx_prepare(sdata, &tx, NULL, skb) == TX_DROP)
return false;
@@ -1539,6 +1540,7 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw,
info->band = band;
info->control.vif = vif;
info->hw_queue = vif->hw_queue[skb_get_queue_mapping(skb)];
+ info->flags |= flags;

if (invoke_tx_handlers(&tx))
return false;
--
1.9.1



2016-01-06 10:44:11

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] mac80211: check requested flags in ieee80211_tx_prepare_skb()

On Tue, 2016-01-05 at 11:35 +0100, Janusz Dziedzic wrote:
> In case driver already set info->flags (eg.
> IEEE80211_TX_CTL_NO_CCK_RATE
> in ath9k driver), before this patch we skip this requested flags.

I don't see how we "skip" them?

> + unsigned int flags = info->flags;
>  
>   if (ieee80211_tx_prepare(sdata, &tx, NULL, skb) == TX_DROP)
>   return false;

>   info->band = band;
>   info->control.vif = vif;
>   info->hw_queue = vif->hw_queue[skb_get_queue_mapping(skb)];
> + info->flags |= flags;

tx_prepare() doesn't [seem to] do anything to the flags but twiddle a
few, so ?

johannes

2016-01-05 10:35:58

by Janusz Dziedzic

[permalink] [raw]
Subject: [PATCH v2 2/2] ath9k: use min rate when MCC and nullfunc

In case of nullfunc and MCC case use lowest
possible rates.

Signed-off-by: Janusz Dziedzic <[email protected]>
---
drivers/net/wireless/ath/ath9k/channel.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
index b81f65c..988c859 100644
--- a/drivers/net/wireless/ath/ath9k/channel.c
+++ b/drivers/net/wireless/ath/ath9k/channel.c
@@ -1155,6 +1155,7 @@ ath_chanctx_send_vif_ps_frame(struct ath_softc *sc, struct ath_vif *avp,

skb->priority = 7;
skb_set_queue_mapping(skb, IEEE80211_AC_VO);
+ IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_USE_MINRATE;
if (!ieee80211_tx_prepare_skb(sc->hw, vif, skb, band, &sta)) {
dev_kfree_skb_any(skb);
return false;
--
1.9.1


2016-01-07 06:17:36

by Janusz Dziedzic

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] mac80211: check requested flags in ieee80211_tx_prepare_skb()

On 6 January 2016 at 11:44, Johannes Berg <[email protected]> wrote:
> On Tue, 2016-01-05 at 11:35 +0100, Janusz Dziedzic wrote:
>> In case driver already set info->flags (eg.
>> IEEE80211_TX_CTL_NO_CCK_RATE
>> in ath9k driver), before this patch we skip this requested flags.
>
> I don't see how we "skip" them?
>
>> + unsigned int flags = info->flags;
>>
>> if (ieee80211_tx_prepare(sdata, &tx, NULL, skb) == TX_DROP)
>> return false;
>>
>> info->band = band;
>> info->control.vif = vif;
>> info->hw_queue = vif->hw_queue[skb_get_queue_mapping(skb)];
>> + info->flags |= flags;
>
> tx_prepare() doesn't [seem to] do anything to the flags but twiddle a
> few, so ?
>
Yes, you right - this patch is not needed.
Thanks.

BR
Janusz

2016-01-21 13:11:48

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] ath9k: use min rate when MCC and nullfunc

Janusz Dziedzic <[email protected]> writes:

> In case of nullfunc and MCC case use lowest
> possible rates.
>
> Signed-off-by: Janusz Dziedzic <[email protected]>

So what should I do with this patch? The mac80211 patch from this series
was dropped, should I do the same?

https://patchwork.kernel.org/patch/7953631/

Also please try to keep driver and mac80211 patches separate, that's
easier for me and Johannes.

--
Kalle Valo