Search Linux Wireless

Re: BUG(?): dev->wl->if_type is 0 for monitor interfaces (should be 5); b43_is_mode(dev->wl; IEEE80211_IF_TYPE_MNTR) is always false

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 25, 2008 at 10:22 PM, Stefanik Gábor
<netrolller.3d@xxxxxxxxx> wrote:
> In both b43 and b43legacy, dev->wl->if_type is 0
> (IEEE80211_IF_TYPE_INVALID) when injecting/transmitting packets on a
> monitor interface (not sure about receiving), while the logical result
> would be  5 (IEEE80211_IF_TYPE_MNTR). Due to this, the check
> b43(legacy)_is_mode(dev->wl; IEEE80211_IF_TYPE_MNTR) always returns 0.
>
> I discovered this when updating the b43/b43legacy injection patches.
> This is the latest patch I made, working around this bug by checking
> for both 0 and 5 (I added a quick printk("B43 DEBUG: dev->wl->if_type
> = %d", dev->wl->if_type) after the /* MAC control */ comment, which
> helped me find this bug):
>
> diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
> index f9e1cff..b7553ab 100644
> --- a/drivers/net/wireless/b43/xmit.c
> +++ b/drivers/net/wireless/b43/xmit.c
> @@ -315,9 +315,11 @@ int b43_generate_txhdr(struct b43_wldev *dev,
>        }
>
>        /* MAC control */
> -       if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
> +       if (dev->wl->if_type != 5 && dev->wl->if_type != 0 &&
> +             !(info->flags & IEEE80211_TX_CTL_NO_ACK))
>                mac_ctl |= B43_TXH_MAC_ACK;
> -       if (!(((fctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
> +       if (dev->wl->if_type != 5 && dev->wl->if_type != 0 &&
> +             !(((fctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
>              ((fctl & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PSPOLL)))
>                mac_ctl |= B43_TXH_MAC_HWSEQ;
>        if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
>
> Is this intentional? I don't know, but it does looks strange for sure.
>
> --Gábor
>
> --
> Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
>

Oops... also CCing linux.wireless.

-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux