diff mbox

[RFC,1/6] zd1211rw: fix beacon interval setup

Message ID 20101226112414.31775.62053.stgit@fate.lan (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Jussi Kivilinna Dec. 26, 2010, 11:24 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index 30f8d40..f21cd7e 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -849,10 +849,12 @@  static int set_aw_pt_bi(struct zd_chip *chip, struct aw_pt_bi *s)
 {
 	struct zd_ioreq32 reqs[3];
 
-	if (s->beacon_interval <= 5)
-		s->beacon_interval = 5;
+	if ((s->beacon_interval & 0xffff) <= 5) {
+		s->beacon_interval &= ~0xffff;
+		s->beacon_interval |= 5;
+	}
 	if (s->pre_tbtt < 4 || s->pre_tbtt >= s->beacon_interval)
-		s->pre_tbtt = s->beacon_interval - 1;
+		s->pre_tbtt = (s->beacon_interval & 0xffff) - 1;
 	if (s->atim_wnd_period >= s->pre_tbtt)
 		s->atim_wnd_period = s->pre_tbtt - 1;