All pastes #210087 Raw Edit

Untitled

public text v1 · immutable
#210087 ·published 2006-10-19 14:34 UTC
rendered paste body
diff -ur madwifi-r1756/ath/if_ath.c patched_madwifi-r1756/ath/if_ath.c
--- madwifi-r1756/ath/if_ath.c	2006-10-18 22:18:06.812500000 +0200
+++ patched_madwifi-r1756/ath/if_ath.c	2006-10-18 22:20:47.000000000 +0200
@@ -2293,6 +2293,7 @@
 ath_tx_startraw(struct net_device *dev, struct ath_buf *bf, struct sk_buff *skb) 
 {
 	struct ath_softc *sc = dev->priv;
+	struct ieee80211com *ic = &sc->sc_ic;
 	struct ath_hal *ah = sc->sc_ah;
 	struct ieee80211_phy_params *ph = (struct ieee80211_phy_params *) (skb->cb + sizeof(struct ieee80211_cb));
 	const HAL_RATE_TABLE *rt;
@@ -2309,7 +2310,11 @@
 	struct ieee80211_frame *wh; 
 	
 	wh = (struct ieee80211_frame *) skb->data;
-	try0 = ph->try0;
+	try0 = (ic->ic_opmode == IEEE80211_M_MONITOR) ? 1 : ph->try0;
+	/*
+	 * The retry value has to be patched to 1 when injecting,
+	 * otherwise the sequence number will be overwritten
+	 */
 	rt = sc->sc_currates;
 	txrate = dot11_to_ratecode(sc, rt, ph->rate0);
 	power = ph->power > 60 ? 60 : ph->power;