|
|
6c9f0c |
From 8618313b6ef1c40002836ffc56d70466ea80d44e Mon Sep 17 00:00:00 2001
|
|
|
6c9f0c |
Message-Id: <8618313b6ef1c40002836ffc56d70466ea80d44e.1488376602.git.dcaratti@redhat.com>
|
|
|
6c9f0c |
From: Sabrina Dubroca <sd@queasysnail.net>
|
|
|
6c9f0c |
Date: Sun, 27 Nov 2016 20:08:54 +0100
|
|
|
6c9f0c |
Subject: [PATCH] drivers: Move driver_wired_get_ssid() to a common file
|
|
|
6c9f0c |
|
|
|
6c9f0c |
This continues refactoring of the common parts of wired drivers code
|
|
|
6c9f0c |
into a shared file, so that they can be reused by other drivers.
|
|
|
6c9f0c |
|
|
|
6c9f0c |
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
|
|
|
6c9f0c |
---
|
|
|
6c9f0c |
src/drivers/driver_macsec_qca.c | 9 +--------
|
|
|
6c9f0c |
src/drivers/driver_wired.c | 9 +--------
|
|
|
6c9f0c |
src/drivers/driver_wired_common.c | 7 +++++++
|
|
|
6c9f0c |
src/drivers/driver_wired_common.h | 1 +
|
|
|
6c9f0c |
4 files changed, 10 insertions(+), 16 deletions(-)
|
|
|
6c9f0c |
|
|
|
6c9f0c |
diff --git a/src/drivers/driver_macsec_qca.c b/src/drivers/driver_macsec_qca.c
|
|
|
6c9f0c |
index 4bbc59f..d3be19c 100644
|
|
|
6c9f0c |
--- a/src/drivers/driver_macsec_qca.c
|
|
|
6c9f0c |
+++ b/src/drivers/driver_macsec_qca.c
|
|
|
6c9f0c |
@@ -76,13 +76,6 @@ struct macsec_qca_data {
|
|
|
6c9f0c |
};
|
|
|
6c9f0c |
|
|
|
6c9f0c |
|
|
|
6c9f0c |
-static int macsec_qca_get_ssid(void *priv, u8 *ssid)
|
|
|
6c9f0c |
-{
|
|
|
6c9f0c |
- ssid[0] = 0;
|
|
|
6c9f0c |
- return 0;
|
|
|
6c9f0c |
-}
|
|
|
6c9f0c |
-
|
|
|
6c9f0c |
-
|
|
|
6c9f0c |
static void __macsec_drv_init(struct macsec_qca_data *drv)
|
|
|
6c9f0c |
{
|
|
|
6c9f0c |
int ret = 0;
|
|
|
6c9f0c |
@@ -740,7 +733,7 @@ static int macsec_qca_disable_transmit_sa(void *priv, struct transmit_sa *sa)
|
|
|
6c9f0c |
const struct wpa_driver_ops wpa_driver_macsec_qca_ops = {
|
|
|
6c9f0c |
.name = "macsec_qca",
|
|
|
6c9f0c |
.desc = "QCA MACsec Ethernet driver",
|
|
|
6c9f0c |
- .get_ssid = macsec_qca_get_ssid,
|
|
|
6c9f0c |
+ .get_ssid = driver_wired_get_ssid,
|
|
|
6c9f0c |
.get_bssid = driver_wired_get_bssid,
|
|
|
6c9f0c |
.get_capa = driver_wired_get_capa,
|
|
|
6c9f0c |
.init = macsec_qca_init,
|
|
|
6c9f0c |
diff --git a/src/drivers/driver_wired.c b/src/drivers/driver_wired.c
|
|
|
6c9f0c |
index ad34627..7e09dcf 100644
|
|
|
6c9f0c |
--- a/src/drivers/driver_wired.c
|
|
|
6c9f0c |
+++ b/src/drivers/driver_wired.c
|
|
|
6c9f0c |
@@ -367,13 +367,6 @@ static void wired_driver_hapd_deinit(void *priv)
|
|
|
6c9f0c |
}
|
|
|
6c9f0c |
|
|
|
6c9f0c |
|
|
|
6c9f0c |
-static int wpa_driver_wired_get_ssid(void *priv, u8 *ssid)
|
|
|
6c9f0c |
-{
|
|
|
6c9f0c |
- ssid[0] = 0;
|
|
|
6c9f0c |
- return 0;
|
|
|
6c9f0c |
-}
|
|
|
6c9f0c |
-
|
|
|
6c9f0c |
-
|
|
|
6c9f0c |
static void * wpa_driver_wired_init(void *ctx, const char *ifname)
|
|
|
6c9f0c |
{
|
|
|
6c9f0c |
struct wpa_driver_wired_data *drv;
|
|
|
6c9f0c |
@@ -406,7 +399,7 @@ const struct wpa_driver_ops wpa_driver_wired_ops = {
|
|
|
6c9f0c |
.hapd_init = wired_driver_hapd_init,
|
|
|
6c9f0c |
.hapd_deinit = wired_driver_hapd_deinit,
|
|
|
6c9f0c |
.hapd_send_eapol = wired_send_eapol,
|
|
|
6c9f0c |
- .get_ssid = wpa_driver_wired_get_ssid,
|
|
|
6c9f0c |
+ .get_ssid = driver_wired_get_ssid,
|
|
|
6c9f0c |
.get_bssid = driver_wired_get_bssid,
|
|
|
6c9f0c |
.get_capa = driver_wired_get_capa,
|
|
|
6c9f0c |
.init = wpa_driver_wired_init,
|
|
|
6c9f0c |
diff --git a/src/drivers/driver_wired_common.c b/src/drivers/driver_wired_common.c
|
|
|
6c9f0c |
index d30d3a4..2e169d7 100644
|
|
|
6c9f0c |
--- a/src/drivers/driver_wired_common.c
|
|
|
6c9f0c |
+++ b/src/drivers/driver_wired_common.c
|
|
|
6c9f0c |
@@ -164,6 +164,13 @@ int wired_multicast_membership(int sock, int ifindex, const u8 *addr, int add)
|
|
|
6c9f0c |
}
|
|
|
6c9f0c |
|
|
|
6c9f0c |
|
|
|
6c9f0c |
+int driver_wired_get_ssid(void *priv, u8 *ssid)
|
|
|
6c9f0c |
+{
|
|
|
6c9f0c |
+ ssid[0] = 0;
|
|
|
6c9f0c |
+ return 0;
|
|
|
6c9f0c |
+}
|
|
|
6c9f0c |
+
|
|
|
6c9f0c |
+
|
|
|
6c9f0c |
int driver_wired_get_bssid(void *priv, u8 *bssid)
|
|
|
6c9f0c |
{
|
|
|
6c9f0c |
/* Report PAE group address as the "BSSID" for wired connection. */
|
|
|
6c9f0c |
diff --git a/src/drivers/driver_wired_common.h b/src/drivers/driver_wired_common.h
|
|
|
6c9f0c |
index 493987a..7e1a4ae 100644
|
|
|
6c9f0c |
--- a/src/drivers/driver_wired_common.h
|
|
|
6c9f0c |
+++ b/src/drivers/driver_wired_common.h
|
|
|
6c9f0c |
@@ -26,6 +26,7 @@ int driver_wired_get_ifflags(const char *ifname, int *flags);
|
|
|
6c9f0c |
int driver_wired_set_ifflags(const char *ifname, int flags);
|
|
|
6c9f0c |
int driver_wired_multi(const char *ifname, const u8 *addr, int add);
|
|
|
6c9f0c |
int wired_multicast_membership(int sock, int ifindex, const u8 *addr, int add);
|
|
|
6c9f0c |
+int driver_wired_get_ssid(void *priv, u8 *ssid);
|
|
|
6c9f0c |
int driver_wired_get_bssid(void *priv, u8 *bssid);
|
|
|
6c9f0c |
int driver_wired_get_capa(void *priv, struct wpa_driver_capa *capa);
|
|
|
6c9f0c |
int driver_wired_get_ifstatus(const char *ifname, int *status);
|
|
|
6c9f0c |
--
|
|
|
6c9f0c |
2.7.4
|
|
|
6c9f0c |
|