r62 - unstable/rt2500/debian/patches

benh at alioth.debian.org benh at alioth.debian.org
Mon Oct 22 00:48:57 UTC 2007


Author: benh
Date: 2007-10-22 00:48:57 +0000 (Mon, 22 Oct 2007)
New Revision: 62

Modified:
   unstable/rt2500/debian/patches/004_fix_mlme_queue_locking.diff
Log:
Corrected use of smp_read_barrier_depends() as expression, thanks to Bryan Batten.


Modified: unstable/rt2500/debian/patches/004_fix_mlme_queue_locking.diff
===================================================================
--- unstable/rt2500/debian/patches/004_fix_mlme_queue_locking.diff	2007-10-21 23:47:48 UTC (rev 61)
+++ unstable/rt2500/debian/patches/004_fix_mlme_queue_locking.diff	2007-10-22 00:48:57 UTC (rev 62)
@@ -1,15 +1,6 @@
 --- rt2500.orig/Module/mlme.c
 +++ rt2500/Module/mlme.c
-@@ -42,6 +42,8 @@
- #include "rt_config.h"
- #include <stdarg.h>
- 
-+#include <asm/system.h>
-+
- // e.g. RssiSafeLevelForTxRate[RATE_36]" means if the current RSSI is greater than
- //      this value, then it's quaranteed capable of operating in 36 mbps TX rate in
- //      clean environment.
-@@ -289,7 +291,6 @@
+@@ -289,7 +289,6 @@
      do
      {
          pAd->Mlme.Running = FALSE;
@@ -17,7 +8,7 @@
  
          // initialize the two tables
          // MacTableInit(pAd);
-@@ -356,34 +357,27 @@
+@@ -356,34 +355,29 @@
      MLME_QUEUE_ELEM        *Elem = NULL;
      unsigned long flags;
  
@@ -42,7 +33,8 @@
 -        pAd->Mlme.Running = TRUE;
 -    }
 -    spin_unlock_irqrestore(&pAd->Mlme.TaskLock, flags);
--
++	pAd->Mlme.Running = TRUE;
+ 
 -    while (TRUE) {
 -	    spin_lock_irqsave(&pAd->Mlme.Queue.Lock, flags);
 -    	if (!MlmeDequeue(&pAd->Mlme.Queue, &Elem)) {
@@ -50,13 +42,13 @@
 -    		break;
 -    	}
 -   		spin_unlock_irqrestore(&pAd->Mlme.Queue.Lock, flags);
-+	pAd->Mlme.Running = TRUE;
++	// If there's a bubble, wait for it to collapse before proceeding.
++    while (MlmeGetHead(&pAd->Mlme.Queue, &Elem)) {
++		smp_read_barrier_depends();
++		if (!Elem->Occupied) break;
  
 -        if (pAd->PortCfg.BssType == BSS_MONITOR)
 -        	continue;
-+	// If there's a bubble, wait for it to collapse before proceeding.
-+    while (MlmeGetHead(&pAd->Mlme.Queue, &Elem) &&
-+           (smp_read_barrier_depends(), Elem->Occupied)) {
 +		spin_unlock_irqrestore(&pAd->Mlme.Queue.Lock, flags);
  
          //From message type, determine which state machine I should drive




More information about the Pkg-ralink-commits mailing list