Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/wpa/dist/src/drivers wpa: Driver does not need ...



details:   https://anonhg.NetBSD.org/src/rev/8547a3bbcfd5
branches:  trunk
changeset: 744304:8547a3bbcfd5
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Jan 29 11:31:40 2020 +0000

description:
wpa: Driver does not need to know about both wpa and hostap contexts

It will either be one or the other.
Fold hapd into ctx to match other drivers.

diffstat:

 external/bsd/wpa/dist/src/drivers/driver_bsd.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r cbbcb3c88692 -r 8547a3bbcfd5 external/bsd/wpa/dist/src/drivers/driver_bsd.c
--- a/external/bsd/wpa/dist/src/drivers/driver_bsd.c    Wed Jan 29 10:55:23 2020 +0000
+++ b/external/bsd/wpa/dist/src/drivers/driver_bsd.c    Wed Jan 29 11:31:40 2020 +0000
@@ -58,14 +58,13 @@
 struct bsd_driver_data {
        struct dl_list  list;
        struct bsd_driver_global *global;
-       struct hostapd_data *hapd;      /* back pointer */
+       void    *ctx;
 
        struct l2_packet_data *sock_xmit;/* raw packet xmit socket */
        char    ifname[IFNAMSIZ+1];     /* interface name */
        int     flags;
        unsigned int ifindex;           /* interface index */
        int     if_removed;             /* has the interface been removed? */
-       void    *ctx;
        struct wpa_driver_capa capa;    /* driver capability */
        int     is_ap;                  /* Access point mode */
        int     prev_roaming;   /* roaming state to restore on deinit */
@@ -843,14 +842,14 @@
                        break;
                case RTM_IEEE80211_LEAVE:
                        leave = (struct ieee80211_leave_event *) &ifan[1];
-                       drv_event_disassoc(drv->hapd, leave->iev_addr);
+                       drv_event_disassoc(drv->ctx, leave->iev_addr);
                        break;
                case RTM_IEEE80211_JOIN:
 #ifdef RTM_IEEE80211_REJOIN
                case RTM_IEEE80211_REJOIN:
 #endif
                        join = (struct ieee80211_join_event *) &ifan[1];
-                       bsd_new_sta(drv, drv->hapd, join->iev_addr);
+                       bsd_new_sta(drv, drv->ctx, join->iev_addr);
                        break;
                case RTM_IEEE80211_REPLAY:
                        /* ignore */
@@ -864,7 +863,7 @@
                        os_memset(&data, 0, sizeof(data));
                        data.michael_mic_failure.unicast = 1;
                        data.michael_mic_failure.src = mic->iev_src;
-                       wpa_supplicant_event(drv->hapd,
+                       wpa_supplicant_event(drv->ctx,
                                             EVENT_MICHAEL_MIC_FAILURE, &data);
                        break;
                }
@@ -876,7 +875,7 @@
 handle_read(void *ctx, const u8 *src_addr, const u8 *buf, size_t len)
 {
        struct bsd_driver_data *drv = ctx;
-       drv_event_eapol_rx(drv->hapd, src_addr, buf, len);
+       drv_event_eapol_rx(drv->ctx, src_addr, buf, len);
 }
 
 static void *
@@ -897,7 +896,7 @@
                goto bad;
        }
 
-       drv->hapd = hapd;
+       drv->ctx = hapd;
        drv->global = params->global_priv;
        os_strlcpy(drv->ifname, params->ifname, sizeof(drv->ifname));
 



Home | Main Index | Thread Index | Old Index