Skip to contentSkip to conversation

rt2x00: Cleanup rt2x00mac_bss_info_changed()

PATCH In review Ivo van Doorn 2 participants 3 messages Aug 26, 2009 – Aug 27, 2009 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt2x00: Cleanup rt2x00mac_bss_info_changed()

Since patch "rt2x00: bss_info_changed() callback is allowed to sleep" the variable delayed wasn't used anymore. This means it can be removed along with the call to schedule_work which depended on that variable.

---

drivers/net/wireless/rt2x00/rt2x00mac.c +0 -8
index a91f316..929b85f 100644
@@ -582,7 +582,6 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
 {
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 	struct rt2x00_intf *intf = vif_to_intf(vif);
-	unsigned int delayed = 0;
 	int update_bssid = 0;
 
 	/*
@@ -645,13 +644,6 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
 	 */
 	if (changes & ~(BSS_CHANGED_ASSOC | BSS_CHANGED_HT))
 		rt2x00lib_config_erp(rt2x00dev, intf, bss_conf);
-
-	spin_lock(&intf->lock);
-	if (delayed) {
-		intf->delayed_flags |= delayed;
-		schedule_work(&rt2x00dev->intf_work);
-	}
-	spin_unlock(&intf->lock);
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_bss_info_changed);
 
maintainer
#1 lore raw
Quoted 3 lines · Ivo van Doorn

Since patch "rt2x00: bss_info_changed() callback is allowed to sleep" the variable delayed wasn't used anymore. This means it can be removed along with the call to schedule_work which depended on that variable.

I just wanted to say thanks for doing all the cleanups. It's really nice to see all my work on making callbacks non-atomic pay off in that way :)

johannes

#2 lore raw
Quoted 7 lines · Johannes Berg
Quoted 3 lines · Ivo van Doorn

Since patch "rt2x00: bss_info_changed() callback is allowed to sleep" the variable delayed wasn't used anymore. This means it can be removed along with the call to schedule_work which depended on that variable.

I just wanted to say thanks for doing all the cleanups. It's really nice to see all my work on making callbacks non-atomic pay off in that way :)

yeah those kind of optimizations really help with the drivers. :)

I still have some other cleanups, but this was the easiest and most obvious one, the others involve changing locking mechanisms so need better verification.

Ivo