diff options
| author | Jouni Malinen <jouni@qca.qualcomm.com> | 2015-07-30 19:10:46 +0000 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-04-01 16:54:55 +0530 |
| commit | f9262effc055345f900cb2d4c900160e2f0781a6 (patch) | |
| tree | dc4e6d06816dff9493a301e6f546941888ab0616 | |
| parent | 4da65ec36d864b1dcc6d204e810f8b34a5e5e40c (diff) | |
| download | android_external_wpa_supplicant_8-f9262effc055345f900cb2d4c900160e2f0781a6.tar.gz android_external_wpa_supplicant_8-f9262effc055345f900cb2d4c900160e2f0781a6.tar.bz2 android_external_wpa_supplicant_8-f9262effc055345f900cb2d4c900160e2f0781a6.zip | |
Return error from wpa_drv_get_pref_freq_list() if no driver support
Commit 983422088f0066068fd364013623d1e475031e6b ('nl80211: Add means to
query preferred channels') return success if no driver wrapper callback
was provided for fetching the preferred channel list. That is
problematic since the *num argument is not updated and uninitialized
freq_list could end up getting used with arbitrary frequency values. Fix
this by returning error in case the values were not available due to
driver wrapper not implementing the function. This matches the style
used in the driver_nl80211.c implementation for the case where the
driver does not support such fetch operation.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 34c5267bbc3093fab170e4c843a10c2c70ed27c2
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: Ida7c6bffffd7052e1c86dfb9c2be353f15ce26f2
CRs-fixed: 842468
| -rw-r--r-- | wpa_supplicant/driver_i.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h index c417cdd4..c739c720 100644 --- a/wpa_supplicant/driver_i.h +++ b/wpa_supplicant/driver_i.h @@ -906,7 +906,7 @@ static inline int wpa_drv_get_pref_freq_list(struct wpa_supplicant *wpa_s, unsigned int *freq_list) { if (!wpa_s->driver->get_pref_freq_list) - return 0; + return -1; return wpa_s->driver->get_pref_freq_list(wpa_s->drv_priv, if_type, num, freq_list); } |
