[rt2x00-users] [PATCH 0/3] Fix 'Error - MCU request failed' during initialization

Andreas Hartmann andihartmann at 01019freenet.de
Mon Jan 23 18:56:16 AEDT 2012


Hello!

Ivo Van Doorn schrieb:
> Hi,
> 
> When you have the updated series, could you add John Linville and
> the linux-wireless mailinglist to the recipientlist as well? Then the  patches
> can be applied to the tree easier. :)
> 
> Thanks,
> 
> Ivo
> 
> On Tue, Jan 17, 2012 at 5:20 PM, Jakub Kicinski <kubakici at wp.pl> wrote:
>> Hi!
>>
>> this is a second posting of fix to:
>>
>> phy0 -> rt2800pci_mcu_status: Error - MCU request failed, no response
>> from hardware

I tested this patch and the above mentioned error message disappeared
here, too :-). Thank you!

I tested the other patches of this patchset, too, and couldn't find any
functional objections. I can say the same to the other patchset,
consisting out of 5 patches (rt2800usb: initialize H2M_INT_SRC
register, ...).

I tested with rt2860 PCI based device (compat-wireless 3.2-1, kernel
3.1.4, 64bit SMP). So, all which I said here does _not_ apply to the USB
part of the patches, because the USB part doesn't work at all for me
(rt3275 based chip).

I additionally applied this patch to make the device working again to
revert "mac80211: retry sending failed BAR frames later instead of
tearing down aggr"
(http://www.spinics.net/lists/linux-wireless/msg76379.html):


--- net/mac80211/status.c.orig	2011-12-31 21:14:58.000000000 +0100
+++ net/mac80211/status.c	2011-12-31 21:19:28.000000000 +0100
@@ -163,32 +163,12 @@
 	dev_kfree_skb(skb);
 }
 
-static void ieee80211_check_pending_bar(struct sta_info *sta, u8 *addr, u8 tid)
-{
-	struct tid_ampdu_tx *tid_tx;
-
-	tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
-	if (!tid_tx || !tid_tx->bar_pending)
-		return;
-
-	tid_tx->bar_pending = false;
-	ieee80211_send_bar(&sta->sdata->vif, addr, tid, tid_tx->failed_bar_ssn);
-}
-
 static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
 {
 	struct ieee80211_mgmt *mgmt = (void *) skb->data;
 	struct ieee80211_local *local = sta->local;
 	struct ieee80211_sub_if_data *sdata = sta->sdata;
 
-	if (ieee80211_is_data_qos(mgmt->frame_control)) {
-		struct ieee80211_hdr *hdr = (void *) skb->data;
-		u8 *qc = ieee80211_get_qos_ctl(hdr);
-		u16 tid = qc[0] & 0xf;
-
-		ieee80211_check_pending_bar(sta, hdr->addr1, tid);
-	}
-
 	if (ieee80211_is_action(mgmt->frame_control) &&
 	    sdata->vif.type == NL80211_IFTYPE_STATION &&
 	    mgmt->u.action.category == WLAN_CATEGORY_HT &&
@@ -217,18 +197,6 @@
 	}
 }
 
-static void ieee80211_set_bar_pending(struct sta_info *sta, u8 tid, u16 ssn)
-{
-	struct tid_ampdu_tx *tid_tx;
-
-	tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
-	if (!tid_tx)
-		return;
-
-	tid_tx->failed_bar_ssn = ssn;
-	tid_tx->bar_pending = true;
-}
-
 static int ieee80211_tx_radiotap_len(struct ieee80211_tx_info *info)
 {
 	int len = sizeof(struct ieee80211_radiotap_header);
@@ -413,7 +381,6 @@
 		}
 
 		if (!acked && ieee80211_is_back_req(fc)) {
-			u16 control;
 
 			/*
 			 * BAR failed, store the last SSN and retry sending
@@ -421,15 +388,11 @@
 			 * same TID succeeds.
 			 */
 			bar = (struct ieee80211_bar *) skb->data;
-			control = le16_to_cpu(bar->control);
-			if (!(control & IEEE80211_BAR_CTRL_MULTI_TID)) {
-				u16 ssn = le16_to_cpu(bar->start_seq_num);
-
-				tid = (control &
+			if (!(bar->control & IEEE80211_BAR_CTRL_MULTI_TID)) {
+				tid = (bar->control &
 				       IEEE80211_BAR_CTRL_TID_INFO_MASK) >>
 				      IEEE80211_BAR_CTRL_TID_INFO_SHIFT;
-
-				ieee80211_set_bar_pending(sta, tid, ssn);
+				ieee80211_stop_tx_ba_session(&sta->sta, tid);
 			}
 		}
 
--- net/mac80211/sta_info.h.orig	2012-01-01 12:49:29.000000000 +0100
+++ net/mac80211/sta_info.h	2011-12-31 21:20:28.000000000 +0100
@@ -96,8 +96,6 @@
  * @stop_initiator: initiator of a session stop
  * @tx_stop: TX DelBA frame when stopping
  * @buf_size: reorder buffer size at receiver
- * @failed_bar_ssn: ssn of the last failed BAR tx attempt
- * @bar_pending: BAR needs to be re-sent
  *
  * This structure's lifetime is managed by RCU, assignments to
  * the array holding it must hold the aggregation mutex.
@@ -118,9 +116,6 @@
 	u8 stop_initiator;
 	bool tx_stop;
 	u8 buf_size;
-
-	u16 failed_bar_ssn;
-	bool bar_pending;
 };
 
 /**
---

This should be really fixed urgently as it breaks rt2800pci/802.11n
completely (at least with a rt2860 based device).


But there is one more patch, I always have to apply:

--- drivers/net/wireless/rt2x00/rt2800lib.c.orig	2011-11-14 23:18:11.000000000 +0100
+++ drivers/net/wireless/rt2x00/rt2800lib.c	2011-11-25 16:27:15.000000000 +0100
@@ -1195,7 +1197,7 @@
 		if (!is_zero_ether_addr((const u8 *)conf->bssid)) {
 			reg = le32_to_cpu(conf->bssid[1]);
 			rt2x00_set_field32(&reg, MAC_BSSID_DW1_BSS_ID_MASK, 3);
-			rt2x00_set_field32(&reg, MAC_BSSID_DW1_BSS_BCN_NUM, 7);
+			rt2x00_set_field32(&reg, MAC_BSSID_DW1_BSS_BCN_NUM, 0);
 			conf->bssid[1] = cpu_to_le32(reg);
 		}
--- 

The long thread for this problem can be found with the subject "7 more
packets after each beacon frame". Would be nice, if this could be fixed some time, too :-).


Kind regards,
Andreas




More information about the users mailing list