diff mbox

[2/2] Android: Fix nl80211 build if BOARD_*_PRIVATE_LIB is unspecified

Message ID 1434759750-17647-2-git-send-email-cernekee@chromium.org
State Accepted
Headers show

Commit Message

Kevin Cernekee June 20, 2015, 12:22 a.m. UTC
From: Kevin Cernekee <cernekee@google.com>

wpa_supplicant has stub functions if the external p2p symbols are
unavailable, but the build still fails if the
wpa_driver_nl80211_driver_cmd symbol is missing.  Fix this by leaving the
function pointer NULL.  This is safe because wpa_drv_driver_cmd() performs
a NULL check.

Signed-off-by: Kevin Cernekee <cernekee@google.com>
---
 src/drivers/driver_nl80211.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 02aa6d3a0c45..c08d99651ac3 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -8510,7 +8510,9 @@  const struct wpa_driver_ops wpa_driver_nl80211_ops = {
 	.set_ap_wps_ie = wpa_driver_set_ap_wps_p2p_ie,
 #endif /* ANDROID_P2P */
 #ifdef ANDROID
+#ifndef ANDROID_LIB_STUB
 	.driver_cmd = wpa_driver_nl80211_driver_cmd,
+#endif /* !ANDROID_LIB_STUB */
 #endif /* ANDROID */
 	.vendor_cmd = nl80211_vendor_cmd,
 	.set_qos_map = nl80211_set_qos_map,