[PATCH] ap: Fix return value in hostapd_drv_switch_channel()

Andrei Otcheretianski andrei.otcheretianski at intel.com
Thu Jun 8 01:17:54 PDT 2017


From: Ilan Peer <ilan.peer at intel.com>

The documentation in driver.h state that in case of an error
-1 is returned.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 src/ap/ap_drv_ops.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
index b598015..bf8169d 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -276,7 +276,7 @@ static inline int hostapd_drv_switch_channel(struct hostapd_data *hapd,
 {
 	if (hapd->driver == NULL || hapd->driver->switch_channel == NULL ||
 	    hapd->drv_priv == NULL)
-		return -ENOTSUP;
+		return -1;
 
 	return hapd->driver->switch_channel(hapd->drv_priv, settings);
 }
-- 
1.9.1




More information about the Hostap mailing list