rt2x00: rt2x00dev: use rt2x00dev->bcn->limit
authorGabor Juhos <juhosg@openwrt.org>
Tue, 4 Jun 2013 11:40:40 +0000 (13:40 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 12 Jun 2013 18:59:34 +0000 (14:59 -0400)
The beacon data queue is initialized already,
so fetch the number of the queue entries from
that instead of using the entry_num field of
the data queue descriptor.

The two values are the same, and the use of the
rt2x00dev->bcn->limit value allows us to get rid
of a superfluous pointer dereference.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00dev.c

index 6a201725bc5093b7c1ce064d8987f18430f1fce8..dff5012f0548c02ac8060fdf07e39716f938a790 100644 (file)
@@ -1336,7 +1336,7 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
         * beacon entries.
         */
        rt2x00dev->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
-       if (rt2x00dev->ops->bcn->entry_num > 0)
+       if (rt2x00dev->bcn->limit > 0)
                rt2x00dev->hw->wiphy->interface_modes |=
                    BIT(NL80211_IFTYPE_ADHOC) |
                    BIT(NL80211_IFTYPE_AP) |