aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r--net/wireless/scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 0798c62e6085..ad1a1a2808d3 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -918,11 +918,12 @@ cfg80211_inform_bss_width(struct wiphy *wiphy,
918 * override the IEs pointer should we have received an earlier 918 * override the IEs pointer should we have received an earlier
919 * indication of Probe Response data. 919 * indication of Probe Response data.
920 */ 920 */
921 ies = kmalloc(sizeof(*ies) + ielen, gfp); 921 ies = kzalloc(sizeof(*ies) + ielen, gfp);
922 if (!ies) 922 if (!ies)
923 return NULL; 923 return NULL;
924 ies->len = ielen; 924 ies->len = ielen;
925 ies->tsf = tsf; 925 ies->tsf = tsf;
926 ies->from_beacon = false;
926 memcpy(ies->data, ie, ielen); 927 memcpy(ies->data, ie, ielen);
927 928
928 rcu_assign_pointer(tmp.pub.beacon_ies, ies); 929 rcu_assign_pointer(tmp.pub.beacon_ies, ies);
@@ -982,11 +983,12 @@ cfg80211_inform_bss_width_frame(struct wiphy *wiphy,
982 if (!channel) 983 if (!channel)
983 return NULL; 984 return NULL;
984 985
985 ies = kmalloc(sizeof(*ies) + ielen, gfp); 986 ies = kzalloc(sizeof(*ies) + ielen, gfp);
986 if (!ies) 987 if (!ies)
987 return NULL; 988 return NULL;
988 ies->len = ielen; 989 ies->len = ielen;
989 ies->tsf = le64_to_cpu(mgmt->u.probe_resp.timestamp); 990 ies->tsf = le64_to_cpu(mgmt->u.probe_resp.timestamp);
991 ies->from_beacon = ieee80211_is_beacon(mgmt->frame_control);
990 memcpy(ies->data, mgmt->u.probe_resp.variable, ielen); 992 memcpy(ies->data, mgmt->u.probe_resp.variable, ielen);
991 993
992 if (ieee80211_is_probe_resp(mgmt->frame_control)) 994 if (ieee80211_is_probe_resp(mgmt->frame_control))