Search Linux Wireless

[PATCH 2/7] mac80211: force calculation of software hash for tx fair queueing

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

 



Depending on the source, a hardware calculated hash may not provide the
same level of collision resistance.

Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
---
 net/mac80211/tx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 6422da6690f7..f1c934f21d7e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3937,7 +3937,8 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
 	if (local->ops->wake_tx_queue) {
 		u16 queue = __ieee80211_select_queue(sdata, sta, skb);
 		skb_set_queue_mapping(skb, queue);
-		skb_get_hash(skb);
+		if (!skb->sw_hash)
+			__skb_get_hash(skb);
 	}
 
 	if (sta) {
@@ -4191,7 +4192,8 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
 	if (local->ops->wake_tx_queue) {
 		u16 queue = __ieee80211_select_queue(sdata, sta, skb);
 		skb_set_queue_mapping(skb, queue);
-		skb_get_hash(skb);
+		if (!skb->sw_hash)
+			__skb_get_hash(skb);
 	}
 
 	if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) &&
-- 
2.28.0




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

  Powered by Linux