The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=768dd32a164b35fb2f66fc8a0250cee84c79471e

commit 768dd32a164b35fb2f66fc8a0250cee84c79471e
Author:     Bjoern A. Zeeb <[email protected]>
AuthorDate: 2022-03-24 17:24:47 +0000
Commit:     Bjoern A. Zeeb <[email protected]>
CommitDate: 2022-03-24 17:24:47 +0000

    LinuxKPI: 802.11: check IEEE80211_FEXT_SCAN_OFFLOAD on vap
    
    When checking for IEEE80211_FEXT_SCAN_OFFLOAD, do so on the vap rather
    than ic.  This brings us in line with what net80211 does.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c 
b/sys/compat/linuxkpi/common/src/linux_80211.c
index fe4157212106..e1e2bbe02a03 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -2433,7 +2433,7 @@ lkpi_ic_scan_start(struct ieee80211com *ic)
        }
 
        hw = LHW_TO_HW(lhw);
-       if ((ic->ic_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) == 0) {
+       if ((vap->iv_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) == 0) {
 sw_scan:
                lvif = VAP_TO_LVIF(vap);
                vif = LVIF_TO_VIF(lvif);
@@ -2566,24 +2566,24 @@ static void
 lkpi_ic_scan_end(struct ieee80211com *ic)
 {
        struct lkpi_hw *lhw;
+       struct ieee80211_scan_state *ss;
+       struct ieee80211vap *vap;
 
        lhw = ic->ic_softc;
        if ((lhw->scan_flags & LKPI_SCAN_RUNNING) == 0) {
                return;
        }
 
-       if (ic->ic_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) {
+       ss = ic->ic_scan;
+       vap = ss->ss_vap;
+       if (vap->iv_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) {
                /* Nothing to do. */
        } else {
                struct ieee80211_hw *hw;
                struct lkpi_vif *lvif;
                struct ieee80211_vif *vif;
-               struct ieee80211_scan_state *ss;
-               struct ieee80211vap *vap;
 
                hw = LHW_TO_HW(lhw);
-               ss = ic->ic_scan;
-               vap = ss->ss_vap;
                lvif = VAP_TO_LVIF(vap);
                vif = LVIF_TO_VIF(lvif);
                lkpi_80211_mo_sw_scan_complete(hw, vif);

Reply via email to