Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/pci Fix vap_setup to match iwm(4).
details: https://anonhg.NetBSD.org/src-all/rev/39bf9a8b93a4
branches: trunk
changeset: 376438:39bf9a8b93a4
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Sun Jun 18 15:10:47 2023 +1000
description:
Fix vap_setup to match iwm(4).
if_start functions have to be set as they are used in ieee80211_transmit.
It is now possible to connect to wifi with wpa_supplicant, though performance
is dismal and it only seems to connect to 11n APs.
diffstat:
sys/dev/pci/if_iwn.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 84a43830b3a9 -r 39bf9a8b93a4 sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Sun Jun 18 15:07:55 2023 +1000
+++ b/sys/dev/pci/if_iwn.c Sun Jun 18 15:10:47 2023 +1000
@@ -775,7 +775,6 @@ iwn_config_complete(device_t self)
iwn_get_radiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans,
ic->ic_channels);
- //ifp->if_percpuq = if_percpuq_create(ifp);
ieee80211_ifattach(ic);
ic->ic_vap_create = iwn_vap_create;
@@ -1015,17 +1014,22 @@ iwn_vap_create(struct ieee80211com *ic,
/* Local setup */
vap->vap.iv_reset = iwn_reset;
- /* Finish setup */
- ieee80211_vap_attach(&vap->vap, iwn_media_change,
- ieee80211_media_status, macaddr);
+ /* Use common softint-based if_input */
+ vap->vap.iv_ifp->if_percpuq = if_percpuq_create(vap->vap.iv_ifp);
/* Override state transition machine. */
/* NNN --- many possible newstate machines ... issue! */
vap->newstate = vap->vap.iv_newstate;
vap->vap.iv_newstate = iwn_newstate;
+ vap->vap.iv_ifp->if_start = iwn_start;
+ vap->vap.iv_ifp->if_extflags |= IFEF_MPSAFE;
ic->ic_opmode = opmode;
+ /* Finish setup */
+ ieee80211_vap_attach(&vap->vap, iwn_media_change,
+ ieee80211_media_status, macaddr);
+
return &vap->vap;
}
Home |
Main Index |
Thread Index |
Old Index