[Click] Set NOACK on outgoing... (contd)

Lars Bro larsbro at gmail.com
Tue Feb 25 08:40:07 EST 2014


--- net/mac80211/tx.c-  2013-10-10 20:55:25.623266347 +0000
+++ net/mac80211/tx.c   2013-10-10 21:03:28.552256199 +0000
@@ -1308,8 +1308,13 @@
        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))
-               CALL_TXH(ieee80211_tx_h_rate_ctrl);
+
+        /*
+         * Do not perform rate control if rate is already set (eg. by
radiotap).
+         */
+       if (!info->control.rates[0].idx)
+               if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL))
+                       CALL_TXH(ieee80211_tx_h_rate_ctrl);

        if (unlikely(info->flags & IEEE80211_TX_INTFL_RETRANSMISSION)) {
                __skb_queue_tail(&tx->skbs, tx->skb);
@@ -1467,6 +1472,7 @@
        int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr,
skb->len,
                                                   NULL);
        u16 txflags;
+       int i;

        info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
                       IEEE80211_TX_CTL_DONTFRAG;
@@ -1523,6 +1529,22 @@
                 * when parsing new fields here.
                 */

+                /*
+                 * Rate is passed as a rate index.
+                 */
+                case IEEE80211_RADIOTAP_RATE:
+                        printk("radiotap came with rate idx %d\n",
*iterator.this_arg);
+                        info->control.rates[0].idx = *iterator.this_arg;
+                        info->control.rates[0].flags = 0;
+                        info->control.rates[0].count = 1;
+                        for (i = 1; i < IEEE80211_TX_MAX_RATES; i++) {
+                                info->control.rates[i].idx = -1;
+                                info->control.rates[i].flags = 0;
+                                info->control.rates[i].count = 0;
+                        }
+                        break;
+
+
                default:
                        break;
                }


More information about the click mailing list