aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 428742d7f440..1b0b7aa387ee 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -675,30 +675,6 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
675 } 675 }
676} 676}
677 677
678static bool ieee80211_check_tim(struct ieee802_11_elems *elems, u16 aid)
679{
680 u8 mask;
681 u8 index, indexn1, indexn2;
682 struct ieee80211_tim_ie *tim = (struct ieee80211_tim_ie *) elems->tim;
683
684 if (unlikely(!tim || elems->tim_len < 4))
685 return false;
686
687 aid &= 0x3fff;
688 index = aid / 8;
689 mask = 1 << (aid & 7);
690
691 indexn1 = tim->bitmap_ctrl & 0xfe;
692 indexn2 = elems->tim_len + indexn1 - 4;
693
694 if (index < indexn1 || index > indexn2)
695 return false;
696
697 index -= indexn1;
698
699 return !!(tim->virtual_map[index] & mask);
700}
701
702static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, 678static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
703 u16 capab, bool erp_valid, u8 erp) 679 u16 capab, bool erp_valid, u8 erp)
704{ 680{
@@ -1806,7 +1782,8 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
1806 care_about_ies, ncrc); 1782 care_about_ies, ncrc);
1807 1783
1808 if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) 1784 if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
1809 directed_tim = ieee80211_check_tim(&elems, ifmgd->aid); 1785 directed_tim = ieee80211_check_tim(elems.tim, elems.tim_len,
1786 ifmgd->aid);
1810 1787
1811 ncrc = crc32_be(ncrc, (void *)&directed_tim, sizeof(directed_tim)); 1788 ncrc = crc32_be(ncrc, (void *)&directed_tim, sizeof(directed_tim));
1812 1789