On 09/10/2010 02:12 PM, Johannes Berg wrote:
On Fri, 10 Sep 2010 13:07:20 -0700, Ben Greear<greearb@xxxxxxxxxxxxxxx>
wrote:
It also consolidates some of the util.c iterator logic in
mac80211.
That really ought to be a different patch.
And I don't think I like the counting in mac80211 -- it's just overhead
(EXPORT_SYMBOL etc) and a very simple implementation in the driver itself.
I can just use the helper method by itself if you don't want another
new method exposed to explicitly count interfaces.
As for counting, as far as I can tell, ath9k doesn't keep a list of
interfaces, but rather calls those iterator methods when it wants to
know them, so one way or another I need to call back into mac80211.
I'll break the patches apart for the next posting.
Did you get a chance to think more about this part of the patch?
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 687077e..db751f1 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -440,7 +440,7 @@ int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
spin_lock_irqsave(&local->sta_lock, flags);
/* check if STA exists already */
- if (sta_info_get_bss(sdata, sta->sta.addr)) {
+ if (sta_info_get(sdata, sta->sta.addr)) {
spin_unlock_irqrestore(&local->sta_lock, flags);
mutex_unlock(&local->sta_mtx);
rcu_read_lock();
Thanks,
Ben
--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc http://www.candelatech.com
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html