* [PATCH 3/5] mac80211: Create STA when transmitting to unknown station in OCB mode
@ 2015-08-05 14:02 Bertold Van den Bergh
2015-08-13 12:01 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Bertold Van den Bergh @ 2015-08-05 14:02 UTC (permalink / raw)
To: johannes, linux-wireless; +Cc: Bertold Van den Bergh
Create a new STA when requested to unicast a frame to an unknown station.
This is needed to make ratecontrol work in the case where data is sent
from sta A to B and sta B never replies. Currently, sta B will stay unknown
to mac80211 and the default rate will always be used.
Signed-off-by: Bertold Van den Bergh <bertold.vandenbergh@esat.kuleuven.be>
---
net/mac80211/tx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 84e0e8c..eb8dba6 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1209,6 +1209,10 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
} else
tx->flags |= IEEE80211_TX_UNICAST;
+ if ((sdata->vif.type == NL80211_IFTYPE_OCB) && (!tx->sta) &&
+ (tx->flags & IEEE80211_TX_UNICAST))
+ ieee80211_ocb_rx_no_sta(sdata, NULL, hdr->addr1, 0);
+
if (!(info->flags & IEEE80211_TX_CTL_DONTFRAG)) {
if (!(tx->flags & IEEE80211_TX_UNICAST) ||
skb->len + FCS_LEN <= local->hw.wiphy->frag_threshold ||
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/5] mac80211: Create STA when transmitting to unknown station in OCB mode
2015-08-05 14:02 [PATCH 3/5] mac80211: Create STA when transmitting to unknown station in OCB mode Bertold Van den Bergh
@ 2015-08-13 12:01 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-08-13 12:01 UTC (permalink / raw)
To: Bertold Van den Bergh, linux-wireless
On Wed, 2015-08-05 at 16:02 +0200, Bertold Van den Bergh wrote:
> Create a new STA when requested to unicast a frame to an unknown
> station.
> This is needed to make ratecontrol work in the case where data is
> sent
> from sta A to B and sta B never replies. Currently, sta B will stay
> unknown
> to mac80211 and the default rate will always be used.
>
> Signed-off-by: Bertold Van den Bergh <
> bertold.vandenbergh@esat.kuleuven.be>
> ---
> net/mac80211/tx.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 84e0e8c..eb8dba6 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1209,6 +1209,10 @@ ieee80211_tx_prepare(struct
> ieee80211_sub_if_data *sdata,
> } else
> tx->flags |= IEEE80211_TX_UNICAST;
>
> + if ((sdata->vif.type == NL80211_IFTYPE_OCB) && (!tx->sta) &&
> + (tx->flags & IEEE80211_TX_UNICAST))
> + ieee80211_ocb_rx_no_sta(sdata, NULL, hdr->addr1, 0);
It seems that this could be in a place that's already OCB specific,
perhaps earlier.
Also, it seems you should then actually use the station and assign it
to tx->sta, and rename the function to be more indicative of what it's
doing now.
And code-style wise - you don't need all those parentheses.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-13 12:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-05 14:02 [PATCH 3/5] mac80211: Create STA when transmitting to unknown station in OCB mode Bertold Van den Bergh
2015-08-13 12:01 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).