[iwm] Use vap->iv_myaddr instead of ic->ic_macaddr when vap != NULL.
ic_macaddr is only used for the initial mac address provided by NVM. We should rather use vap->iv_myaddr when vap != NULL, to allow the MAC address to be changed later with ifconfig(8). Submitted by: Imre Vadasz <imre@vdsz.com> Reviewed by: avos Approved by: re (gjb) Obtained from: DragonflyBSD git 4aee7a78275676d22d14c04177bd0c9377d91478 Differential Revision: https://reviews.freebsd.org/D6743
This commit is contained in:
parent
359eeea70b
commit
bc6cd01d38
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=302101
@ -275,7 +275,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
|
||||
*/
|
||||
cmd->tsf_id = htole32(IWM_DEFAULT_TSFID);
|
||||
|
||||
IEEE80211_ADDR_COPY(cmd->node_addr, ic->ic_macaddr);
|
||||
IEEE80211_ADDR_COPY(cmd->node_addr, vap->iv_myaddr);
|
||||
|
||||
/*
|
||||
* XXX should we error out if in_assoc is 1 and ni == NULL?
|
||||
|
@ -371,6 +371,8 @@ iwm_mvm_scan_request(struct iwm_softc *sc, int flags,
|
||||
.dataflags = { IWM_HCMD_DFL_NOCOPY, },
|
||||
};
|
||||
struct iwm_scan_cmd *cmd = sc->sc_scan_cmd;
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
|
||||
int is_assoc = 0;
|
||||
int ret;
|
||||
uint32_t status;
|
||||
@ -421,8 +423,9 @@ iwm_mvm_scan_request(struct iwm_softc *sc, int flags,
|
||||
|
||||
cmd->tx_cmd.len = htole16(iwm_mvm_fill_probe_req(sc,
|
||||
(struct ieee80211_frame *)cmd->data,
|
||||
sc->sc_ic.ic_macaddr, n_ssids, ssid, ssid_len,
|
||||
NULL, 0, sc->sc_capa_max_probe_len));
|
||||
vap ? vap->iv_myaddr : ic->ic_macaddr, n_ssids,
|
||||
ssid, ssid_len, NULL, 0,
|
||||
sc->sc_capa_max_probe_len));
|
||||
|
||||
cmd->channel_count
|
||||
= iwm_mvm_scan_fill_channels(sc, cmd, flags, n_ssids, basic_ssid);
|
||||
|
Loading…
Reference in New Issue
Block a user