diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 9926455dd546..9348caf1c611 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1548,8 +1548,10 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
1548 | } | 1548 | } |
1549 | 1549 | ||
1550 | if (sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN && | 1550 | if (sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN && |
1551 | sta->sdata->u.vlan.sta) | 1551 | sta->sdata->u.vlan.sta) { |
1552 | ieee80211_clear_fast_rx(sta); | ||
1552 | RCU_INIT_POINTER(sta->sdata->u.vlan.sta, NULL); | 1553 | RCU_INIT_POINTER(sta->sdata->u.vlan.sta, NULL); |
1554 | } | ||
1553 | 1555 | ||
1554 | if (test_sta_flag(sta, WLAN_STA_AUTHORIZED)) | 1556 | if (test_sta_flag(sta, WLAN_STA_AUTHORIZED)) |
1555 | ieee80211_vif_dec_num_mcast(sta->sdata); | 1557 | ieee80211_vif_dec_num_mcast(sta->sdata); |
@@ -1821,13 +1823,11 @@ static int copy_mesh_setup(struct ieee80211_if_mesh *ifmsh, | |||
1821 | const struct mesh_setup *setup) | 1823 | const struct mesh_setup *setup) |
1822 | { | 1824 | { |
1823 | u8 *new_ie; | 1825 | u8 *new_ie; |
1824 | const u8 *old_ie; | ||
1825 | struct ieee80211_sub_if_data *sdata = container_of(ifmsh, | 1826 | struct ieee80211_sub_if_data *sdata = container_of(ifmsh, |
1826 | struct ieee80211_sub_if_data, u.mesh); | 1827 | struct ieee80211_sub_if_data, u.mesh); |
1827 | 1828 | ||
1828 | /* allocate information elements */ | 1829 | /* allocate information elements */ |
1829 | new_ie = NULL; | 1830 | new_ie = NULL; |
1830 | old_ie = ifmsh->ie; | ||
1831 | 1831 | ||
1832 | if (setup->ie_len) { | 1832 | if (setup->ie_len) { |
1833 | new_ie = kmemdup(setup->ie, setup->ie_len, | 1833 | new_ie = kmemdup(setup->ie, setup->ie_len, |
@@ -1837,7 +1837,6 @@ static int copy_mesh_setup(struct ieee80211_if_mesh *ifmsh, | |||
1837 | } | 1837 | } |
1838 | ifmsh->ie_len = setup->ie_len; | 1838 | ifmsh->ie_len = setup->ie_len; |
1839 | ifmsh->ie = new_ie; | 1839 | ifmsh->ie = new_ie; |
1840 | kfree(old_ie); | ||
1841 | 1840 | ||
1842 | /* now copy the rest of the setup parameters */ | 1841 | /* now copy the rest of the setup parameters */ |
1843 | ifmsh->mesh_id_len = setup->mesh_id_len; | 1842 | ifmsh->mesh_id_len = setup->mesh_id_len; |
@@ -2777,14 +2776,14 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, | |||
2777 | continue; | 2776 | continue; |
2778 | 2777 | ||
2779 | for (j = 0; j < IEEE80211_HT_MCS_MASK_LEN; j++) { | 2778 | for (j = 0; j < IEEE80211_HT_MCS_MASK_LEN; j++) { |
2780 | if (~sdata->rc_rateidx_mcs_mask[i][j]) { | 2779 | if (sdata->rc_rateidx_mcs_mask[i][j] != 0xff) { |
2781 | sdata->rc_has_mcs_mask[i] = true; | 2780 | sdata->rc_has_mcs_mask[i] = true; |
2782 | break; | 2781 | break; |
2783 | } | 2782 | } |
2784 | } | 2783 | } |
2785 | 2784 | ||
2786 | for (j = 0; j < NL80211_VHT_NSS_MAX; j++) { | 2785 | for (j = 0; j < NL80211_VHT_NSS_MAX; j++) { |
2787 | if (~sdata->rc_rateidx_vht_mcs_mask[i][j]) { | 2786 | if (sdata->rc_rateidx_vht_mcs_mask[i][j] != 0xffff) { |
2788 | sdata->rc_has_vht_mcs_mask[i] = true; | 2787 | sdata->rc_has_vht_mcs_mask[i] = true; |
2789 | break; | 2788 | break; |
2790 | } | 2789 | } |