[PATCH v3] mac80211: fix dtim period propagation to the driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In case the beacon is heard before we try to associate,
the dtim_period was not communicated to the low level
driver. This led to disconnections with iwlmvm which needs
to know the dtim_period before it can move its firmware to
'associated' state. The following print would appear in the
log prior the disconnection.

iwlwifi: No association and the time event is over already...

Note that we usually hear the beacon only after the
association because we associate based on the probe
responses from the scan. This is why this bug has not been
discovered until now.

https://bugzilla.kernel.org/show_bug.cgi?id=78101

Cc: <stable@xxxxxxxxxxxxxxx> [3.9+]
Fixes: c65dd1477b6f ("mac80211: inform the driver about update of dtim_period")
Reported-by: Johannes Stezenbach <js@xxxxxxxxx>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx>
---
v2: fix typos in commit message
v3: move the assignment to the proper place (if tim)
    change the "Fixes" + stable tag
---
 net/mac80211/mlme.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index e37b97d..92fd200 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4427,6 +4427,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
 			const struct ieee80211_tim_ie *tim;
 			tim = (void *)(tim_ie + 2);
 			ifmgd->dtim_period = tim->dtim_period;
+			sdata->vif.bss_conf.dtim_period =
+				ifmgd->dtim_period ? : 1;
 			dtim_count = tim->dtim_count;
 		}
 		ifmgd->have_beacon = true;
-- 
1.8.1.msysgit.1

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]