aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index f11e8c540db4..7519018ff71a 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1358,6 +1358,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1358 struct ieee80211_chanctx *ctx; 1358 struct ieee80211_chanctx *ctx;
1359 struct sta_info *sta; 1359 struct sta_info *sta;
1360 int res, i; 1360 int res, i;
1361 bool reconfig_due_to_wowlan = false;
1361 1362
1362#ifdef CONFIG_PM 1363#ifdef CONFIG_PM
1363 if (local->suspended) 1364 if (local->suspended)
@@ -1377,6 +1378,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1377 * res is 1, which means the driver requested 1378 * res is 1, which means the driver requested
1378 * to go through a regular reset on wakeup. 1379 * to go through a regular reset on wakeup.
1379 */ 1380 */
1381 reconfig_due_to_wowlan = true;
1380 } 1382 }
1381#endif 1383#endif
1382 /* everything else happens only if HW was up & running */ 1384 /* everything else happens only if HW was up & running */
@@ -1526,6 +1528,11 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1526 BSS_CHANGED_IDLE | 1528 BSS_CHANGED_IDLE |
1527 BSS_CHANGED_TXPOWER; 1529 BSS_CHANGED_TXPOWER;
1528 1530
1531#ifdef CONFIG_PM
1532 if (local->resuming && !reconfig_due_to_wowlan)
1533 sdata->vif.bss_conf = sdata->suspend_bss_conf;
1534#endif
1535
1529 switch (sdata->vif.type) { 1536 switch (sdata->vif.type) {
1530 case NL80211_IFTYPE_STATION: 1537 case NL80211_IFTYPE_STATION:
1531 changed |= BSS_CHANGED_ASSOC | 1538 changed |= BSS_CHANGED_ASSOC |
@@ -1550,9 +1557,11 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1550 1557
1551 /* fall through */ 1558 /* fall through */
1552 case NL80211_IFTYPE_MESH_POINT: 1559 case NL80211_IFTYPE_MESH_POINT:
1553 changed |= BSS_CHANGED_BEACON | 1560 if (sdata->vif.bss_conf.enable_beacon) {
1554 BSS_CHANGED_BEACON_ENABLED; 1561 changed |= BSS_CHANGED_BEACON |
1555 ieee80211_bss_info_change_notify(sdata, changed); 1562 BSS_CHANGED_BEACON_ENABLED;
1563 ieee80211_bss_info_change_notify(sdata, changed);
1564 }
1556 break; 1565 break;
1557 case NL80211_IFTYPE_WDS: 1566 case NL80211_IFTYPE_WDS:
1558 break; 1567 break;
@@ -1632,7 +1641,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1632 mutex_lock(&local->sta_mtx); 1641 mutex_lock(&local->sta_mtx);
1633 1642
1634 list_for_each_entry(sta, &local->sta_list, list) { 1643 list_for_each_entry(sta, &local->sta_list, list) {
1635 ieee80211_sta_tear_down_BA_sessions(sta, true); 1644 ieee80211_sta_tear_down_BA_sessions(
1645 sta, AGG_STOP_LOCAL_REQUEST);
1636 clear_sta_flag(sta, WLAN_STA_BLOCK_BA); 1646 clear_sta_flag(sta, WLAN_STA_BLOCK_BA);
1637 } 1647 }
1638 1648
@@ -1646,10 +1656,11 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1646 * If this is for hw restart things are still running. 1656 * If this is for hw restart things are still running.
1647 * We may want to change that later, however. 1657 * We may want to change that later, however.
1648 */ 1658 */
1649 if (!local->suspended) { 1659 if (!local->suspended || reconfig_due_to_wowlan)
1650 drv_restart_complete(local); 1660 drv_restart_complete(local);
1661
1662 if (!local->suspended)
1651 return 0; 1663 return 0;
1652 }
1653 1664
1654#ifdef CONFIG_PM 1665#ifdef CONFIG_PM
1655 /* first set suspended false, then resuming */ 1666 /* first set suspended false, then resuming */
@@ -1864,7 +1875,7 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1864} 1875}
1865 1876
1866u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, 1877u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap,
1867 u32 cap) 1878 u32 cap)
1868{ 1879{
1869 __le32 tmp; 1880 __le32 tmp;
1870 1881