From: Johannes Berg <johannes@sipsolutions.net>
To: Bertold Van den Bergh <bertold.vandenbergh@esat.kuleuven.be>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH 3/5] mac80211: Create STA when transmitting to unknown station in OCB mode
Date: Thu, 13 Aug 2015 14:01:03 +0200 [thread overview]
Message-ID: <1439467263.2114.26.camel@sipsolutions.net> (raw)
In-Reply-To: <1438783353-5685-1-git-send-email-bertold.vandenbergh@esat.kuleuven.be>
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
prev parent reply other threads:[~2015-08-13 12:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439467263.2114.26.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=bertold.vandenbergh@esat.kuleuven.be \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.