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.vandenbe...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to