rtap mode.

Javier Cardona javier at cozybit.com
Mon Dec 10 12:35:27 EST 2007


David, Michail,

> What was wrong with 'iwconfig eth1 mode monitor', anyway?

There was a discussion on the proper API for this in July.  Seems like
the kernel people want to move away from wireless tools, but the new
API (cfg80211) is not quite there yet.  So we picked the middle way:

http://lists.infradead.org/pipermail/libertas-dev/2007-July/000582.html

> > > However, I cannot use the _normal_ interfaces (eth0, msh0) while the
> > > rtap interface exists. The transmit and receive paths are both broken --
> > > and if I attempt to fix them, I think I crash the firmware. It doesn't
> > > seem to like me attempting to transmit while it's in rtap mode, and
> > > certainly doesn't seem to manage to scan or associate.
> >
> > That is a bug and it wasn't always like that.

Actually it has.  On a fullmac device like libertas it was prohibitive
to clone each received management frame to pass it to the host.  On a
thinmac architecture
this is not an issue because no internal processing of management frames occurs.
One option could have been to only pass data frames, but the really
useful troubleshooting information for mesh will be in the management
frames.

This limitation was described in the patch comments:

  Any non zero [libertas_rtap] mode will activate the monitor mode, inhibiting
  transmission in ethX and mshX interfaces and routing all the
incoming traffic to
  a new rtapX interface that will output the packets in 802.11+radiotap headers
  format.

Cheers,

Javier

> --- a/drivers/net/wireless/libertas/rx.c
> +++ b/drivers/net/wireless/libertas/rx.c
> @@ -155,8 +155,10 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
>
>         skb->ip_summed = CHECKSUM_NONE;
>
> -       if (priv->monitormode != LBS_MONITOR_OFF)
> -               return process_rxed_802_11_packet(priv, skb);
> +       if (priv->monitormode != LBS_MONITOR_OFF) {
> +               struct sk_buff +rtap_skb = skb_copy(skb, GFP_ATOMIC);
> +               process_rxed_802_11_packet(priv, skb);
> +       }
>
>         p_rx_pkt = (struct rxpackethdr *) skb->data;
>         p_rx_pd = &p_rx_pkt->rx_pd;
>
> ... and then I do indeed get packets on both rtap0 and msh0, but the
> latter are nonsense. I haven't yet investigated whether the frame type
> we receive from the firmware is different. I should probably avoid
> getting distracted into adding new features right now, anyway.
>
> --
> dwmw2
>
>
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev
>


-- 
Javier Cardona
cozybit Inc.



More information about the libertas-dev mailing list