[Prism54-devel] [USB] missing include / ad-hoc effects / tla update

Sebastien B sebastien.b at swissinfo.org
Mon Mar 28 10:21:50 UTC 2005


> > Then I tried to run latest version (patch-87). A mode switch with
> > iwconfig always gave me
> >
> > Error for wireless request "Set Mode" (8B06) :
> >      SET failed on device eth2 ; Network dropped connection on reset.
>
> And i don't understand why...

From what I've just understood while writing channel change support in monitor 
mode, the 802.11 parent method returns ENETRESET when it would require your 
driver to reconfigure the device to complete the request.
The device driver just has to make the function return zero (no error), then.
Here's an example :

static int p54u_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
  struct p54u_softc *sc = ifp->if_softc;
  struct ieee80211com *ic = &sc->sc_ic;
  struct ieee80211_node *ni = ic->ic_bss;
  struct ieee80211req *req = (struct ieee80211req *)data;
  int r;

  mtx_lock(&sc->lock);
  r = ieee80211_ioctl(ifp, cmd, data); /* call the parent method */
  if(r == ENETRESET) { /* should we reconfigure the device ? */
    if(cmd == (SIOCS80211)) {
      if(req->i_type == IEEE80211_IOC_CHANNEL) ni->ni_chan = 
&ic->ic_channels[req->i_val]; /* update channel information if required, 
ieee80211_ioctl() doesn't do it */
    }
    p54u_init(sc); /* reconfigure... */
    mtx_unlock(&sc->lock);
    return 0; /* ...and return success */
  }
  mtx_unlock(&sc->lock);
  return r;
}

Regards,
Sebastien
PS: what do you think of my problem with TCP frames ?



More information about the Prism54-devel mailing list