Search Linux Wireless

[PATCH 3/5] mac80211: Create STA when transmitting to unknown station in OCB mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux