Skip to contentSkip to conversation

iwl3945 regression: associates but no data is transfered

DISCUSSION Kalle Valo 6 participants 10 messages Jan 22, 2009 – Jan 23, 2009 mac80211

lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

Hello,

I upgraded to the latest wireless-testing and my iwl3945 is now broken. It can associate but no data is transfered after that. Tried with open and wep modes. With dhcp I cannot get ip and with static ip ping to the gateway doesn't work.

Any hints?

Signature · 1 line
Kalle Valo
#1 lore raw
Quoted 8 lines · Kalle Valo

Hello,

I upgraded to the latest wireless-testing and my iwl3945 is now broken. It can associate but no data is transfered after that. Tried with open and wep modes. With dhcp I cannot get ip and with static ip ping to the gateway doesn't work.

Any hints?

Lots of iwlwifi stuff merged yesterday...

Chatre, Reinette (1):
iwl3945: add debugging for wrong command queue

Helmut Schaa (2):
iwl3945: fix some warnings when compiled without debug
iwlagn: fix hw-rfkill while the interface is down

Jay Sternberg (4):
iwlwifi: correct Kconfig to prevent following entries from not indenting
iwlwifi: remove static from 5000 structures
iwlwifi: add recognition of Intel WiFi Link 6000 and 6050 Series
iwlwifi: add recognition of Intel WiFi Link 100 Series

Reinette Chatre (1):
iwlwifi: return NETDEV_TX_OK from _tx ops

Samuel Ortiz (3):
iwl3945: Use iwl_txq_update_write_ptr
iwlwifi: Add TFD library operations
iwl3945: Use iwl-hcmd host command routines

Winkler, Tomas (6):
iwlwifi: make iwl-power.c more readable
iwlwifi: fix iwl_mac_set_key and iwl3945_mac_set_key
iwlwifi: kill iwl3945_scan_cancel and iwl3945_scan_cancel_timeout
iwlwifi: kill scan39
iwlwifi: remove unused or twice defined members in iwl_priv
iwlwifi: eliminate power_data_39.

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#9 lore raw
In reply to Kalle Valo

Hi Kalle,

I noticed the same regression here with iwl3945 and static-IP with wl.git master 2009-01-21.

I tried to apply the iwlwifi-updates from 20-Jan-2009 (5 patches, without the iwl3945-rfkill one, see below).
As far as I can see the patchset as of 19-Jan-2009 (15 patches) seem to be all included in latest master.

There were two patches specially for 2.6.29 [1], but they were not applicable in my case, so I took the ones from the older patchset. But no luck here.

Johannes and Mohamed are discussing mac80211 disassociation on [2].

Hope these infos help.

Kind Regards,
Sedat

[1] http://marc.info/?l=linux-wireless&m=123256418517083&w=2
[2] http://marc.info/?l=linux-wireless&m=123264308904962&w=2

----- BEGIN series -----

# 00xx-series: All patches against wireless-testing (master-2009-01-21) 0000-patches-against-wl-v2.6.29-rc2-11925-g88e5942
#
# 01xx-series: Patches from <kernel.org> 0100-patch-2.6.29-rc2-git1
#
# 02xx-series: Patches from wl-mailing-list 0200-0_5-iwlwifi-driver-updates-01_20_2009.patch 0201-1_5-iwlwifi-fix-rs_get_rate-WARN_ON.patch 0202-2_5-iwlwifi-allow-user-to-set-max-rate.patch 0203-3_5-iwlagn-fix-agn-rate-scaling.patch
# Disabled - included in wl (master-2009-01-21) #0204-4_5-iwl3945-Use-iwl-rfkill-v2.patch 0205-5_5-iwl3945-fix-deep-sleep-when-removing-the-driver.patch

----- END series -----

Quoted 16 lines · Kalle Valo

Hello,

I upgraded to the latest wireless-testing and my iwl3945 is now broken. It can associate but no data is transfered after that. Tried with open and wep modes. With dhcp I cannot get ip and with static ip ping to the gateway doesn't work.

Any hints?

--
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to John W. Linville

On Thu, 22 Jan 2009 13:34:48 -0500, "John W. Linville"

Quoted 16 lines · <[email protected]> wrote:
Quoted 13 lines · Kalle Valo

Hello,

I upgraded to the latest wireless-testing and my iwl3945 is now

broken. It can associate but no data is transfered after that. Tried

with open and wep modes. With dhcp I cannot get ip and with static ip

ping to the gateway doesn't work.

Quoted 5 lines
Quoted 1 line

Any hints?

Lots of iwlwifi stuff merged yesterday...

The bad commit seems to be e32b1b9a33759e8a83ac566c4c43f23ed5d6343b, which

is not iwlwifi related.

Even though it's an mlme commit, it doesnt seem to affect other drivers (at

least b43 and ath5k).

I'll come up soon with a proper fix, but for now iwl3945 users should

revert that commit locally.

Cheers,

Samuel.

Quoted 59 lines

Chatre, Reinette (1):

iwl3945: add debugging for wrong command queue

Helmut Schaa (2):

iwl3945: fix some warnings when compiled without debug

iwlagn: fix hw-rfkill while the interface is down

Jay Sternberg (4):

iwlwifi: correct Kconfig to prevent following entries from not

indenting

iwlwifi: remove static from 5000 structures

iwlwifi: add recognition of Intel WiFi Link 6000 and 6050 Series

iwlwifi: add recognition of Intel WiFi Link 100 Series

Reinette Chatre (1):

iwlwifi: return NETDEV_TX_OK from _tx ops

Samuel Ortiz (3):

iwl3945: Use iwl_txq_update_write_ptr

iwlwifi: Add TFD library operations

iwl3945: Use iwl-hcmd host command routines

Winkler, Tomas (6):

iwlwifi: make iwl-power.c more readable

iwlwifi: fix iwl_mac_set_key and iwl3945_mac_set_key

iwlwifi: kill iwl3945_scan_cancel and iwl3945_scan_cancel_timeout

iwlwifi: kill scan39

iwlwifi: remove unused or twice defined members in iwl_priv

iwlwifi: eliminate power_data_39.

#3 lore raw
Quoted 6 lines · [email protected] wrote:

The bad commit seems to be e32b1b9a33759e8a83ac566c4c43f23ed5d6343b, which is not iwlwifi related.
Even though it's an mlme commit, it doesnt seem to affect other drivers (at least b43 and ath5k).
I'll come up soon with a proper fix, but for now iwl3945 users should revert that commit locally.

Something between 2.6.29-rc1 and -rc2 killed b43 and p54usb on my WPA2 network. My rtl8187 devices work fine.

I'm in the process of bisecting right now. Only 1500 commits to go.

Larry

#7 lore raw
In reply to [email protected]

Hi,

BTW, v2 of Alina's fix is *NOT* fixing the problem (not on my machine).

Kind Regards,
Sedat

[1] [PATCH v2] mac80211: Fixed BSSID handling revisited
http://marc.info/?l=linux-wireless&m=123259183328417&w=2

Quoted 59 lines · On Fri, Jan 23, 2009 at 12:41 AM, <[email protected]> wrote:
Quoted 11 lines · John W. Linville
Quoted 8 lines · Kalle Valo

Hello,

I upgraded to the latest wireless-testing and my iwl3945 is now broken. It can associate but no data is transfered after that. Tried with open and wep modes. With dhcp I cannot get ip and with static ip ping to the gateway doesn't work.

Any hints?

Lots of iwlwifi stuff merged yesterday...

The bad commit seems to be e32b1b9a33759e8a83ac566c4c43f23ed5d6343b, which is not iwlwifi related.
Even though it's an mlme commit, it doesnt seem to affect other drivers (at least b43 and ath5k).
I'll come up soon with a proper fix, but for now iwl3945 users should revert that commit locally.

Cheers,
Samuel.

Quoted 23 lines

Chatre, Reinette (1):
iwl3945: add debugging for wrong command queue

Helmut Schaa (2):
iwl3945: fix some warnings when compiled without debug
iwlagn: fix hw-rfkill while the interface is down

Jay Sternberg (4):
iwlwifi: correct Kconfig to prevent following entries from not indenting
iwlwifi: remove static from 5000 structures
iwlwifi: add recognition of Intel WiFi Link 6000 and 6050 Series
iwlwifi: add recognition of Intel WiFi Link 100 Series

Reinette Chatre (1):
iwlwifi: return NETDEV_TX_OK from _tx ops

Samuel Ortiz (3):
iwl3945: Use iwl_txq_update_write_ptr
iwlwifi: Add TFD library operations
iwl3945: Use iwl-hcmd host command routines

Quoted 7 lines

Winkler, Tomas (6):
iwlwifi: make iwl-power.c more readable
iwlwifi: fix iwl_mac_set_key and iwl3945_mac_set_key
iwlwifi: kill iwl3945_scan_cancel and iwl3945_scan_cancel_timeout
iwlwifi: kill scan39
iwlwifi: remove unused or twice defined members in iwl_priv
iwlwifi: eliminate power_data_39.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to Larry Finger

On Thu, 22 Jan 2009 17:55:39 -0600, Larry Finger

<[email protected]>

Quoted 24 lines · wrote:
Quoted 8 lines · [email protected] wrote:

The bad commit seems to be e32b1b9a33759e8a83ac566c4c43f23ed5d6343b,

which

is not iwlwifi related.

Even though it's an mlme commit, it doesnt seem to affect other drivers

Quoted 7 lines

(at

least b43 and ath5k).

I'll come up soon with a proper fix, but for now iwl3945 users should

revert that commit locally.

Something between 2.6.29-rc1 and -rc2 killed b43 and p54usb on my WPA2

Quoted 7 lines

network. My rtl8187

devices work fine.

I'm in the process of bisecting right now. Only 1500 commits to go.

Have you tried reverting that commit ?

I actually found that it does break ath5k as well...

Cheers,

Samuel.

#5 lore raw
Quoted 2 lines · [email protected] wrote:

Have you tried reverting that commit ?
I actually found that it does break ath5k as well...

No - as I was bisecting, I thought I'd keep going; however, that sounds like a good idea that might save some time.

I'll report ASAP.

Larry

#8 lore raw
In reply to [email protected]

Thanks Samuel, this works.

-SD

----- BEGIN series -----

# 00xx-series: All patches against wireless-testing (master-2009-01-21) 0000-patches-against-wl-v2.6.29-rc2-11925-g88e5942
#
# 01xx-series: Patches from <kernel.org> 0100-patch-2.6.29-rc2-git1
#
# 02xx-series: Patches from wl-mailing-list 0200-Revert-mac80211-Fixed-BSSID-handling-revisited.patch

----- END series -----

Quoted 54 lines · On Fri, Jan 23, 2009 at 12:41 AM, <[email protected]> wrote:
Quoted 11 lines · John W. Linville
Quoted 8 lines · Kalle Valo

Hello,

I upgraded to the latest wireless-testing and my iwl3945 is now broken. It can associate but no data is transfered after that. Tried with open and wep modes. With dhcp I cannot get ip and with static ip ping to the gateway doesn't work.

Any hints?

Lots of iwlwifi stuff merged yesterday...

The bad commit seems to be e32b1b9a33759e8a83ac566c4c43f23ed5d6343b, which is not iwlwifi related.
Even though it's an mlme commit, it doesnt seem to affect other drivers (at least b43 and ath5k).
I'll come up soon with a proper fix, but for now iwl3945 users should revert that commit locally.

Cheers,
Samuel.

Quoted 23 lines

Chatre, Reinette (1):
iwl3945: add debugging for wrong command queue

Helmut Schaa (2):
iwl3945: fix some warnings when compiled without debug
iwlagn: fix hw-rfkill while the interface is down

Jay Sternberg (4):
iwlwifi: correct Kconfig to prevent following entries from not indenting
iwlwifi: remove static from 5000 structures
iwlwifi: add recognition of Intel WiFi Link 6000 and 6050 Series
iwlwifi: add recognition of Intel WiFi Link 100 Series

Reinette Chatre (1):
iwlwifi: return NETDEV_TX_OK from _tx ops

Samuel Ortiz (3):
iwl3945: Use iwl_txq_update_write_ptr
iwlwifi: Add TFD library operations
iwl3945: Use iwl-hcmd host command routines

Quoted 7 lines

Winkler, Tomas (6):
iwlwifi: make iwl-power.c more readable
iwlwifi: fix iwl_mac_set_key and iwl3945_mac_set_key
iwlwifi: kill iwl3945_scan_cancel and iwl3945_scan_cancel_timeout
iwlwifi: kill scan39
iwlwifi: remove unused or twice defined members in iwl_priv
iwlwifi: eliminate power_data_39.

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

net/mac80211/mlme.c +42 -30
index ca9e415..b9e4b93 100644
@@ -1614,7 +1614,6 @@ static int ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 
 	ieee80211_sta_def_wmm_params(sdata, bss);
 
-	ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET;
 	ifsta->state = IEEE80211_STA_MLME_IBSS_JOINED;
 	mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL);
 
@@ -1758,8 +1757,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
 		       (unsigned long long)(rx_timestamp - beacon_timestamp),
 		       jiffies);
 #endif /* CONFIG_MAC80211_IBSS_DEBUG */
-		if (beacon_timestamp > rx_timestamp &&
-		    memcmp(sdata->u.sta.bssid, mgmt->bssid, ETH_ALEN) != 0) {
+		if (beacon_timestamp > rx_timestamp) {
 #ifdef CONFIG_MAC80211_IBSS_DEBUG
 			printk(KERN_DEBUG "%s: beacon TSF higher than "
 			       "local TSF - IBSS merge with BSSID %pM\n",
@@ -2179,18 +2177,19 @@ static int ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata,
 	int i;
 	int ret;
 
-	if (sdata->u.sta.flags & IEEE80211_STA_BSSID_SET) {
-		memcpy(bssid, ifsta->bssid, ETH_ALEN);
-	} else {
-		/* Generate random, not broadcast, locally administered BSSID. Mix in
-		 * own MAC address to make sure that devices that do not have proper
-		 * random number generator get different BSSID. */
-		get_random_bytes(bssid, ETH_ALEN);
-		for (i = 0; i < ETH_ALEN; i++)
-			bssid[i] ^= sdata->dev->dev_addr[i];
-		bssid[0] &= ~0x01;
-		bssid[0] |= 0x02;
-	}
+#if 0
+	/* Easier testing, use fixed BSSID. */
+	memset(bssid, 0xfe, ETH_ALEN);
+#else
+	/* Generate random, not broadcast, locally administered BSSID. Mix in
+	 * own MAC address to make sure that devices that do not have proper
+	 * random number generator get different BSSID. */
+	get_random_bytes(bssid, ETH_ALEN);
+	for (i = 0; i < ETH_ALEN; i++)
+		bssid[i] ^= sdata->dev->dev_addr[i];
+	bssid[0] &= ~0x01;
+	bssid[0] |= 0x02;
+#endif
 
 	printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID %pM\n",
 	       sdata->dev->name, bssid);
@@ -2251,9 +2250,6 @@ static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata,
 		    memcmp(ifsta->ssid, bss->ssid, bss->ssid_len) != 0
 		    || !(bss->capability & WLAN_CAPABILITY_IBSS))
 			continue;
-		if ((ifsta->flags & IEEE80211_STA_BSSID_SET) &&
-		    memcmp(ifsta->bssid, bss->bssid, ETH_ALEN) != 0)
-			continue;
 #ifdef CONFIG_MAC80211_IBSS_DEBUG
 		printk(KERN_DEBUG "   bssid=%pM found\n", bss->bssid);
 #endif /* CONFIG_MAC80211_IBSS_DEBUG */
@@ -2270,9 +2266,7 @@ static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata,
 		       "%pM\n", bssid, ifsta->bssid);
 #endif /* CONFIG_MAC80211_IBSS_DEBUG */
 
-	if (found &&
-	    ((!(ifsta->flags & IEEE80211_STA_PREV_BSSID_SET)) ||
-	     memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0)) {
+	if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) {
 		int ret;
 		int search_freq;
 
@@ -2610,16 +2604,16 @@ int ieee80211_sta_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size
 		memset(ifsta->ssid, 0, sizeof(ifsta->ssid));
 		memcpy(ifsta->ssid, ssid, len);
 		ifsta->ssid_len = len;
+		ifsta->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
 	}
 
-	ifsta->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
-
 	if (len)
 		ifsta->flags |= IEEE80211_STA_SSID_SET;
 	else
 		ifsta->flags &= ~IEEE80211_STA_SSID_SET;
 
-	if (sdata->vif.type == NL80211_IFTYPE_ADHOC) {
+	if (sdata->vif.type == NL80211_IFTYPE_ADHOC &&
+	    !(ifsta->flags & IEEE80211_STA_BSSID_SET)) {
 		ifsta->ibss_join_req = jiffies;
 		ifsta->state = IEEE80211_STA_MLME_IBSS_SEARCH;
 		return ieee80211_sta_find_ibss(sdata, ifsta);
@@ -2639,18 +2633,36 @@ int ieee80211_sta_get_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size
 int ieee80211_sta_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid)
 {
 	struct ieee80211_if_sta *ifsta;
+	int res;
+	bool valid;
 
 	ifsta = &sdata->u.sta;
+	valid = is_valid_ether_addr(bssid);
+
+	if (memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) {
+		if(valid)
+			memcpy(ifsta->bssid, bssid, ETH_ALEN);
+		else
+			memset(ifsta->bssid, 0, ETH_ALEN);
+		res = 0;
+		/*
+		 * Hack! See also ieee80211_sta_set_ssid.
+		 */
+		if (netif_running(sdata->dev))
+			res = ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID);
+		if (res) {
+			printk(KERN_DEBUG "%s: Failed to config new BSSID to "
+			       "the low-level driver\n", sdata->dev->name);
+			return res;
+		}
+	}
 
-	if (is_valid_ether_addr(bssid)) {
-		memcpy(ifsta->bssid, bssid, ETH_ALEN);
+	if (valid)
 		ifsta->flags |= IEEE80211_STA_BSSID_SET;
-	} else {
-		memset(ifsta->bssid, 0, ETH_ALEN);
+	else
 		ifsta->flags &= ~IEEE80211_STA_BSSID_SET;
-	}
 
-	return ieee80211_sta_set_ssid(sdata, ifsta->ssid, ifsta->ssid_len);
+	return 0;
 }
 
 int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata, char *ie, size_t len)
#6 lore raw
In reply to Larry Finger
Quoted 9 lines · Larry Finger
Quoted 6 lines · [email protected] wrote:

The bad commit seems to be e32b1b9a33759e8a83ac566c4c43f23ed5d6343b, which is not iwlwifi related.
Even though it's an mlme commit, it doesnt seem to affect other drivers (at least b43 and ath5k).
I'll come up soon with a proper fix, but for now iwl3945 users should revert that commit locally.

Quoted 4 lines

Something between 2.6.29-rc1 and -rc2 killed b43 and p54usb on my WPA2 network. My rtl8187 devices work fine.

I'm in the process of bisecting right now. Only 1500 commits to go.

I wish I'd said something sooner, I thought it was just the university's network being particularly crappy causing wpa2 to be so flaky since going to -rc2. (b43)

Harvey