[PATCH 11/13] drivers: move driver_wired_get_ssid to a common file

Sabrina Dubroca sd at queasysnail.net
Sun Nov 27 11:08:54 PST 2016


Signed-off-by: Sabrina Dubroca <sd at queasysnail.net>
---
 src/drivers/driver_macsec_qca.c   | 9 +--------
 src/drivers/driver_wired.c        | 9 +--------
 src/drivers/driver_wired_common.c | 6 ++++++
 src/drivers/driver_wired_common.h | 1 +
 4 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/src/drivers/driver_macsec_qca.c b/src/drivers/driver_macsec_qca.c
index ce93af049f17..c983d50bea7b 100644
--- a/src/drivers/driver_macsec_qca.c
+++ b/src/drivers/driver_macsec_qca.c
@@ -76,13 +76,6 @@ struct macsec_qca_data {
 };
 
 
-static int macsec_qca_get_ssid(void *priv, u8 *ssid)
-{
-	ssid[0] = 0;
-	return 0;
-}
-
-
 static void __macsec_drv_init(struct macsec_qca_data *drv)
 {
 	int ret = 0;
@@ -740,7 +733,7 @@ static int macsec_qca_disable_transmit_sa(void *priv, struct transmit_sa *sa)
 const struct wpa_driver_ops wpa_driver_macsec_qca_ops = {
 	.name = "macsec_qca",
 	.desc = "QCA MACsec Ethernet driver",
-	.get_ssid = macsec_qca_get_ssid,
+	.get_ssid = driver_wired_get_ssid,
 	.get_bssid = driver_wired_get_bssid,
 	.get_capa = driver_wired_get_capa,
 	.init = macsec_qca_init,
diff --git a/src/drivers/driver_wired.c b/src/drivers/driver_wired.c
index ba7829a9f367..6d088f720cf8 100644
--- a/src/drivers/driver_wired.c
+++ b/src/drivers/driver_wired.c
@@ -365,13 +365,6 @@ static void wired_driver_hapd_deinit(void *priv)
 }
 
 
-static int wpa_driver_wired_get_ssid(void *priv, u8 *ssid)
-{
-	ssid[0] = 0;
-	return 0;
-}
-
-
 static void * wpa_driver_wired_init(void *ctx, const char *ifname)
 {
 	struct wpa_driver_wired_data *drv;
@@ -404,7 +397,7 @@ const struct wpa_driver_ops wpa_driver_wired_ops = {
 	.hapd_init = wired_driver_hapd_init,
 	.hapd_deinit = wired_driver_hapd_deinit,
 	.hapd_send_eapol = wired_send_eapol,
-	.get_ssid = wpa_driver_wired_get_ssid,
+	.get_ssid = driver_wired_get_ssid,
 	.get_bssid = driver_wired_get_bssid,
 	.get_capa = driver_wired_get_capa,
 	.init = wpa_driver_wired_init,
diff --git a/src/drivers/driver_wired_common.c b/src/drivers/driver_wired_common.c
index 3032dd597831..f9b7637d6d2a 100644
--- a/src/drivers/driver_wired_common.c
+++ b/src/drivers/driver_wired_common.c
@@ -158,6 +158,12 @@ int wired_multicast_membership(int sock, int ifindex, const u8 *addr, int add)
 #endif /* __linux__ */
 }
 
+int driver_wired_get_ssid(void *priv, u8 *ssid)
+{
+	ssid[0] = 0;
+	return 0;
+}
+
 int driver_wired_get_bssid(void *priv, u8 *bssid)
 {
 	/* Report PAE group address as the "BSSID" for wired connection. */
diff --git a/src/drivers/driver_wired_common.h b/src/drivers/driver_wired_common.h
index 265a1c582a94..e6723969ae65 100644
--- a/src/drivers/driver_wired_common.h
+++ b/src/drivers/driver_wired_common.h
@@ -26,6 +26,7 @@ int driver_wired_get_ifflags(const char *ifname, int *flags);
 int driver_wired_set_ifflags(const char *ifname, int flags);
 int driver_wired_multi(const char *ifname, const u8 *addr, int add);
 int wired_multicast_membership(int sock, int ifindex, const u8 *addr, int add);
+int driver_wired_get_ssid(void *priv, u8 *ssid);
 int driver_wired_get_bssid(void *priv, u8 *bssid);
 int driver_wired_get_capa(void *priv, struct wpa_driver_capa *capa);
 
-- 
2.10.2




More information about the Hostap mailing list