summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw/zd_mac.h
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-01-31 20:48:55 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-02-04 16:29:50 -0500
commit9be232563666b7d1bd424780aef7ee2aa261ba04 (patch)
tree28c4455cce240e9a81962d67cb613c692b254bf0 /drivers/net/wireless/zd1211rw/zd_mac.h
parent512119b36f7945a650877cbc7e9b5f4cc4d92e4c (diff)
zd1211rw: add beacon watchdog and setting HW beacon more failsafe
When doing tx/rx at high packet rate (for example simply using ping -f), device starts to fail to respond to control messages. On non-AP modes this only causes problems for LED updating code but when we are running in AP-mode we are writing new beacon to HW usually every 100ms. Now if control message fails in HW beacon setup, device lock is kept locked and beacon data partially written. This can and usually does cause: 1. HW beacon setup fail now on, as driver cannot acquire device lock. 2. Beacon-done interrupt stop working as device has incomplete beacon. Therefore make zd_mac_config_beacon() always try to release device lock and add beacon watchdog to restart beaconing when stall is detected. Also fix zd_mac_config_beacon() try acquiring device lock for max 500ms, as what old code appeared to be trying to do using loop and msleep(1). Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_mac.h')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.h b/drivers/net/wireless/zd1211rw/zd_mac.h
index 0ec6bde0b37..281b3079311 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.h
+++ b/drivers/net/wireless/zd1211rw/zd_mac.h
@@ -163,6 +163,17 @@ struct housekeeping {
struct delayed_work link_led_work;
};
+struct beacon {
+ struct delayed_work watchdog_work;
+ unsigned long last_update;
+ u16 interval;
+ u8 period;
+};
+
+enum zd_device_flags {
+ ZD_DEVICE_RUNNING,
+};
+
#define ZD_MAC_STATS_BUFFER_SIZE 16
#define ZD_MAC_MAX_ACK_WAITERS 50
@@ -174,6 +185,7 @@ struct zd_mac {
struct ieee80211_hw *hw;
struct ieee80211_vif *vif;
struct housekeeping housekeeping;
+ struct beacon beacon;
struct work_struct set_rts_cts_work;
struct work_struct process_intr;
struct zd_mc_hash multicast_hash;
@@ -182,6 +194,7 @@ struct zd_mac {
u8 default_regdomain;
int type;
int associated;
+ unsigned long flags;
struct sk_buff_head ack_wait_queue;
struct ieee80211_channel channels[14];
struct ieee80211_rate rates[12];