LinuxKPI: 802.11: use ni_dtim_period instead of iv_dtim_period
Both iwm(4) and iwx(4) are using the iv_dtim_period from the vap. This likely stems from the fact that ieee80211_sta_join() while setting up the ni basics does set the dtim_period on the vap (we should revist this in net80211) from the scan results. The problem with that is that once we are associated and are receiving beacons, sta_recv_mgmt() will handle the TIM IE and and save the tim period and tim count in ni_dtim_period and ni_dtim_count on the node. Given we need to inform the driver/firmware (at least for iwlwifi) with values from beacons received after assoc, the ni is the better place the take the value from (though the beacons hopefully stay consistent). Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
@@ -1872,13 +1872,13 @@ lkpi_update_dtim_tsf(struct ieee80211_vif *vif, struct ieee80211_node *ni,
|
||||
vif->bss_conf.beacon_int = 16;
|
||||
bss_changed |= BSS_CHANGED_BEACON_INT;
|
||||
}
|
||||
if (vif->bss_conf.dtim_period != vap->iv_dtim_period &&
|
||||
vap->iv_dtim_period > 0) {
|
||||
vif->bss_conf.dtim_period = vap->iv_dtim_period;
|
||||
if (vif->bss_conf.dtim_period != ni->ni_dtim_period &&
|
||||
ni->ni_dtim_period > 0) {
|
||||
vif->bss_conf.dtim_period = ni->ni_dtim_period;
|
||||
bss_changed |= BSS_CHANGED_BEACON_INFO;
|
||||
}
|
||||
|
||||
vif->bss_conf.sync_dtim_count = vap->iv_dtim_count;
|
||||
vif->bss_conf.sync_dtim_count = ni->ni_dtim_count;
|
||||
vif->bss_conf.sync_tsf = le64toh(ni->ni_tstamp.tsf);
|
||||
/* vif->bss_conf.sync_device_ts = set in linuxkpi_ieee80211_rx. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user