r125 - tarballs unstable/rt2400/debian unstable/rt2400/debian/patches
benh at alioth.debian.org
benh at alioth.debian.org
Sun Jun 22 23:32:15 UTC 2008
Author: benh
Date: 2008-06-22 23:32:13 +0000 (Sun, 22 Jun 2008)
New Revision: 125
Added:
tarballs/rt2400_1.2.2+cvs20080623.orig.tar.gz
Removed:
unstable/rt2400/debian/patches/004_fix_mlme_queue_locking.diff
Modified:
unstable/rt2400/debian/changelog
unstable/rt2400/debian/patches/000_if_name.diff
unstable/rt2400/debian/patches/series
Log:
Added new CVS snapshot of rt2400.
Removed obsolete patch.
Added: tarballs/rt2400_1.2.2+cvs20080623.orig.tar.gz
===================================================================
(Binary files differ)
Property changes on: tarballs/rt2400_1.2.2+cvs20080623.orig.tar.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: unstable/rt2400/debian/changelog
===================================================================
--- unstable/rt2400/debian/changelog 2008-02-08 01:10:24 UTC (rev 124)
+++ unstable/rt2400/debian/changelog 2008-06-22 23:32:13 UTC (rev 125)
@@ -1,10 +1,12 @@
-rt2400 (1.2.2+cvs20070911-2) unstable; urgency=low
+rt2400 (1.2.2+cvs20080623-1) unstable; urgency=low
- [Ben Hutchings]
+ * New CVS snapshot
+ - Fixes compile error with Linux 2.6.24 and later
+ - Obsoletes 004_fix_mlme_queue_locking.diff
* Copied recommendations and suggestions from modules packages to
rt2400-source to make them more visible
- --
+ -- Ben Hutchings <ben at decadent.org.uk> Mon, 23 Jun 2008 00:12:29 +0100
rt2400 (1.2.2+cvs20070911-1) unstable; urgency=low
Modified: unstable/rt2400/debian/patches/000_if_name.diff
===================================================================
--- unstable/rt2400/debian/patches/000_if_name.diff 2008-02-08 01:10:24 UTC (rev 124)
+++ unstable/rt2400/debian/patches/000_if_name.diff 2008-06-22 23:32:13 UTC (rev 125)
@@ -1,5 +1,5 @@
---- Module/rtmp_main.c.orig
-+++ Module/rtmp_main.c
+--- rt2400.orig/Module/rtmp_main.c
++++ rt2400/Module/rtmp_main.c
@@ -64,7 +64,7 @@
#endif
Deleted: unstable/rt2400/debian/patches/004_fix_mlme_queue_locking.diff
===================================================================
--- unstable/rt2400/debian/patches/004_fix_mlme_queue_locking.diff 2008-02-08 01:10:24 UTC (rev 124)
+++ unstable/rt2400/debian/patches/004_fix_mlme_queue_locking.diff 2008-06-22 23:32:13 UTC (rev 125)
@@ -1,217 +0,0 @@
---- rt2400.orig/Module/mlme.c
-+++ rt2400/Module/mlme.c
-@@ -39,6 +39,8 @@
- #include "rt_config.h"
- #include <stdarg.h>
-
-+#include <asm/system.h>
-+
- /*
- ==========================================================================
- Description:
-@@ -58,7 +60,6 @@
- do
- {
- pAd->Mlme.Running = FALSE;
-- spin_lock_init(&pAd->Mlme.TaskLock);
-
- // initialize the two tables
- // MacTableInit(pAd);
-@@ -131,32 +132,28 @@
- {
- MLME_QUEUE_ELEM *Elem = NULL;
-
-- // Only accept MLME and Frame from peer side, no other (control/data) frame should
-- // get into this state machine
-+ // Only accept MLME and Frame from peer side, no other (control/data)
-+ // frame should get into this state machine
-
-- spin_lock(&pAd->Mlme.TaskLock);
-+ // We fix the multiple context service drop problem identified by
-+ // Ben Hutchings in an SMP- safe way by combining TaskLock and Queue.Lock
-+ // per his suggestion.
-+ spin_lock(&pAd->Mlme.Queue.Lock);
- if(pAd->Mlme.Running)
- {
-- spin_unlock(&pAd->Mlme.TaskLock);
-+ spin_unlock(&pAd->Mlme.Queue.Lock);
- return;
- }
-- else
-- {
-- pAd->Mlme.Running = TRUE;
-- }
-- spin_unlock(&pAd->Mlme.TaskLock);
-+ pAd->Mlme.Running = TRUE;
-+
-+ while (MlmeGetHead(&pAd->Mlme.Queue, &Elem)) {
-+ smp_read_barrier_depends();
-+ if (!Elem->Occupied) break;
-
-- while (TRUE) {
-- spin_lock(&pAd->Mlme.Queue.Lock);
-- if (!MlmeDequeue(&pAd->Mlme.Queue, &Elem)) {
-- spin_unlock(&pAd->Mlme.Queue.Lock);
-- break;
-- }
- spin_unlock(&pAd->Mlme.Queue.Lock);
-- if (pAd->PortCfg.BssType == BSS_MONITOR)
-- continue;
-+
- // From message type, determine which state machine I should drive
-- switch (Elem->Machine) {
-+ if (pAd->PortCfg.BssType != BSS_MONITOR) switch (Elem->Machine) {
- case ASSOC_STATE_MACHINE:
- StateMachinePerformAction(pAd, &pAd->Mlme.AssocMachine, Elem);
- break;
-@@ -173,18 +170,19 @@
- MlmeCntlMachinePerformAction(pAd, &pAd->Mlme.CntlMachine, Elem);
- break;
- default:
-- DBGPRINT(RT_DEBUG_TRACE, "ERROR: Illegal machine in MlmeHandler()\n");
-+ DBGPRINT(RT_DEBUG_ERROR,
-+ "ERROR: Illegal machine in MlmeHandler()\n");
- break;
- } // end of switch
-
- // free MLME element
-- Elem->Occupied = FALSE;
-- Elem->MsgLen = 0;
-+ smp_mb();
-+ Elem->Occupied = FALSE; // sic - bb
-+ spin_lock(&pAd->Mlme.Queue.Lock);
-+ MlmeDequeue(&pAd->Mlme.Queue);
- }
--
-- spin_lock(&pAd->Mlme.TaskLock);
- pAd->Mlme.Running = FALSE;
-- spin_unlock(&pAd->Mlme.TaskLock);
-+ spin_unlock(&pAd->Mlme.Queue.Lock);
- }
-
- /*
-@@ -229,7 +227,6 @@
- StateMachineDestroy(&pAd->Mlme.AuthRspMachine);
- StateMachineDestroy(&pAd->Mlme.SyncMachine);
- // StateMachineDestroy(&pAd->Mlme.CntlMachine);
--// spin_unlock(&pAd->Mlme.TaskLock);
- // NdisFreeSpinLock(&pAd->PortCfg.MacTab.Lock);
-
- // Cancel pending timers
-@@ -1392,17 +1389,31 @@
- printk(KERN_ERR DRV_NAME ": MlmeEnqueue full, msg dropped and may corrupt MLME\n");
- return FALSE;
- }
-+ // If another context preempts us, it uses the next element - sic. bb
- Tail = Queue->Tail++;
- Queue->Tail %= MAX_LEN_OF_MLME_QUEUE;
- Queue->Num++;
-+
-+ // We guard against Ben Hutchings' incomplete queue element problem by not
-+ // setting the Occupied flag until the memcpy is done. The ocurrence of a
-+ // refresh cycle during a copy can stretch the time by up to 100 usec
-+ // (well, quite a few usec, anyway); not good when interrupts are disabled.
-+ // Note that this can leave a bubble in the queue, but it will have
-+ // disappeared by the time this thread gets around to calling MlmeHandler.
-+ // All items will be handled in their proper order, but possibly not in the
-+ // context in which they were added. - bb
- spin_unlock(&Queue->Lock);
- DBGPRINT(RT_DEBUG_INFO, "MlmeEnqueue, num=%d\n", Queue->Num);
-
-- Queue->Entry[Tail].Occupied = TRUE;
- Queue->Entry[Tail].Machine = Machine;
- Queue->Entry[Tail].MsgType = MsgType;
- Queue->Entry[Tail].MsgLen = MsgLen;
- memcpy(Queue->Entry[Tail].Msg, Msg, MsgLen);
-+
-+ //MlmeHandler will stop when it finds this false.
-+ smp_wmb();
-+ Queue->Entry[Tail].Occupied = TRUE;
-+
- return TRUE;
- }
-
-@@ -1449,7 +1460,7 @@
- DBGPRINT(RT_DEBUG_INFO, "MlmeEnqueueForRecv, num=%d\n",Queue->Num);
-
- // OK, we got all the informations, it is time to put things into queue
-- Queue->Entry[Tail].Occupied = TRUE;
-+ // See MlmeEnqueue note for use of Occupied flag.
- Queue->Entry[Tail].Machine = Machine;
- Queue->Entry[Tail].MsgType = MsgType;
- Queue->Entry[Tail].MsgLen = MsgLen;
-@@ -1458,13 +1469,15 @@
- Queue->Entry[Tail].TimeStamp = jiffies;
- Queue->Entry[Tail].Rssi = Rssi;
- memcpy(Queue->Entry[Tail].Msg, Msg, MsgLen);
-+ smp_wmb();
-+ Queue->Entry[Tail].Occupied = TRUE;
-
- MlmeHandler(pAd);
-
- return TRUE;
- }
-
--/*! \brief Dequeue a message from the MLME Queue
-+/*! \brief Get the first message from the MLME Queue
- * WARNING: Must be call with Mlme.Queue.Lock held
- * \param *Queue The MLME Queue
- * \param *Elem The message dequeued from MLME Queue
-@@ -1472,14 +1485,29 @@
- * \pre
- * \post
- */
--BOOLEAN MlmeDequeue(
-+BOOLEAN MlmeGetHead(
- IN MLME_QUEUE *Queue,
- OUT MLME_QUEUE_ELEM **Elem)
- {
- if (Queue->Num == 0)
- return FALSE;
-- *Elem = &Queue->Entry[Queue->Head++];
-- Queue->Head %= MAX_LEN_OF_MLME_QUEUE;
-+ *Elem = &Queue->Entry[Queue->Head];
-+ return TRUE;
-+}
-+
-+/*! \brief Remove the first message from the MLME Queue
-+ * WARNING: Must be call with Mlme.Queue.Lock held
-+ * \param *Queue The MLME Queue
-+ * \return TRUE if a message was removed, FALSE if the queue was empty
-+ * \pre
-+ * \post
-+ */
-+BOOLEAN MlmeDequeue(
-+ IN MLME_QUEUE *Queue)
-+{
-+ if (Queue->Num == 0)
-+ return FALSE;
-+ Queue->Head = (Queue->Head + 1) % MAX_LEN_OF_MLME_QUEUE;
- Queue->Num--;
- DBGPRINT(RT_DEBUG_INFO, "MlmeDequeue, num=%d\n",Queue->Num);
-
---- rt2400.orig/Module/rtmp.h
-+++ rt2400/Module/rtmp.h
-@@ -596,7 +596,6 @@
- ULONG RxPER; // 0..100 %
-
- BOOLEAN Running;
-- spinlock_t TaskLock;
- MLME_QUEUE Queue;
-
- UINT ShiftReg;
-@@ -1287,10 +1286,13 @@
- IN ULONG MsgLen,
- IN VOID *Msg);
-
--BOOLEAN MlmeDequeue(
-+BOOLEAN MlmeGetHead(
- IN MLME_QUEUE *Queue,
- OUT MLME_QUEUE_ELEM **Elem);
-
-+BOOLEAN MlmeDequeue(
-+ IN MLME_QUEUE *Queue);
-+
- BOOLEAN MsgTypeSubst(
- IN MACFRAME *Fr,
- OUT INT *Machine,
Modified: unstable/rt2400/debian/patches/series
===================================================================
--- unstable/rt2400/debian/patches/series 2008-02-08 01:10:24 UTC (rev 124)
+++ unstable/rt2400/debian/patches/series 2008-06-22 23:32:13 UTC (rev 125)
@@ -1,2 +1 @@
000_if_name.diff -p0
-004_fix_mlme_queue_locking.diff
More information about the Pkg-ralink-commits
mailing list