Update to new version 0.8.16 from BRCM
Sync with main tree commit b8349523e460493fa0b4de36c689595109e45e91
Author: Neeraj Kumar Garg <neerajkg@broadcom.com>
Date: Tue Dec 27 23:21:45 2011 +0200
P2P: Reject p2p_group_add if forced frequency is not acceptable
Change-Id: Icb4541a371b05c270e80440d7a7fdea7f33ff61e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/wpa_supplicant/bgscan_learn.c b/wpa_supplicant/bgscan_learn.c
index ee79511..5385cce 100644
--- a/wpa_supplicant/bgscan_learn.c
+++ b/wpa_supplicant/bgscan_learn.c
@@ -355,20 +355,19 @@
static int * bgscan_learn_get_supp_freqs(struct wpa_supplicant *wpa_s)
{
struct hostapd_hw_modes *modes;
- u16 num_modes, flags;
int i, j, *freqs = NULL, *n;
size_t count = 0;
- modes = wpa_drv_get_hw_feature_data(wpa_s, &num_modes, &flags);
- if (!modes)
+ modes = wpa_s->hw.modes;
+ if (modes == NULL)
return NULL;
- for (i = 0; i < num_modes; i++) {
+ for (i = 0; i < wpa_s->hw.num_modes; i++) {
for (j = 0; j < modes[i].num_channels; j++) {
if (modes[i].channels[j].flag & HOSTAPD_CHAN_DISABLED)
continue;
n = os_realloc(freqs, (count + 2) * sizeof(int));
- if (!n)
+ if (n == NULL)
continue;
freqs = n;
@@ -376,10 +375,7 @@
count++;
freqs[count] = 0;
}
- os_free(modes[i].channels);
- os_free(modes[i].rates);
}
- os_free(modes);
return freqs;
}