summary refs log tree commit diff
path: root/pkgs/os-specific/linux/atheros/inj.patch
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2008-10-28 07:28:16 +0000
committerMichael Raskin <7c6f434c@mail.ru>2008-10-28 07:28:16 +0000
commit3cceb8afd8f611347a878a3c180d25c787d0d7c3 (patch)
tree8c564d5b99752c7b40d6a09845283a8adede201a /pkgs/os-specific/linux/atheros/inj.patch
parent99893c8aeceb2caa22adb2d717e0b0b2e1817663 (diff)
downloadnixpkgs-3cceb8afd8f611347a878a3c180d25c787d0d7c3.tar
nixpkgs-3cceb8afd8f611347a878a3c180d25c787d0d7c3.tar.gz
nixpkgs-3cceb8afd8f611347a878a3c180d25c787d0d7c3.tar.bz2
nixpkgs-3cceb8afd8f611347a878a3c180d25c787d0d7c3.tar.lz
nixpkgs-3cceb8afd8f611347a878a3c180d25c787d0d7c3.tar.xz
nixpkgs-3cceb8afd8f611347a878a3c180d25c787d0d7c3.tar.zst
nixpkgs-3cceb8afd8f611347a878a3c180d25c787d0d7c3.zip
Added atheros injection patches (from aircrack)
svn path=/nixpkgs/trunk/; revision=13127
Diffstat (limited to 'pkgs/os-specific/linux/atheros/inj.patch')
-rw-r--r--pkgs/os-specific/linux/atheros/inj.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/atheros/inj.patch b/pkgs/os-specific/linux/atheros/inj.patch
new file mode 100644
index 00000000000..baae9b88aa4
--- /dev/null
+++ b/pkgs/os-specific/linux/atheros/inj.patch
@@ -0,0 +1,32 @@
+diff -Naur madwifi/ath/if_ath.c madwifi_rawtx/ath/if_ath.c
+--- madwifi/ath/if_ath.c	2008-06-24 17:20:58.000000000 -0400
++++ madwifi_rawtx/ath/if_ath.c	2008-06-24 17:20:12.000000000 -0400
+@@ -2950,6 +2950,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 = &(SKB_CB(skb)->phy); 
+ 	const HAL_RATE_TABLE *rt;
+@@ -2962,7 +2963,8 @@
+ 	struct ieee80211_frame *wh;
+ 
+ 	wh = (struct ieee80211_frame *)skb->data;
+-	try0 = ph->try[0];
++//	try0 = ph->try[0];
++	try0 = (ic->ic_opmode == IEEE80211_M_MONITOR) ? 1 : ph->try[0];
+ 	rt = sc->sc_currates;
+ 	txrate = dot11_to_ratecode(sc, rt, ph->rate[0]);
+ 	power = ph->power > 60 ? 60 : ph->power;
+@@ -2986,7 +2988,8 @@
+ 	rt = sc->sc_currates;
+ 	KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
+ 
+-	if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
++	if (IEEE80211_IS_MULTICAST(wh->i_addr1) || ((ic->ic_opmode == 
++IEEE80211_M_MONITOR) && (skb->data[1]&3) != 0x01) ) {
+ 		flags |= HAL_TXDESC_NOACK;	/* no ack on broad/multicast */
+ 		sc->sc_stats.ast_tx_noack++;
+ 		try0 = 1;
+