Date: Fri, 25 Sep 2009 01:08:21 +0200 From: "Paul B. Mahol" <onemda@gmail.com> To: cokane@freebsd.org Cc: current@freebsd.org Subject: Re: Regression with ndis and rt2860 on 8.0-RC1 Message-ID: <3a142e750909241608j786b6029g83f2705922e6936f@mail.gmail.com> In-Reply-To: <3a142e750909240300m275f8025q2228a62ec9e41377@mail.gmail.com> References: <4AB913B3.1050709@borderworlds.dk> <3a142e750909230102tfee2bact6c165ee97da0c7eb@mail.gmail.com> <3a142e750909231500o6d875b1dj3b6cba12483a84b3@mail.gmail.com> <4ABB0CFC.4050105@borderworlds.dk> <4ABB146E.3050103@borderworlds.dk> <3a142e750909240251x6d06f733m2897f4cc7158a025@mail.gmail.com> <3a142e750909240300m275f8025q2228a62ec9e41377@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On 9/24/09, Paul B. Mahol <onemda@gmail.com> wrote:
> On 9/24/09, Paul B. Mahol <onemda@gmail.com> wrote:
>> On 9/24/09, Christian Laursen <xi@borderworlds.dk> wrote:
>>> Christian Laursen wrote:
>>>> Paul B. Mahol wrote:
>>>>> On 9/23/09, Paul B. Mahol <onemda@gmail.com> wrote:
>>>>>> On 9/22/09, Christian Laursen <xi@borderworlds.dk> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Some days ago I upgraded my Asus Eee 1000H from 7.2-RELEASE to
>>>>>>> 8.0-BETA4
>>>>>>> and then to 8.0-RC1 as of this morning.
>>>>>>>
>>>>>>> Since the Ralink Wireless NIC is not supported with a native driver
>>>>>>> I
>>>>>>> have been using ndis for a long time on 7.x without any issues.
>>>
>>> I just made a discovery.
>>>
>>> If I create a wlan device with wlandevice ndis0, I am able to associate
>>> and get traffic through the interface.
>>>
>>> I did get one warning though:
>>> wlan0: ieee80211_new_state_locked: pending SCAN -> RUN transition lost
>>>
>>> If I read UPDATING correctly this is the way to configure wireless
>>> devices on 8.0. As this is my first 8.0 system I was not sufficiently
>>> aware of that.
>>>
>>> However, a panic is somewhat unexpected in this case.
>>
>> Yes, there is still code path where vap is used when it is NULL.
>
> What about moving windrv_(un)wrap() calls from ndisdrv_modevent() to
> vap create/delete.
Forget that one it simple cant be done.
Instead I attached patch.
--
Paul
[-- Attachment #2 --]
Index: if_ndis.c
===================================================================
--- if_ndis.c (revision 197472)
+++ if_ndis.c (working copy)
@@ -1534,7 +1534,7 @@
if (m == NULL)
break;
KeReleaseSpinLock(&sc->ndis_rxlock, irql);
- if (sc->ndis_80211)
+ if (sc->ndis_80211 && vap)
vap->iv_deliver_data(vap, vap->iv_bss, m);
else
(*ifp->if_input)(ifp, m);
@@ -1746,7 +1746,7 @@
sc->ndis_sts == NDIS_STATUS_MEDIA_CONNECT) {
sc->ndis_link = 1;
NDIS_UNLOCK(sc);
- if (sc->ndis_80211) {
+ if (sc->ndis_80211 && vap) {
ndis_getstate_80211(sc);
ieee80211_new_state(vap, IEEE80211_S_RUN, -1);
}
@@ -1758,7 +1758,7 @@
sc->ndis_sts == NDIS_STATUS_MEDIA_DISCONNECT) {
sc->ndis_link = 0;
NDIS_UNLOCK(sc);
- if (sc->ndis_80211)
+ if (sc->ndis_80211 && vap)
ieee80211_new_state(vap, IEEE80211_S_SCAN, 0);
NDIS_LOCK(sc);
if_link_state_change(sc->ifp, LINK_STATE_DOWN);
@@ -2047,9 +2047,6 @@
/* Setup task offload. */
ndis_set_offload(sc);
- if (sc->ndis_80211)
- ndis_setstate_80211(sc);
-
NDIS_LOCK(sc);
sc->ndis_txidx = 0;
@@ -2297,8 +2294,6 @@
ifp = sc->ifp;
ic = ifp->if_l2com;
vap = TAILQ_FIRST(&ic->ic_vaps);
- if (vap == NULL)
- return;
if (!NDIS_INITIALIZED(sc)) {
DPRINTF(("%s: NDIS not initialized\n", __func__));
@@ -2730,8 +2725,6 @@
ifp = sc->ifp;
ic = ifp->if_l2com;
vap = TAILQ_FIRST(&ic->ic_vaps);
- if (vap == NULL)
- return;
ni = vap->iv_bss;
if (!NDIS_INITIALIZED(sc))
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3a142e750909241608j786b6029g83f2705922e6936f>
