Skip to contentSkip to conversation

mac80211: fix association beacon wait timeout

PATCH In review Johannes Berg 2 participants 2 messages Mar 28, 2012 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: fix association beacon wait timeout

From: Johannes Berg <[email protected]>

The TU_TO_EXP_TIME() macro already includes the
"jiffies +" piece of the calculation, so don't
add jiffies again.

---
 net/mac80211/mlme.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/mac80211/mlme.c +1 -2
@@ -3387,8 +3387,7 @@ int ieee80211_mgd_assoc(struct ieee80211
 		 */
 		printk(KERN_DEBUG "%s: waiting for beacon from %pM\n",
 		       sdata->name, ifmgd->bssid);
-		assoc_data->timeout = jiffies +
-				TU_TO_EXP_TIME(req->bss->beacon_interval);
+		assoc_data->timeout = TU_TO_EXP_TIME(req->bss->beacon_interval);
 	} else {
 		assoc_data->have_beacon = true;
 		assoc_data->sent_assoc = false;
Tested-by on v1 1/1
#1 lore raw
Quoted 8 lines · Johannes Berg

From: Johannes Berg <[email protected]>

The TU_TO_EXP_TIME() macro already includes the
"jiffies +" piece of the calculation, so don't
add jiffies again.

three times :-)

Thanks Johannes!

Quoted 18 lines
---
 net/mac80211/mlme.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/mac80211/mlme.c +1 -2
@@ -3387,8 +3387,7 @@ int ieee80211_mgd_assoc(struct ieee80211
 		 */
 		printk(KERN_DEBUG "%s: waiting for beacon from %pM\n",
 		       sdata->name, ifmgd->bssid);
-		assoc_data->timeout = jiffies +
-				TU_TO_EXP_TIME(req->bss->beacon_interval);
+		assoc_data->timeout = TU_TO_EXP_TIME(req->bss->beacon_interval);
 	} else {
 		assoc_data->have_beacon = true;
 		assoc_data->sent_assoc = false;