Author: adrian Date: Thu Jun 23 00:56:54 2016 New Revision: 302101 URL: https://svnweb.freebsd.org/changeset/base/302101
Log: [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 <i...@vdsz.com> Reviewed by: avos Approved by: re (gjb) Obtained from: DragonflyBSD git 4aee7a78275676d22d14c04177bd0c9377d91478 Differential Revision: https://reviews.freebsd.org/D6743 Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c head/sys/dev/iwm/if_iwm_scan.c Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Thu Jun 23 00:54:14 2016 (r302100) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Thu Jun 23 00:56:54 2016 (r302101) @@ -275,7 +275,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s */ 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? Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Thu Jun 23 00:54:14 2016 (r302100) +++ head/sys/dev/iwm/if_iwm_scan.c Thu Jun 23 00:56:54 2016 (r302101) @@ -371,6 +371,8 @@ iwm_mvm_scan_request(struct iwm_softc *s .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 *s 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); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"