drivers: Move driver_wired_get_ssid() to a common file

This continues refactoring of the common parts of wired drivers code
into a shared file, so that they can be reused by other drivers.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
This commit is contained in:
Sabrina Dubroca 2016-11-27 20:08:54 +01:00 committed by Jouni Malinen
parent d27c42baea
commit 8618313b6e
4 changed files with 10 additions and 16 deletions

View file

@ -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) static void __macsec_drv_init(struct macsec_qca_data *drv)
{ {
int ret = 0; 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 = { const struct wpa_driver_ops wpa_driver_macsec_qca_ops = {
.name = "macsec_qca", .name = "macsec_qca",
.desc = "QCA MACsec Ethernet driver", .desc = "QCA MACsec Ethernet driver",
.get_ssid = macsec_qca_get_ssid, .get_ssid = driver_wired_get_ssid,
.get_bssid = driver_wired_get_bssid, .get_bssid = driver_wired_get_bssid,
.get_capa = driver_wired_get_capa, .get_capa = driver_wired_get_capa,
.init = macsec_qca_init, .init = macsec_qca_init,

View file

@ -367,13 +367,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) static void * wpa_driver_wired_init(void *ctx, const char *ifname)
{ {
struct wpa_driver_wired_data *drv; struct wpa_driver_wired_data *drv;
@ -406,7 +399,7 @@ const struct wpa_driver_ops wpa_driver_wired_ops = {
.hapd_init = wired_driver_hapd_init, .hapd_init = wired_driver_hapd_init,
.hapd_deinit = wired_driver_hapd_deinit, .hapd_deinit = wired_driver_hapd_deinit,
.hapd_send_eapol = wired_send_eapol, .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_bssid = driver_wired_get_bssid,
.get_capa = driver_wired_get_capa, .get_capa = driver_wired_get_capa,
.init = wpa_driver_wired_init, .init = wpa_driver_wired_init,

View file

@ -164,6 +164,13 @@ int wired_multicast_membership(int sock, int ifindex, const u8 *addr, int add)
} }
int driver_wired_get_ssid(void *priv, u8 *ssid)
{
ssid[0] = 0;
return 0;
}
int driver_wired_get_bssid(void *priv, u8 *bssid) int driver_wired_get_bssid(void *priv, u8 *bssid)
{ {
/* Report PAE group address as the "BSSID" for wired connection. */ /* Report PAE group address as the "BSSID" for wired connection. */

View file

@ -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_set_ifflags(const char *ifname, int flags);
int driver_wired_multi(const char *ifname, const u8 *addr, int add); 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 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_bssid(void *priv, u8 *bssid);
int driver_wired_get_capa(void *priv, struct wpa_driver_capa *capa); int driver_wired_get_capa(void *priv, struct wpa_driver_capa *capa);
int driver_wired_get_ifstatus(const char *ifname, int *status); int driver_wired_get_ifstatus(const char *ifname, int *status);