Search Linux Wireless

Re: [PATCH 29/33] iwlwifi: drop skb silently for Tx request in monitor mode

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

 



On Monday 30 June 2008 12:22:45 Stefanik Gábor wrote:
> On Mon, Jun 30, 2008 at 11:23 AM, Zhu Yi <yi.zhu@xxxxxxxxx> wrote:
> > This patch fixes the problem to keep mac80211 resubmitting SKBs
> > when Tx request cannot be met in monitor mode.
> >
> > Signed-off-by: Zhu Yi <yi.zhu@xxxxxxxxx>
> > ---
> >  drivers/net/wireless/iwlwifi/iwl3945-base.c |    3 ++-
> >  drivers/net/wireless/iwlwifi/iwl4965-base.c |    3 ++-
> >  2 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> > index 4f0a18a..2744b0a 100644
> > --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> > +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> > @@ -6695,7 +6695,8 @@ static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
> >
> >        if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) {
> >                IWL_DEBUG_MAC80211("leave - monitor\n");
> > -               return -1;
> > +               dev_kfree_skb_any(skb);
> > +               return 0;
> >        }
> >
> >        IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
> > diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
> > index ba0f289..60b7a64 100644
> > --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
> > +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
> > @@ -2682,7 +2682,8 @@ static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
> >
> >        if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) {
> >                IWL_DEBUG_MAC80211("leave - monitor\n");
> > -               return -1;
> > +               dev_kfree_skb_any(skb);
> > +               return 0;
> >        }
> >
> >        IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
> > --
> > 1.5.3.6
> >
> > --
> > 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
> >
> 
> NACK.
> 
> This blocks packet injection for not only 4965/5000, but also 3945.
> Also, I have multiple records of injection working with 4965 cards
> with your original patch.
> 

This patch fixes a _real_ bug. No matter what your plans for packet injection
are, it _needs_ to go in for now. You can later change the code to actually
transmit the frame. There are only two possibilities for the TX handler:
Either transmit it or drop it. It must not return an error.


-- 
Greetings Michael.
--
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