aboutsummaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linuxkpi/common/include/net/mac80211.h2
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211.c14
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index 4320edc90eba..13ae7bb99376 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -215,7 +215,7 @@ struct mac80211_fils_discovery {
struct ieee80211_bss_conf {
/* TODO FIXME */
- uint8_t bssid[ETH_ALEN];
+ const uint8_t *bssid;
uint8_t transmitter_bssid[ETH_ALEN];
struct ieee80211_ftm_responder_params *ftmr_params;
struct ieee80211_p2p_noa_attr p2p_noa_attr;
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index a98ed56fcdad..4ec54400c166 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -115,6 +115,9 @@ SYSCTL_INT(_compat_linuxkpi_80211, OID_AUTO, debug, CTLFLAG_RWTUN,
#define PREP_TX_INFO_DURATION 0 /* Let the driver do its thing. */
#endif
+/* c.f. ieee80211_ioctl.c */
+static const uint8_t zerobssid[IEEE80211_ADDR_LEN];
+
/* This is DSAP | SSAP | CTRL | ProtoID/OrgCode{3}. */
const uint8_t rfc1042_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
@@ -996,7 +999,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
/* Set bss info (bss_info_changed). */
bss_changed = 0;
- IEEE80211_ADDR_COPY(vif->bss_conf.bssid, ni->ni_bssid);
+ vif->bss_conf.bssid = ni->ni_bssid;
bss_changed |= BSS_CHANGED_BSSID;
vif->bss_conf.txpower = ni->ni_txpower;
bss_changed |= BSS_CHANGED_TXPOWER;
@@ -2230,6 +2233,15 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
vif->bss_conf.ht_operation_mode = IEEE80211_HT_OP_MODE_PROTECTION_NONE;
vif->bss_conf.assoc = false;
vif->bss_conf.aid = 0;
+ /*
+ * We need to initialize it to something as the bss_info_changed call
+ * will try to copy from it in iwlwifi and NULL is a panic.
+ * We will set the proper one in scan_to_auth() before being assoc.
+ * NB: the logic there with using an array as bssid_override and checking
+ * for non-NULL later is flawed but in their workflow does not seem to
+ * matter.
+ */
+ vif->bss_conf.bssid = zerobssid;
#endif
#if 0
vif->bss_conf.dtim_period = 0; /* IEEE80211_DTIM_DEFAULT ; must stay 0. */