Search Linux Wireless

WARN on return of ieee80211_if_config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johannes,

In 2.6.30 we are starting to see people encountering a WARN when
resuming with HW rfkill enabled. The WARN is printed from
net/mac80211/pm.c:159 in 2.6.30, for current wireless-testing it is 
net/mac80211/util.c:1050.

With that function resuming multiple interfaces I do not know if it will
make sense to return an error code if one fails. So, it seems that
__ieee80211_resume()/ieee80211_reconfig() will always return zero. Even
so, the case where ieee80211_if_config() fails needs to be
accommodated. 

Would something like this make sense?

diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 0273023..46f2961 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -156,8 +156,11 @@ int __ieee80211_resume(struct ieee80211_hw *hw)
 		case NL80211_IFTYPE_ADHOC:
 		case NL80211_IFTYPE_AP:
 		case NL80211_IFTYPE_MESH_POINT:
-			WARN_ON(ieee80211_if_config(sdata, changed));
-			ieee80211_bss_info_change_notify(sdata, ~0);
+			if (ieee80211_if_config(sdata, changed))
+				printk(KERN_DEBUG "%s: failed to configure interface\n",
+				       sdata->dev->name);
+			else
+				ieee80211_bss_info_change_notify(sdata, ~0);
 			break;
 		case NL80211_IFTYPE_WDS:
 			break;


Thank you

Reinette


--
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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux