Did you have any luck with 11n cards (e.g. using the ath9k driver)?
i mixed the Pavel Roskin patch with another in order to support 11n rates, but I'm having some troubles injecting traffic. The patch is here: http://gforge.create-net.org/gf/project/wing/scmsvn/?action=browse&path=%2F%2Acheckout%2A%2Ftrunk%2Fpatches%2Fpackage%2Fmac80211%2Fpatches%2F890-radiotap_rate.patch If you have the possibility/time could you test it? Il 10/05/2011 14:52, Paweł Foremski ha scritto:
Hello, below is a patch by Pavel Roskin [1] which allows for choosing frame bit rate and retry count in injected frames. I've reformatted it to match compat-wireless of openwrt trunk@26460 (git 020dd72982225bf36072130046c88c3fdab12811). I find it very useful for my needs, you may want to consider importing. [1] http://article.gmane.org/gmane.linux.kernel.wireless.general/47441 diff -urN a/include/net/mac80211.h b/include/net/mac80211.h --- a/include/net/mac80211.h 2011-04-04 10:19:31.269159064 +0200 +++ b/include/net/mac80211.h 2011-05-10 13:24:34.520866984 +0200 @@ -344,6 +344,7 @@ * @IEEE80211_TX_INTFL_TKIP_MIC_FAILURE: Marks this packet to be used for TKIP * testing. It will be sent out with incorrect Michael MIC key to allow * TKIP countermeasures to be tested. + * @IEEE80211_TX_CTL_RC_BYPASS: Don't use rate control on the frame. * * Note: If you have to add new flags to the enumeration, then don't * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. @@ -374,6 +375,7 @@ IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24), IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25), IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26), + IEEE80211_TX_CTL_RC_BYPASS = BIT(27), }; #define IEEE80211_TX_CTL_STBC_SHIFT 23 diff -urN a/net/mac80211/tx.c b/net/mac80211/tx.c --- a/net/mac80211/tx.c 2011-03-25 21:43:25.000000000 +0100 +++ b/net/mac80211/tx.c 2011-05-10 13:28:11.096866864 +0200 @@ -1091,6 +1091,39 @@ tx->flags |= IEEE80211_TX_FRAGMENTED; break; + case IEEE80211_RADIOTAP_RATE: { + int i, idx = -1; + int rate = *iterator.this_arg * 5; + + for (i = 0; i< sband->n_bitrates; i++) + if (sband->bitrates[i].bitrate == rate) { + idx = i; + break; + } + + /* Rate not available - rejecting */ + if (idx< 0) + return false; + + info->flags |= IEEE80211_TX_CTL_RC_BYPASS; + info->control.rates[0].idx = idx; + info->control.rates[0].count = 1; + for (i = 1; i< IEEE80211_TX_MAX_RATES; i++) + info->control.rates[i].idx = -1; + break; + } + + case IEEE80211_RADIOTAP_DATA_RETRIES: + /* + * Only allow setting the number of retries in + * conjunction with the rates, when the rate control + * is bypassed. + */ + if (info->flags& IEEE80211_TX_CTL_RC_BYPASS) + info->control.rates[0].count = + *iterator.this_arg; + break; + /* * Please update the file * Documentation/networking/mac80211-injection.txt @@ -1397,7 +1430,8 @@ CALL_TXH(ieee80211_tx_h_ps_buf); CALL_TXH(ieee80211_tx_h_check_control_port_protocol); CALL_TXH(ieee80211_tx_h_select_key); - if (!(tx->local->hw.flags& IEEE80211_HW_HAS_RATE_CONTROL)) + if (!(tx->local->hw.flags& IEEE80211_HW_HAS_RATE_CONTROL)&& + !(info->flags& IEEE80211_TX_CTL_RC_BYPASS)) CALL_TXH(ieee80211_tx_h_rate_ctrl); if (unlikely(info->flags& IEEE80211_TX_INTFL_RETRANSMISSION)) --- Paweł Foremski _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-- -------------------------------------------------------- Roberto Riggio, Ph.D. CREATE-NET Network& Security Solutions for Pervasive Computing Systems (iNSPIRE) Senior Researcher Via alla Cascata 56/D - 38123 Povo Trento (Italy) e-mail: roberto.rig...@create-net.org Tel: (+39) 0461 408400 - interno/extension 708 Fax: (+39) 0461 421157 www.create-net.org/~rriggio -------------------------------------------------------- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited according to the Italian Law 196/2003 of the Legislature. If you received this in error, please contact the sender and delete the material from any computer. Le informazioni contenute in questo messaggio di posta elettronica e nei file allegati sono da considerarsi strettamente riservate. Il loro utilizzo e' consentito esclusivamente al destinatario del messaggio, per le finalita' indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla cancellazione del messaggio stesso dal Vostro sistema. Trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalita' diverse, costituisce comportamento contrario ai principi dettati dal D. Lgs. 196/2003. _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel