[rt2x00-users] [bugzilla-daemon at bugzilla.kernel.org: [Bug 42828] rt2800pci unstable - chokes after too much I/O]

Gertjan van Wingerde gwingerde at gmail.com
Mon Oct 22 07:04:25 AEDT 2012


On 10/21/12 20:53, Andreas Hartmann wrote:
> Francisco Pina Martins wrote:
>> On Sun, 2012-10-21 at 11:02 +0200, Andreas Hartmann wrote:
>>
>>> Francisco Pina Martins wrote:
>>>> Here is my update on this:
>>>> I cannot boot with the patched kernel - I get a kernel panic at about 9
>>>> secs during boot.
>>>
>>> Stanislaws patch hangs the machine for me, too. See my other post.
>>>
>>
>> Guess it's a no-go then.
> 
> It was only a test patch. He wanted to help me, but I did it manually to
> get the information, too. Therefore: no problem.
> 

Yeah, the problem with Stanislaw's patch was that he was trying to
access fields that were no longer valid at that point in the code.

Could you check if the attached (also untested) patch works better?

---
Gertjan
-------------- next part --------------
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 69097d1..8cbced8 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -391,10 +391,9 @@ void rt2x00lib_txdone(struct queue_entry *entry,
 		tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
 		tx_info->status.ampdu_len = 1;
 		tx_info->status.ampdu_ack_len = success ? 1 : 0;
-		/*
-		 * TODO: Need to tear down BA session here
-		 * if not successful.
-		 */
+
+		if (!(skbdesc->flags & SKBDESC_TX_IS_AP) && !success)
+			tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
 	}
 
 	if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index e488b94..3f8b69b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -590,6 +590,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
 	struct txentry_desc txdesc;
 	struct skb_frame_desc *skbdesc;
 	u8 rate_idx, rate_flags;
+	bool is_ap;
 	int ret = 0;
 
 	/*
@@ -607,11 +608,16 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
 	tx_info = IEEE80211_SKB_CB(skb);
 	rate_idx = tx_info->control.rates[0].idx;
 	rate_flags = tx_info->control.rates[0].flags;
+	is_ap = tx_info->control.vif->type == NL80211_IFTYPE_AP;
+
 	skbdesc = get_skb_frame_desc(skb);
 	memset(skbdesc, 0, sizeof(*skbdesc));
 	skbdesc->tx_rate_idx = rate_idx;
 	skbdesc->tx_rate_flags = rate_flags;
 
+	if (is_ap)
+		skbdesc->flags |= SKBDESC_TX_IS_AP;
+
 	if (local)
 		skbdesc->flags |= SKBDESC_NOT_MAC80211;
 
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index 9b8c10a..52ce7e8 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -80,6 +80,7 @@ enum data_queue_qid {
  *	don't try to pass it back.
  * @SKBDESC_DESC_IN_SKB: The descriptor is at the start of the
  *	skb, instead of in the desc field.
+ * @SKBDESC_TX_IS_AP: Frame was transmitted for an AP interface.
  */
 enum skb_frame_desc_flags {
 	SKBDESC_DMA_MAPPED_RX = 1 << 0,
@@ -87,6 +88,7 @@ enum skb_frame_desc_flags {
 	SKBDESC_IV_STRIPPED = 1 << 2,
 	SKBDESC_NOT_MAC80211 = 1 << 3,
 	SKBDESC_DESC_IN_SKB = 1 << 4,
+	SKBDESC_TX_IS_AP = 1 << 5,
 };
 
 /**


More information about the users mailing list