Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jun 2015 21:55:32 +0200
From:      Oliver Pinter <oliver.pinter@hardenedbsd.org>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        Lev Serebryakov <lev@freebsd.org>, Oliver Pinter <oliver.pntr@gmail.com>,  Adrian Chadd <adrian@freebsd.org>, current@freebsd.org
Subject:   Re: converted ath(4) for testing Was: [Testers needed!] WiFi drivers changes
Message-ID:  <CAPQ4ffsedr2AfuEooOd7%2BZVNZUAHApkK38Ws9zh_GN0quekMQA@mail.gmail.com>
In-Reply-To: <CAPQ4ffupHTqDtfnJUysxyisCP4CUXGrmHMnazLaYMa_r4dJPJg@mail.gmail.com>
References:  <20150529151405.GA8509@ns.kevlo.org> <55686E8F.3030400@FreeBSD.org> <20150601153717.GX73119@FreeBSD.org> <CAPQ4ffupHTqDtfnJUysxyisCP4CUXGrmHMnazLaYMa_r4dJPJg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 1, 2015 at 9:47 PM, Oliver Pinter
<oliver.pinter@hardenedbsd.org> wrote:
> On Mon, Jun 1, 2015 at 5:37 PM, Gleb Smirnoff <glebius@freebsd.org> wrote:
>>   Hi!
>>
>> I've converted the ath(4), probably the most complex ieee80211 driver.
>>
>> The updated diff is uploaded to https://reviews.freebsd.org/D2655.
>>
>> Pretty sure it will panic or fail on first try :) Nevertheless,
>> asking for your help. Please try to run it and report any problems
>> to me.
>
> Hi!
>
> Do you have compile tested the code? I got this build error:
>
> --- if_ath.o ---
> /usr/src/sys/dev/ath/if_ath.c:5732:26: error: no member named 'ic_ifp'
> in 'struct ieee80211com'; did you mean 'ic_dfs'?
>         struct ifnet *ifp = ic->ic_ifp;
>                                 ^~~~~~
>                                 ic_dfs
> /usr/src/sys/net80211/ieee80211_var.h:197:29: note: 'ic_dfs' declared here
>         struct ieee80211_dfs_state ic_dfs;      /* DFS state */
>                                    ^
> /usr/src/sys/dev/ath/if_ath.c:5732:16: error: initializing 'struct
> ifnet *' with an expression of incompatible type 'struct
> ieee80211_dfs_state'
>         struct ifnet *ifp = ic->ic_ifp;
>                       ^
>

diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 53763a6..b719ed4 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -5729,8 +5729,7 @@ ath_scan_end(struct ieee80211com *ic)
 static void
 ath_update_chw(struct ieee80211com *ic)
 {
-       struct ifnet *ifp = ic->ic_ifp;
-       struct ath_softc *sc = ifp->if_softc;
+       struct ath_softc *sc = ic->ic_softc;

        DPRINTF(sc, ATH_DEBUG_STATE, "%s: called\n", __func__);
        ath_set_channel(ic);
diff --git a/sys/dev/ath/if_ath_tdma.c b/sys/dev/ath/if_ath_tdma.c
index fd23db1..d4c9ccd 100644
--- a/sys/dev/ath/if_ath_tdma.c
+++ b/sys/dev/ath/if_ath_tdma.c
@@ -359,7 +359,7 @@ ath_tdma_update(struct ieee80211_node *ni,
 #define        TU_TO_TSF(_tu)  (((u_int64_t)(_tu)) << 10)
        struct ieee80211vap *vap = ni->ni_vap;
        struct ieee80211com *ic = ni->ni_ic;
-       struct ath_softc *sc = ic->ic_ifp->if_softc;
+       struct ath_softc *sc = ic->ic_softc;
        struct ath_hal *ah = sc->sc_ah;
        const HAL_RATE_TABLE *rt = sc->sc_currates;
        u_int64_t tsf, rstamp, nextslot, nexttbtt, nexttbtt_full;

>>
>> --
>> Totus tuus, Glebius.
>> _______________________________________________
>> freebsd-current@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4ffsedr2AfuEooOd7%2BZVNZUAHApkK38Ws9zh_GN0quekMQA>