On Tue, Jan 12, 2010 at 6:38 PM, Benoit PAPILLAULT
<benoit.papilla...@free.fr> wrote:
>
>>
> Hello Vitalik,
>
> That's interesting. I tried to achieve the same thing. I found that in 
> monitor mode, some fields are modified by mac80211 as well. So do you try to 
> preserve what mac80211 has computed or what was originally written in the 
> injected frame from your user application?
>
> Regards,
> Benoit
>

Hi Benoit,

mac80211 does not modify sequence numbers. In ieee80211_tx_h_sequence() handler,
it specifically states:

/*
 * Packet injection may want to control the sequence
 * number, if we have no matching interface then we
 * neither assign one ourselves nor ask the driver to.
 */
if (unlikely(info->control.vif->type == NL80211_IFTYPE_MONITOR))
        return TX_CONTINUE;

Otherwise (i.e. if it's not a monitor mode), it sets IEEE80211_TX_CTL_ASSIGN_SEQ
flag and assigns the sequence number from the global counter:

info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ;

/* for pure STA mode without beacons, we can do it */
hdr->seq_ctrl = cpu_to_le16(tx->sdata->sequence_number);
tx->sdata->sequence_number += 0x10;
return TX_CONTINUE;

So, to answer your question, I'm trying to preserve what was originally written
in the injected frame.

--
-- Bell Labs Unix - Reach out and grep someone
_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to