diff options
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r-- | net/wireless/scan.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index ad1a1a2808d3..620a4b40d466 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -884,6 +884,7 @@ struct cfg80211_bss* | |||
884 | cfg80211_inform_bss_width(struct wiphy *wiphy, | 884 | cfg80211_inform_bss_width(struct wiphy *wiphy, |
885 | struct ieee80211_channel *rx_channel, | 885 | struct ieee80211_channel *rx_channel, |
886 | enum nl80211_bss_scan_width scan_width, | 886 | enum nl80211_bss_scan_width scan_width, |
887 | enum cfg80211_bss_frame_type ftype, | ||
887 | const u8 *bssid, u64 tsf, u16 capability, | 888 | const u8 *bssid, u64 tsf, u16 capability, |
888 | u16 beacon_interval, const u8 *ie, size_t ielen, | 889 | u16 beacon_interval, const u8 *ie, size_t ielen, |
889 | s32 signal, gfp_t gfp) | 890 | s32 signal, gfp_t gfp) |
@@ -911,7 +912,7 @@ cfg80211_inform_bss_width(struct wiphy *wiphy, | |||
911 | tmp.pub.beacon_interval = beacon_interval; | 912 | tmp.pub.beacon_interval = beacon_interval; |
912 | tmp.pub.capability = capability; | 913 | tmp.pub.capability = capability; |
913 | /* | 914 | /* |
914 | * Since we do not know here whether the IEs are from a Beacon or Probe | 915 | * If we do not know here whether the IEs are from a Beacon or Probe |
915 | * Response frame, we need to pick one of the options and only use it | 916 | * Response frame, we need to pick one of the options and only use it |
916 | * with the driver that does not provide the full Beacon/Probe Response | 917 | * with the driver that does not provide the full Beacon/Probe Response |
917 | * frame. Use Beacon frame pointer to avoid indicating that this should | 918 | * frame. Use Beacon frame pointer to avoid indicating that this should |
@@ -926,7 +927,17 @@ cfg80211_inform_bss_width(struct wiphy *wiphy, | |||
926 | ies->from_beacon = false; | 927 | ies->from_beacon = false; |
927 | memcpy(ies->data, ie, ielen); | 928 | memcpy(ies->data, ie, ielen); |
928 | 929 | ||
929 | rcu_assign_pointer(tmp.pub.beacon_ies, ies); | 930 | switch (ftype) { |
931 | case CFG80211_BSS_FTYPE_BEACON: | ||
932 | ies->from_beacon = true; | ||
933 | /* fall through to assign */ | ||
934 | case CFG80211_BSS_FTYPE_UNKNOWN: | ||
935 | rcu_assign_pointer(tmp.pub.beacon_ies, ies); | ||
936 | break; | ||
937 | case CFG80211_BSS_FTYPE_PRESP: | ||
938 | rcu_assign_pointer(tmp.pub.proberesp_ies, ies); | ||
939 | break; | ||
940 | } | ||
930 | rcu_assign_pointer(tmp.pub.ies, ies); | 941 | rcu_assign_pointer(tmp.pub.ies, ies); |
931 | 942 | ||
932 | signal_valid = abs(rx_channel->center_freq - channel->center_freq) <= | 943 | signal_valid = abs(rx_channel->center_freq - channel->center_freq) <= |