Module Name: src
Committed By: roy
Date: Wed Jan 29 11:31:40 UTC 2020
Modified Files:
src/external/bsd/wpa/dist/src/drivers: driver_bsd.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/external/bsd/wpa/dist/src/drivers/driver_bsd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/wpa/dist/src/drivers/driver_bsd.c
diff -u src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.30 src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.31
--- src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.30 Wed Apr 10 17:48:07 2019
+++ src/external/bsd/wpa/dist/src/drivers/driver_bsd.c Wed Jan 29 11:31:40 2020
@@ -58,14 +58,13 @@ struct bsd_driver_global {
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 @@ bsd_wireless_event_receive(int sock, voi
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 @@ bsd_wireless_event_receive(int sock, voi
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 @@ static void
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 @@ bsd_init(struct hostapd_data *hapd, stru
goto bad;
}
- drv->hapd = hapd;
+ drv->ctx = hapd;
drv->global = params->global_priv;
os_strlcpy(drv->ifname, params->ifname, sizeof(drv->ifname));