aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich Kunitz <kune@deine-taler.de>2006-08-01 17:43:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-08-02 14:26:51 -0400
commitfde627b54ce7bef094157074f3adb9b6e1a96d4c (patch)
tree37b4faed23a48f9342b055fa539300e689439baa
parentb269825b9bb2c925bbaf4365ec9fa4c6a16e46b4 (diff)
[PATCH] zd1211rw: Packet filter fix for managed (STA) mode
I had problems with my AVM Fritz!Box access point. It appeared that the AP deauthorized me and the softmac didn't reconnect me. This patch handles the problem. Signed-off-by: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/zd1211rw/zd_chip.c4
-rw-r--r--drivers/net/wireless/zd1211rw/zd_chip.h6
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c5
3 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index efc9c4bd826f..da9d06bdb818 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -797,7 +797,7 @@ static int zd1211_hw_init_hmac(struct zd_chip *chip)
797 { CR_ADDA_MBIAS_WARMTIME, 0x30000808 }, 797 { CR_ADDA_MBIAS_WARMTIME, 0x30000808 },
798 { CR_ZD1211_RETRY_MAX, 0x2 }, 798 { CR_ZD1211_RETRY_MAX, 0x2 },
799 { CR_SNIFFER_ON, 0 }, 799 { CR_SNIFFER_ON, 0 },
800 { CR_RX_FILTER, AP_RX_FILTER }, 800 { CR_RX_FILTER, STA_RX_FILTER },
801 { CR_GROUP_HASH_P1, 0x00 }, 801 { CR_GROUP_HASH_P1, 0x00 },
802 { CR_GROUP_HASH_P2, 0x80000000 }, 802 { CR_GROUP_HASH_P2, 0x80000000 },
803 { CR_REG1, 0xa4 }, 803 { CR_REG1, 0xa4 },
@@ -844,7 +844,7 @@ static int zd1211b_hw_init_hmac(struct zd_chip *chip)
844 { CR_ZD1211B_AIFS_CTL2, 0x008C003C }, 844 { CR_ZD1211B_AIFS_CTL2, 0x008C003C },
845 { CR_ZD1211B_TXOP, 0x01800824 }, 845 { CR_ZD1211B_TXOP, 0x01800824 },
846 { CR_SNIFFER_ON, 0 }, 846 { CR_SNIFFER_ON, 0 },
847 { CR_RX_FILTER, AP_RX_FILTER }, 847 { CR_RX_FILTER, STA_RX_FILTER },
848 { CR_GROUP_HASH_P1, 0x00 }, 848 { CR_GROUP_HASH_P1, 0x00 },
849 { CR_GROUP_HASH_P2, 0x80000000 }, 849 { CR_GROUP_HASH_P2, 0x80000000 },
850 { CR_REG1, 0xa4 }, 850 { CR_REG1, 0xa4 },
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.h b/drivers/net/wireless/zd1211rw/zd_chip.h
index 0eb9c8facbd3..069d2b467339 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.h
+++ b/drivers/net/wireless/zd1211rw/zd_chip.h
@@ -466,6 +466,9 @@
466#define RX_FILTER_BEACON 0x0100 466#define RX_FILTER_BEACON 0x0100
467#define RX_FILTER_DISASSOC 0x0400 467#define RX_FILTER_DISASSOC 0x0400
468#define RX_FILTER_AUTH 0x0800 468#define RX_FILTER_AUTH 0x0800
469#define AP_RX_FILTER 0x0400feff
470#define STA_RX_FILTER 0x0000ffff
471
469/* Monitor mode sets filter to 0xfffff */ 472/* Monitor mode sets filter to 0xfffff */
470 473
471#define CR_ACK_TIMEOUT_EXT CTL_REG(0x0690) 474#define CR_ACK_TIMEOUT_EXT CTL_REG(0x0690)
@@ -548,9 +551,6 @@
548#define CR_ZD1211B_TXOP CTL_REG(0x0b20) 551#define CR_ZD1211B_TXOP CTL_REG(0x0b20)
549#define CR_ZD1211B_RETRY_MAX CTL_REG(0x0b28) 552#define CR_ZD1211B_RETRY_MAX CTL_REG(0x0b28)
550 553
551#define AP_RX_FILTER 0x0400feff
552#define STA_RX_FILTER 0x0000ffff
553
554#define CWIN_SIZE 0x007f043f 554#define CWIN_SIZE 0x007f043f
555 555
556 556
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index a66625c43487..d6f3e02a0b54 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -138,10 +138,7 @@ static int reset_mode(struct zd_mac *mac)
138{ 138{
139 struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); 139 struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac);
140 struct zd_ioreq32 ioreqs[3] = { 140 struct zd_ioreq32 ioreqs[3] = {
141 { CR_RX_FILTER, RX_FILTER_BEACON | RX_FILTER_PROBE_RESPONSE | 141 { CR_RX_FILTER, STA_RX_FILTER },
142 RX_FILTER_AUTH | RX_FILTER_ASSOC_RESPONSE |
143 RX_FILTER_REASSOC_RESPONSE |
144 RX_FILTER_DISASSOC },
145 { CR_SNIFFER_ON, 0U }, 142 { CR_SNIFFER_ON, 0U },
146 }; 143 };
147 144