]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rt2x00: Add unlikely macro to special case tx status handling
authorHelmut Schaa <helmut.schaa@googlemail.com>
Thu, 3 Mar 2011 18:40:33 +0000 (19:40 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 4 Mar 2011 19:06:47 +0000 (14:06 -0500)
This special case shouldn't happen very often. Only if a frame that
is not intended to be aggregated ends up in an AMPDU _and_ was intended
to be sent at a different MCS rate as the aggregate. Hence, using
unlikely is justified.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c

index 76ced6dcee052e514c2781434f85c39ecbc7aa1e..ad90c86810d777447d039555bbca8785d94a04cc 100644 (file)
@@ -681,7 +681,7 @@ void rt2800_txdone_entry(struct queue_entry *entry, u32 status)
         * confuse the rate control algortihm by providing clearly wrong
         * data.
         */
-       if (aggr == 1 && ampdu == 0 && real_mcs != mcs) {
+       if (unlikely(aggr == 1 && ampdu == 0 && real_mcs != mcs)) {
                skbdesc->tx_rate_idx = real_mcs;
                mcs = real_mcs;
        }