Commit fde627b5 authored by Ulrich Kunitz's avatar Ulrich Kunitz Committed by John W. Linville

[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: default avatarUlrich Kunitz <kune@deine-taler.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b269825b
...@@ -797,7 +797,7 @@ static int zd1211_hw_init_hmac(struct zd_chip *chip) ...@@ -797,7 +797,7 @@ static int zd1211_hw_init_hmac(struct zd_chip *chip)
{ CR_ADDA_MBIAS_WARMTIME, 0x30000808 }, { CR_ADDA_MBIAS_WARMTIME, 0x30000808 },
{ CR_ZD1211_RETRY_MAX, 0x2 }, { CR_ZD1211_RETRY_MAX, 0x2 },
{ CR_SNIFFER_ON, 0 }, { CR_SNIFFER_ON, 0 },
{ CR_RX_FILTER, AP_RX_FILTER }, { CR_RX_FILTER, STA_RX_FILTER },
{ CR_GROUP_HASH_P1, 0x00 }, { CR_GROUP_HASH_P1, 0x00 },
{ CR_GROUP_HASH_P2, 0x80000000 }, { CR_GROUP_HASH_P2, 0x80000000 },
{ CR_REG1, 0xa4 }, { CR_REG1, 0xa4 },
...@@ -844,7 +844,7 @@ static int zd1211b_hw_init_hmac(struct zd_chip *chip) ...@@ -844,7 +844,7 @@ static int zd1211b_hw_init_hmac(struct zd_chip *chip)
{ CR_ZD1211B_AIFS_CTL2, 0x008C003C }, { CR_ZD1211B_AIFS_CTL2, 0x008C003C },
{ CR_ZD1211B_TXOP, 0x01800824 }, { CR_ZD1211B_TXOP, 0x01800824 },
{ CR_SNIFFER_ON, 0 }, { CR_SNIFFER_ON, 0 },
{ CR_RX_FILTER, AP_RX_FILTER }, { CR_RX_FILTER, STA_RX_FILTER },
{ CR_GROUP_HASH_P1, 0x00 }, { CR_GROUP_HASH_P1, 0x00 },
{ CR_GROUP_HASH_P2, 0x80000000 }, { CR_GROUP_HASH_P2, 0x80000000 },
{ CR_REG1, 0xa4 }, { CR_REG1, 0xa4 },
......
...@@ -466,6 +466,9 @@ ...@@ -466,6 +466,9 @@
#define RX_FILTER_BEACON 0x0100 #define RX_FILTER_BEACON 0x0100
#define RX_FILTER_DISASSOC 0x0400 #define RX_FILTER_DISASSOC 0x0400
#define RX_FILTER_AUTH 0x0800 #define RX_FILTER_AUTH 0x0800
#define AP_RX_FILTER 0x0400feff
#define STA_RX_FILTER 0x0000ffff
/* Monitor mode sets filter to 0xfffff */ /* Monitor mode sets filter to 0xfffff */
#define CR_ACK_TIMEOUT_EXT CTL_REG(0x0690) #define CR_ACK_TIMEOUT_EXT CTL_REG(0x0690)
...@@ -548,9 +551,6 @@ ...@@ -548,9 +551,6 @@
#define CR_ZD1211B_TXOP CTL_REG(0x0b20) #define CR_ZD1211B_TXOP CTL_REG(0x0b20)
#define CR_ZD1211B_RETRY_MAX CTL_REG(0x0b28) #define CR_ZD1211B_RETRY_MAX CTL_REG(0x0b28)
#define AP_RX_FILTER 0x0400feff
#define STA_RX_FILTER 0x0000ffff
#define CWIN_SIZE 0x007f043f #define CWIN_SIZE 0x007f043f
......
...@@ -138,10 +138,7 @@ static int reset_mode(struct zd_mac *mac) ...@@ -138,10 +138,7 @@ static int reset_mode(struct zd_mac *mac)
{ {
struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac);
struct zd_ioreq32 ioreqs[3] = { struct zd_ioreq32 ioreqs[3] = {
{ CR_RX_FILTER, RX_FILTER_BEACON | RX_FILTER_PROBE_RESPONSE | { CR_RX_FILTER, STA_RX_FILTER },
RX_FILTER_AUTH | RX_FILTER_ASSOC_RESPONSE |
RX_FILTER_REASSOC_RESPONSE |
RX_FILTER_DISASSOC },
{ CR_SNIFFER_ON, 0U }, { CR_SNIFFER_ON, 0U },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment