rt2860sta, rt2870sta: Apply changes from Linux 2.6.33 and 2.6.34
rt3090sta: Replace with rt2860sta (Closes: #588863) svn path=/dists/sid/linux-2.6/; revision=15991
This commit is contained in:
parent
bf53f8f2c6
commit
15c7d66033
|
@ -5,6 +5,8 @@ linux-2.6 (2.6.32-18) UNRELEASED; urgency=low
|
|||
allocation failure (Closes: #580124)
|
||||
* postinst: Remove support for 'default' boot loaders. Warn users on
|
||||
upgrade if the current configuration may rely on this.
|
||||
* rt2860sta, rt2870sta: Apply changes from Linux 2.6.33 and 2.6.34
|
||||
* rt3090sta: Replace with rt2860sta (Closes: #588863)
|
||||
|
||||
[ Martin Michlmayr ]
|
||||
* Add some patches from the Orion tree, including support for Marvell's
|
||||
|
|
|
@ -1085,11 +1085,6 @@ CONFIG_RT2860=m
|
|||
##
|
||||
CONFIG_RT2870=m
|
||||
|
||||
##
|
||||
## file: drivers/staging/rt3090/Kconfig
|
||||
##
|
||||
CONFIG_RT3090=m
|
||||
|
||||
##
|
||||
## file: drivers/staging/rtl8187se/Kconfig
|
||||
##
|
||||
|
|
79796
debian/patches/features/all/rt28x0/0001-Staging-rt28x0-updates-from-vendor-s-V2.1.0.0-driver.patch
vendored
Normal file
79796
debian/patches/features/all/rt28x0/0001-Staging-rt28x0-updates-from-vendor-s-V2.1.0.0-driver.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
496
debian/patches/features/all/rt28x0/0002-Staging-rt28x0-remove-unused-code-from-common-dfs.c.patch
vendored
Normal file
496
debian/patches/features/all/rt28x0/0002-Staging-rt28x0-remove-unused-code-from-common-dfs.c.patch
vendored
Normal file
|
@ -0,0 +1,496 @@
|
|||
From d040160beeb549525fb1098db3ff84b06d87620d Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Tue, 22 Sep 2009 20:44:15 +0200
|
||||
Subject: [PATCH 02/42] Staging: rt28x0: remove unused code from common/dfs.c
|
||||
|
||||
commit c3126b93b512c046340dfc4ab38beabd8084169f upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/common/dfs.c | 378 -----------------------------------
|
||||
drivers/staging/rt2860/dfs.h | 75 -------
|
||||
2 files changed, 0 insertions(+), 453 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/dfs.c b/drivers/staging/rt2860/common/dfs.c
|
||||
index 7b3890f..11b7c19 100644
|
||||
--- a/drivers/staging/rt2860/common/dfs.c
|
||||
+++ b/drivers/staging/rt2860/common/dfs.c
|
||||
@@ -37,196 +37,6 @@
|
||||
|
||||
#include "../rt_config.h"
|
||||
|
||||
-typedef struct _RADAR_DURATION_TABLE
|
||||
-{
|
||||
- ULONG RDDurRegion;
|
||||
- ULONG RadarSignalDuration;
|
||||
- ULONG Tolerance;
|
||||
-} RADAR_DURATION_TABLE, *PRADAR_DURATION_TABLE;
|
||||
-
|
||||
-
|
||||
-
|
||||
-UCHAR RdIdleTimeTable[MAX_RD_REGION][4] =
|
||||
-{
|
||||
- {9, 250, 250, 250}, // CE
|
||||
-#ifdef DFS_FCC_BW40_FIX
|
||||
- {1, 250, 250, 250}, // FCC
|
||||
-#else
|
||||
- {4, 250, 250, 250}, // FCC
|
||||
-#endif
|
||||
- {4, 250, 250, 250}, // JAP
|
||||
- {15, 250, 250, 250}, // JAP_W53
|
||||
- {4, 250, 250, 250} // JAP_W56
|
||||
-};
|
||||
-
|
||||
-/*
|
||||
- ========================================================================
|
||||
-
|
||||
- Routine Description:
|
||||
- Bbp Radar detection routine
|
||||
-
|
||||
- Arguments:
|
||||
- pAd Pointer to our adapter
|
||||
-
|
||||
- Return Value:
|
||||
-
|
||||
- ========================================================================
|
||||
-*/
|
||||
-VOID BbpRadarDetectionStart(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- UINT8 RadarPeriod;
|
||||
-
|
||||
- RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 114, 0x02);
|
||||
- RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 121, 0x20);
|
||||
- RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 122, 0x00);
|
||||
- RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 123, 0x08/*0x80*/);
|
||||
- RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 124, 0x28);
|
||||
- RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, 125, 0xff);
|
||||
-
|
||||
-#ifdef MERGE_ARCH_TEAM
|
||||
- if ((pAd->CommonCfg.RadarDetect.RDDurRegion == JAP) || (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W53) || (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W56))
|
||||
- {
|
||||
- pAd->CommonCfg.RadarDetect.RDDurRegion = JAP;
|
||||
- pAd->CommonCfg.RadarDetect.RDDurRegion = JapRadarType(pAd);
|
||||
- if (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W56)
|
||||
- {
|
||||
- pAd->CommonCfg.RadarDetect.DfsSessionTime = 13;
|
||||
- }
|
||||
- else if (pAd->CommonCfg.RadarDetect.RDDurRegion == JAP_W53)
|
||||
- {
|
||||
- pAd->CommonCfg.RadarDetect.DfsSessionTime = 15;
|
||||
- }
|
||||
- }
|
||||
-#endif // MERGE_ARCH_TEAM //
|
||||
-
|
||||
- RadarPeriod = ((UINT)RdIdleTimeTable[pAd->CommonCfg.RadarDetect.RDDurRegion][0] + (UINT)pAd->CommonCfg.RadarDetect.DfsSessionTime) < 250 ?
|
||||
- (RdIdleTimeTable[pAd->CommonCfg.RadarDetect.RDDurRegion][0] + pAd->CommonCfg.RadarDetect.DfsSessionTime) : 250;
|
||||
-
|
||||
-#ifdef MERGE_ARCH_TEAM
|
||||
-
|
||||
-
|
||||
-#else // Original RT28xx source code.
|
||||
- RTMP_IO_WRITE8(pAd, 0x7020, 0x1d);
|
||||
- RTMP_IO_WRITE8(pAd, 0x7021, 0x40);
|
||||
-#endif // MERGE_ARCH_TEAM //
|
||||
-
|
||||
- RadarDetectionStart(pAd, 0, RadarPeriod);
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
- ========================================================================
|
||||
-
|
||||
- Routine Description:
|
||||
- Bbp Radar detection routine
|
||||
-
|
||||
- Arguments:
|
||||
- pAd Pointer to our adapter
|
||||
-
|
||||
- Return Value:
|
||||
-
|
||||
- ========================================================================
|
||||
-*/
|
||||
-VOID BbpRadarDetectionStop(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- RTMP_IO_WRITE8(pAd, 0x7020, 0x1d);
|
||||
- RTMP_IO_WRITE8(pAd, 0x7021, 0x60);
|
||||
-
|
||||
- RadarDetectionStop(pAd);
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
- ========================================================================
|
||||
-
|
||||
- Routine Description:
|
||||
- Radar detection routine
|
||||
-
|
||||
- Arguments:
|
||||
- pAd Pointer to our adapter
|
||||
-
|
||||
- Return Value:
|
||||
-
|
||||
- ========================================================================
|
||||
-*/
|
||||
-VOID RadarDetectionStart(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN BOOLEAN CTSProtect,
|
||||
- IN UINT8 CTSPeriod)
|
||||
-{
|
||||
- UINT8 DfsActiveTime = (pAd->CommonCfg.RadarDetect.DfsSessionTime & 0x1f);
|
||||
- UINT8 CtsProtect = (CTSProtect == 1) ? 0x02 : 0x01; // CTS protect.
|
||||
-
|
||||
- if (CTSProtect != 0)
|
||||
- {
|
||||
- switch(pAd->CommonCfg.RadarDetect.RDDurRegion)
|
||||
- {
|
||||
- case FCC:
|
||||
- case JAP_W56:
|
||||
- CtsProtect = 0x03;
|
||||
- break;
|
||||
-
|
||||
- case JAP:
|
||||
- {
|
||||
- UCHAR RDDurRegion;
|
||||
- RDDurRegion = JapRadarType(pAd);
|
||||
- if (RDDurRegion == JAP_W56)
|
||||
- CtsProtect = 0x03;
|
||||
- else
|
||||
- CtsProtect = 0x02;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- case CE:
|
||||
- case JAP_W53:
|
||||
- default:
|
||||
- CtsProtect = 0x02;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- CtsProtect = 0x01;
|
||||
-
|
||||
-
|
||||
- // send start-RD with CTS protection command to MCU
|
||||
- // highbyte [7] reserve
|
||||
- // highbyte [6:5] 0x: stop Carrier/Radar detection
|
||||
- // highbyte [10]: Start Carrier/Radar detection without CTS protection, 11: Start Carrier/Radar detection with CTS protection
|
||||
- // highbyte [4:0] Radar/carrier detection duration. In 1ms.
|
||||
-
|
||||
- // lowbyte [7:0] Radar/carrier detection period, in 1ms.
|
||||
- AsicSendCommandToMcu(pAd, 0x60, 0xff, CTSPeriod, DfsActiveTime | (CtsProtect << 5));
|
||||
- //AsicSendCommandToMcu(pAd, 0x63, 0xff, 10, 0);
|
||||
-
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
- ========================================================================
|
||||
-
|
||||
- Routine Description:
|
||||
- Radar detection routine
|
||||
-
|
||||
- Arguments:
|
||||
- pAd Pointer to our adapter
|
||||
-
|
||||
- Return Value:
|
||||
- TRUE Found radar signal
|
||||
- FALSE Not found radar signal
|
||||
-
|
||||
- ========================================================================
|
||||
-*/
|
||||
-VOID RadarDetectionStop(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- DBGPRINT(RT_DEBUG_TRACE,("RadarDetectionStop.\n"));
|
||||
- AsicSendCommandToMcu(pAd, 0x60, 0xff, 0x00, 0x00); // send start-RD with CTS protection command to MCU
|
||||
-
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
/*
|
||||
========================================================================
|
||||
|
||||
@@ -260,191 +70,3 @@ BOOLEAN RadarChannelCheck(
|
||||
|
||||
return result;
|
||||
}
|
||||
-
|
||||
-ULONG JapRadarType(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- ULONG i;
|
||||
- const UCHAR Channel[15]={52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140};
|
||||
-
|
||||
- if (pAd->CommonCfg.RadarDetect.RDDurRegion != JAP)
|
||||
- {
|
||||
- return pAd->CommonCfg.RadarDetect.RDDurRegion;
|
||||
- }
|
||||
-
|
||||
- for (i=0; i<15; i++)
|
||||
- {
|
||||
- if (pAd->CommonCfg.Channel == Channel[i])
|
||||
- {
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (i < 4)
|
||||
- return JAP_W53;
|
||||
- else if (i < 15)
|
||||
- return JAP_W56;
|
||||
- else
|
||||
- return JAP; // W52
|
||||
-
|
||||
-}
|
||||
-
|
||||
-ULONG RTMPBbpReadRadarDuration(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- UINT8 byteValue = 0;
|
||||
- ULONG result;
|
||||
-
|
||||
- BBP_IO_READ8_BY_REG_ID(pAd, BBP_R115, &byteValue);
|
||||
-
|
||||
- result = 0;
|
||||
- switch (byteValue)
|
||||
- {
|
||||
- case 1: // radar signal detected by pulse mode.
|
||||
- case 2: // radar signal detected by width mode.
|
||||
- result = RTMPReadRadarDuration(pAd);
|
||||
- break;
|
||||
-
|
||||
- case 0: // No radar signal.
|
||||
- default:
|
||||
-
|
||||
- result = 0;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- return result;
|
||||
-}
|
||||
-
|
||||
-ULONG RTMPReadRadarDuration(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- ULONG result = 0;
|
||||
-
|
||||
- return result;
|
||||
-
|
||||
-}
|
||||
-
|
||||
-VOID RTMPCleanRadarDuration(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
- ========================================================================
|
||||
- Routine Description:
|
||||
- Radar wave detection. The API should be invoke each second.
|
||||
-
|
||||
- Arguments:
|
||||
- pAd - Adapter pointer
|
||||
-
|
||||
- Return Value:
|
||||
- None
|
||||
-
|
||||
- ========================================================================
|
||||
-*/
|
||||
-VOID ApRadarDetectPeriodic(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- INT i;
|
||||
-
|
||||
- pAd->CommonCfg.RadarDetect.InServiceMonitorCount++;
|
||||
-
|
||||
- for (i=0; i<pAd->ChannelListNum; i++)
|
||||
- {
|
||||
- if (pAd->ChannelList[i].RemainingTimeForUse > 0)
|
||||
- {
|
||||
- pAd->ChannelList[i].RemainingTimeForUse --;
|
||||
- if ((pAd->Mlme.PeriodicRound%5) == 0)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("RadarDetectPeriodic - ch=%d, RemainingTimeForUse=%d\n", pAd->ChannelList[i].Channel, pAd->ChannelList[i].RemainingTimeForUse));
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- //radar detect
|
||||
- if ((pAd->CommonCfg.Channel > 14)
|
||||
- && (pAd->CommonCfg.bIEEE80211H == 1)
|
||||
- && RadarChannelCheck(pAd, pAd->CommonCfg.Channel))
|
||||
- {
|
||||
- RadarDetectPeriodic(pAd);
|
||||
- }
|
||||
-
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
-// Periodic Radar detection, switch channel will occur in RTMPHandleTBTTInterrupt()
|
||||
-// Before switch channel, driver needs doing channel switch announcement.
|
||||
-VOID RadarDetectPeriodic(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- // need to check channel availability, after switch channel
|
||||
- if (pAd->CommonCfg.RadarDetect.RDMode != RD_SILENCE_MODE)
|
||||
- return;
|
||||
-
|
||||
- // channel availability check time is 60sec, use 65 for assurance
|
||||
- if (pAd->CommonCfg.RadarDetect.RDCount++ > pAd->CommonCfg.RadarDetect.ChMovingTime)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("Not found radar signal, start send beacon and radar detection in service monitor\n\n"));
|
||||
- BbpRadarDetectionStop(pAd);
|
||||
- AsicEnableBssSync(pAd);
|
||||
- pAd->CommonCfg.RadarDetect.RDMode = RD_NORMAL_MODE;
|
||||
-
|
||||
-
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/*
|
||||
- ==========================================================================
|
||||
- Description:
|
||||
- change channel moving time for DFS testing.
|
||||
-
|
||||
- Arguments:
|
||||
- pAdapter Pointer to our adapter
|
||||
- wrq Pointer to the ioctl argument
|
||||
-
|
||||
- Return Value:
|
||||
- None
|
||||
-
|
||||
- Note:
|
||||
- Usage:
|
||||
- 1.) iwpriv ra0 set ChMovTime=[value]
|
||||
- ==========================================================================
|
||||
-*/
|
||||
-INT Set_ChMovingTime_Proc(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN PSTRING arg)
|
||||
-{
|
||||
- UINT8 Value;
|
||||
-
|
||||
- Value = (UINT8) simple_strtol(arg, 0, 10);
|
||||
-
|
||||
- pAd->CommonCfg.RadarDetect.ChMovingTime = Value;
|
||||
-
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("%s:: %d\n", __func__,
|
||||
- pAd->CommonCfg.RadarDetect.ChMovingTime));
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-INT Set_LongPulseRadarTh_Proc(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN PSTRING arg)
|
||||
-{
|
||||
- UINT8 Value;
|
||||
-
|
||||
- Value = (UINT8) simple_strtol(arg, 0, 10) > 10 ? 10 : simple_strtol(arg, 0, 10);
|
||||
-
|
||||
- pAd->CommonCfg.RadarDetect.LongPulseRadarTh = Value;
|
||||
-
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("%s:: %d\n", __func__,
|
||||
- pAd->CommonCfg.RadarDetect.LongPulseRadarTh));
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
diff --git a/drivers/staging/rt2860/dfs.h b/drivers/staging/rt2860/dfs.h
|
||||
index 6fa6d65..9ab445c 100644
|
||||
--- a/drivers/staging/rt2860/dfs.h
|
||||
+++ b/drivers/staging/rt2860/dfs.h
|
||||
@@ -36,81 +36,6 @@
|
||||
Fonchi 03-12-2007 created
|
||||
*/
|
||||
|
||||
-#define RADAR_PULSE 1
|
||||
-#define RADAR_WIDTH 2
|
||||
-
|
||||
-#define WIDTH_RD_IDLE 0
|
||||
-#define WIDTH_RD_CHECK 1
|
||||
-
|
||||
-
|
||||
-
|
||||
-/*************************************************************************
|
||||
- *
|
||||
- * DFS Radar related definitions.
|
||||
- *
|
||||
- ************************************************************************/
|
||||
-//#define CARRIER_DETECT_TASK_NUM 6
|
||||
-//#define RADAR_DETECT_TASK_NUM 7
|
||||
-
|
||||
-// McuRadarState && McuCarrierState for 2880-SW-MCU
|
||||
-#define FREE_FOR_TX 0
|
||||
-#define WAIT_CTS_BEING_SENT 1
|
||||
-#define DO_DETECTION 2
|
||||
-
|
||||
-// McuRadarEvent
|
||||
-#define RADAR_EVENT_CTS_SENT 0x01 // Host signal MCU that CTS has been sent
|
||||
-#define RADAR_EVENT_CTS_CARRIER_SENT 0x02 // Host signal MCU that CTS has been sent (Carrier)
|
||||
-#define RADAR_EVENT_RADAR_DETECTING 0x04 // Radar detection is on going, carrier detection hold back
|
||||
-#define RADAR_EVENT_CARRIER_DETECTING 0x08 // Carrier detection is on going, radar detection hold back
|
||||
-#define RADAR_EVENT_WIDTH_RADAR 0x10 // BBP == 2 radar detected
|
||||
-#define RADAR_EVENT_CTS_KICKED 0x20 // Radar detection need to sent double CTS, first CTS sent
|
||||
-
|
||||
-// McuRadarCmd
|
||||
-#define DETECTION_STOP 0
|
||||
-#define RADAR_DETECTION 1
|
||||
-#define CARRIER_DETECTION 2
|
||||
-
|
||||
-VOID BbpRadarDetectionStart(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
-VOID BbpRadarDetectionStop(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
-VOID RadarDetectionStart(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN BOOLEAN CTS_Protect,
|
||||
- IN UINT8 CTSPeriod);
|
||||
-
|
||||
-VOID RadarDetectionStop(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
-VOID RadarDetectPeriodic(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
-
|
||||
BOOLEAN RadarChannelCheck(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN UCHAR Ch);
|
||||
-
|
||||
-ULONG JapRadarType(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
-ULONG RTMPBbpReadRadarDuration(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
-ULONG RTMPReadRadarDuration(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
-VOID RTMPCleanRadarDuration(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
-
|
||||
-INT Set_ChMovingTime_Proc(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN PSTRING arg);
|
||||
-
|
||||
-INT Set_LongPulseRadarTh_Proc(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN PSTRING arg);
|
||||
-
|
||||
-
|
||||
--
|
||||
1.7.1
|
||||
|
3191
debian/patches/features/all/rt28x0/0003-Staging-rt2860-add-RT3090-chipset-support.patch
vendored
Normal file
3191
debian/patches/features/all/rt28x0/0003-Staging-rt2860-add-RT3090-chipset-support.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
105373
debian/patches/features/all/rt28x0/0004-Staging-remove-no-longer-needed-rt3090-driver.patch
vendored
Normal file
105373
debian/patches/features/all/rt28x0/0004-Staging-remove-no-longer-needed-rt3090-driver.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
222
debian/patches/features/all/rt28x0/0005-Staging-rt28x0-remove-unused-eewrite-methods.patch
vendored
Normal file
222
debian/patches/features/all/rt28x0/0005-Staging-rt28x0-remove-unused-eewrite-methods.patch
vendored
Normal file
|
@ -0,0 +1,222 @@
|
|||
From 620d8973fb89089d4210f1e21c02b5e9654ae3ee Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Wed, 21 Oct 2009 22:43:51 +0200
|
||||
Subject: [PATCH 05/42] Staging: rt28x0: remove unused ->eewrite methods
|
||||
|
||||
commit fbedb45f6a547901781d23d0e70ef77e0724cb1c upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/common/ee_efuse.c | 17 ----------
|
||||
drivers/staging/rt2860/common/ee_prom.c | 48 ------------------------------
|
||||
drivers/staging/rt2860/common/eeprom.c | 3 --
|
||||
drivers/staging/rt2860/eeprom.h | 15 ---------
|
||||
drivers/staging/rt2860/rtmp.h | 1 -
|
||||
drivers/staging/rt2860/rtmp_chip.h | 4 --
|
||||
drivers/staging/rt2870/common/rtusb_io.c | 11 -------
|
||||
7 files changed, 0 insertions(+), 99 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/ee_efuse.c b/drivers/staging/rt2860/common/ee_efuse.c
|
||||
index f522244..f294450 100644
|
||||
--- a/drivers/staging/rt2860/common/ee_efuse.c
|
||||
+++ b/drivers/staging/rt2860/common/ee_efuse.c
|
||||
@@ -1271,23 +1271,6 @@ int rtmp_ee_efuse_read16(
|
||||
return (*pValue);
|
||||
}
|
||||
|
||||
-
|
||||
-int rtmp_ee_efuse_write16(
|
||||
- IN RTMP_ADAPTER *pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT data)
|
||||
-{
|
||||
- if(pAd->bFroceEEPROMBuffer||pAd->bEEPROMFile)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("Write to EEPROM Buffer\n"));
|
||||
- NdisMoveMemory(&(pAd->EEPROMImage[Offset]), &data, 2);
|
||||
- }
|
||||
- else
|
||||
- eFuseWriteRegisters(pAd, Offset, 2, &data);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
int RtmpEfuseSupportCheck(
|
||||
IN RTMP_ADAPTER *pAd)
|
||||
{
|
||||
diff --git a/drivers/staging/rt2860/common/ee_prom.c b/drivers/staging/rt2860/common/ee_prom.c
|
||||
index 9ebff8b..d600e9b 100644
|
||||
--- a/drivers/staging/rt2860/common/ee_prom.c
|
||||
+++ b/drivers/staging/rt2860/common/ee_prom.c
|
||||
@@ -220,51 +220,3 @@ int rtmp_ee_prom_read16(
|
||||
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
}
|
||||
-
|
||||
-
|
||||
-int rtmp_ee_prom_write16(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT Data)
|
||||
-{
|
||||
- UINT32 x;
|
||||
-
|
||||
-
|
||||
- Offset /= 2;
|
||||
-
|
||||
- EWEN(pAd);
|
||||
-
|
||||
- // reset bits and set EECS
|
||||
- RTMP_IO_READ32(pAd, E2PROM_CSR, &x);
|
||||
- x &= ~(EEDI | EEDO | EESK);
|
||||
- x |= EECS;
|
||||
- RTMP_IO_WRITE32(pAd, E2PROM_CSR, x);
|
||||
-
|
||||
- // patch can not access e-Fuse issue
|
||||
- if (!(IS_RT3090(pAd) || IS_RT3572(pAd) || IS_RT3390(pAd)))
|
||||
- {
|
||||
- // kick a pulse
|
||||
- RaiseClock(pAd, &x);
|
||||
- LowerClock(pAd, &x);
|
||||
- }
|
||||
-
|
||||
- // output the read_opcode ,register number and data in that order
|
||||
- ShiftOutBits(pAd, EEPROM_WRITE_OPCODE, 3);
|
||||
- ShiftOutBits(pAd, Offset, pAd->EEPROMAddressNum);
|
||||
- ShiftOutBits(pAd, Data, 16); // 16-bit access
|
||||
-
|
||||
- // read DO status
|
||||
- RTMP_IO_READ32(pAd, E2PROM_CSR, &x);
|
||||
-
|
||||
- EEpromCleanup(pAd);
|
||||
-
|
||||
- RTMPusecDelay(10000); //delay for twp(MAX)=10ms
|
||||
-
|
||||
- EWDS(pAd);
|
||||
-
|
||||
- EEpromCleanup(pAd);
|
||||
-
|
||||
-
|
||||
- return NDIS_STATUS_SUCCESS;
|
||||
-
|
||||
-}
|
||||
diff --git a/drivers/staging/rt2860/common/eeprom.c b/drivers/staging/rt2860/common/eeprom.c
|
||||
index 03b8454..d7a2664 100644
|
||||
--- a/drivers/staging/rt2860/common/eeprom.c
|
||||
+++ b/drivers/staging/rt2860/common/eeprom.c
|
||||
@@ -66,7 +66,6 @@ INT RtmpChipOpsEepromHook(
|
||||
{
|
||||
pChipOps->eeinit = eFuse_init;
|
||||
pChipOps->eeread = rtmp_ee_efuse_read16;
|
||||
- pChipOps->eewrite = rtmp_ee_efuse_write16;
|
||||
return 0 ;
|
||||
}
|
||||
else
|
||||
@@ -83,14 +82,12 @@ INT RtmpChipOpsEepromHook(
|
||||
case RTMP_DEV_INF_PCI:
|
||||
pChipOps->eeinit = NULL;
|
||||
pChipOps->eeread = rtmp_ee_prom_read16;
|
||||
- pChipOps->eewrite = rtmp_ee_prom_write16;
|
||||
break;
|
||||
#endif // RTMP_PCI_SUPPORT //
|
||||
#ifdef RTMP_USB_SUPPORT
|
||||
case RTMP_DEV_INF_USB:
|
||||
pChipOps->eeinit = NULL;
|
||||
pChipOps->eeread = RTUSBReadEEPROM16;
|
||||
- pChipOps->eewrite = RTUSBWriteEEPROM16;
|
||||
break;
|
||||
#endif // RTMP_USB_SUPPORT //
|
||||
|
||||
diff --git a/drivers/staging/rt2860/eeprom.h b/drivers/staging/rt2860/eeprom.h
|
||||
index f1aef0c..9979fef 100644
|
||||
--- a/drivers/staging/rt2860/eeprom.h
|
||||
+++ b/drivers/staging/rt2860/eeprom.h
|
||||
@@ -48,11 +48,6 @@ int rtmp_ee_prom_read16(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN USHORT Offset,
|
||||
OUT USHORT *pValue);
|
||||
-
|
||||
-int rtmp_ee_prom_write16(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT value);
|
||||
#endif // RTMP_PCI_SUPPORT //
|
||||
#ifdef RTMP_USB_SUPPORT
|
||||
/*************************************************************************
|
||||
@@ -62,11 +57,6 @@ NTSTATUS RTUSBReadEEPROM16(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN USHORT offset,
|
||||
OUT PUSHORT pData);
|
||||
-
|
||||
-NTSTATUS RTUSBWriteEEPROM16(
|
||||
- IN RTMP_ADAPTER *pAd,
|
||||
- IN USHORT offset,
|
||||
- IN USHORT value);
|
||||
#endif // RTMP_USB_SUPPORT //
|
||||
|
||||
#ifdef RT30xx
|
||||
@@ -75,11 +65,6 @@ int rtmp_ee_efuse_read16(
|
||||
IN RTMP_ADAPTER *pAd,
|
||||
IN USHORT Offset,
|
||||
OUT USHORT *pValue);
|
||||
-
|
||||
-int rtmp_ee_efuse_write16(
|
||||
- IN RTMP_ADAPTER *pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT data);
|
||||
#endif // RTMP_EFUSE_SUPPORT //
|
||||
#endif // RT30xx //
|
||||
|
||||
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
|
||||
index 12b1465..3e284f2 100644
|
||||
--- a/drivers/staging/rt2860/rtmp.h
|
||||
+++ b/drivers/staging/rt2860/rtmp.h
|
||||
@@ -1790,7 +1790,6 @@ struct _RTMP_CHIP_OP_
|
||||
/* Calibration access related callback functions */
|
||||
int (*eeinit)(RTMP_ADAPTER *pAd); /* int (*eeinit)(RTMP_ADAPTER *pAd); */
|
||||
int (*eeread)(RTMP_ADAPTER *pAd, USHORT offset, PUSHORT pValue); /* int (*eeread)(RTMP_ADAPTER *pAd, int offset, PUSHORT pValue); */
|
||||
- int (*eewrite)(RTMP_ADAPTER *pAd, USHORT offset, USHORT value);; /* int (*eewrite)(RTMP_ADAPTER *pAd, int offset, USHORT value); */
|
||||
|
||||
/* MCU related callback functions */
|
||||
int (*loadFirmware)(RTMP_ADAPTER *pAd); /* int (*loadFirmware)(RTMP_ADAPTER *pAd); */
|
||||
diff --git a/drivers/staging/rt2860/rtmp_chip.h b/drivers/staging/rt2860/rtmp_chip.h
|
||||
index 1284a44..1098a85 100644
|
||||
--- a/drivers/staging/rt2860/rtmp_chip.h
|
||||
+++ b/drivers/staging/rt2860/rtmp_chip.h
|
||||
@@ -167,10 +167,6 @@
|
||||
#define RT28xx_EEPROM_READ16(_pAd, _offset, _value) \
|
||||
(_pAd)->chipOps.eeread((RTMP_ADAPTER *)(_pAd), (USHORT)(_offset), (PUSHORT)&(_value))
|
||||
|
||||
-#define RT28xx_EEPROM_WRITE16(_pAd, _offset, _value) \
|
||||
- (_pAd)->chipOps.eewrite((RTMP_ADAPTER *)(_pAd), (USHORT)(_offset), (USHORT)(_value))
|
||||
-
|
||||
-
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// E2PROM data layout
|
||||
diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c
|
||||
index a93fde5..b01a24a 100644
|
||||
--- a/drivers/staging/rt2870/common/rtusb_io.c
|
||||
+++ b/drivers/staging/rt2870/common/rtusb_io.c
|
||||
@@ -619,17 +619,6 @@ NTSTATUS RTUSBReadEEPROM16(
|
||||
|
||||
}
|
||||
|
||||
-NTSTATUS RTUSBWriteEEPROM16(
|
||||
- IN RTMP_ADAPTER *pAd,
|
||||
- IN USHORT offset,
|
||||
- IN USHORT value)
|
||||
-{
|
||||
- USHORT tmpVal;
|
||||
-
|
||||
- tmpVal = cpu2le16(value);
|
||||
- return RTUSBWriteEEPROM(pAd, offset, (PUCHAR)&(tmpVal), 2);
|
||||
-}
|
||||
-
|
||||
/*
|
||||
========================================================================
|
||||
|
||||
--
|
||||
1.7.1
|
||||
|
412
debian/patches/features/all/rt28x0/0006-Staging-rt28x0-remove-unused-code-from-common-ee_efu.patch
vendored
Normal file
412
debian/patches/features/all/rt28x0/0006-Staging-rt28x0-remove-unused-code-from-common-ee_efu.patch
vendored
Normal file
|
@ -0,0 +1,412 @@
|
|||
From edfb9eabb381f5666328ced6adf7978ca66e310e Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Wed, 21 Oct 2009 22:43:57 +0200
|
||||
Subject: [PATCH 06/42] Staging: rt28x0: remove unused code from common/ee_efuse-c
|
||||
|
||||
commit abf1794e698d9bbdade846ef6ffd23b247cfb59f upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/common/ee_efuse.c | 340 ------------------------------
|
||||
drivers/staging/rt2860/rtmp.h | 12 -
|
||||
2 files changed, 0 insertions(+), 352 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/ee_efuse.c b/drivers/staging/rt2860/common/ee_efuse.c
|
||||
index f294450..5807cc4 100644
|
||||
--- a/drivers/staging/rt2860/common/ee_efuse.c
|
||||
+++ b/drivers/staging/rt2860/common/ee_efuse.c
|
||||
@@ -67,31 +67,6 @@ typedef union _EFUSE_CTRL_STRUC {
|
||||
UINT32 word;
|
||||
} EFUSE_CTRL_STRUC, *PEFUSE_CTRL_STRUC;
|
||||
|
||||
-static UCHAR eFuseReadRegisters(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT Length,
|
||||
- OUT USHORT* pData);
|
||||
-
|
||||
-static VOID eFuseReadPhysical(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN PUSHORT lpInBuffer,
|
||||
- IN ULONG nInBufferSize,
|
||||
- OUT PUSHORT lpOutBuffer,
|
||||
- IN ULONG nOutBufferSize);
|
||||
-
|
||||
-static VOID eFusePhysicalWriteRegisters(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT Length,
|
||||
- OUT USHORT* pData);
|
||||
-
|
||||
-static NTSTATUS eFuseWriteRegisters(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT Length,
|
||||
- IN USHORT* pData);
|
||||
-
|
||||
static VOID eFuseWritePhysical(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
PUSHORT lpInBuffer,
|
||||
@@ -306,37 +281,6 @@ static VOID eFuseReadPhysical(
|
||||
|
||||
========================================================================
|
||||
*/
|
||||
-NTSTATUS eFuseRead(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- OUT PUCHAR pData,
|
||||
- IN USHORT Length)
|
||||
-{
|
||||
- USHORT* pOutBuf = (USHORT*)pData;
|
||||
- NTSTATUS Status = STATUS_SUCCESS;
|
||||
- UCHAR EFSROM_AOUT;
|
||||
- int i;
|
||||
-
|
||||
- for(i=0; i<Length; i+=2)
|
||||
- {
|
||||
- EFSROM_AOUT = eFuseReadRegisters(pAd, Offset+i, 2, &pOutBuf[i/2]);
|
||||
- }
|
||||
- return Status;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
-========================================================================
|
||||
-
|
||||
- Routine Description:
|
||||
-
|
||||
- Arguments:
|
||||
-
|
||||
- Return Value:
|
||||
-
|
||||
- Note:
|
||||
-
|
||||
-========================================================================
|
||||
-*/
|
||||
static VOID eFusePhysicalWriteRegisters(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN USHORT Offset,
|
||||
@@ -450,247 +394,6 @@ static VOID eFusePhysicalWriteRegisters(
|
||||
|
||||
========================================================================
|
||||
*/
|
||||
-static NTSTATUS eFuseWriteRegisters(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT Length,
|
||||
- IN USHORT* pData)
|
||||
-{
|
||||
- USHORT i,Loop=0;
|
||||
- USHORT eFuseData;
|
||||
- USHORT LogicalAddress, BlkNum = 0xffff;
|
||||
- UCHAR EFSROM_AOUT;
|
||||
-
|
||||
- USHORT addr,tmpaddr, InBuf[3], tmpOffset;
|
||||
- USHORT buffer[8];
|
||||
- BOOLEAN bWriteSuccess = TRUE;
|
||||
-
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWriteRegisters Offset=%x, pData=%x\n", Offset, *pData));
|
||||
-
|
||||
- //Step 0. find the entry in the mapping table
|
||||
- //The address of EEPROM is 2-bytes alignment.
|
||||
- //The last bit is used for alignment, so it must be 0.
|
||||
- tmpOffset = Offset & 0xfffe;
|
||||
- EFSROM_AOUT = eFuseReadRegisters(pAd, tmpOffset, 2, &eFuseData);
|
||||
-
|
||||
- if( EFSROM_AOUT == 0x3f)
|
||||
- { //find available logical address pointer
|
||||
- //the logical address does not exist, find an empty one
|
||||
- //from the first address of block 45=16*45=0x2d0 to the last address of block 47
|
||||
- //==>48*16-3(reserved)=2FC
|
||||
- for (i=EFUSE_USAGE_MAP_START; i<=EFUSE_USAGE_MAP_END; i+=2)
|
||||
- {
|
||||
- //Retrive the logical block nubmer form each logical address pointer
|
||||
- //It will access two logical address pointer each time.
|
||||
- eFusePhysicalReadRegisters(pAd, i, 2, &LogicalAddress);
|
||||
- if( (LogicalAddress & 0xff) == 0)
|
||||
- {//Not used logical address pointer
|
||||
- BlkNum = i-EFUSE_USAGE_MAP_START;
|
||||
- break;
|
||||
- }
|
||||
- else if(( (LogicalAddress >> 8) & 0xff) == 0)
|
||||
- {//Not used logical address pointer
|
||||
- if (i != EFUSE_USAGE_MAP_END)
|
||||
- {
|
||||
- BlkNum = i-EFUSE_USAGE_MAP_START+1;
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- BlkNum = EFSROM_AOUT;
|
||||
- }
|
||||
-
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWriteRegisters BlkNum = %d \n", BlkNum));
|
||||
-
|
||||
- if(BlkNum == 0xffff)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWriteRegisters: out of free E-fuse space!!!\n"));
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
- //Step 1. Save data of this block which is pointed by the avaible logical address pointer
|
||||
- // read and save the original block data
|
||||
- for(i =0; i<8; i++)
|
||||
- {
|
||||
- addr = BlkNum * 0x10 ;
|
||||
-
|
||||
- InBuf[0] = addr+2*i;
|
||||
- InBuf[1] = 2;
|
||||
- InBuf[2] = 0x0;
|
||||
-
|
||||
- eFuseReadPhysical(pAd, &InBuf[0], 4, &InBuf[2], 2);
|
||||
-
|
||||
- buffer[i] = InBuf[2];
|
||||
- }
|
||||
-
|
||||
- //Step 2. Update the data in buffer, and write the data to Efuse
|
||||
- buffer[ (Offset >> 1) % 8] = pData[0];
|
||||
-
|
||||
- do
|
||||
- { Loop++;
|
||||
- //Step 3. Write the data to Efuse
|
||||
- if(!bWriteSuccess)
|
||||
- {
|
||||
- for(i =0; i<8; i++)
|
||||
- {
|
||||
- addr = BlkNum * 0x10 ;
|
||||
-
|
||||
- InBuf[0] = addr+2*i;
|
||||
- InBuf[1] = 2;
|
||||
- InBuf[2] = buffer[i];
|
||||
-
|
||||
- eFuseWritePhysical(pAd, &InBuf[0], 6, NULL, 2);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- addr = BlkNum * 0x10 ;
|
||||
-
|
||||
- InBuf[0] = addr+(Offset % 16);
|
||||
- InBuf[1] = 2;
|
||||
- InBuf[2] = pData[0];
|
||||
-
|
||||
- eFuseWritePhysical(pAd, &InBuf[0], 6, NULL, 2);
|
||||
- }
|
||||
-
|
||||
- //Step 4. Write mapping table
|
||||
- addr = EFUSE_USAGE_MAP_START+BlkNum;
|
||||
-
|
||||
- tmpaddr = addr;
|
||||
-
|
||||
- if(addr % 2 != 0)
|
||||
- addr = addr -1;
|
||||
- InBuf[0] = addr;
|
||||
- InBuf[1] = 2;
|
||||
-
|
||||
- //convert the address from 10 to 8 bit ( bit7, 6 = parity and bit5 ~ 0 = bit9~4), and write to logical map entry
|
||||
- tmpOffset = Offset;
|
||||
- tmpOffset >>= 4;
|
||||
- tmpOffset |= ((~((tmpOffset & 0x01) ^ ( tmpOffset >> 1 & 0x01) ^ (tmpOffset >> 2 & 0x01) ^ (tmpOffset >> 3 & 0x01))) << 6) & 0x40;
|
||||
- tmpOffset |= ((~( (tmpOffset >> 2 & 0x01) ^ (tmpOffset >> 3 & 0x01) ^ (tmpOffset >> 4 & 0x01) ^ ( tmpOffset >> 5 & 0x01))) << 7) & 0x80;
|
||||
-
|
||||
- // write the logical address
|
||||
- if(tmpaddr%2 != 0)
|
||||
- InBuf[2] = tmpOffset<<8;
|
||||
- else
|
||||
- InBuf[2] = tmpOffset;
|
||||
-
|
||||
- eFuseWritePhysical(pAd,&InBuf[0], 6, NULL, 0);
|
||||
-
|
||||
- //Step 5. Compare data if not the same, invalidate the mapping entry, then re-write the data until E-fuse is exhausted
|
||||
- bWriteSuccess = TRUE;
|
||||
- for(i =0; i<8; i++)
|
||||
- {
|
||||
- addr = BlkNum * 0x10 ;
|
||||
-
|
||||
- InBuf[0] = addr+2*i;
|
||||
- InBuf[1] = 2;
|
||||
- InBuf[2] = 0x0;
|
||||
-
|
||||
- eFuseReadPhysical(pAd, &InBuf[0], 4, &InBuf[2], 2);
|
||||
-
|
||||
- if(buffer[i] != InBuf[2])
|
||||
- {
|
||||
- bWriteSuccess = FALSE;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- //Step 6. invlidate mapping entry and find a free mapping entry if not succeed
|
||||
- if (!bWriteSuccess)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("Not bWriteSuccess BlkNum = %d\n", BlkNum));
|
||||
-
|
||||
- // the offset of current mapping entry
|
||||
- addr = EFUSE_USAGE_MAP_START+BlkNum;
|
||||
-
|
||||
- //find a new mapping entry
|
||||
- BlkNum = 0xffff;
|
||||
- for (i=EFUSE_USAGE_MAP_START; i<=EFUSE_USAGE_MAP_END; i+=2)
|
||||
- {
|
||||
- eFusePhysicalReadRegisters(pAd, i, 2, &LogicalAddress);
|
||||
- if( (LogicalAddress & 0xff) == 0)
|
||||
- {
|
||||
- BlkNum = i-EFUSE_USAGE_MAP_START;
|
||||
- break;
|
||||
- }
|
||||
- else if(( (LogicalAddress >> 8) & 0xff) == 0)
|
||||
- {
|
||||
- if (i != EFUSE_USAGE_MAP_END)
|
||||
- {
|
||||
- BlkNum = i+1-EFUSE_USAGE_MAP_START;
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("Not bWriteSuccess new BlkNum = %d\n", BlkNum));
|
||||
- if(BlkNum == 0xffff)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWriteRegisters: out of free E-fuse space!!!\n"));
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
- //invalidate the original mapping entry if new entry is not found
|
||||
- tmpaddr = addr;
|
||||
-
|
||||
- if(addr % 2 != 0)
|
||||
- addr = addr -1;
|
||||
- InBuf[0] = addr;
|
||||
- InBuf[1] = 2;
|
||||
-
|
||||
- eFuseReadPhysical(pAd, &InBuf[0], 4, &InBuf[2], 2);
|
||||
-
|
||||
- // write the logical address
|
||||
- if(tmpaddr%2 != 0)
|
||||
- {
|
||||
- // Invalidate the high byte
|
||||
- for (i=8; i<15; i++)
|
||||
- {
|
||||
- if( ( (InBuf[2] >> i) & 0x01) == 0)
|
||||
- {
|
||||
- InBuf[2] |= (0x1 <<i);
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- // invalidate the low byte
|
||||
- for (i=0; i<8; i++)
|
||||
- {
|
||||
- if( ( (InBuf[2] >> i) & 0x01) == 0)
|
||||
- {
|
||||
- InBuf[2] |= (0x1 <<i);
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- eFuseWritePhysical(pAd, &InBuf[0], 6, NULL, 0);
|
||||
- }
|
||||
- }
|
||||
- while (!bWriteSuccess&&Loop<2);
|
||||
- if(!bWriteSuccess)
|
||||
- DBGPRINT(RT_DEBUG_ERROR,("Efsue Write Failed!!\n"));
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/*
|
||||
-========================================================================
|
||||
-
|
||||
- Routine Description:
|
||||
-
|
||||
- Arguments:
|
||||
-
|
||||
- Return Value:
|
||||
-
|
||||
- Note:
|
||||
-
|
||||
-========================================================================
|
||||
-*/
|
||||
static VOID eFuseWritePhysical(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
PUSHORT lpInBuffer,
|
||||
@@ -723,49 +426,6 @@ static VOID eFuseWritePhysical(
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
-/*
|
||||
-========================================================================
|
||||
-
|
||||
- Routine Description:
|
||||
-
|
||||
- Arguments:
|
||||
-
|
||||
- Return Value:
|
||||
-
|
||||
- Note:
|
||||
-
|
||||
-========================================================================
|
||||
-*/
|
||||
-NTSTATUS eFuseWrite(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN PUCHAR pData,
|
||||
- IN USHORT length)
|
||||
-{
|
||||
- int i;
|
||||
- USHORT* pValueX = (PUSHORT) pData; //value ...
|
||||
-
|
||||
- // The input value=3070 will be stored as following
|
||||
- // Little-endian S | S Big-endian
|
||||
- // addr 1 0 | 0 1
|
||||
- // Ori-V 30 70 | 30 70
|
||||
- // After swapping
|
||||
- // 30 70 | 70 30
|
||||
- // Casting
|
||||
- // 3070 | 7030 (x)
|
||||
- // The swapping should be removed for big-endian
|
||||
- for(i=0; i<length; i+=2)
|
||||
- {
|
||||
- eFuseWriteRegisters(pAd, Offset+i, 2, &pValueX[i/2]);
|
||||
- }
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
/*
|
||||
========================================================================
|
||||
|
||||
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
|
||||
index 3e284f2..c9e3045 100644
|
||||
--- a/drivers/staging/rt2860/rtmp.h
|
||||
+++ b/drivers/staging/rt2860/rtmp.h
|
||||
@@ -4052,18 +4052,6 @@ VOID eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd,
|
||||
|
||||
INT eFuse_init(
|
||||
IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
-NTSTATUS eFuseRead(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- OUT PUCHAR pData,
|
||||
- IN USHORT Length);
|
||||
-
|
||||
-NTSTATUS eFuseWrite(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN PUCHAR pData,
|
||||
- IN USHORT length);
|
||||
//2008/09/11:KH add to support efuse-->
|
||||
#endif // RTMP_EFUSE_SUPPORT //
|
||||
|
||||
--
|
||||
1.7.1
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
From e5b457c03b8163cf4c791521a3703a627090ff8c Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Wed, 21 Oct 2009 22:44:05 +0200
|
||||
Subject: [PATCH 07/42] Staging: rt28x0: remove private RTPRIV_IOCTL_SET ioctl
|
||||
|
||||
commit 468d0c507b9c11a2e3ae95ff149eb551d05be8b9 upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/sta_ioctl.c | 6 +-----
|
||||
1 files changed, 1 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c
|
||||
index e5e2942..b6ba561 100644
|
||||
--- a/drivers/staging/rt2860/sta_ioctl.c
|
||||
+++ b/drivers/staging/rt2860/sta_ioctl.c
|
||||
@@ -2978,6 +2978,7 @@ INT rt28xx_sta_ioctl(
|
||||
case SIOCSIWRETRY: //set retry limits and lifetime
|
||||
case RT_PRIV_IOCTL:
|
||||
case RT_PRIV_IOCTL_EXT:
|
||||
+ case RTPRIV_IOCTL_SET:
|
||||
Status = -EOPNOTSUPP;
|
||||
break;
|
||||
case SIOCGIWPRIV:
|
||||
@@ -2990,11 +2991,6 @@ INT rt28xx_sta_ioctl(
|
||||
Status = -EFAULT;
|
||||
}
|
||||
break;
|
||||
- case RTPRIV_IOCTL_SET:
|
||||
- if(access_ok(VERIFY_READ, wrq->u.data.pointer, wrq->u.data.length) != TRUE)
|
||||
- break;
|
||||
- rt_ioctl_setparam(net_dev, NULL, NULL, wrq->u.data.pointer);
|
||||
- break;
|
||||
case RTPRIV_IOCTL_GSITESURVEY:
|
||||
RTMPIoctlGetSiteSurvey(pAd, wrq);
|
||||
break;
|
||||
--
|
||||
1.7.1
|
||||
|
131
debian/patches/features/all/rt28x0/0008-Staging-rt28x0-remove-private-RTPRIV_IOCTL_GSITESURV.patch
vendored
Normal file
131
debian/patches/features/all/rt28x0/0008-Staging-rt28x0-remove-private-RTPRIV_IOCTL_GSITESURV.patch
vendored
Normal file
|
@ -0,0 +1,131 @@
|
|||
From 5c0670fc0db64dad3b864ffa7907aac00eb22c13 Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Wed, 21 Oct 2009 22:44:12 +0200
|
||||
Subject: [PATCH 08/42] Staging: rt28x0: remove private RTPRIV_IOCTL_GSITESURVEY ioctl
|
||||
|
||||
commit 725fef147b29eaf37aaee6e80c2c19c5c9c4bff9 upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/common/cmm_info.c | 57 ------------------------------
|
||||
drivers/staging/rt2860/rtmp.h | 12 ------
|
||||
drivers/staging/rt2860/sta_ioctl.c | 4 +--
|
||||
3 files changed, 1 insertions(+), 72 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_info.c b/drivers/staging/rt2860/common/cmm_info.c
|
||||
index 49e9bdf..0f4aab9 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_info.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_info.c
|
||||
@@ -1969,63 +1969,6 @@ VOID RTMPCommSiteSurveyData(
|
||||
return;
|
||||
}
|
||||
|
||||
-VOID RTMPIoctlGetSiteSurvey(
|
||||
- IN PRTMP_ADAPTER pAdapter,
|
||||
- IN struct iwreq *wrq)
|
||||
-{
|
||||
- PSTRING msg;
|
||||
- INT i=0;
|
||||
- INT WaitCnt;
|
||||
- INT Status=0;
|
||||
- INT max_len = LINE_LEN;
|
||||
- PBSS_ENTRY pBss;
|
||||
-
|
||||
-
|
||||
- os_alloc_mem(NULL, (PUCHAR *)&msg, sizeof(CHAR)*((MAX_LEN_OF_BSS_TABLE)*max_len));
|
||||
-
|
||||
- if (msg == NULL)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("RTMPIoctlGetSiteSurvey - msg memory alloc fail.\n"));
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- memset(msg, 0 ,(MAX_LEN_OF_BSS_TABLE)*max_len );
|
||||
- sprintf(msg,"%s","\n");
|
||||
- sprintf(msg+strlen(msg),"%-4s%-33s%-20s%-23s%-9s%-7s%-7s%-3s\n",
|
||||
- "Ch", "SSID", "BSSID", "Security", "Siganl(%)", "W-Mode", " ExtCH"," NT");
|
||||
-
|
||||
-
|
||||
-
|
||||
- WaitCnt = 0;
|
||||
- pAdapter->StaCfg.bScanReqIsFromWebUI = TRUE;
|
||||
- while ((ScanRunning(pAdapter) == TRUE) && (WaitCnt++ < 200))
|
||||
- OS_WAIT(500);
|
||||
-
|
||||
- for(i=0; i<pAdapter->ScanTab.BssNr ;i++)
|
||||
- {
|
||||
- pBss = &pAdapter->ScanTab.BssEntry[i];
|
||||
-
|
||||
- if( pBss->Channel==0)
|
||||
- break;
|
||||
-
|
||||
- if((strlen(msg)+max_len ) >= IW_SCAN_MAX_DATA)
|
||||
- break;
|
||||
-
|
||||
-
|
||||
- RTMPCommSiteSurveyData(msg, pBss);
|
||||
-
|
||||
-
|
||||
- }
|
||||
-
|
||||
- pAdapter->StaCfg.bScanReqIsFromWebUI = FALSE;
|
||||
- wrq->u.data.length = strlen(msg);
|
||||
- Status = copy_to_user(wrq->u.data.pointer, msg, wrq->u.data.length);
|
||||
-
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("RTMPIoctlGetSiteSurvey - wrq->u.data.length = %d\n", wrq->u.data.length));
|
||||
- os_free_mem(NULL, (PUCHAR)msg);
|
||||
-}
|
||||
-
|
||||
-
|
||||
#define MAC_LINE_LEN (14+4+4+10+10+10+6+6) // Addr+aid+psm+datatime+rxbyte+txbyte+current tx rate+last tx rate
|
||||
VOID RTMPIoctlGetMacTable(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
|
||||
index c9e3045..32e553a 100644
|
||||
--- a/drivers/staging/rt2860/rtmp.h
|
||||
+++ b/drivers/staging/rt2860/rtmp.h
|
||||
@@ -4991,18 +4991,6 @@ PNDIS_PACKET RTMPDeFragmentDataFrame(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN RX_BLK *pRxBlk);
|
||||
|
||||
-////////////////////////////////////////
|
||||
-
|
||||
-VOID RTMPIoctlGetSiteSurvey(
|
||||
- IN PRTMP_ADAPTER pAdapter,
|
||||
- IN struct iwreq *wrq);
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
enum {
|
||||
DIDmsg_lnxind_wlansniffrm = 0x00000044,
|
||||
DIDmsg_lnxind_wlansniffrm_hosttime = 0x00010044,
|
||||
diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c
|
||||
index b6ba561..a3aeb1e 100644
|
||||
--- a/drivers/staging/rt2860/sta_ioctl.c
|
||||
+++ b/drivers/staging/rt2860/sta_ioctl.c
|
||||
@@ -2979,6 +2979,7 @@ INT rt28xx_sta_ioctl(
|
||||
case RT_PRIV_IOCTL:
|
||||
case RT_PRIV_IOCTL_EXT:
|
||||
case RTPRIV_IOCTL_SET:
|
||||
+ case RTPRIV_IOCTL_GSITESURVEY:
|
||||
Status = -EOPNOTSUPP;
|
||||
break;
|
||||
case SIOCGIWPRIV:
|
||||
@@ -2991,9 +2992,6 @@ INT rt28xx_sta_ioctl(
|
||||
Status = -EFAULT;
|
||||
}
|
||||
break;
|
||||
- case RTPRIV_IOCTL_GSITESURVEY:
|
||||
- RTMPIoctlGetSiteSurvey(pAd, wrq);
|
||||
- break;
|
||||
case SIOCETHTOOL:
|
||||
break;
|
||||
default:
|
||||
--
|
||||
1.7.1
|
||||
|
4115
debian/patches/features/all/rt28x0/0009-Staging-rt28x0-remove-private-WEXT-handlers.patch
vendored
Normal file
4115
debian/patches/features/all/rt28x0/0009-Staging-rt28x0-remove-private-WEXT-handlers.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
181
debian/patches/features/all/rt28x0/0010-Staging-rt28x0-remove-support-for-private-driver-par.patch
vendored
Normal file
181
debian/patches/features/all/rt28x0/0010-Staging-rt28x0-remove-support-for-private-driver-par.patch
vendored
Normal file
|
@ -0,0 +1,181 @@
|
|||
From 9228d0d8c860c266248bb1034d74952e1928f03b Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Wed, 21 Oct 2009 22:44:27 +0200
|
||||
Subject: [PATCH 10/42] Staging: rt28x0: remove support for private driver parameters
|
||||
|
||||
commit 782f1111256557c75415f57cd360ebf9d1377a55 upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/Makefile | 1 -
|
||||
drivers/staging/rt2860/common/rtmp_init.c | 9 ---
|
||||
drivers/staging/rt2860/rt_profile.c | 95 -----------------------------
|
||||
drivers/staging/rt2860/rtmp.h | 3 -
|
||||
drivers/staging/rt2870/Makefile | 1 -
|
||||
5 files changed, 0 insertions(+), 109 deletions(-)
|
||||
delete mode 100644 drivers/staging/rt2860/rt_profile.c
|
||||
|
||||
diff --git a/drivers/staging/rt2860/Makefile b/drivers/staging/rt2860/Makefile
|
||||
index ba17142..09e448a 100644
|
||||
--- a/drivers/staging/rt2860/Makefile
|
||||
+++ b/drivers/staging/rt2860/Makefile
|
||||
@@ -38,7 +38,6 @@ rt2860sta-objs := \
|
||||
sta/connect.o \
|
||||
sta/wpa.o \
|
||||
rt_linux.o \
|
||||
- rt_profile.o \
|
||||
rt_main_dev.o \
|
||||
sta_ioctl.o \
|
||||
common/ba_action.o \
|
||||
diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
index 3b43101..9e1c73d 100644
|
||||
--- a/drivers/staging/rt2860/common/rtmp_init.c
|
||||
+++ b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
@@ -3439,16 +3439,7 @@ int rt28xx_init(
|
||||
goto err3;
|
||||
}
|
||||
|
||||
- // Read parameters from Config File
|
||||
- Status = RTMPReadParametersHook(pAd);
|
||||
-
|
||||
DBGPRINT(RT_DEBUG_OFF, ("1. Phy Mode = %d\n", pAd->CommonCfg.PhyMode));
|
||||
- if (Status != NDIS_STATUS_SUCCESS)
|
||||
- {
|
||||
- DBGPRINT_ERR(("NICReadRegParameters failed, Status[=0x%08x]\n",Status));
|
||||
-// goto err4;
|
||||
- Status = 0;
|
||||
- }
|
||||
|
||||
#ifdef RTMP_MAC_USB
|
||||
pAd->CommonCfg.bMultipleIRP = FALSE;
|
||||
diff --git a/drivers/staging/rt2860/rt_profile.c b/drivers/staging/rt2860/rt_profile.c
|
||||
deleted file mode 100644
|
||||
index 4355331..0000000
|
||||
--- a/drivers/staging/rt2860/rt_profile.c
|
||||
+++ /dev/null
|
||||
@@ -1,95 +0,0 @@
|
||||
-/*
|
||||
- *************************************************************************
|
||||
- * Ralink Tech Inc.
|
||||
- * 5F., No.36, Taiyuan St., Jhubei City,
|
||||
- * Hsinchu County 302,
|
||||
- * Taiwan, R.O.C.
|
||||
- *
|
||||
- * (c) Copyright 2002-2007, Ralink Technology, Inc.
|
||||
- *
|
||||
- * This program is free software; you can redistribute it and/or modify *
|
||||
- * it under the terms of the GNU General Public License as published by *
|
||||
- * the Free Software Foundation; either version 2 of the License, or *
|
||||
- * (at your option) any later version. *
|
||||
- * *
|
||||
- * This program is distributed in the hope that it will be useful, *
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
- * GNU General Public License for more details. *
|
||||
- * *
|
||||
- * You should have received a copy of the GNU General Public License *
|
||||
- * along with this program; if not, write to the *
|
||||
- * Free Software Foundation, Inc., *
|
||||
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
- * *
|
||||
- *************************************************************************
|
||||
-
|
||||
- Module Name:
|
||||
- rt_profile.c
|
||||
-
|
||||
- Abstract:
|
||||
-
|
||||
- Revision History:
|
||||
- Who When What
|
||||
- --------- ---------- ----------------------------------------------
|
||||
- */
|
||||
-
|
||||
-#include "rt_config.h"
|
||||
-
|
||||
-
|
||||
-NDIS_STATUS RTMPReadParametersHook(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- PSTRING src = NULL;
|
||||
- RTMP_OS_FD srcf;
|
||||
- RTMP_OS_FS_INFO osFSInfo;
|
||||
- INT retval = NDIS_STATUS_FAILURE;
|
||||
- PSTRING buffer;
|
||||
-
|
||||
- buffer = kmalloc(MAX_INI_BUFFER_SIZE, MEM_ALLOC_FLAG);
|
||||
- if(buffer == NULL)
|
||||
- return NDIS_STATUS_FAILURE;
|
||||
- memset(buffer, 0x00, MAX_INI_BUFFER_SIZE);
|
||||
-
|
||||
- {
|
||||
- {
|
||||
- src = STA_PROFILE_PATH;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (src && *src)
|
||||
- {
|
||||
- RtmpOSFSInfoChange(&osFSInfo, TRUE);
|
||||
- srcf = RtmpOSFileOpen(src, O_RDONLY, 0);
|
||||
- if (IS_FILE_OPEN_ERR(srcf))
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("Open file \"%s\" failed!\n", src));
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- retval =RtmpOSFileRead(srcf, buffer, MAX_INI_BUFFER_SIZE);
|
||||
- if (retval > 0)
|
||||
- {
|
||||
- RTMPSetProfileParameters(pAd, buffer);
|
||||
- retval = NDIS_STATUS_SUCCESS;
|
||||
- }
|
||||
- else
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("Read file \"%s\" failed(errCode=%d)!\n", src, retval));
|
||||
-
|
||||
- retval = RtmpOSFileClose(srcf);
|
||||
- if ( retval != 0)
|
||||
- {
|
||||
- retval = NDIS_STATUS_FAILURE;
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("Close file \"%s\" failed(errCode=%d)!\n", src, retval));
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- RtmpOSFSInfoChange(&osFSInfo, FALSE);
|
||||
- }
|
||||
-
|
||||
- kfree(buffer);
|
||||
-
|
||||
- return (retval);
|
||||
-
|
||||
-}
|
||||
-
|
||||
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
|
||||
index 59fd05b..3ec50b5 100644
|
||||
--- a/drivers/staging/rt2860/rtmp.h
|
||||
+++ b/drivers/staging/rt2860/rtmp.h
|
||||
@@ -2453,9 +2453,6 @@ NDIS_STATUS RTMPAllocAdapterBlock(
|
||||
NDIS_STATUS RTMPAllocTxRxRingMemory(
|
||||
IN PRTMP_ADAPTER pAd);
|
||||
|
||||
-NDIS_STATUS RTMPReadParametersHook(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
NDIS_STATUS RTMPSetProfileParameters(
|
||||
IN RTMP_ADAPTER *pAd,
|
||||
IN PSTRING pBuffer);
|
||||
diff --git a/drivers/staging/rt2870/Makefile b/drivers/staging/rt2870/Makefile
|
||||
index 661cdf9..92668eb 100644
|
||||
--- a/drivers/staging/rt2870/Makefile
|
||||
+++ b/drivers/staging/rt2870/Makefile
|
||||
@@ -39,7 +39,6 @@ rt2870sta-objs := \
|
||||
sta/connect.o \
|
||||
sta/wpa.o \
|
||||
rt_linux.o \
|
||||
- rt_profile.o \
|
||||
rt_main_dev.o \
|
||||
sta_ioctl.o \
|
||||
common/ba_action.o \
|
||||
--
|
||||
1.7.1
|
||||
|
992
debian/patches/features/all/rt28x0/0011-Staging-rt28x0-remove-optional-loading-of-EEPROM-fro.patch
vendored
Normal file
992
debian/patches/features/all/rt28x0/0011-Staging-rt28x0-remove-optional-loading-of-EEPROM-fro.patch
vendored
Normal file
|
@ -0,0 +1,992 @@
|
|||
From 00bbeabc14e759b3df8071d5ac38ec73f84061eb Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Wed, 21 Oct 2009 22:44:35 +0200
|
||||
Subject: [PATCH 11/42] Staging: rt28x0: remove optional loading of EEPROM from file in eFuse mode
|
||||
|
||||
commit 44c68c23b16c85127d187fd720f95aa2e7a94d2e upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/common/cmm_profile.c | 10 -
|
||||
drivers/staging/rt2860/common/ee_efuse.c | 788 +--------------------------
|
||||
drivers/staging/rt2860/common/eeprom.c | 3 -
|
||||
drivers/staging/rt2860/common/rtmp_init.c | 9 -
|
||||
drivers/staging/rt2860/rt_linux.c | 20 -
|
||||
drivers/staging/rt2860/rtmp.h | 21 -
|
||||
6 files changed, 1 insertions(+), 850 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_profile.c b/drivers/staging/rt2860/common/cmm_profile.c
|
||||
index 056cffd..117ee07 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_profile.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_profile.c
|
||||
@@ -1194,16 +1194,6 @@ NDIS_STATUS RTMPSetProfileParameters(
|
||||
retval = RT_CfgSetCountryRegion(pAd, tmpbuf, BAND_5G);
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("CountryRegionABand=%d\n", pAd->CommonCfg.CountryRegionForABand));
|
||||
}
|
||||
-#ifdef RTMP_EFUSE_SUPPORT
|
||||
-#ifdef RT30xx
|
||||
- //EfuseBufferMode
|
||||
- if(RTMPGetKeyParameter("EfuseBufferMode", tmpbuf, 25, pBuffer, TRUE))
|
||||
- {
|
||||
- pAd->bEEPROMFile = (UCHAR) simple_strtol(tmpbuf, 0, 10);
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("EfuseBufferMode=%d\n", pAd->bUseEfuse));
|
||||
- }
|
||||
-#endif // RT30xx //
|
||||
-#endif // RTMP_EFUSE_SUPPORT //
|
||||
//CountryCode
|
||||
if(RTMPGetKeyParameter("CountryCode", tmpbuf, 25, pBuffer, TRUE))
|
||||
{
|
||||
diff --git a/drivers/staging/rt2860/common/ee_efuse.c b/drivers/staging/rt2860/common/ee_efuse.c
|
||||
index 5807cc4..4bff473 100644
|
||||
--- a/drivers/staging/rt2860/common/ee_efuse.c
|
||||
+++ b/drivers/staging/rt2860/common/ee_efuse.c
|
||||
@@ -67,21 +67,6 @@ typedef union _EFUSE_CTRL_STRUC {
|
||||
UINT32 word;
|
||||
} EFUSE_CTRL_STRUC, *PEFUSE_CTRL_STRUC;
|
||||
|
||||
-static VOID eFuseWritePhysical(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- PUSHORT lpInBuffer,
|
||||
- ULONG nInBufferSize,
|
||||
- PUCHAR lpOutBuffer,
|
||||
- ULONG nOutBufferSize);
|
||||
-
|
||||
-
|
||||
-static NTSTATUS eFuseWriteRegistersFromBin(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT Length,
|
||||
- IN USHORT* pData);
|
||||
-
|
||||
-
|
||||
/*
|
||||
========================================================================
|
||||
|
||||
@@ -281,164 +266,6 @@ static VOID eFuseReadPhysical(
|
||||
|
||||
========================================================================
|
||||
*/
|
||||
-static VOID eFusePhysicalWriteRegisters(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT Length,
|
||||
- OUT USHORT* pData)
|
||||
-{
|
||||
- EFUSE_CTRL_STRUC eFuseCtrlStruc;
|
||||
- int i;
|
||||
- USHORT efuseDataOffset;
|
||||
- UINT32 data, eFuseDataBuffer[4];
|
||||
-
|
||||
- //Step0. Write 16-byte of data to EFUSE_DATA0-3 (0x590-0x59C), where EFUSE_DATA0 is the LSB DW, EFUSE_DATA3 is the MSB DW.
|
||||
-
|
||||
- /////////////////////////////////////////////////////////////////
|
||||
- //read current values of 16-byte block
|
||||
- RTMP_IO_READ32(pAd, EFUSE_CTRL, &eFuseCtrlStruc.word);
|
||||
-
|
||||
- //Step0. Write 10-bit of address to EFSROM_AIN (0x580, bit25:bit16). The address must be 16-byte alignment.
|
||||
- eFuseCtrlStruc.field.EFSROM_AIN = Offset & 0xfff0;
|
||||
-
|
||||
- //Step1. Write EFSROM_MODE (0x580, bit7:bit6) to 1.
|
||||
- eFuseCtrlStruc.field.EFSROM_MODE = 1;
|
||||
-
|
||||
- //Step2. Write EFSROM_KICK (0x580, bit30) to 1 to kick-off physical read procedure.
|
||||
- eFuseCtrlStruc.field.EFSROM_KICK = 1;
|
||||
-
|
||||
- NdisMoveMemory(&data, &eFuseCtrlStruc, 4);
|
||||
- RTMP_IO_WRITE32(pAd, EFUSE_CTRL, data);
|
||||
-
|
||||
- //Step3. Polling EFSROM_KICK(0x580, bit30) until it become 0 again.
|
||||
- i = 0;
|
||||
- while(i < 500)
|
||||
- {
|
||||
- RTMP_IO_READ32(pAd, EFUSE_CTRL, &eFuseCtrlStruc.word);
|
||||
-
|
||||
- if(eFuseCtrlStruc.field.EFSROM_KICK == 0)
|
||||
- break;
|
||||
- RTMPusecDelay(2);
|
||||
- i++;
|
||||
- }
|
||||
-
|
||||
- //Step4. Read 16-byte of data from EFUSE_DATA0-3 (0x59C-0x590)
|
||||
- efuseDataOffset = EFUSE_DATA3;
|
||||
- for(i=0; i< 4; i++)
|
||||
- {
|
||||
- RTMP_IO_READ32(pAd, efuseDataOffset, (PUINT32) &eFuseDataBuffer[i]);
|
||||
- efuseDataOffset -= 4;
|
||||
- }
|
||||
-
|
||||
- //Update the value, the offset is multiple of 2, length is 2
|
||||
- efuseDataOffset = (Offset & 0xc) >> 2;
|
||||
- data = pData[0] & 0xffff;
|
||||
- //The offset should be 0x***10 or 0x***00
|
||||
- if((Offset % 4) != 0)
|
||||
- {
|
||||
- eFuseDataBuffer[efuseDataOffset] = (eFuseDataBuffer[efuseDataOffset] & 0xffff) | (data << 16);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- eFuseDataBuffer[efuseDataOffset] = (eFuseDataBuffer[efuseDataOffset] & 0xffff0000) | data;
|
||||
- }
|
||||
-
|
||||
- efuseDataOffset = EFUSE_DATA3;
|
||||
- for(i=0; i< 4; i++)
|
||||
- {
|
||||
- RTMP_IO_WRITE32(pAd, efuseDataOffset, eFuseDataBuffer[i]);
|
||||
- efuseDataOffset -= 4;
|
||||
- }
|
||||
- /////////////////////////////////////////////////////////////////
|
||||
-
|
||||
- //Step1. Write 10-bit of address to EFSROM_AIN (0x580, bit25:bit16). The address must be 16-byte alignment.
|
||||
-
|
||||
- RTMP_IO_READ32(pAd, EFUSE_CTRL, &eFuseCtrlStruc.word);
|
||||
-
|
||||
- eFuseCtrlStruc.field.EFSROM_AIN = Offset & 0xfff0;
|
||||
-
|
||||
- //Step2. Write EFSROM_MODE (0x580, bit7:bit6) to 3.
|
||||
- eFuseCtrlStruc.field.EFSROM_MODE = 3;
|
||||
-
|
||||
- //Step3. Write EFSROM_KICK (0x580, bit30) to 1 to kick-off physical write procedure.
|
||||
- eFuseCtrlStruc.field.EFSROM_KICK = 1;
|
||||
-
|
||||
- NdisMoveMemory(&data, &eFuseCtrlStruc, 4);
|
||||
- RTMP_IO_WRITE32(pAd, EFUSE_CTRL, data);
|
||||
-
|
||||
- //Step4. Polling EFSROM_KICK(0x580, bit30) until it become 0 again. It¡¦s done.
|
||||
- i = 0;
|
||||
-
|
||||
- while(i < 500)
|
||||
- {
|
||||
- RTMP_IO_READ32(pAd, EFUSE_CTRL, &eFuseCtrlStruc.word);
|
||||
-
|
||||
- if(eFuseCtrlStruc.field.EFSROM_KICK == 0)
|
||||
- break;
|
||||
-
|
||||
- RTMPusecDelay(2);
|
||||
- i++;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
-========================================================================
|
||||
-
|
||||
- Routine Description:
|
||||
-
|
||||
- Arguments:
|
||||
-
|
||||
- Return Value:
|
||||
-
|
||||
- Note:
|
||||
-
|
||||
-========================================================================
|
||||
-*/
|
||||
-static VOID eFuseWritePhysical(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- PUSHORT lpInBuffer,
|
||||
- ULONG nInBufferSize,
|
||||
- PUCHAR lpOutBuffer,
|
||||
- ULONG nOutBufferSize
|
||||
-)
|
||||
-{
|
||||
- USHORT* pInBuf = (USHORT*)lpInBuffer;
|
||||
- int i;
|
||||
- //USHORT* pOutBuf = (USHORT*)ioBuffer;
|
||||
- USHORT Offset = pInBuf[0]; // addr
|
||||
- USHORT Length = pInBuf[1]; // length
|
||||
- USHORT* pValueX = &pInBuf[2]; // value ...
|
||||
-
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWritePhysical Offset=0x%x, length=%d\n", Offset, Length));
|
||||
-
|
||||
- {
|
||||
- // Little-endian S | S Big-endian
|
||||
- // addr 3 2 1 0 | 0 1 2 3
|
||||
- // Ori-V D C B A | A B C D
|
||||
- // After swapping
|
||||
- // D C B A | D C B A
|
||||
- // Both the little and big-endian use the same sequence to write data.
|
||||
- // Therefore, we only need swap data when read the data.
|
||||
- for (i=0; i<Length; i+=2)
|
||||
- {
|
||||
- eFusePhysicalWriteRegisters(pAd, Offset+i, 2, &pValueX[i/2]);
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
-========================================================================
|
||||
-
|
||||
- Routine Description:
|
||||
-
|
||||
- Arguments:
|
||||
-
|
||||
- Return Value:
|
||||
-
|
||||
- Note:
|
||||
-
|
||||
-========================================================================
|
||||
-*/
|
||||
INT set_eFuseGetFreeBlockCount_Proc(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PSTRING arg)
|
||||
@@ -492,442 +319,12 @@ USHORT InBuf[3];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
-
|
||||
-INT set_eFuseLoadFromBin_Proc(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN PSTRING arg)
|
||||
-{
|
||||
- PSTRING src;
|
||||
- RTMP_OS_FD srcf;
|
||||
- RTMP_OS_FS_INFO osfsInfo;
|
||||
- INT retval, memSize;
|
||||
- PSTRING buffer, memPtr;
|
||||
- INT i = 0,j=0,k=1;
|
||||
- USHORT *PDATA;
|
||||
- USHORT DATA;
|
||||
-
|
||||
- memSize = 128 + MAX_EEPROM_BIN_FILE_SIZE + sizeof(USHORT) * 8;
|
||||
- memPtr = kmalloc(memSize, MEM_ALLOC_FLAG);
|
||||
- if (memPtr == NULL)
|
||||
- return FALSE;
|
||||
-
|
||||
- NdisZeroMemory(memPtr, memSize);
|
||||
- src = memPtr; // kmalloc(128, MEM_ALLOC_FLAG);
|
||||
- buffer = src + 128; // kmalloc(MAX_EEPROM_BIN_FILE_SIZE, MEM_ALLOC_FLAG);
|
||||
- PDATA = (USHORT*)(buffer + MAX_EEPROM_BIN_FILE_SIZE); // kmalloc(sizeof(USHORT)*8,MEM_ALLOC_FLAG);
|
||||
-
|
||||
- if(strlen(arg)>0)
|
||||
- NdisMoveMemory(src, arg, strlen(arg));
|
||||
- else
|
||||
- NdisMoveMemory(src, EFUSE_EEPROM_DEFULT_FILE, strlen(EFUSE_EEPROM_DEFULT_FILE));
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("FileName=%s\n",src));
|
||||
-
|
||||
- RtmpOSFSInfoChange(&osfsInfo, TRUE);
|
||||
-
|
||||
- srcf = RtmpOSFileOpen(src, O_RDONLY, 0);
|
||||
- if (IS_FILE_OPEN_ERR(srcf))
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("--> Error opening file %s\n", src));
|
||||
- retval = FALSE;
|
||||
- goto recoverFS;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- // The object must have a read method
|
||||
- while(RtmpOSFileRead(srcf, &buffer[i], 1)==1)
|
||||
- {
|
||||
- i++;
|
||||
- if(i>MAX_EEPROM_BIN_FILE_SIZE)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("--> Error reading file %s, file size too large[>%d]\n", src, MAX_EEPROM_BIN_FILE_SIZE));
|
||||
- retval = FALSE;
|
||||
- goto closeFile;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- retval = RtmpOSFileClose(srcf);
|
||||
- if (retval)
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("--> Error closing file %s\n", src));
|
||||
- }
|
||||
-
|
||||
-
|
||||
- RtmpOSFSInfoChange(&osfsInfo, FALSE);
|
||||
-
|
||||
- for(j=0;j<i;j++)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("%02X ",buffer[j]&0xff));
|
||||
- if((j+1)%2==0)
|
||||
- PDATA[j/2%8]=((buffer[j]<<8)&0xff00)|(buffer[j-1]&0xff);
|
||||
- if(j%16==0)
|
||||
- {
|
||||
- k=buffer[j];
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- k&=buffer[j];
|
||||
- if((j+1)%16==0)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, (" result=%02X,blk=%02x\n",k,j/16));
|
||||
- if(k!=0xff)
|
||||
- eFuseWriteRegistersFromBin(pAd,(USHORT)j-15, 16, PDATA);
|
||||
- else
|
||||
- {
|
||||
- if(eFuseReadRegisters(pAd,j, 2,(PUSHORT)&DATA)!=0x3f)
|
||||
- eFuseWriteRegistersFromBin(pAd,(USHORT)j-15, 16, PDATA);
|
||||
- }
|
||||
- /*
|
||||
- for(l=0;l<8;l++)
|
||||
- printk("%04x ",PDATA[l]);
|
||||
- printk("\n");
|
||||
- */
|
||||
- NdisZeroMemory(PDATA,16);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return TRUE;
|
||||
-
|
||||
-closeFile:
|
||||
- if (srcf)
|
||||
- RtmpOSFileClose(srcf);
|
||||
-
|
||||
-recoverFS:
|
||||
- RtmpOSFSInfoChange(&osfsInfo, FALSE);
|
||||
-
|
||||
-
|
||||
- if (memPtr)
|
||||
- kfree(memPtr);
|
||||
-
|
||||
- return retval;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static NTSTATUS eFuseWriteRegistersFromBin(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN USHORT Offset,
|
||||
- IN USHORT Length,
|
||||
- IN USHORT* pData)
|
||||
-{
|
||||
- USHORT i;
|
||||
- USHORT eFuseData;
|
||||
- USHORT LogicalAddress, BlkNum = 0xffff;
|
||||
- UCHAR EFSROM_AOUT,Loop=0;
|
||||
- EFUSE_CTRL_STRUC eFuseCtrlStruc;
|
||||
- USHORT efuseDataOffset;
|
||||
- UINT32 data,tempbuffer;
|
||||
- USHORT addr,tmpaddr, InBuf[3], tmpOffset;
|
||||
- UINT32 buffer[4];
|
||||
- BOOLEAN bWriteSuccess = TRUE;
|
||||
- BOOLEAN bNotWrite=TRUE;
|
||||
- BOOLEAN bAllocateNewBlk=TRUE;
|
||||
-
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWriteRegistersFromBin Offset=%x, pData=%04x:%04x:%04x:%04x\n", Offset, *pData,*(pData+1),*(pData+2),*(pData+3)));
|
||||
-
|
||||
- do
|
||||
- {
|
||||
- //Step 0. find the entry in the mapping table
|
||||
- //The address of EEPROM is 2-bytes alignment.
|
||||
- //The last bit is used for alignment, so it must be 0.
|
||||
- Loop++;
|
||||
- tmpOffset = Offset & 0xfffe;
|
||||
- EFSROM_AOUT = eFuseReadRegisters(pAd, tmpOffset, 2, &eFuseData);
|
||||
-
|
||||
- if( EFSROM_AOUT == 0x3f)
|
||||
- { //find available logical address pointer
|
||||
- //the logical address does not exist, find an empty one
|
||||
- //from the first address of block 45=16*45=0x2d0 to the last address of block 47
|
||||
- //==>48*16-3(reserved)=2FC
|
||||
- bAllocateNewBlk=TRUE;
|
||||
- for (i=EFUSE_USAGE_MAP_START; i<=EFUSE_USAGE_MAP_END; i+=2)
|
||||
- {
|
||||
- //Retrive the logical block nubmer form each logical address pointer
|
||||
- //It will access two logical address pointer each time.
|
||||
- eFusePhysicalReadRegisters(pAd, i, 2, &LogicalAddress);
|
||||
- if( (LogicalAddress & 0xff) == 0)
|
||||
- {//Not used logical address pointer
|
||||
- BlkNum = i-EFUSE_USAGE_MAP_START;
|
||||
- break;
|
||||
- }
|
||||
- else if(( (LogicalAddress >> 8) & 0xff) == 0)
|
||||
- {//Not used logical address pointer
|
||||
- if (i != EFUSE_USAGE_MAP_END)
|
||||
- {
|
||||
- BlkNum = i-EFUSE_USAGE_MAP_START+1;
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- bAllocateNewBlk=FALSE;
|
||||
- BlkNum = EFSROM_AOUT;
|
||||
- }
|
||||
-
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWriteRegisters BlkNum = %d \n", BlkNum));
|
||||
-
|
||||
- if(BlkNum == 0xffff)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWriteRegisters: out of free E-fuse space!!!\n"));
|
||||
- return FALSE;
|
||||
- }
|
||||
- //Step 1.1.0
|
||||
- //If the block is not existing in mapping table, create one
|
||||
- //and write down the 16-bytes data to the new block
|
||||
- if(bAllocateNewBlk)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("Allocate New Blk\n"));
|
||||
- efuseDataOffset = EFUSE_DATA3;
|
||||
- for(i=0; i< 4; i++)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("Allocate New Blk, Data%d=%04x%04x\n",3-i,pData[2*i+1],pData[2*i]));
|
||||
- tempbuffer=((pData[2*i+1]<<16)&0xffff0000)|pData[2*i];
|
||||
-
|
||||
-
|
||||
- RTMP_IO_WRITE32(pAd, efuseDataOffset,tempbuffer);
|
||||
- efuseDataOffset -= 4;
|
||||
-
|
||||
- }
|
||||
- /////////////////////////////////////////////////////////////////
|
||||
-
|
||||
- //Step1.1.1. Write 10-bit of address to EFSROM_AIN (0x580, bit25:bit16). The address must be 16-byte alignment.
|
||||
- RTMP_IO_READ32(pAd, EFUSE_CTRL, &eFuseCtrlStruc.word);
|
||||
- eFuseCtrlStruc.field.EFSROM_AIN = BlkNum* 0x10 ;
|
||||
-
|
||||
- //Step1.1.2. Write EFSROM_MODE (0x580, bit7:bit6) to 3.
|
||||
- eFuseCtrlStruc.field.EFSROM_MODE = 3;
|
||||
-
|
||||
- //Step1.1.3. Write EFSROM_KICK (0x580, bit30) to 1 to kick-off physical write procedure.
|
||||
- eFuseCtrlStruc.field.EFSROM_KICK = 1;
|
||||
-
|
||||
- NdisMoveMemory(&data, &eFuseCtrlStruc, 4);
|
||||
-
|
||||
- RTMP_IO_WRITE32(pAd, EFUSE_CTRL, data);
|
||||
-
|
||||
- //Step1.1.4. Polling EFSROM_KICK(0x580, bit30) until it become 0 again. It¡¦s done.
|
||||
- i = 0;
|
||||
- while(i < 100)
|
||||
- {
|
||||
- RTMP_IO_READ32(pAd, EFUSE_CTRL, (PUINT32) &eFuseCtrlStruc);
|
||||
-
|
||||
- if(eFuseCtrlStruc.field.EFSROM_KICK == 0)
|
||||
- break;
|
||||
-
|
||||
- RTMPusecDelay(2);
|
||||
- i++;
|
||||
- }
|
||||
-
|
||||
- }
|
||||
- else
|
||||
- { //Step1.2.
|
||||
- //If the same logical number is existing, check if the writting data and the data
|
||||
- //saving in this block are the same.
|
||||
- /////////////////////////////////////////////////////////////////
|
||||
- //read current values of 16-byte block
|
||||
- RTMP_IO_READ32(pAd, EFUSE_CTRL, &eFuseCtrlStruc.word);
|
||||
-
|
||||
- //Step1.2.0. Write 10-bit of address to EFSROM_AIN (0x580, bit25:bit16). The address must be 16-byte alignment.
|
||||
- eFuseCtrlStruc.field.EFSROM_AIN = Offset & 0xfff0;
|
||||
-
|
||||
- //Step1.2.1. Write EFSROM_MODE (0x580, bit7:bit6) to 1.
|
||||
- eFuseCtrlStruc.field.EFSROM_MODE = 0;
|
||||
-
|
||||
- //Step1.2.2. Write EFSROM_KICK (0x580, bit30) to 1 to kick-off physical read procedure.
|
||||
- eFuseCtrlStruc.field.EFSROM_KICK = 1;
|
||||
-
|
||||
- NdisMoveMemory(&data, &eFuseCtrlStruc, 4);
|
||||
- RTMP_IO_WRITE32(pAd, EFUSE_CTRL, data);
|
||||
-
|
||||
- //Step1.2.3. Polling EFSROM_KICK(0x580, bit30) until it become 0 again.
|
||||
- i = 0;
|
||||
- while(i < 500)
|
||||
- {
|
||||
- RTMP_IO_READ32(pAd, EFUSE_CTRL, (PUINT32) &eFuseCtrlStruc);
|
||||
-
|
||||
- if(eFuseCtrlStruc.field.EFSROM_KICK == 0)
|
||||
- break;
|
||||
- RTMPusecDelay(2);
|
||||
- i++;
|
||||
- }
|
||||
-
|
||||
- //Step1.2.4. Read 16-byte of data from EFUSE_DATA0-3 (0x59C-0x590)
|
||||
- efuseDataOffset = EFUSE_DATA3;
|
||||
- for(i=0; i< 4; i++)
|
||||
- {
|
||||
- RTMP_IO_READ32(pAd, efuseDataOffset, (PUINT32) &buffer[i]);
|
||||
- efuseDataOffset -= 4;
|
||||
- }
|
||||
- //Step1.2.5. Check if the data of efuse and the writing data are the same.
|
||||
- for(i =0; i<4; i++)
|
||||
- {
|
||||
- tempbuffer=((pData[2*i+1]<<16)&0xffff0000)|pData[2*i];
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("buffer[%d]=%x,pData[%d]=%x,pData[%d]=%x,tempbuffer=%x\n",i,buffer[i],2*i,pData[2*i],2*i+1,pData[2*i+1],tempbuffer));
|
||||
-
|
||||
- if(((buffer[i]&0xffff0000)==(pData[2*i+1]<<16))&&((buffer[i]&0xffff)==pData[2*i]))
|
||||
- bNotWrite&=TRUE;
|
||||
- else
|
||||
- {
|
||||
- bNotWrite&=FALSE;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- if(!bNotWrite)
|
||||
- {
|
||||
- printk("The data is not the same\n");
|
||||
-
|
||||
- for(i =0; i<8; i++)
|
||||
- {
|
||||
- addr = BlkNum * 0x10 ;
|
||||
-
|
||||
- InBuf[0] = addr+2*i;
|
||||
- InBuf[1] = 2;
|
||||
- InBuf[2] = pData[i];
|
||||
-
|
||||
- eFuseWritePhysical(pAd, &InBuf[0], 6, NULL, 2);
|
||||
- }
|
||||
-
|
||||
- }
|
||||
- else
|
||||
- return TRUE;
|
||||
- }
|
||||
-
|
||||
-
|
||||
-
|
||||
- //Step 2. Write mapping table
|
||||
- addr = EFUSE_USAGE_MAP_START+BlkNum;
|
||||
-
|
||||
- tmpaddr = addr;
|
||||
-
|
||||
- if(addr % 2 != 0)
|
||||
- addr = addr -1;
|
||||
- InBuf[0] = addr;
|
||||
- InBuf[1] = 2;
|
||||
-
|
||||
- //convert the address from 10 to 8 bit ( bit7, 6 = parity and bit5 ~ 0 = bit9~4), and write to logical map entry
|
||||
- tmpOffset = Offset;
|
||||
- tmpOffset >>= 4;
|
||||
- tmpOffset |= ((~((tmpOffset & 0x01) ^ ( tmpOffset >> 1 & 0x01) ^ (tmpOffset >> 2 & 0x01) ^ (tmpOffset >> 3 & 0x01))) << 6) & 0x40;
|
||||
- tmpOffset |= ((~( (tmpOffset >> 2 & 0x01) ^ (tmpOffset >> 3 & 0x01) ^ (tmpOffset >> 4 & 0x01) ^ ( tmpOffset >> 5 & 0x01))) << 7) & 0x80;
|
||||
-
|
||||
- // write the logical address
|
||||
- if(tmpaddr%2 != 0)
|
||||
- InBuf[2] = tmpOffset<<8;
|
||||
- else
|
||||
- InBuf[2] = tmpOffset;
|
||||
-
|
||||
- eFuseWritePhysical(pAd,&InBuf[0], 6, NULL, 0);
|
||||
-
|
||||
- //Step 3. Compare data if not the same, invalidate the mapping entry, then re-write the data until E-fuse is exhausted
|
||||
- bWriteSuccess = TRUE;
|
||||
- for(i =0; i<8; i++)
|
||||
- {
|
||||
- addr = BlkNum * 0x10 ;
|
||||
-
|
||||
- InBuf[0] = addr+2*i;
|
||||
- InBuf[1] = 2;
|
||||
- InBuf[2] = 0x0;
|
||||
-
|
||||
- eFuseReadPhysical(pAd, &InBuf[0], 4, &InBuf[2], 2);
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("addr=%x, buffer[i]=%x,InBuf[2]=%x\n",InBuf[0],pData[i],InBuf[2]));
|
||||
- if(pData[i] != InBuf[2])
|
||||
- {
|
||||
- bWriteSuccess = FALSE;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- //Step 4. invlidate mapping entry and find a free mapping entry if not succeed
|
||||
-
|
||||
- if (!bWriteSuccess&&Loop<2)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWriteRegistersFromBin::Not bWriteSuccess BlkNum = %d\n", BlkNum));
|
||||
-
|
||||
- // the offset of current mapping entry
|
||||
- addr = EFUSE_USAGE_MAP_START+BlkNum;
|
||||
-
|
||||
- //find a new mapping entry
|
||||
- BlkNum = 0xffff;
|
||||
- for (i=EFUSE_USAGE_MAP_START; i<=EFUSE_USAGE_MAP_END; i+=2)
|
||||
- {
|
||||
- eFusePhysicalReadRegisters(pAd, i, 2, &LogicalAddress);
|
||||
- if( (LogicalAddress & 0xff) == 0)
|
||||
- {
|
||||
- BlkNum = i-EFUSE_USAGE_MAP_START;
|
||||
- break;
|
||||
- }
|
||||
- else if(( (LogicalAddress >> 8) & 0xff) == 0)
|
||||
- {
|
||||
- if (i != EFUSE_USAGE_MAP_END)
|
||||
- {
|
||||
- BlkNum = i+1-EFUSE_USAGE_MAP_START;
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWriteRegistersFromBin::Not bWriteSuccess new BlkNum = %d\n", BlkNum));
|
||||
- if(BlkNum == 0xffff)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("eFuseWriteRegistersFromBin: out of free E-fuse space!!!\n"));
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
- //invalidate the original mapping entry if new entry is not found
|
||||
- tmpaddr = addr;
|
||||
-
|
||||
- if(addr % 2 != 0)
|
||||
- addr = addr -1;
|
||||
- InBuf[0] = addr;
|
||||
- InBuf[1] = 2;
|
||||
-
|
||||
- eFuseReadPhysical(pAd, &InBuf[0], 4, &InBuf[2], 2);
|
||||
-
|
||||
- // write the logical address
|
||||
- if(tmpaddr%2 != 0)
|
||||
- {
|
||||
- // Invalidate the high byte
|
||||
- for (i=8; i<15; i++)
|
||||
- {
|
||||
- if( ( (InBuf[2] >> i) & 0x01) == 0)
|
||||
- {
|
||||
- InBuf[2] |= (0x1 <<i);
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- // invalidate the low byte
|
||||
- for (i=0; i<8; i++)
|
||||
- {
|
||||
- if( ( (InBuf[2] >> i) & 0x01) == 0)
|
||||
- {
|
||||
- InBuf[2] |= (0x1 <<i);
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- eFuseWritePhysical(pAd, &InBuf[0], 6, NULL, 0);
|
||||
- }
|
||||
-
|
||||
- }
|
||||
- while(!bWriteSuccess&&Loop<2);
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
int rtmp_ee_efuse_read16(
|
||||
IN RTMP_ADAPTER *pAd,
|
||||
IN USHORT Offset,
|
||||
OUT USHORT *pValue)
|
||||
{
|
||||
- if(pAd->bFroceEEPROMBuffer || pAd->bEEPROMFile)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("Read from EEPROM Buffer\n"));
|
||||
- NdisMoveMemory(pValue, &(pAd->EEPROMImage[Offset]), 2);
|
||||
- }
|
||||
- else
|
||||
- eFuseReadRegisters(pAd, Offset, 2, pValue);
|
||||
+ eFuseReadRegisters(pAd, Offset, 2, pValue);
|
||||
return (*pValue);
|
||||
}
|
||||
|
||||
@@ -944,177 +341,6 @@ int RtmpEfuseSupportCheck(
|
||||
return 0;
|
||||
}
|
||||
|
||||
-INT set_eFuseBufferModeWriteBack_Proc(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN PSTRING arg)
|
||||
-{
|
||||
- UINT Enable;
|
||||
-
|
||||
-
|
||||
- if(strlen(arg)>0)
|
||||
- {
|
||||
- Enable= simple_strtol(arg, 0, 16);
|
||||
- }
|
||||
- else
|
||||
- return FALSE;
|
||||
- if(Enable==1)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("set_eFuseBufferMode_Proc:: Call WRITEEEPROMBUF"));
|
||||
- eFuseWriteEeeppromBuf(pAd);
|
||||
- }
|
||||
- else
|
||||
- return FALSE;
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/*
|
||||
- ========================================================================
|
||||
-
|
||||
- Routine Description:
|
||||
- Load EEPROM from bin file for eFuse mode
|
||||
-
|
||||
- Arguments:
|
||||
- Adapter Pointer to our adapter
|
||||
-
|
||||
- Return Value:
|
||||
- NDIS_STATUS_SUCCESS firmware image load ok
|
||||
- NDIS_STATUS_FAILURE image not found
|
||||
-
|
||||
- IRQL = PASSIVE_LEVEL
|
||||
-
|
||||
- ========================================================================
|
||||
-*/
|
||||
-INT eFuseLoadEEPROM(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
- PSTRING src = NULL;
|
||||
- INT retval;
|
||||
- RTMP_OS_FD srcf;
|
||||
- RTMP_OS_FS_INFO osFSInfo;
|
||||
-
|
||||
-
|
||||
- src=EFUSE_BUFFER_PATH;
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("FileName=%s\n",src));
|
||||
-
|
||||
-
|
||||
- RtmpOSFSInfoChange(&osFSInfo, TRUE);
|
||||
-
|
||||
- if (src && *src)
|
||||
- {
|
||||
- srcf = RtmpOSFileOpen(src, O_RDONLY, 0);
|
||||
- if (IS_FILE_OPEN_ERR(srcf))
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("--> Error %ld opening %s\n", -PTR_ERR(srcf),src));
|
||||
- return FALSE;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
-
|
||||
- memset(pAd->EEPROMImage, 0x00, MAX_EEPROM_BIN_FILE_SIZE);
|
||||
-
|
||||
-
|
||||
- retval =RtmpOSFileRead(srcf, (PSTRING)pAd->EEPROMImage, MAX_EEPROM_BIN_FILE_SIZE);
|
||||
- if (retval > 0)
|
||||
- {
|
||||
- RTMPSetProfileParameters(pAd, (PSTRING)pAd->EEPROMImage);
|
||||
- retval = NDIS_STATUS_SUCCESS;
|
||||
- }
|
||||
- else
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("Read file \"%s\" failed(errCode=%d)!\n", src, retval));
|
||||
-
|
||||
- }
|
||||
-
|
||||
-
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("--> Error src or srcf is null\n"));
|
||||
- return FALSE;
|
||||
-
|
||||
- }
|
||||
-
|
||||
- retval=RtmpOSFileClose(srcf);
|
||||
-
|
||||
- if (retval)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("--> Error %d closing %s\n", -retval, src));
|
||||
- }
|
||||
-
|
||||
-
|
||||
- RtmpOSFSInfoChange(&osFSInfo, FALSE);
|
||||
-
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-INT eFuseWriteEeeppromBuf(
|
||||
- IN PRTMP_ADAPTER pAd)
|
||||
-{
|
||||
-
|
||||
- PSTRING src = NULL;
|
||||
- INT retval;
|
||||
- RTMP_OS_FD srcf;
|
||||
- RTMP_OS_FS_INFO osFSInfo;
|
||||
-
|
||||
-
|
||||
- src=EFUSE_BUFFER_PATH;
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("FileName=%s\n",src));
|
||||
-
|
||||
- RtmpOSFSInfoChange(&osFSInfo, TRUE);
|
||||
-
|
||||
-
|
||||
-
|
||||
- if (src && *src)
|
||||
- {
|
||||
- srcf = RtmpOSFileOpen(src, O_WRONLY|O_CREAT, 0);
|
||||
-
|
||||
- if (IS_FILE_OPEN_ERR(srcf))
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("--> Error %ld opening %s\n", -PTR_ERR(srcf),src));
|
||||
- return FALSE;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
-/*
|
||||
- // The object must have a read method
|
||||
- if (srcf->f_op && srcf->f_op->write)
|
||||
- {
|
||||
- // The object must have a read method
|
||||
- srcf->f_op->write(srcf, pAd->EEPROMImage, 1024, &srcf->f_pos);
|
||||
-
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("--> Error!! System doest not support read function\n"));
|
||||
- return FALSE;
|
||||
- }
|
||||
-*/
|
||||
-
|
||||
- RtmpOSFileWrite(srcf, (PSTRING)pAd->EEPROMImage,MAX_EEPROM_BIN_FILE_SIZE);
|
||||
-
|
||||
- }
|
||||
-
|
||||
-
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("--> Error src or srcf is null\n"));
|
||||
- return FALSE;
|
||||
-
|
||||
- }
|
||||
-
|
||||
- retval=RtmpOSFileClose(srcf);
|
||||
-
|
||||
- if (retval)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("--> Error %d closing %s\n", -retval, src));
|
||||
- }
|
||||
-
|
||||
- RtmpOSFSInfoChange(&osFSInfo, FALSE);
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-
|
||||
VOID eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd,
|
||||
PUINT EfuseFreeBlock)
|
||||
{
|
||||
@@ -1151,18 +377,6 @@ INT eFuse_init(
|
||||
UINT EfuseFreeBlock=0;
|
||||
DBGPRINT(RT_DEBUG_ERROR, ("NVM is Efuse and its size =%x[%x-%x] \n",EFUSE_USAGE_MAP_SIZE,EFUSE_USAGE_MAP_START,EFUSE_USAGE_MAP_END));
|
||||
eFuseGetFreeBlockCount(pAd, &EfuseFreeBlock);
|
||||
- //If the used block of efuse is less than 5. We assume the default value
|
||||
- // of this efuse is empty and change to the buffer mode in odrder to
|
||||
- //bring up interfaces successfully.
|
||||
- if(EfuseFreeBlock > (EFUSE_USAGE_MAP_END-5))
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("NVM is Efuse and the information is too less to bring up interface. Force to use EEPROM Buffer Mode\n"));
|
||||
- pAd->bFroceEEPROMBuffer = TRUE;
|
||||
- eFuseLoadEEPROM(pAd);
|
||||
- }
|
||||
- else
|
||||
- pAd->bFroceEEPROMBuffer = FALSE;
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("NVM is Efuse and force to use EEPROM Buffer Mode=%x\n",pAd->bFroceEEPROMBuffer));
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/drivers/staging/rt2860/common/eeprom.c b/drivers/staging/rt2860/common/eeprom.c
|
||||
index d7a2664..39276ca 100644
|
||||
--- a/drivers/staging/rt2860/common/eeprom.c
|
||||
+++ b/drivers/staging/rt2860/common/eeprom.c
|
||||
@@ -69,10 +69,7 @@ INT RtmpChipOpsEepromHook(
|
||||
return 0 ;
|
||||
}
|
||||
else
|
||||
- {
|
||||
- pAd->bFroceEEPROMBuffer = FALSE;
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("NVM is EEPROM\n"));
|
||||
- }
|
||||
#endif // RTMP_EFUSE_SUPPORT //
|
||||
#endif // RT30xx //
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
index 9e1c73d..fe8327b 100644
|
||||
--- a/drivers/staging/rt2860/common/rtmp_init.c
|
||||
+++ b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
@@ -694,15 +694,6 @@ VOID NICReadEEPROMParameters(
|
||||
|
||||
if (pAd->chipOps.eeinit)
|
||||
pAd->chipOps.eeinit(pAd);
|
||||
-#ifdef RTMP_EFUSE_SUPPORT
|
||||
-#ifdef RT30xx
|
||||
- if(!pAd->bFroceEEPROMBuffer && pAd->bEEPROMFile)
|
||||
- {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("--> NICReadEEPROMParameters::(Efuse)Load to EEPROM Buffer Mode\n"));
|
||||
- eFuseLoadEEPROM(pAd);
|
||||
- }
|
||||
-#endif // RT30xx //
|
||||
-#endif // RTMP_EFUSE_SUPPORT //
|
||||
|
||||
// Init EEPROM Address Number, before access EEPROM; if 93c46, EEPROMAddressNum=6, else if 93c66, EEPROMAddressNum=8
|
||||
RTMP_IO_READ32(pAd, E2PROM_CSR, &data);
|
||||
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
|
||||
index b578360..cdda247 100644
|
||||
--- a/drivers/staging/rt2860/rt_linux.c
|
||||
+++ b/drivers/staging/rt2860/rt_linux.c
|
||||
@@ -1065,26 +1065,6 @@ int RtmpOSFileWrite(RTMP_OS_FD osfd, char *pDataPtr, int writeLen)
|
||||
return osfd->f_op->write(osfd, pDataPtr, (size_t)writeLen, &osfd->f_pos);
|
||||
}
|
||||
|
||||
-
|
||||
-void RtmpOSFSInfoChange(RTMP_OS_FS_INFO *pOSFSInfo, BOOLEAN bSet)
|
||||
-{
|
||||
- if (bSet)
|
||||
- {
|
||||
- // Save uid and gid used for filesystem access.
|
||||
- // Set user and group to 0 (root)
|
||||
- pOSFSInfo->fsuid = current_fsuid();
|
||||
- pOSFSInfo->fsgid = current_fsgid();
|
||||
- pOSFSInfo->fs = get_fs();
|
||||
- set_fs(KERNEL_DS);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- set_fs(pOSFSInfo->fs);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-
|
||||
-
|
||||
/*******************************************************************************
|
||||
|
||||
Task create/management/kill related functions.
|
||||
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
|
||||
index 3ec50b5..c43c8ea 100644
|
||||
--- a/drivers/staging/rt2860/rtmp.h
|
||||
+++ b/drivers/staging/rt2860/rtmp.h
|
||||
@@ -2258,8 +2258,6 @@ struct _RTMP_ADAPTER
|
||||
#ifdef RT30xx
|
||||
#ifdef RTMP_EFUSE_SUPPORT
|
||||
BOOLEAN bUseEfuse;
|
||||
- BOOLEAN bEEPROMFile;
|
||||
- BOOLEAN bFroceEEPROMBuffer;
|
||||
UCHAR EEPROMImage[1024];
|
||||
#endif // RTMP_EFUSE_SUPPORT //
|
||||
#endif // RT30xx //
|
||||
@@ -4021,10 +4019,6 @@ INT set_eFusedump_Proc(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN PSTRING arg);
|
||||
|
||||
-INT set_eFuseLoadFromBin_Proc(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN PSTRING arg);
|
||||
-
|
||||
VOID eFusePhysicalReadRegisters(
|
||||
IN PRTMP_ADAPTER pAd,
|
||||
IN USHORT Offset,
|
||||
@@ -4034,16 +4028,6 @@ VOID eFusePhysicalReadRegisters(
|
||||
int RtmpEfuseSupportCheck(
|
||||
IN RTMP_ADAPTER *pAd);
|
||||
|
||||
-INT set_eFuseBufferModeWriteBack_Proc(
|
||||
- IN PRTMP_ADAPTER pAd,
|
||||
- IN PSTRING arg);
|
||||
-
|
||||
-INT eFuseLoadEEPROM(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
-INT eFuseWriteEeeppromBuf(
|
||||
- IN PRTMP_ADAPTER pAd);
|
||||
-
|
||||
VOID eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd,
|
||||
PUINT EfuseFreeBlock);
|
||||
|
||||
@@ -5632,10 +5616,5 @@ int RtmpOSFileWrite(
|
||||
IN char *pDataPtr,
|
||||
IN int writeLen);
|
||||
|
||||
-void RtmpOSFSInfoChange(
|
||||
- IN RTMP_OS_FS_INFO *pOSFSInfo,
|
||||
- IN BOOLEAN bSet);
|
||||
-
|
||||
-
|
||||
#endif // __RTMP_H__
|
||||
|
||||
--
|
||||
1.7.1
|
||||
|
349
debian/patches/features/all/rt28x0/0012-Staging-rt28x0-fix-some-build-warnings.patch
vendored
Normal file
349
debian/patches/features/all/rt28x0/0012-Staging-rt28x0-fix-some-build-warnings.patch
vendored
Normal file
|
@ -0,0 +1,349 @@
|
|||
From 579614c2cab885c702da52c9c1cb836bd08ddbd0 Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Wed, 21 Oct 2009 22:44:42 +0200
|
||||
Subject: [PATCH 12/42] Staging: rt28x0: fix some build warnings
|
||||
|
||||
commit ca58fb303757d73876af32238d86091c59b88507 upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/chip/rtmp_phy.h | 8 +++---
|
||||
drivers/staging/rt2860/chips/rt30xx.c | 2 +
|
||||
drivers/staging/rt2860/common/cmm_asic.c | 6 ++--
|
||||
drivers/staging/rt2860/common/cmm_mac_pci.c | 7 ++---
|
||||
drivers/staging/rt2860/common/mlme.c | 1 -
|
||||
drivers/staging/rt2860/common/rtmp_init.c | 3 +-
|
||||
drivers/staging/rt2860/common/rtmp_mcu.c | 2 +
|
||||
drivers/staging/rt2860/pci_main_dev.c | 35 +++++++++++++++++----------
|
||||
drivers/staging/rt2860/rt_linux.c | 10 +++----
|
||||
drivers/staging/rt2860/rt_main_dev.c | 6 +---
|
||||
drivers/staging/rt2860/sta/connect.c | 1 -
|
||||
drivers/staging/rt2860/usb_main_dev.c | 7 +++--
|
||||
12 files changed, 48 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/chip/rtmp_phy.h b/drivers/staging/rt2860/chip/rtmp_phy.h
|
||||
index 87516f3..e2b90a1 100644
|
||||
--- a/drivers/staging/rt2860/chip/rtmp_phy.h
|
||||
+++ b/drivers/staging/rt2860/chip/rtmp_phy.h
|
||||
@@ -552,8 +552,8 @@
|
||||
#ifdef RT30xx
|
||||
#define RTMP_ASIC_MMPS_DISABLE(_pAd) \
|
||||
do{ \
|
||||
- UCHAR _bbpData; \
|
||||
- UINT32 _macData; \
|
||||
+ UINT32 _macData; \
|
||||
+ UCHAR _bbpData = 0; \
|
||||
/* disable MMPS BBP control register */ \
|
||||
RTMP_BBP_IO_READ8_BY_REG_ID(_pAd, BBP_R3, &_bbpData); \
|
||||
_bbpData &= ~(0x04); /*bit 2*/ \
|
||||
@@ -568,8 +568,8 @@
|
||||
|
||||
#define RTMP_ASIC_MMPS_ENABLE(_pAd) \
|
||||
do{ \
|
||||
- UCHAR _bbpData; \
|
||||
- UINT32 _macData; \
|
||||
+ UINT32 _macData; \
|
||||
+ UCHAR _bbpData = 0; \
|
||||
/* enable MMPS BBP control register */ \
|
||||
RTMP_BBP_IO_READ8_BY_REG_ID(_pAd, BBP_R3, &_bbpData); \
|
||||
_bbpData |= (0x04); /*bit 2*/ \
|
||||
diff --git a/drivers/staging/rt2860/chips/rt30xx.c b/drivers/staging/rt2860/chips/rt30xx.c
|
||||
index f29d11d..c69fab5 100644
|
||||
--- a/drivers/staging/rt2860/chips/rt30xx.c
|
||||
+++ b/drivers/staging/rt2860/chips/rt30xx.c
|
||||
@@ -86,7 +86,9 @@ VOID RT30xxSetRxAnt(
|
||||
IN UCHAR Ant)
|
||||
{
|
||||
UINT32 Value;
|
||||
+#ifdef RTMP_MAC_PCI
|
||||
UINT32 x;
|
||||
+#endif
|
||||
|
||||
if ((pAd->EepromAccess) ||
|
||||
(RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS)) ||
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_asic.c b/drivers/staging/rt2860/common/cmm_asic.c
|
||||
index 5d3a387..406e0bb 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_asic.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_asic.c
|
||||
@@ -810,9 +810,9 @@ VOID AsicSwitchChannel(
|
||||
|
||||
#if defined(RT3090) || defined(RT3390)
|
||||
// PCIe PHY Transmit attenuation adjustment
|
||||
- if (IS_RT3090A(pAd) || IS_RT3390(pAd))
|
||||
- {
|
||||
- TX_ATTENUATION_CTRL_STRUC TxAttenuationCtrl = {0};
|
||||
+ if (IS_RT3090A(pAd) || IS_RT3390(pAd)) {
|
||||
+ TX_ATTENUATION_CTRL_STRUC
|
||||
+ TxAttenuationCtrl = { .word = 0 };
|
||||
|
||||
RTMP_IO_READ32(pAd, PCIE_PHY_TX_ATTENUATION_CTRL, &TxAttenuationCtrl.word);
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_mac_pci.c b/drivers/staging/rt2860/common/cmm_mac_pci.c
|
||||
index 73992cb..d910bfd 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_mac_pci.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_mac_pci.c
|
||||
@@ -1173,10 +1173,9 @@ BOOLEAN RT28xxPciAsicRadioOn(
|
||||
pAd->Mlme.bPsPollTimerRunning = FALSE;
|
||||
RTMPCancelTimer(&pAd->Mlme.PsPollTimer, &Cancelled);
|
||||
}
|
||||
- if ((pAd->StaCfg.PSControl.field.EnableNewPS == TRUE)&&
|
||||
- ((Level == GUIRADIO_OFF) || (Level == GUI_IDLE_POWER_SAVE))
|
||||
- ||(RTMP_TEST_PSFLAG(pAd, fRTMP_PS_SET_PCI_CLK_OFF_COMMAND)))
|
||||
- {
|
||||
+ if ((pAd->StaCfg.PSControl.field.EnableNewPS == TRUE &&
|
||||
+ (Level == GUIRADIO_OFF || Level == GUI_IDLE_POWER_SAVE)) ||
|
||||
+ RTMP_TEST_PSFLAG(pAd, fRTMP_PS_SET_PCI_CLK_OFF_COMMAND)) {
|
||||
// Some chips don't need to delay 6ms, so copy RTMPPCIePowerLinkCtrlRestore
|
||||
// return condition here.
|
||||
/*
|
||||
diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c
|
||||
index 7647c09..9fa853e 100644
|
||||
--- a/drivers/staging/rt2860/common/mlme.c
|
||||
+++ b/drivers/staging/rt2860/common/mlme.c
|
||||
@@ -679,7 +679,6 @@ VOID MlmePeriodicExec(
|
||||
{
|
||||
ULONG TxTotalCnt;
|
||||
PRTMP_ADAPTER pAd = (RTMP_ADAPTER *)FunctionContext;
|
||||
- SHORT realavgrssi;
|
||||
|
||||
#ifdef RTMP_MAC_PCI
|
||||
{
|
||||
diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
index fe8327b..5deba8d 100644
|
||||
--- a/drivers/staging/rt2860/common/rtmp_init.c
|
||||
+++ b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
@@ -3621,7 +3621,8 @@ INT RtmpRaDevCtrlInit(
|
||||
|
||||
#ifdef RTMP_MAC_USB
|
||||
init_MUTEX(&(pAd->UsbVendorReq_semaphore));
|
||||
- os_alloc_mem(pAd, (PUCHAR)&pAd->UsbVendorReqBuf, MAX_PARAM_BUFFER_SIZE - 1);
|
||||
+ os_alloc_mem(pAd, (PUCHAR *)&pAd->UsbVendorReqBuf,
|
||||
+ MAX_PARAM_BUFFER_SIZE - 1);
|
||||
if (pAd->UsbVendorReqBuf == NULL)
|
||||
{
|
||||
DBGPRINT(RT_DEBUG_ERROR, ("Allocate vendor request temp buffer failed!\n"));
|
||||
diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
index 229ea05..e5d1902 100644
|
||||
--- a/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
+++ b/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
@@ -119,7 +119,9 @@ NDIS_STATUS RtmpAsicLoadFirmware(
|
||||
PUCHAR pFirmwareImage = NULL;
|
||||
ULONG FileLength, Index;
|
||||
UINT32 MacReg = 0;
|
||||
+#ifdef RTMP_MAC_USB
|
||||
UINT32 Version = (pAd->MACVersion >> 16);
|
||||
+#endif
|
||||
|
||||
// New 8k byte firmware size for RT3071/RT3072
|
||||
{
|
||||
diff --git a/drivers/staging/rt2860/pci_main_dev.c b/drivers/staging/rt2860/pci_main_dev.c
|
||||
index 1436a60..38bc429 100644
|
||||
--- a/drivers/staging/rt2860/pci_main_dev.c
|
||||
+++ b/drivers/staging/rt2860/pci_main_dev.c
|
||||
@@ -310,7 +310,7 @@ static INT __devinit rt2860_probe(
|
||||
return rv;
|
||||
}
|
||||
|
||||
- print_name = pci_name(pci_dev);
|
||||
+ print_name = (PSTRING)pci_name(pci_dev);
|
||||
|
||||
if ((rv = pci_request_regions(pci_dev, print_name)) != 0)
|
||||
{
|
||||
@@ -883,7 +883,7 @@ VOID RTMPPCIeLinkCtrlValueRestore(
|
||||
#endif // RT2860 //
|
||||
// Check PSControl Configuration
|
||||
if (pAd->StaCfg.PSControl.field.EnableNewPS == FALSE)
|
||||
- return TRUE;
|
||||
+ return;
|
||||
|
||||
//3090 will not execute the following codes.
|
||||
// Check interface : If not PCIe interface, return.
|
||||
@@ -977,7 +977,7 @@ VOID RTMPPCIeLinkCtrlSetting(
|
||||
#endif // RT2860 //
|
||||
// Check PSControl Configuration
|
||||
if (pAd->StaCfg.PSControl.field.EnableNewPS == FALSE)
|
||||
- return TRUE;
|
||||
+ return;
|
||||
|
||||
// Check interface : If not PCIe interface, return.
|
||||
//Block 3090 to enter the following function
|
||||
@@ -1086,17 +1086,17 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
|
||||
IN PRTMP_ADAPTER pAd)
|
||||
{
|
||||
|
||||
- ULONG HostConfiguration;
|
||||
+ ULONG HostConfiguration = 0;
|
||||
ULONG Configuration;
|
||||
- ULONG Vendor;
|
||||
- ULONG offset;
|
||||
POS_COOKIE pObj;
|
||||
INT pos;
|
||||
USHORT reg16;
|
||||
|
||||
pObj = (POS_COOKIE) pAd->OS_Cookie;
|
||||
|
||||
- DBGPRINT(RT_DEBUG_INFO, ("RTMPrt3xSetPCIePowerLinkCtrl.===> %x\n", pAd->StaCfg.PSControl.word));
|
||||
+ DBGPRINT(RT_DEBUG_INFO,
|
||||
+ ("RTMPrt3xSetPCIePowerLinkCtrl.===> %lx\n",
|
||||
+ pAd->StaCfg.PSControl.word));
|
||||
|
||||
// Check PSControl Configuration
|
||||
if (pAd->StaCfg.PSControl.field.EnableNewPS == FALSE)
|
||||
@@ -1104,7 +1104,6 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
|
||||
RTMPFindHostPCIDev(pAd);
|
||||
if (pObj->parent_pci_dev)
|
||||
{
|
||||
- USHORT vendor_id;
|
||||
// Find PCI-to-PCI Bridge Express Capability Offset
|
||||
pos = pci_find_capability(pObj->parent_pci_dev, PCI_CAP_ID_EXP);
|
||||
|
||||
@@ -1129,7 +1128,10 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
|
||||
// Because in rt30xxForceASPMTest Mode, Force turn on L0s, L1.
|
||||
// Fix HostConfiguration bit0:1 = 0x3 for later use.
|
||||
HostConfiguration = 0x3;
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("PSM : Force ASPM : Host device L1/L0s Value = 0x%x\n", HostConfiguration));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE,
|
||||
+ ("PSM : Force ASPM : "
|
||||
+ "Host device L1/L0s Value = 0x%lx\n",
|
||||
+ HostConfiguration));
|
||||
}
|
||||
}
|
||||
else if (pAd->StaCfg.PSControl.field.rt30xxFollowHostASPM == 1)
|
||||
@@ -1141,7 +1143,10 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
|
||||
PCI_REG_READ_WORD(pObj->parent_pci_dev, pAd->HostLnkCtrlOffset, HostConfiguration);
|
||||
pAd->Rt3xxHostLinkCtrl = HostConfiguration;
|
||||
HostConfiguration &= 0x3;
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("PSM : Follow Host ASPM : Host device L1/L0s Value = 0x%x\n", HostConfiguration));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE,
|
||||
+ ("PSM : Follow Host ASPM : "
|
||||
+ "Host device L1/L0s Value = 0x%lx\n",
|
||||
+ HostConfiguration));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1155,8 +1160,10 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
|
||||
pAd->RLnkCtrlOffset = pos + PCI_EXP_LNKCTL;
|
||||
pci_read_config_word(pObj->pci_dev, pAd->RLnkCtrlOffset, ®16);
|
||||
Configuration = le2cpu16(reg16);
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("Read (Ralink PCIe Link Control Register) offset 0x%x = 0x%x\n",
|
||||
- pAd->RLnkCtrlOffset, Configuration));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE,
|
||||
+ ("Read (Ralink PCIe Link Control Register) "
|
||||
+ "offset 0x%x = 0x%lx\n",
|
||||
+ pAd->RLnkCtrlOffset, Configuration));
|
||||
Configuration |= 0x100;
|
||||
if ((pAd->StaCfg.PSControl.field.rt30xxFollowHostASPM == 1)
|
||||
|| (pAd->StaCfg.PSControl.field.rt30xxForceASPMTest == 1))
|
||||
@@ -1182,7 +1189,9 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl(
|
||||
reg16 = cpu2le16(Configuration);
|
||||
pci_write_config_word(pObj->pci_dev, pAd->RLnkCtrlOffset, reg16);
|
||||
pAd->Rt3xxRalinkLinkCtrl = Configuration;
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("PSM :Write Ralink device L1/L0s Value = 0x%x\n", Configuration));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE,
|
||||
+ ("PSM :Write Ralink device L1/L0s Value = 0x%lx\n",
|
||||
+ Configuration));
|
||||
}
|
||||
DBGPRINT(RT_DEBUG_INFO,("PSM :RTMPrt3xSetPCIePowerLinkCtrl <==============\n"));
|
||||
}
|
||||
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
|
||||
index cdda247..d57013f 100644
|
||||
--- a/drivers/staging/rt2860/rt_linux.c
|
||||
+++ b/drivers/staging/rt2860/rt_linux.c
|
||||
@@ -965,6 +965,7 @@ err_free_sk_buff:
|
||||
*******************************************************************************/
|
||||
int RtmpOSIRQRequest(IN PNET_DEV pNetDev)
|
||||
{
|
||||
+#ifdef RTMP_PCI_SUPPORT
|
||||
struct net_device *net_dev = pNetDev;
|
||||
PRTMP_ADAPTER pAd = NULL;
|
||||
int retval = 0;
|
||||
@@ -973,7 +974,6 @@ int RtmpOSIRQRequest(IN PNET_DEV pNetDev)
|
||||
|
||||
ASSERT(pAd);
|
||||
|
||||
-#ifdef RTMP_PCI_SUPPORT
|
||||
if (pAd->infType == RTMP_DEV_INF_PCI)
|
||||
{
|
||||
POS_COOKIE _pObj = (POS_COOKIE)(pAd->OS_Cookie);
|
||||
@@ -982,14 +982,13 @@ int RtmpOSIRQRequest(IN PNET_DEV pNetDev)
|
||||
if (retval != 0)
|
||||
printk("RT2860: request_irq ERROR(%d)\n", retval);
|
||||
}
|
||||
-#endif // RTMP_PCI_SUPPORT //
|
||||
-
|
||||
|
||||
return retval;
|
||||
-
|
||||
+#else
|
||||
+ return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
-
|
||||
int RtmpOSIRQRelease(IN PNET_DEV pNetDev)
|
||||
{
|
||||
struct net_device *net_dev = pNetDev;
|
||||
@@ -1149,7 +1148,6 @@ NDIS_STATUS RtmpOSTaskAttach(
|
||||
IN void *arg)
|
||||
{
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
- pid_t pid_number = -1;
|
||||
|
||||
#ifdef KTHREAD_SUPPORT
|
||||
pTask->task_killed = 0;
|
||||
diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c
|
||||
index 7ea85e6..3a73571 100644
|
||||
--- a/drivers/staging/rt2860/rt_main_dev.c
|
||||
+++ b/drivers/staging/rt2860/rt_main_dev.c
|
||||
@@ -209,15 +209,13 @@ int rt28xx_close(IN PNET_DEV dev)
|
||||
BOOLEAN Cancelled;
|
||||
UINT32 i = 0;
|
||||
|
||||
- GET_PAD_FROM_NET_DEV(pAd, net_dev);
|
||||
-
|
||||
#ifdef RTMP_MAC_USB
|
||||
DECLARE_WAIT_QUEUE_HEAD(unlink_wakeup);
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
-
|
||||
- //RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_REMOVE_IN_PROGRESS);
|
||||
#endif // RTMP_MAC_USB //
|
||||
|
||||
+ GET_PAD_FROM_NET_DEV(pAd, net_dev);
|
||||
+
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("===> rt28xx_close\n"));
|
||||
|
||||
Cancelled = FALSE;
|
||||
diff --git a/drivers/staging/rt2860/sta/connect.c b/drivers/staging/rt2860/sta/connect.c
|
||||
index 7f263a6..43edd8e 100644
|
||||
--- a/drivers/staging/rt2860/sta/connect.c
|
||||
+++ b/drivers/staging/rt2860/sta/connect.c
|
||||
@@ -1809,7 +1809,6 @@ VOID LinkDown(
|
||||
IN BOOLEAN IsReqFromAP)
|
||||
{
|
||||
UCHAR i, ByteValue = 0;
|
||||
- BOOLEAN Cancelled;
|
||||
|
||||
// Do nothing if monitor mode is on
|
||||
if (MONITOR_ON(pAd))
|
||||
diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c
|
||||
index 16e1bbf..00732be 100644
|
||||
--- a/drivers/staging/rt2860/usb_main_dev.c
|
||||
+++ b/drivers/staging/rt2860/usb_main_dev.c
|
||||
@@ -686,9 +686,10 @@ VOID RTUSBWatchDog(IN RTMP_ADAPTER *pAd)
|
||||
|
||||
RTMP_IRQ_UNLOCK(&pAd->BulkOutLock[idx], irqFlags);
|
||||
|
||||
-
|
||||
- printk("%d:%d LTL=%d , TL=%d L:%d\n",idx,pAd->watchDogTxPendingCnt[idx],pAd->TransferedLength[idx]
|
||||
- ,actual_length,transfer_buffer_length);
|
||||
+ printk(KERN_INFO "%d:%lu LTL=%d , TL=%d L:%d\n",
|
||||
+ idx, pAd->watchDogTxPendingCnt[idx],
|
||||
+ pAd->TransferedLength[idx],
|
||||
+ actual_length, transfer_buffer_length);
|
||||
|
||||
if (pUrb)
|
||||
{
|
||||
--
|
||||
1.7.1
|
||||
|
1875
debian/patches/features/all/rt28x0/0013-Staging-rt28x0-remove-optional-cmm-profile-parameter.patch
vendored
Normal file
1875
debian/patches/features/all/rt28x0/0013-Staging-rt28x0-remove-optional-cmm-profile-parameter.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
77
debian/patches/features/all/rt28x0/0014-Staging-rt28x0-remove-dead-code-from-rtmp_phy.h.patch
vendored
Normal file
77
debian/patches/features/all/rt28x0/0014-Staging-rt28x0-remove-dead-code-from-rtmp_phy.h.patch
vendored
Normal file
|
@ -0,0 +1,77 @@
|
|||
From a0320664481bcaff11aa238dcbce4518b015cfb8 Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Wed, 21 Oct 2009 22:44:55 +0200
|
||||
Subject: [PATCH 14/42] Staging: rt28x0: remove dead code from rtmp_phy.h
|
||||
|
||||
commit 46ff62398cdabb87522c0564d1ebfa397132abe4 upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/chip/rtmp_phy.h | 28 +---------------------------
|
||||
1 files changed, 1 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/chip/rtmp_phy.h b/drivers/staging/rt2860/chip/rtmp_phy.h
|
||||
index e2b90a1..36f438b 100644
|
||||
--- a/drivers/staging/rt2860/chip/rtmp_phy.h
|
||||
+++ b/drivers/staging/rt2860/chip/rtmp_phy.h
|
||||
@@ -278,18 +278,6 @@
|
||||
But for some chipset which didn't have mcu (e.g., RBUS based chipset), we
|
||||
will use this function too and didn't access the bbp register via the MCU.
|
||||
*/
|
||||
-#if 0
|
||||
-#define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) \
|
||||
- do{ \
|
||||
- if ((_A)->bPCIclkOff == FALSE) \
|
||||
- { \
|
||||
- if ((_A)->infType == RTMP_DEV_INF_RBUS) \
|
||||
- RTMP_BBP_IO_READ8((_A), (_I), (_pV), FALSE); \
|
||||
- else \
|
||||
- RTMP_BBP_IO_READ8((_A), (_I), (_pV), TRUE); \
|
||||
- } \
|
||||
- }while(0)
|
||||
-#else
|
||||
// Read BBP register by register's ID. Generate PER to test BA
|
||||
#define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) \
|
||||
{ \
|
||||
@@ -381,7 +369,6 @@
|
||||
*(_pV) = (_A)->BbpWriteLatch[_I]; \
|
||||
} \
|
||||
}
|
||||
-#endif // 0 //
|
||||
|
||||
/*
|
||||
basic marco for BBP write operation.
|
||||
@@ -441,18 +428,6 @@
|
||||
But for some chipset which didn't have mcu (e.g., RBUS based chipset), we
|
||||
will use this function too and didn't access the bbp register via the MCU.
|
||||
*/
|
||||
-#if 0
|
||||
-#define RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, _I, _pV) \
|
||||
- do{ \
|
||||
- if ((_A)->bPCIclkOff == FALSE) \
|
||||
- { \
|
||||
- if ((_A)->infType == RTMP_DEV_INF_RBUS) \
|
||||
- RTMP_BBP_IO_WRITE8((_A), (_I), (_pV), FALSE); \
|
||||
- else \
|
||||
- RTMP_BBP_IO_WRITE8((_A), (_I), (_pV), TRUE); \
|
||||
- } \
|
||||
- }while(0)
|
||||
-#else
|
||||
// Write BBP register by register's ID & value
|
||||
#define RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V) \
|
||||
{ \
|
||||
@@ -538,9 +513,8 @@
|
||||
DBGPRINT_ERR(("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n")); \
|
||||
} \
|
||||
}
|
||||
-#endif // 0 //
|
||||
-
|
||||
#endif // RTMP_MAC_PCI //
|
||||
+
|
||||
#ifdef RTMP_MAC_USB
|
||||
#define RTMP_BBP_IO_READ8_BY_REG_ID(_A, _I, _pV) RTUSBReadBBPRegister(_A, _I, _pV)
|
||||
#define RTMP_BBP_IO_WRITE8_BY_REG_ID(_A, _I, _V) RTUSBWriteBBPRegister(_A, _I, _V)
|
||||
--
|
||||
1.7.1
|
||||
|
358
debian/patches/features/all/rt28x0/0015-Staging-rt28x0-remove-unused-SHA256-code.patch
vendored
Normal file
358
debian/patches/features/all/rt28x0/0015-Staging-rt28x0-remove-unused-SHA256-code.patch
vendored
Normal file
|
@ -0,0 +1,358 @@
|
|||
From 90a74c98d8173bc0fdbfb4e852d8c946119d25c8 Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Wed, 21 Oct 2009 22:45:02 +0200
|
||||
Subject: [PATCH 15/42] Staging: rt28x0: remove unused SHA256 code
|
||||
|
||||
commit ef3e746815954ada673fab6545679e7418d1b1d3 upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/common/crypt_sha2.c | 257 ----------------------------
|
||||
drivers/staging/rt2860/crypt_hmac.h | 11 --
|
||||
drivers/staging/rt2860/crypt_sha2.h | 28 ---
|
||||
3 files changed, 0 insertions(+), 296 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/crypt_sha2.c b/drivers/staging/rt2860/common/crypt_sha2.c
|
||||
index cb3f7c2..d4b2396 100644
|
||||
--- a/drivers/staging/rt2860/common/crypt_sha2.c
|
||||
+++ b/drivers/staging/rt2860/common/crypt_sha2.c
|
||||
@@ -47,42 +47,7 @@ static const UINT32 SHA1_K[4] = {
|
||||
static const UINT32 SHA1_DefaultHashValue[5] = {
|
||||
0x67452301UL, 0xefcdab89UL, 0x98badcfeUL, 0x10325476UL, 0xc3d2e1f0UL
|
||||
};
|
||||
-#endif /* SHA1_SUPPORT */
|
||||
-
|
||||
-
|
||||
-#ifdef SHA256_SUPPORT
|
||||
-/* SHA256 functions */
|
||||
-#define Zsigma_256_0(x) (ROTR32(x,2) ^ ROTR32(x,13) ^ ROTR32(x,22))
|
||||
-#define Zsigma_256_1(x) (ROTR32(x,6) ^ ROTR32(x,11) ^ ROTR32(x,25))
|
||||
-#define Sigma_256_0(x) (ROTR32(x,7) ^ ROTR32(x,18) ^ SHR(x,3))
|
||||
-#define Sigma_256_1(x) (ROTR32(x,17) ^ ROTR32(x,19) ^ SHR(x,10))
|
||||
-/* SHA256 constants */
|
||||
-static const UINT32 SHA256_K[64] = {
|
||||
- 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
|
||||
- 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
|
||||
- 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
|
||||
- 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL,
|
||||
- 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL,
|
||||
- 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL,
|
||||
- 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL,
|
||||
- 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL,
|
||||
- 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL,
|
||||
- 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
|
||||
- 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL,
|
||||
- 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL,
|
||||
- 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL,
|
||||
- 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL,
|
||||
- 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
|
||||
- 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
|
||||
-};
|
||||
-static const UINT32 SHA256_DefaultHashValue[8] = {
|
||||
- 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, 0xa54ff53aUL,
|
||||
- 0x510e527fUL, 0x9b05688cUL, 0x1f83d9abUL, 0x5be0cd19UL
|
||||
-};
|
||||
-#endif /* SHA256_SUPPORT */
|
||||
|
||||
-
|
||||
-#ifdef SHA1_SUPPORT
|
||||
/*
|
||||
========================================================================
|
||||
Routine Description:
|
||||
@@ -310,226 +275,4 @@ VOID RT_SHA1 (
|
||||
} /* End of RT_SHA1 */
|
||||
#endif /* SHA1_SUPPORT */
|
||||
|
||||
-
|
||||
-#ifdef SHA256_SUPPORT
|
||||
-/*
|
||||
-========================================================================
|
||||
-Routine Description:
|
||||
- Initial SHA256_CTX_STRUC
|
||||
-
|
||||
-Arguments:
|
||||
- pSHA_CTX Pointer to SHA256_CTX_STRUC
|
||||
-
|
||||
-Return Value:
|
||||
- None
|
||||
-
|
||||
-Note:
|
||||
- None
|
||||
-========================================================================
|
||||
-*/
|
||||
-VOID SHA256_Init (
|
||||
- IN SHA256_CTX_STRUC *pSHA_CTX)
|
||||
-{
|
||||
- NdisMoveMemory(pSHA_CTX->HashValue, SHA256_DefaultHashValue,
|
||||
- sizeof(SHA256_DefaultHashValue));
|
||||
- NdisZeroMemory(pSHA_CTX->Block, SHA256_BLOCK_SIZE);
|
||||
- pSHA_CTX->MessageLen = 0;
|
||||
- pSHA_CTX->BlockLen = 0;
|
||||
-} /* End of SHA256_Init */
|
||||
-
|
||||
-
|
||||
-/*
|
||||
-========================================================================
|
||||
-Routine Description:
|
||||
- SHA256 computation for one block (512 bits)
|
||||
-
|
||||
-Arguments:
|
||||
- pSHA_CTX Pointer to SHA256_CTX_STRUC
|
||||
-
|
||||
-Return Value:
|
||||
- None
|
||||
-
|
||||
-Note:
|
||||
- None
|
||||
-========================================================================
|
||||
-*/
|
||||
-VOID SHA256_Hash (
|
||||
- IN SHA256_CTX_STRUC *pSHA_CTX)
|
||||
-{
|
||||
- UINT32 W_i,t;
|
||||
- UINT32 W[64];
|
||||
- UINT32 a,b,c,d,e,f,g,h,T1,T2;
|
||||
-
|
||||
- /* Prepare the message schedule, {W_i}, 0 < t < 15 */
|
||||
- NdisMoveMemory(W, pSHA_CTX->Block, SHA256_BLOCK_SIZE);
|
||||
- for (W_i = 0; W_i < 16; W_i++)
|
||||
- W[W_i] = cpu2be32(W[W_i]); /* Endian Swap */
|
||||
- /* End of for */
|
||||
-
|
||||
- /* SHA256 hash computation */
|
||||
- /* Initialize the working variables */
|
||||
- a = pSHA_CTX->HashValue[0];
|
||||
- b = pSHA_CTX->HashValue[1];
|
||||
- c = pSHA_CTX->HashValue[2];
|
||||
- d = pSHA_CTX->HashValue[3];
|
||||
- e = pSHA_CTX->HashValue[4];
|
||||
- f = pSHA_CTX->HashValue[5];
|
||||
- g = pSHA_CTX->HashValue[6];
|
||||
- h = pSHA_CTX->HashValue[7];
|
||||
-
|
||||
- /* 64 rounds */
|
||||
- for (t = 0;t < 64;t++) {
|
||||
- if (t > 15) /* Prepare the message schedule, {W_i}, 16 < t < 63 */
|
||||
- W[t] = Sigma_256_1(W[t-2]) + W[t-7] + Sigma_256_0(W[t-15]) + W[t-16];
|
||||
- /* End of if */
|
||||
- T1 = h + Zsigma_256_1(e) + Ch(e,f,g) + SHA256_K[t] + W[t];
|
||||
- T2 = Zsigma_256_0(a) + Maj(a,b,c);
|
||||
- h = g;
|
||||
- g = f;
|
||||
- f = e;
|
||||
- e = d + T1;
|
||||
- d = c;
|
||||
- c = b;
|
||||
- b = a;
|
||||
- a = T1 + T2;
|
||||
- } /* End of for */
|
||||
-
|
||||
- /* Compute the i^th intermediate hash value H^(i) */
|
||||
- pSHA_CTX->HashValue[0] += a;
|
||||
- pSHA_CTX->HashValue[1] += b;
|
||||
- pSHA_CTX->HashValue[2] += c;
|
||||
- pSHA_CTX->HashValue[3] += d;
|
||||
- pSHA_CTX->HashValue[4] += e;
|
||||
- pSHA_CTX->HashValue[5] += f;
|
||||
- pSHA_CTX->HashValue[6] += g;
|
||||
- pSHA_CTX->HashValue[7] += h;
|
||||
-
|
||||
- NdisZeroMemory(pSHA_CTX->Block, SHA256_BLOCK_SIZE);
|
||||
- pSHA_CTX->BlockLen = 0;
|
||||
-} /* End of SHA256_Hash */
|
||||
-
|
||||
-
|
||||
-/*
|
||||
-========================================================================
|
||||
-Routine Description:
|
||||
- The message is appended to block. If block size > 64 bytes, the SHA256_Hash
|
||||
-will be called.
|
||||
-
|
||||
-Arguments:
|
||||
- pSHA_CTX Pointer to SHA256_CTX_STRUC
|
||||
- message Message context
|
||||
- messageLen The length of message in bytes
|
||||
-
|
||||
-Return Value:
|
||||
- None
|
||||
-
|
||||
-Note:
|
||||
- None
|
||||
-========================================================================
|
||||
-*/
|
||||
-VOID SHA256_Append (
|
||||
- IN SHA256_CTX_STRUC *pSHA_CTX,
|
||||
- IN const UINT8 Message[],
|
||||
- IN UINT MessageLen)
|
||||
-{
|
||||
- UINT appendLen = 0;
|
||||
- UINT diffLen = 0;
|
||||
-
|
||||
- while (appendLen != MessageLen) {
|
||||
- diffLen = MessageLen - appendLen;
|
||||
- if ((pSHA_CTX->BlockLen + diffLen) < SHA256_BLOCK_SIZE) {
|
||||
- NdisMoveMemory(pSHA_CTX->Block + pSHA_CTX->BlockLen,
|
||||
- Message + appendLen, diffLen);
|
||||
- pSHA_CTX->BlockLen += diffLen;
|
||||
- appendLen += diffLen;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- NdisMoveMemory(pSHA_CTX->Block + pSHA_CTX->BlockLen,
|
||||
- Message + appendLen, SHA256_BLOCK_SIZE - pSHA_CTX->BlockLen);
|
||||
- appendLen += (SHA256_BLOCK_SIZE - pSHA_CTX->BlockLen);
|
||||
- pSHA_CTX->BlockLen = SHA256_BLOCK_SIZE;
|
||||
- SHA256_Hash(pSHA_CTX);
|
||||
- } /* End of if */
|
||||
- } /* End of while */
|
||||
- pSHA_CTX->MessageLen += MessageLen;
|
||||
-} /* End of SHA256_Append */
|
||||
-
|
||||
-
|
||||
-/*
|
||||
-========================================================================
|
||||
-Routine Description:
|
||||
- 1. Append bit 1 to end of the message
|
||||
- 2. Append the length of message in rightmost 64 bits
|
||||
- 3. Transform the Hash Value to digest message
|
||||
-
|
||||
-Arguments:
|
||||
- pSHA_CTX Pointer to SHA256_CTX_STRUC
|
||||
-
|
||||
-Return Value:
|
||||
- digestMessage Digest message
|
||||
-
|
||||
-Note:
|
||||
- None
|
||||
-========================================================================
|
||||
-*/
|
||||
-VOID SHA256_End (
|
||||
- IN SHA256_CTX_STRUC *pSHA_CTX,
|
||||
- OUT UINT8 DigestMessage[])
|
||||
-{
|
||||
- UINT index;
|
||||
- UINT64 message_length_bits;
|
||||
-
|
||||
- /* Append bit 1 to end of the message */
|
||||
- NdisFillMemory(pSHA_CTX->Block + pSHA_CTX->BlockLen, 1, 0x80);
|
||||
-
|
||||
- /* 55 = 64 - 8 - 1: append 1 bit(1 byte) and message length (8 bytes) */
|
||||
- if (pSHA_CTX->BlockLen > 55)
|
||||
- SHA256_Hash(pSHA_CTX);
|
||||
- /* End of if */
|
||||
-
|
||||
- /* Append the length of message in rightmost 64 bits */
|
||||
- message_length_bits = pSHA_CTX->MessageLen*8;
|
||||
- message_length_bits = cpu2be64(message_length_bits);
|
||||
- NdisMoveMemory(&pSHA_CTX->Block[56], &message_length_bits, 8);
|
||||
- SHA256_Hash(pSHA_CTX);
|
||||
-
|
||||
- /* Return message digest, transform the UINT32 hash value to bytes */
|
||||
- for (index = 0; index < 8;index++)
|
||||
- pSHA_CTX->HashValue[index] = cpu2be32(pSHA_CTX->HashValue[index]);
|
||||
- /* End of for */
|
||||
- NdisMoveMemory(DigestMessage, pSHA_CTX->HashValue, SHA256_DIGEST_SIZE);
|
||||
-} /* End of SHA256_End */
|
||||
-
|
||||
-
|
||||
-/*
|
||||
-========================================================================
|
||||
-Routine Description:
|
||||
- SHA256 algorithm
|
||||
-
|
||||
-Arguments:
|
||||
- message Message context
|
||||
- messageLen The length of message in bytes
|
||||
-
|
||||
-Return Value:
|
||||
- digestMessage Digest message
|
||||
-
|
||||
-Note:
|
||||
- None
|
||||
-========================================================================
|
||||
-*/
|
||||
-VOID RT_SHA256 (
|
||||
- IN const UINT8 Message[],
|
||||
- IN UINT MessageLen,
|
||||
- OUT UINT8 DigestMessage[])
|
||||
-{
|
||||
- SHA256_CTX_STRUC sha_ctx;
|
||||
-
|
||||
- NdisZeroMemory(&sha_ctx, sizeof(SHA256_CTX_STRUC));
|
||||
- SHA256_Init(&sha_ctx);
|
||||
- SHA256_Append(&sha_ctx, Message, MessageLen);
|
||||
- SHA256_End(&sha_ctx, DigestMessage);
|
||||
-} /* End of RT_SHA256 */
|
||||
-#endif /* SHA256_SUPPORT */
|
||||
-
|
||||
/* End of crypt_sha2.c */
|
||||
diff --git a/drivers/staging/rt2860/crypt_hmac.h b/drivers/staging/rt2860/crypt_hmac.h
|
||||
index 9314ff7..717b8a2 100644
|
||||
--- a/drivers/staging/rt2860/crypt_hmac.h
|
||||
+++ b/drivers/staging/rt2860/crypt_hmac.h
|
||||
@@ -57,17 +57,6 @@ VOID HMAC_SHA1 (
|
||||
IN UINT MACLen);
|
||||
#endif /* SHA1_SUPPORT */
|
||||
|
||||
-#ifdef SHA256_SUPPORT
|
||||
-#define HMAC_SHA256_SUPPORT
|
||||
-VOID HMAC_SHA256 (
|
||||
- IN const UINT8 Key[],
|
||||
- IN UINT KeyLen,
|
||||
- IN const UINT8 Message[],
|
||||
- IN UINT MessageLen,
|
||||
- OUT UINT8 MAC[],
|
||||
- IN UINT MACLen);
|
||||
-#endif /* SHA256_SUPPORT */
|
||||
-
|
||||
#ifdef MD5_SUPPORT
|
||||
#define HMAC_MD5_SUPPORT
|
||||
VOID HMAC_MD5 (
|
||||
diff --git a/drivers/staging/rt2860/crypt_sha2.h b/drivers/staging/rt2860/crypt_sha2.h
|
||||
index 055efb1..5b95965 100644
|
||||
--- a/drivers/staging/rt2860/crypt_sha2.h
|
||||
+++ b/drivers/staging/rt2860/crypt_sha2.h
|
||||
@@ -50,7 +50,6 @@
|
||||
|
||||
/* Algorithm options */
|
||||
#define SHA1_SUPPORT
|
||||
-#define SHA256_SUPPORT
|
||||
|
||||
#ifdef SHA1_SUPPORT
|
||||
#define SHA1_BLOCK_SIZE 64 /* 512 bits = 64 bytes */
|
||||
@@ -79,31 +78,4 @@ VOID RT_SHA1 (
|
||||
OUT UINT8 DigestMessage[]);
|
||||
#endif /* SHA1_SUPPORT */
|
||||
|
||||
-#ifdef SHA256_SUPPORT
|
||||
-#define SHA256_BLOCK_SIZE 64 /* 512 bits = 64 bytes */
|
||||
-#define SHA256_DIGEST_SIZE 32 /* 256 bits = 32 bytes */
|
||||
-typedef struct _SHA256_CTX_STRUC {
|
||||
- UINT32 HashValue[8]; /* 8 = (SHA256_DIGEST_SIZE / 32) */
|
||||
- UINT64 MessageLen; /* total size */
|
||||
- UINT8 Block[SHA256_BLOCK_SIZE];
|
||||
- UINT BlockLen;
|
||||
-} SHA256_CTX_STRUC, *PSHA256_CTX_STRUC;
|
||||
-
|
||||
-VOID SHA256_Init (
|
||||
- IN SHA256_CTX_STRUC *pSHA_CTX);
|
||||
-VOID SHA256_Hash (
|
||||
- IN SHA256_CTX_STRUC *pSHA_CTX);
|
||||
-VOID SHA256_Append (
|
||||
- IN SHA256_CTX_STRUC *pSHA_CTX,
|
||||
- IN const UINT8 Message[],
|
||||
- IN UINT MessageLen);
|
||||
-VOID SHA256_End (
|
||||
- IN SHA256_CTX_STRUC *pSHA_CTX,
|
||||
- OUT UINT8 DigestMessage[]);
|
||||
-VOID RT_SHA256 (
|
||||
- IN const UINT8 Message[],
|
||||
- IN UINT MessageLen,
|
||||
- OUT UINT8 DigestMessage[]);
|
||||
-#endif /* SHA256_SUPPORT */
|
||||
-
|
||||
#endif /* __CRYPT_SHA2_H__ */
|
||||
--
|
||||
1.7.1
|
||||
|
152
debian/patches/features/all/rt28x0/0016-Staging-rt28x0-remove-dead-code.patch
vendored
Normal file
152
debian/patches/features/all/rt28x0/0016-Staging-rt28x0-remove-dead-code.patch
vendored
Normal file
|
@ -0,0 +1,152 @@
|
|||
From e84beefedf58e615983a84621af3d47301e45835 Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Wed, 21 Oct 2009 22:45:09 +0200
|
||||
Subject: [PATCH 16/42] Staging: rt28x0: remove dead code
|
||||
|
||||
commit 5a1322317abff17a6cdaf53bd33a4102d456ec23 upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/oid.h | 19 -------------------
|
||||
drivers/staging/rt2860/rt_config.h | 8 --------
|
||||
drivers/staging/rt2860/rt_linux.h | 10 ----------
|
||||
drivers/staging/rt2860/rtmp.h | 13 -------------
|
||||
drivers/staging/rt2860/rtmp_def.h | 9 ---------
|
||||
5 files changed, 0 insertions(+), 59 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/oid.h b/drivers/staging/rt2860/oid.h
|
||||
index a03293c..f3fb5ff 100644
|
||||
--- a/drivers/staging/rt2860/oid.h
|
||||
+++ b/drivers/staging/rt2860/oid.h
|
||||
@@ -502,19 +502,6 @@ typedef struct _NDIS_802_11_AUTHENTICATION_EVENT
|
||||
NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
|
||||
} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
|
||||
|
||||
-/*
|
||||
-typedef struct _NDIS_802_11_TEST
|
||||
-{
|
||||
- ULONG Length;
|
||||
- ULONG Type;
|
||||
- union
|
||||
- {
|
||||
- NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
|
||||
- NDIS_802_11_RSSI RssiTrigger;
|
||||
- };
|
||||
-} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
||||
- */
|
||||
-
|
||||
// 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE
|
||||
typedef enum _NDIS_802_11_MEDIA_STREAM_MODE
|
||||
{
|
||||
@@ -553,10 +540,6 @@ typedef struct _NDIS_802_11_CAPABILITY
|
||||
NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
|
||||
} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
|
||||
|
||||
-#ifdef LINUX
|
||||
-#endif // LINUX //
|
||||
-
|
||||
-
|
||||
#define RT_PRIV_IOCTL (SIOCIWFIRSTPRIV + 0x01) // Sync. with AP for wsc upnp daemon
|
||||
#define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02)
|
||||
|
||||
@@ -593,8 +576,6 @@ enum {
|
||||
#define OID_802_11_GET_COUNTRY_CODE 0x0716
|
||||
#define OID_802_11_GET_CHANNEL_GEOGRAPHY 0x0717
|
||||
|
||||
-//#define RT_OID_802_11_STATISTICS (OID_GET_SET_TOGGLE | OID_802_11_STATISTICS)
|
||||
-
|
||||
#define RT_OID_WSC_SET_PASSPHRASE 0x0740 // passphrase for wpa(2)-psk
|
||||
#define RT_OID_WSC_DRIVER_AUTO_CONNECT 0x0741
|
||||
#define RT_OID_WSC_QUERY_DEFAULT_PROFILE 0x0742
|
||||
diff --git a/drivers/staging/rt2860/rt_config.h b/drivers/staging/rt2860/rt_config.h
|
||||
index 67b957b..9e684ae 100644
|
||||
--- a/drivers/staging/rt2860/rt_config.h
|
||||
+++ b/drivers/staging/rt2860/rt_config.h
|
||||
@@ -64,14 +64,6 @@
|
||||
#include "rtmp_mcu.h"
|
||||
#endif
|
||||
|
||||
-#undef AP_WSC_INCLUDED
|
||||
-#undef STA_WSC_INCLUDED
|
||||
-#undef WSC_INCLUDED
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
#ifdef IGMP_SNOOP_SUPPORT
|
||||
#include "igmp_snoop.h"
|
||||
#endif // IGMP_SNOOP_SUPPORT //
|
||||
diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h
|
||||
index e8c7d88..d16bcf3 100644
|
||||
--- a/drivers/staging/rt2860/rt_linux.h
|
||||
+++ b/drivers/staging/rt2860/rt_linux.h
|
||||
@@ -75,16 +75,6 @@
|
||||
#include <linux/kthread.h>
|
||||
#endif // KTHREAD_SUPPORT //
|
||||
|
||||
-#undef AP_WSC_INCLUDED
|
||||
-#undef STA_WSC_INCLUDED
|
||||
-#undef WSC_INCLUDED
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-#ifdef KTHREAD_SUPPORT
|
||||
-#endif // KTHREAD_SUPPORT //
|
||||
-
|
||||
/***********************************************************************************
|
||||
* Profile related sections
|
||||
***********************************************************************************/
|
||||
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
|
||||
index d213387..2ca1ca6 100644
|
||||
--- a/drivers/staging/rt2860/rtmp.h
|
||||
+++ b/drivers/staging/rt2860/rtmp.h
|
||||
@@ -41,23 +41,10 @@
|
||||
#define __RTMP_H__
|
||||
|
||||
#include "spectrum_def.h"
|
||||
-
|
||||
#include "rtmp_dot11.h"
|
||||
-
|
||||
-#undef AP_WSC_INCLUDED
|
||||
-#undef STA_WSC_INCLUDED
|
||||
-#undef WSC_INCLUDED
|
||||
-
|
||||
-
|
||||
-
|
||||
-#if defined(AP_WSC_INCLUDED) || defined(STA_WSC_INCLUDED)
|
||||
-#define WSC_INCLUDED
|
||||
-#endif
|
||||
-
|
||||
#include "rtmp_chip.h"
|
||||
|
||||
|
||||
-
|
||||
typedef struct _RTMP_ADAPTER RTMP_ADAPTER;
|
||||
typedef struct _RTMP_ADAPTER *PRTMP_ADAPTER;
|
||||
|
||||
diff --git a/drivers/staging/rt2860/rtmp_def.h b/drivers/staging/rt2860/rtmp_def.h
|
||||
index ca700d0..816ae62 100644
|
||||
--- a/drivers/staging/rt2860/rtmp_def.h
|
||||
+++ b/drivers/staging/rt2860/rtmp_def.h
|
||||
@@ -41,15 +41,6 @@
|
||||
|
||||
#include "oid.h"
|
||||
|
||||
-#undef AP_WSC_INCLUDED
|
||||
-#undef STA_WSC_INCLUDED
|
||||
-#undef WSC_INCLUDED
|
||||
-
|
||||
-
|
||||
-
|
||||
-#if defined(AP_WSC_INCLUDED) || defined(STA_WSC_INCLUDED)
|
||||
-#define WSC_INCLUDED
|
||||
-#endif
|
||||
//
|
||||
// Debug information verbosity: lower values indicate higher urgency
|
||||
//
|
||||
--
|
||||
1.7.1
|
||||
|
80
debian/patches/features/all/rt28x0/0017-Staging-rt28x0-remove-__LINE__-instances.patch
vendored
Normal file
80
debian/patches/features/all/rt28x0/0017-Staging-rt28x0-remove-__LINE__-instances.patch
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
From 8558c5398d6f51507e6f5ff205526b1756377d63 Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Fri, 11 Dec 2009 12:23:13 -0800
|
||||
Subject: [PATCH 17/42] Staging: rt28x0: remove __LINE__ instances
|
||||
|
||||
commit 460bb8df1e910a8c5d36ad363fbc1f0164cf0b85 upstream.
|
||||
|
||||
Remove instances of __LINE__ preprocessor directive to make
|
||||
validation of resulting binary output files easier.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/common/mlme.c | 7 ++-----
|
||||
drivers/staging/rt2860/common/rtmp_init.c | 3 ++-
|
||||
drivers/staging/rt2860/pci_main_dev.c | 1 -
|
||||
3 files changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c
|
||||
index 9fa853e..9c250c2 100644
|
||||
--- a/drivers/staging/rt2860/common/mlme.c
|
||||
+++ b/drivers/staging/rt2860/common/mlme.c
|
||||
@@ -1222,13 +1222,11 @@ if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_PCIE_DEVICE))
|
||||
{
|
||||
if (pAd->StaCfg.PSControl.field.EnableNewPS == TRUE)
|
||||
{
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("%s::%d\n",__FUNCTION__,__LINE__));
|
||||
-
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("%s\n", __func__));
|
||||
RT28xxPciAsicRadioOff(pAd, GUI_IDLE_POWER_SAVE, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("%s::%d\n",__FUNCTION__,__LINE__));
|
||||
AsicSendCommandToMcu(pAd, 0x30, PowerSafeCID, 0xff, 0x2);
|
||||
// Wait command success
|
||||
AsicCheckCommanOk(pAd, PowerSafeCID);
|
||||
@@ -1240,12 +1238,11 @@ if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_PCIE_DEVICE))
|
||||
{
|
||||
if (pAd->StaCfg.PSControl.field.EnableNewPS == TRUE)
|
||||
{
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("%s::%d\n",__FUNCTION__,__LINE__));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("%s\n", __func__));
|
||||
RT28xxPciAsicRadioOff(pAd, GUI_IDLE_POWER_SAVE, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("%s::%d\n",__FUNCTION__,__LINE__));
|
||||
AsicSendCommandToMcu(pAd, 0x30, PowerSafeCID, 0xff, 0x02);
|
||||
// Wait command success
|
||||
AsicCheckCommanOk(pAd, PowerSafeCID);
|
||||
diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
index 5deba8d..1cc6e44 100644
|
||||
--- a/drivers/staging/rt2860/common/rtmp_init.c
|
||||
+++ b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
@@ -1261,7 +1261,8 @@ VOID NICInitAsicFromEEPROM(
|
||||
&& (pAd->StaCfg.PSControl.field.rt30xxPowerMode == 3)
|
||||
&& (pAd->StaCfg.PSControl.field.EnableNewPS == TRUE))
|
||||
{
|
||||
- DBGPRINT(RT_DEBUG_TRACE,("%s::%d,release Mcu Lock\n",__FUNCTION__,__LINE__));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE,
|
||||
+ ("%s, release Mcu Lock\n", __func__));
|
||||
RTMP_SEM_LOCK(&pAd->McuCmdLock);
|
||||
pAd->brt30xxBanMcuCmd = FALSE;
|
||||
RTMP_SEM_UNLOCK(&pAd->McuCmdLock);
|
||||
diff --git a/drivers/staging/rt2860/pci_main_dev.c b/drivers/staging/rt2860/pci_main_dev.c
|
||||
index 38bc429..2c51d9d 100644
|
||||
--- a/drivers/staging/rt2860/pci_main_dev.c
|
||||
+++ b/drivers/staging/rt2860/pci_main_dev.c
|
||||
@@ -599,7 +599,6 @@ VOID RTMPInitPCIeLinkCtrlValue(
|
||||
}
|
||||
|
||||
DBGPRINT(RT_DEBUG_TRACE, ("====> rt28xx Write 0x83 Command = 0x%x.\n", PCIePowerSaveLevel));
|
||||
- printk("\n\n\n%s:%d\n",__FUNCTION__,__LINE__);
|
||||
|
||||
AsicSendCommandToMcu(pAd, 0x83, 0xff, (UCHAR)PCIePowerSaveLevel, 0x00);
|
||||
}
|
||||
--
|
||||
1.7.1
|
||||
|
16892
debian/patches/features/all/rt28x0/0018-Staging-rt28x0-run-.c-files-through-Lindent.patch
vendored
Normal file
16892
debian/patches/features/all/rt28x0/0018-Staging-rt28x0-run-.c-files-through-Lindent.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
47154
debian/patches/features/all/rt28x0/0019-Staging-rt28x0-run-common-.c-files-through-Lindent.patch
vendored
Normal file
47154
debian/patches/features/all/rt28x0/0019-Staging-rt28x0-run-common-.c-files-through-Lindent.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
13626
debian/patches/features/all/rt28x0/0020-Staging-rt28x0-run-sta-.c-files-through-Lindent.patch
vendored
Normal file
13626
debian/patches/features/all/rt28x0/0020-Staging-rt28x0-run-sta-.c-files-through-Lindent.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
17149
debian/patches/features/all/rt28x0/0021-Staging-rt28x0-run-.h-files-through-Lindent.patch
vendored
Normal file
17149
debian/patches/features/all/rt28x0/0021-Staging-rt28x0-run-.h-files-through-Lindent.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5538
debian/patches/features/all/rt28x0/0022-Staging-rt28x0-fix-comments-in-.c-files.patch
vendored
Normal file
5538
debian/patches/features/all/rt28x0/0022-Staging-rt28x0-fix-comments-in-.c-files.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
19769
debian/patches/features/all/rt28x0/0023-Staging-rt28x0-fix-comments-in-common-.c-files.patch
vendored
Normal file
19769
debian/patches/features/all/rt28x0/0023-Staging-rt28x0-fix-comments-in-common-.c-files.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5809
debian/patches/features/all/rt28x0/0024-Staging-rt28x0-fix-comments-in-sta-.c-files.patch
vendored
Normal file
5809
debian/patches/features/all/rt28x0/0024-Staging-rt28x0-fix-comments-in-sta-.c-files.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9877
debian/patches/features/all/rt28x0/0025-Staging-rt28x0-fix-comments-in-.h-files.patch
vendored
Normal file
9877
debian/patches/features/all/rt28x0/0025-Staging-rt28x0-fix-comments-in-.h-files.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
28225
debian/patches/features/all/rt28x0/0026-Staging-rt28x0-remove-typedefs-part-one.patch
vendored
Normal file
28225
debian/patches/features/all/rt28x0/0026-Staging-rt28x0-remove-typedefs-part-one.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2928
debian/patches/features/all/rt28x0/0027-Staging-rt28x0-remove-typedefs-part-two.patch
vendored
Normal file
2928
debian/patches/features/all/rt28x0/0027-Staging-rt28x0-remove-typedefs-part-two.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21194
debian/patches/features/all/rt28x0/0028-Staging-rt28x0-remove-typedefs-part-three.patch
vendored
Normal file
21194
debian/patches/features/all/rt28x0/0028-Staging-rt28x0-remove-typedefs-part-three.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,51 @@
|
|||
From 8dd16dd0927be159d12fd610ca191805bb3e12ce Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Sebastian=20Dalfu=C3=9F?= <sd@sedf.de>
|
||||
Date: Fri, 6 Nov 2009 14:49:00 +0100
|
||||
Subject: [PATCH 29/42] Staging: rt2860: remove remainders of /etc reading stuff
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit ad26848142950277172a983e7e525fa8806a6300 upstream.
|
||||
|
||||
The stuff that tries to read a file from /etc is already removed, so
|
||||
this patch just removes the last remainders.
|
||||
|
||||
Signed-off-by: Sebastian Dalfuß <sd@sedf.de>
|
||||
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
---
|
||||
drivers/staging/rt2860/TODO | 1 -
|
||||
drivers/staging/rt2860/rt_linux.h | 2 --
|
||||
2 files changed, 0 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/TODO b/drivers/staging/rt2860/TODO
|
||||
index 6158dc2..8e2f6ee 100644
|
||||
--- a/drivers/staging/rt2860/TODO
|
||||
+++ b/drivers/staging/rt2860/TODO
|
||||
@@ -9,7 +9,6 @@ TODO:
|
||||
- checkpatch.pl clean
|
||||
- sparse clean
|
||||
- port to in-kernel 80211 stack and common rt2x00 infrastructure
|
||||
- - remove reading from /etc/ config files
|
||||
- review by the wireless developer community
|
||||
|
||||
Please send any patches or complaints about this driver to Greg
|
||||
diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h
|
||||
index e1eb740..7efc109 100644
|
||||
--- a/drivers/staging/rt2860/rt_linux.h
|
||||
+++ b/drivers/staging/rt2860/rt_linux.h
|
||||
@@ -80,11 +80,9 @@
|
||||
***********************************************************************************/
|
||||
|
||||
#ifdef RTMP_MAC_PCI
|
||||
-#define STA_PROFILE_PATH "/etc/Wireless/RT2860STA/RT2860STA.dat"
|
||||
#define STA_DRIVER_VERSION "2.1.0.0"
|
||||
#endif /* RTMP_MAC_PCI // */
|
||||
#ifdef RTMP_MAC_USB
|
||||
-#define STA_PROFILE_PATH "/etc/Wireless/RT2870STA/RT2870STA.dat"
|
||||
#define STA_DRIVER_VERSION "2.1.0.0"
|
||||
/* RT3070 version: 2.1.1.0 */
|
||||
#endif /* RTMP_MAC_USB // */
|
||||
--
|
||||
1.7.1
|
||||
|
65
debian/patches/features/all/rt28x0/0030-Staging-rt2860-remove-superfluous-newlines.patch
vendored
Normal file
65
debian/patches/features/all/rt28x0/0030-Staging-rt2860-remove-superfluous-newlines.patch
vendored
Normal file
|
@ -0,0 +1,65 @@
|
|||
From 3d283405b185f624a030e7495c8da0ed53bd5004 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Sebastian=20Dalfu=C3=9F?= <sd@sedf.de>
|
||||
Date: Fri, 6 Nov 2009 14:49:28 +0100
|
||||
Subject: [PATCH 30/42] Staging: rt2860: remove superfluous newlines
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit d6dbc0126beedc43f19abb5870c892f7bd105b2c upstream.
|
||||
|
||||
This patch is based on next-20091106.
|
||||
This tiny patch removes a few quite unnecessary extra newlines from
|
||||
DBGPRINT() and printk() strings.
|
||||
|
||||
Signed-off-by: Sebastian Dalfuß <sd@sedf.de>
|
||||
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/common/rtmp_init.c | 2 +-
|
||||
drivers/staging/rt2860/common/rtmp_mcu.c | 2 +-
|
||||
drivers/staging/rt2860/rt_linux.c | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
index 46e7a2a..d3c7c17 100644
|
||||
--- a/drivers/staging/rt2860/common/rtmp_init.c
|
||||
+++ b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
@@ -181,7 +181,7 @@ int RTMPAllocAdapterBlock(void *handle,
|
||||
}
|
||||
pAd->BeaconBuf = pBeaconBuf;
|
||||
DBGPRINT(RT_DEBUG_OFF,
|
||||
- ("\n\n=== pAd = %p, size = %d ===\n\n", pAd,
|
||||
+ ("=== pAd = %p, size = %d ===\n", pAd,
|
||||
(u32)sizeof(struct rt_rtmp_adapter)));
|
||||
|
||||
/* Init spin locks */
|
||||
diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
index 683abad..9f03901 100644
|
||||
--- a/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
+++ b/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
@@ -163,7 +163,7 @@ int RtmpAsicLoadFirmware(struct rt_rtmp_adapter *pAd)
|
||||
|
||||
if (Index > 1000) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("NICLoadFirmware: MCU is not ready\n\n\n"));
|
||||
+ ("NICLoadFirmware: MCU is not ready\n"));
|
||||
Status = NDIS_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
|
||||
index a94593c..d84ac32 100644
|
||||
--- a/drivers/staging/rt2860/rt_linux.c
|
||||
+++ b/drivers/staging/rt2860/rt_linux.c
|
||||
@@ -340,7 +340,7 @@ int RTMPAllocateNdisPacket(struct rt_rtmp_adapter *pAd,
|
||||
if (pPacket == NULL) {
|
||||
*ppPacket = NULL;
|
||||
#ifdef DEBUG
|
||||
- printk("RTMPAllocateNdisPacket Fail\n\n");
|
||||
+ printk("RTMPAllocateNdisPacket Fail\n");
|
||||
#endif
|
||||
return NDIS_STATUS_FAILURE;
|
||||
}
|
||||
--
|
||||
1.7.1
|
||||
|
189
debian/patches/features/all/rt28x0/0031-Staging-rt28x0-fix-comments-in-chip-mac_pci.h.patch
vendored
Normal file
189
debian/patches/features/all/rt28x0/0031-Staging-rt28x0-fix-comments-in-chip-mac_pci.h.patch
vendored
Normal file
|
@ -0,0 +1,189 @@
|
|||
From 4891eb9a786182e5cd08a40b9d0b3ee0f1a8c7d7 Mon Sep 17 00:00:00 2001
|
||||
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Date: Mon, 9 Nov 2009 17:19:45 +0100
|
||||
Subject: [PATCH 31/42] Staging: rt28x0: fix comments in chip/mac_pci.h
|
||||
|
||||
commit 956cd45d03efd10f8b780d54b6e5e28d0afc2ef9 upstream.
|
||||
|
||||
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/chip/mac_pci.h | 72 ++++++++++++++++----------------
|
||||
1 files changed, 36 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/chip/mac_pci.h b/drivers/staging/rt2860/chip/mac_pci.h
|
||||
index 8dbadd0..bc704ac 100644
|
||||
--- a/drivers/staging/rt2860/chip/mac_pci.h
|
||||
+++ b/drivers/staging/rt2860/chip/mac_pci.h
|
||||
@@ -43,10 +43,10 @@
|
||||
#include "../rtmp_iface.h"
|
||||
#include "../rtmp_dot11.h"
|
||||
|
||||
-//
|
||||
-// Device ID & Vendor ID related definitions,
|
||||
-// NOTE: you should not add the new VendorID/DeviceID here unless you not sure it belongs to what chip.
|
||||
-//
|
||||
+/* */
|
||||
+/* Device ID & Vendor ID related definitions, */
|
||||
+/* NOTE: you should not add the new VendorID/DeviceID here unless you not sure it belongs to what chip. */
|
||||
+/* */
|
||||
#define NIC_PCI_VENDOR_ID 0x1814
|
||||
#define PCIBUS_INTEL_VENDOR 0x8086
|
||||
|
||||
@@ -66,22 +66,22 @@
|
||||
|
||||
#define AUX_CTRL 0x10c
|
||||
|
||||
-//
|
||||
-// TX descriptor format, Tx ring, Mgmt Ring
|
||||
-//
|
||||
+/* */
|
||||
+/* TX descriptor format, Tx ring, Mgmt Ring */
|
||||
+/* */
|
||||
struct PACKED rt_txd {
|
||||
- // Word 0
|
||||
+ /* Word 0 */
|
||||
u32 SDPtr0;
|
||||
- // Word 1
|
||||
+ /* Word 1 */
|
||||
u32 SDLen1:14;
|
||||
u32 LastSec1:1;
|
||||
u32 Burst:1;
|
||||
u32 SDLen0:14;
|
||||
u32 LastSec0:1;
|
||||
u32 DMADONE:1;
|
||||
- //Word2
|
||||
+ /*Word2 */
|
||||
u32 SDPtr1;
|
||||
- //Word3
|
||||
+ /*Word3 */
|
||||
u32 rsv2:24;
|
||||
u32 WIV:1; /* Wireless Info Valid. 1 if Driver already fill WI, o if DMA needs to copy WI to correctposition */
|
||||
u32 QSEL:2; /* select on-chip FIFO ID for 2nd-stage output scheduler.0:MGMT, 1:HCCA 2:EDCA */
|
||||
@@ -91,21 +91,21 @@ struct PACKED rt_txd {
|
||||
u32 ICO:1; /* */
|
||||
};
|
||||
|
||||
-//
|
||||
-// Rx descriptor format, Rx Ring
|
||||
-//
|
||||
+/* */
|
||||
+/* Rx descriptor format, Rx Ring */
|
||||
+/* */
|
||||
typedef struct PACKED rt_rxd {
|
||||
- // Word 0
|
||||
+ /* Word 0 */
|
||||
u32 SDP0;
|
||||
- // Word 1
|
||||
+ /* Word 1 */
|
||||
u32 SDL1:14;
|
||||
u32 Rsv:2;
|
||||
u32 SDL0:14;
|
||||
u32 LS0:1;
|
||||
u32 DDONE:1;
|
||||
- // Word 2
|
||||
+ /* Word 2 */
|
||||
u32 SDP1;
|
||||
- // Word 3
|
||||
+ /* Word 3 */
|
||||
u32 BA:1;
|
||||
u32 DATA:1;
|
||||
u32 NULLDATA:1;
|
||||
@@ -141,9 +141,9 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
|
||||
|
||||
/* ----------------- EEPROM Related MACRO ----------------- */
|
||||
|
||||
-// 8051 firmware image for RT2860 - base address = 0x4000
|
||||
+/* 8051 firmware image for RT2860 - base address = 0x4000 */
|
||||
#define FIRMWARE_IMAGE_BASE 0x2000
|
||||
-#define MAX_FIRMWARE_IMAGE_SIZE 0x2000 // 8kbyte
|
||||
+#define MAX_FIRMWARE_IMAGE_SIZE 0x2000 /* 8kbyte */
|
||||
|
||||
/* ----------------- Frimware Related MACRO ----------------- */
|
||||
#define RTMP_WRITE_FIRMWARE(_pAd, _pFwImage, _FwLen) \
|
||||
@@ -222,25 +222,25 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
|
||||
/* ----------------- RX Related MACRO ----------------- */
|
||||
|
||||
/* ----------------- ASIC Related MACRO ----------------- */
|
||||
-// reset MAC of a station entry to 0x000000000000
|
||||
+/* reset MAC of a station entry to 0x000000000000 */
|
||||
#define RTMP_STA_ENTRY_MAC_RESET(pAd, Wcid) \
|
||||
AsicDelWcidTab(pAd, Wcid);
|
||||
|
||||
-// add this entry into ASIC RX WCID search table
|
||||
+/* add this entry into ASIC RX WCID search table */
|
||||
#define RTMP_STA_ENTRY_ADD(pAd, pEntry) \
|
||||
AsicUpdateRxWCIDTable(pAd, pEntry->Aid, pEntry->Addr);
|
||||
|
||||
-// add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet
|
||||
-// Set MAC register value according operation mode
|
||||
+/* add by johnli, fix "in_interrupt" error when call "MacTableDeleteEntry" in Rx tasklet */
|
||||
+/* Set MAC register value according operation mode */
|
||||
#define RTMP_UPDATE_PROTECT(pAd) \
|
||||
AsicUpdateProtect(pAd, 0, (ALLN_SETPROTECT), TRUE, 0);
|
||||
-// end johnli
|
||||
+/* end johnli */
|
||||
|
||||
-// remove Pair-wise key material from ASIC
|
||||
+/* remove Pair-wise key material from ASIC */
|
||||
#define RTMP_STA_ENTRY_KEY_DEL(pAd, BssIdx, Wcid) \
|
||||
AsicRemovePairwiseKeyEntry(pAd, BssIdx, (u8)Wcid);
|
||||
|
||||
-// add Client security information into ASIC WCID table and IVEIV table
|
||||
+/* add Client security information into ASIC WCID table and IVEIV table */
|
||||
#define RTMP_STA_SECURITY_INFO_ADD(pAd, apidx, KeyID, pEntry) \
|
||||
RTMPAddWcidAttributeEntry(pAd, apidx, KeyID, \
|
||||
pAd->SharedKey[apidx][KeyID].CipherAlg, pEntry);
|
||||
@@ -257,7 +257,7 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
|
||||
pAd->SharedKey[apidx][KeyID].CipherAlg, \
|
||||
pEntry); }
|
||||
|
||||
-// Insert the BA bitmap to ASIC for the Wcid entry
|
||||
+/* Insert the BA bitmap to ASIC for the Wcid entry */
|
||||
#define RTMP_ADD_BA_SESSION_TO_ASIC(_pAd, _Aid, _TID) \
|
||||
do{ \
|
||||
u32 _Value = 0, _Offset; \
|
||||
@@ -267,8 +267,8 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
|
||||
RTMP_IO_WRITE32((_pAd), _Offset, _Value);\
|
||||
}while(0)
|
||||
|
||||
-// Remove the BA bitmap from ASIC for the Wcid entry
|
||||
-// bitmap field starts at 0x10000 in ASIC WCID table
|
||||
+/* Remove the BA bitmap from ASIC for the Wcid entry */
|
||||
+/* bitmap field starts at 0x10000 in ASIC WCID table */
|
||||
#define RTMP_DEL_BA_SESSION_FROM_ASIC(_pAd, _Wcid, _TID) \
|
||||
do{ \
|
||||
u32 _Value = 0, _Offset; \
|
||||
@@ -280,10 +280,10 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
|
||||
|
||||
/* ----------------- Interface Related MACRO ----------------- */
|
||||
|
||||
-//
|
||||
-// Enable & Disable NIC interrupt via writing interrupt mask register
|
||||
-// Since it use ADAPTER structure, it have to be put after structure definition.
|
||||
-//
|
||||
+/* */
|
||||
+/* Enable & Disable NIC interrupt via writing interrupt mask register */
|
||||
+/* Since it use ADAPTER structure, it have to be put after structure definition. */
|
||||
+/* */
|
||||
#define RTMP_ASIC_INTERRUPT_DISABLE(_pAd) \
|
||||
do{ \
|
||||
RTMP_IO_WRITE32((_pAd), INT_MASK_CSR, 0x0); /* 0: disable */ \
|
||||
@@ -324,7 +324,7 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
|
||||
/* ----------------- Power Save Related MACRO ----------------- */
|
||||
#define RTMP_PS_POLL_ENQUEUE(pAd) EnqueuePsPoll(pAd)
|
||||
|
||||
-// For RTMPPCIePowerLinkCtrlRestore () function
|
||||
+/* For RTMPPCIePowerLinkCtrlRestore () function */
|
||||
#define RESTORE_HALT 1
|
||||
#define RESTORE_WAKEUP 2
|
||||
#define RESTORE_CLOSE 3
|
||||
@@ -352,4 +352,4 @@ typedef union _TX_ATTENUATION_CTRL_STRUC {
|
||||
#define RTMP_MLME_RADIO_OFF(pAd) \
|
||||
RT28xxPciMlmeRadioOFF(pAd);
|
||||
|
||||
-#endif //__MAC_PCI_H__ //
|
||||
+#endif /*__MAC_PCI_H__ // */
|
||||
--
|
||||
1.7.1
|
||||
|
830
debian/patches/features/all/rt28x0/0032-Staging-rt2860-reduce-superfluous-exclamation-marks.patch
vendored
Normal file
830
debian/patches/features/all/rt28x0/0032-Staging-rt2860-reduce-superfluous-exclamation-marks.patch
vendored
Normal file
|
@ -0,0 +1,830 @@
|
|||
From 765924a54d765b8ba92b14ce5e47ffedf7a38c96 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Sebastian=20Dalfu=C3=9F?= <sd@sedf.de>
|
||||
Date: Sat, 7 Nov 2009 17:31:12 +0100
|
||||
Subject: [PATCH 32/42] Staging: rt2860: reduce superfluous exclamation marks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
commit 06aea994cf03ec589b198ff718ae7fee4ec41659 upstream.
|
||||
|
||||
This removes superfluous exclamation marks from strings and comments, and
|
||||
also three spelling typos.
|
||||
|
||||
Signed-off-by: Sebastian Dalfuß <sd@sedf.de>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/common/ba_action.c | 4 +-
|
||||
drivers/staging/rt2860/common/cmm_aes.c | 2 +-
|
||||
drivers/staging/rt2860/common/cmm_asic.c | 2 +-
|
||||
drivers/staging/rt2860/common/cmm_data.c | 8 ++--
|
||||
drivers/staging/rt2860/common/cmm_data_2860.c | 2 +-
|
||||
drivers/staging/rt2860/common/cmm_data_pci.c | 2 +-
|
||||
drivers/staging/rt2860/common/cmm_mac_pci.c | 2 +-
|
||||
drivers/staging/rt2860/common/cmm_mac_usb.c | 22 +++++++-------
|
||||
drivers/staging/rt2860/common/cmm_sanity.c | 4 +-
|
||||
drivers/staging/rt2860/common/cmm_tkip.c | 2 +-
|
||||
drivers/staging/rt2860/common/cmm_wep.c | 2 +-
|
||||
drivers/staging/rt2860/common/cmm_wpa.c | 4 +-
|
||||
drivers/staging/rt2860/common/mlme.c | 8 ++--
|
||||
drivers/staging/rt2860/common/rt_rf.c | 2 +-
|
||||
drivers/staging/rt2860/common/rtmp_init.c | 6 ++--
|
||||
drivers/staging/rt2860/oid.h | 4 +-
|
||||
drivers/staging/rt2860/rt_linux.c | 4 +-
|
||||
drivers/staging/rt2860/rt_linux.h | 2 +-
|
||||
drivers/staging/rt2860/rt_main_dev.c | 2 +-
|
||||
drivers/staging/rt2860/rtmp_chip.h | 2 +-
|
||||
drivers/staging/rt2860/rtmp_def.h | 2 +-
|
||||
drivers/staging/rt2860/sta/assoc.c | 4 +-
|
||||
drivers/staging/rt2860/sta/connect.c | 40 ++++++++++++------------
|
||||
drivers/staging/rt2860/sta/rtmp_data.c | 12 ++++----
|
||||
drivers/staging/rt2860/sta/sanity.c | 2 +-
|
||||
drivers/staging/rt2860/sta_ioctl.c | 14 ++++----
|
||||
drivers/staging/rt2860/usb_main_dev.c | 4 +-
|
||||
27 files changed, 82 insertions(+), 82 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/ba_action.c b/drivers/staging/rt2860/common/ba_action.c
|
||||
index 69eea40..174f2a7 100644
|
||||
--- a/drivers/staging/rt2860/common/ba_action.c
|
||||
+++ b/drivers/staging/rt2860/common/ba_action.c
|
||||
@@ -1481,7 +1481,7 @@ static void ba_enqueue_reordering_packet(struct rt_rtmp_adapter *pAd,
|
||||
NdisReleaseSpinLock(&pBAEntry->RxReRingLock);
|
||||
} else {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("!!! (%d) Can't allocate reordering mpdu blk\n",
|
||||
+ (" (%d) Can't allocate reordering mpdu blk\n",
|
||||
pBAEntry->list.qlen));
|
||||
|
||||
/*
|
||||
@@ -1542,7 +1542,7 @@ void Indicate_AMPDU_Packet(struct rt_rtmp_adapter *pAd,
|
||||
}
|
||||
pBAEntry = &pAd->BATable.BARecEntry[Idx];
|
||||
} else {
|
||||
- /* impossible !!! */
|
||||
+ /* impossible ! */
|
||||
ASSERT(0);
|
||||
/* release packet */
|
||||
RELEASE_NDIS_PACKET(pAd, pRxBlk->pRxPacket,
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_aes.c b/drivers/staging/rt2860/common/cmm_aes.c
|
||||
index 6730d78..250357c 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_aes.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_aes.c
|
||||
@@ -1279,7 +1279,7 @@ void AES_GTK_KEY_UNWRAP(u8 * key,
|
||||
|
||||
if (R == NULL) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("!!!AES_GTK_KEY_UNWRAP: no memory!!!\n"));
|
||||
+ ("AES_GTK_KEY_UNWRAP: no memory!\n"));
|
||||
return;
|
||||
}
|
||||
/* End of if */
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_asic.c b/drivers/staging/rt2860/common/cmm_asic.c
|
||||
index fafba27..4d77e83 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_asic.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_asic.c
|
||||
@@ -1005,7 +1005,7 @@ void AsicSwitchChannel(struct rt_rtmp_adapter *pAd, u8 Channel, IN BOOLEAN bScan
|
||||
void AsicResetBBPAgent(struct rt_rtmp_adapter *pAd)
|
||||
{
|
||||
BBP_CSR_CFG_STRUC BbpCsr;
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("Reset BBP Agent busy bit.!! \n"));
|
||||
+ DBGPRINT(RT_DEBUG_ERROR, ("Reset BBP Agent busy bit!\n"));
|
||||
/* Still need to find why BBP agent keeps busy, but in fact, hardware still function ok. Now clear busy first. */
|
||||
RTMP_IO_READ32(pAd, H2M_BBP_AGENT, &BbpCsr.word);
|
||||
BbpCsr.field.Busy = 0;
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_data.c b/drivers/staging/rt2860/common/cmm_data.c
|
||||
index 2d2c311..68263ce 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_data.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_data.c
|
||||
@@ -397,7 +397,7 @@ int MlmeHardTransmitMgmtRing(struct rt_rtmp_adapter *pAd,
|
||||
&& (pAd->CommonCfg.bIEEE80211H == 1)
|
||||
&& (pAd->CommonCfg.RadarDetect.RDMode != RD_NORMAL_MODE)) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("MlmeHardTransmit --> radar detect not in normal mode !!!\n"));
|
||||
+ ("MlmeHardTransmit --> radar detect not in normal mode!\n"));
|
||||
/* if (!IrqState) */
|
||||
RTMP_SEM_UNLOCK(&pAd->MgmtRingLock);
|
||||
return (NDIS_STATUS_FAILURE);
|
||||
@@ -964,7 +964,7 @@ u16 RTMPCalcDuration(struct rt_rtmp_adapter *pAd, u8 Rate, unsigned long Size)
|
||||
IRQL = PASSIVE_LEVEL
|
||||
IRQL = DISPATCH_LEVEL
|
||||
|
||||
- See also : BASmartHardTransmit() !!!
|
||||
+ See also : BASmartHardTransmit() !
|
||||
|
||||
========================================================================
|
||||
*/
|
||||
@@ -1708,7 +1708,7 @@ BOOLEAN MacTableDeleteEntry(struct rt_rtmp_adapter *pAd,
|
||||
pProbeEntry = pProbeEntry->pNext;
|
||||
} while (pProbeEntry);
|
||||
|
||||
- /* not found !!! */
|
||||
+ /* not found ! */
|
||||
ASSERT(pProbeEntry != NULL);
|
||||
|
||||
RTMP_STA_ENTRY_KEY_DEL(pAd, BSS0, wcid);
|
||||
@@ -1729,7 +1729,7 @@ BOOLEAN MacTableDeleteEntry(struct rt_rtmp_adapter *pAd,
|
||||
pAd->MacTab.Size));
|
||||
} else {
|
||||
DBGPRINT(RT_DEBUG_OFF,
|
||||
- ("\n%s: Impossible Wcid = %d !!!!!\n",
|
||||
+ ("\n%s: Impossible Wcid = %d !\n",
|
||||
__func__, wcid));
|
||||
}
|
||||
}
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_data_2860.c b/drivers/staging/rt2860/common/cmm_data_2860.c
|
||||
index 857ff45..d3ae7ca 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_data_2860.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_data_2860.c
|
||||
@@ -847,7 +847,7 @@ VOID RT28xxPciStaAsicForceWakeup(
|
||||
AutoWakeupCfg.word = 0;
|
||||
RTMP_IO_WRITE32(pAd, AUTO_WAKEUP_CFG, AutoWakeupCfg.word);
|
||||
|
||||
- // If this is called from Halt. ALWAYS force wakeup!!!
|
||||
+ // If this is called from Halt. ALWAYS force wakeup!
|
||||
if (Level == RTMP_HALT)
|
||||
{
|
||||
RT28xxPciAsicRadioOn(pAd, RTMP_HALT);
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_data_pci.c b/drivers/staging/rt2860/common/cmm_data_pci.c
|
||||
index e6cb55a..43d73a0 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_data_pci.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_data_pci.c
|
||||
@@ -979,7 +979,7 @@ int MlmeHardTransmitTxRing(struct rt_rtmp_adapter *pAd,
|
||||
&& (pAd->CommonCfg.bIEEE80211H == 1)
|
||||
&& (pAd->CommonCfg.RadarDetect.RDMode != RD_NORMAL_MODE)) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("MlmeHardTransmit --> radar detect not in normal mode !!!\n"));
|
||||
+ ("MlmeHardTransmit --> radar detect not in normal mode!\n"));
|
||||
/*NdisReleaseSpinLock(&pAd->TxRingLock); */
|
||||
return (NDIS_STATUS_FAILURE);
|
||||
}
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_mac_pci.c b/drivers/staging/rt2860/common/cmm_mac_pci.c
|
||||
index 11dfdc5..560ebd3 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_mac_pci.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_mac_pci.c
|
||||
@@ -1650,7 +1650,7 @@ void RT28xxPciMlmeRadioOFF(struct rt_rtmp_adapter *pAd)
|
||||
|
||||
if (brc == FALSE) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("%s call RT28xxPciAsicRadioOff fail !!\n",
|
||||
+ ("%s call RT28xxPciAsicRadioOff fail!\n",
|
||||
__func__));
|
||||
}
|
||||
}
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_mac_usb.c b/drivers/staging/rt2860/common/cmm_mac_usb.c
|
||||
index 010c37c..9dd6959 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_mac_usb.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_mac_usb.c
|
||||
@@ -205,9 +205,9 @@ int NICInitTransmit(struct rt_rtmp_adapter *pAd)
|
||||
/*Allocate URB */
|
||||
LM_USB_ALLOC(pObj, pHTTXContext, struct rt_httx_buffer *,
|
||||
sizeof(struct rt_httx_buffer), Status,
|
||||
- ("<-- ERROR in Alloc TX TxContext[%d] urb!! \n",
|
||||
+ ("<-- ERROR in Alloc TX TxContext[%d] urb!\n",
|
||||
acidx), done,
|
||||
- ("<-- ERROR in Alloc TX TxContext[%d] struct rt_httx_buffer !! \n",
|
||||
+ ("<-- ERROR in Alloc TX TxContext[%d] struct rt_httx_buffer!\n",
|
||||
acidx), out1);
|
||||
|
||||
NdisZeroMemory(pHTTXContext->TransferBuffer->
|
||||
@@ -259,7 +259,7 @@ int NICInitTransmit(struct rt_rtmp_adapter *pAd)
|
||||
pMLMEContext->pUrb = RTUSB_ALLOC_URB(0);
|
||||
if (pMLMEContext->pUrb == NULL) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("<-- ERROR in Alloc TX MLMEContext[%d] urb!! \n",
|
||||
+ ("<-- ERROR in Alloc TX MLMEContext[%d] urb!\n",
|
||||
i));
|
||||
Status = NDIS_STATUS_RESOURCES;
|
||||
goto out2;
|
||||
@@ -296,9 +296,9 @@ int NICInitTransmit(struct rt_rtmp_adapter *pAd)
|
||||
/*Allocate URB */
|
||||
LM_USB_ALLOC(pObj, pBeaconContext, struct rt_tx_buffer *,
|
||||
sizeof(struct rt_tx_buffer), Status,
|
||||
- ("<-- ERROR in Alloc TX BeaconContext[%d] urb!! \n",
|
||||
+ ("<-- ERROR in Alloc TX BeaconContext[%d] urb!\n",
|
||||
i), out2,
|
||||
- ("<-- ERROR in Alloc TX BeaconContext[%d] struct rt_tx_buffer !! \n",
|
||||
+ ("<-- ERROR in Alloc TX BeaconContext[%d] struct rt_tx_buffer!\n",
|
||||
i), out3);
|
||||
|
||||
pBeaconContext->pAd = pAd;
|
||||
@@ -315,9 +315,9 @@ int NICInitTransmit(struct rt_rtmp_adapter *pAd)
|
||||
/*Allocate URB */
|
||||
LM_USB_ALLOC(pObj, pNullContext, struct rt_tx_buffer *, sizeof(struct rt_tx_buffer),
|
||||
Status,
|
||||
- ("<-- ERROR in Alloc TX NullContext urb!! \n"),
|
||||
+ ("<-- ERROR in Alloc TX NullContext urb!\n"),
|
||||
out3,
|
||||
- ("<-- ERROR in Alloc TX NullContext struct rt_tx_buffer !! \n"),
|
||||
+ ("<-- ERROR in Alloc TX NullContext struct rt_tx_buffer!\n"),
|
||||
out4);
|
||||
|
||||
pNullContext->pAd = pAd;
|
||||
@@ -333,9 +333,9 @@ int NICInitTransmit(struct rt_rtmp_adapter *pAd)
|
||||
/*Allocate URB */
|
||||
LM_USB_ALLOC(pObj, pRTSContext, struct rt_tx_buffer *, sizeof(struct rt_tx_buffer),
|
||||
Status,
|
||||
- ("<-- ERROR in Alloc TX RTSContext urb!! \n"),
|
||||
+ ("<-- ERROR in Alloc TX RTSContext urb!\n"),
|
||||
out4,
|
||||
- ("<-- ERROR in Alloc TX RTSContext struct rt_tx_buffer !! \n"),
|
||||
+ ("<-- ERROR in Alloc TX RTSContext struct rt_tx_buffer!\n"),
|
||||
out5);
|
||||
|
||||
pRTSContext->pAd = pAd;
|
||||
@@ -350,9 +350,9 @@ int NICInitTransmit(struct rt_rtmp_adapter *pAd)
|
||||
/*Allocate URB */
|
||||
LM_USB_ALLOC(pObj, pPsPollContext, struct rt_tx_buffer *,
|
||||
sizeof(struct rt_tx_buffer), Status,
|
||||
- ("<-- ERROR in Alloc TX PsPollContext urb!! \n"),
|
||||
+ ("<-- ERROR in Alloc TX PsPollContext urb!\n"),
|
||||
out5,
|
||||
- ("<-- ERROR in Alloc TX PsPollContext struct rt_tx_buffer !! \n"),
|
||||
+ ("<-- ERROR in Alloc TX PsPollContext struct rt_tx_buffer!\n"),
|
||||
out6);
|
||||
|
||||
pPsPollContext->pAd = pAd;
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_sanity.c b/drivers/staging/rt2860/common/cmm_sanity.c
|
||||
index 556e3d0..6b003c9 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_sanity.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_sanity.c
|
||||
@@ -256,7 +256,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(struct rt_rtmp_adapter *pAd, void * Msg, uns
|
||||
|
||||
/* For some 11a AP which didn't have DS_IE, we use two conditions to decide the channel */
|
||||
/* 1. If the AP is 11n enabled, then check the control channel. */
|
||||
- /* 2. If the AP didn't have any info about channel, use the channel we received this frame as the channel. (May inaccuracy!!) */
|
||||
+ /* 2. If the AP didn't have any info about channel, use the channel we received this frame as the channel. (May inaccuracy!) */
|
||||
u8 CtrlChannel = 0;
|
||||
|
||||
/* Add for 3 necessary EID field check */
|
||||
@@ -371,7 +371,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(struct rt_rtmp_adapter *pAd, void * Msg, uns
|
||||
break;
|
||||
|
||||
case IE_HT_CAP:
|
||||
- if (pEid->Len >= SIZE_HT_CAP_IE) /*Note: allow extension.!! */
|
||||
+ if (pEid->Len >= SIZE_HT_CAP_IE) /*Note: allow extension! */
|
||||
{
|
||||
NdisMoveMemory(pHtCapability, pEid->Octet,
|
||||
sizeof(struct rt_ht_capability_ie));
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_tkip.c b/drivers/staging/rt2860/common/cmm_tkip.c
|
||||
index 7a2a48e..4881ef9 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_tkip.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_tkip.c
|
||||
@@ -828,6 +828,6 @@ BOOLEAN RTMPSoftDecryptTKIP(struct rt_rtmp_adapter *pAd,
|
||||
/*RTMPReportMicError(pAd, &pWpaKey[KeyID]); // marked by AlbertY @ 20060630 */
|
||||
return (FALSE);
|
||||
}
|
||||
- /*DBGPRINT(RT_DEBUG_TRACE, "RTMPSoftDecryptTKIP Decript done!!\n"); */
|
||||
+ /*DBGPRINT(RT_DEBUG_TRACE, "RTMPSoftDecryptTKIP Decript done!\n"); */
|
||||
return TRUE;
|
||||
}
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_wep.c b/drivers/staging/rt2860/common/cmm_wep.c
|
||||
index c728355..76f880c 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_wep.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_wep.c
|
||||
@@ -245,7 +245,7 @@ BOOLEAN RTMPSoftDecryptWEP(struct rt_rtmp_adapter *pAd,
|
||||
crc32 ^= 0xffffffff; /* complement */
|
||||
|
||||
if (crc32 != cpu2le32(trailfcs)) {
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("! WEP Data CRC Error !\n")); /*CRC error. */
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("WEP Data CRC Error!\n")); /*CRC error. */
|
||||
return (FALSE);
|
||||
}
|
||||
return (TRUE);
|
||||
diff --git a/drivers/staging/rt2860/common/cmm_wpa.c b/drivers/staging/rt2860/common/cmm_wpa.c
|
||||
index 7b51be0..94e119f 100644
|
||||
--- a/drivers/staging/rt2860/common/cmm_wpa.c
|
||||
+++ b/drivers/staging/rt2860/common/cmm_wpa.c
|
||||
@@ -1292,7 +1292,7 @@ void PRF(u8 * key,
|
||||
os_alloc_mem(NULL, (u8 **) & input, 1024);
|
||||
|
||||
if (input == NULL) {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("!!!PRF: no memory!!!\n"));
|
||||
+ DBGPRINT(RT_DEBUG_ERROR, ("PRF: no memory!\n"));
|
||||
return;
|
||||
}
|
||||
/* Generate concatenation input */
|
||||
@@ -2672,7 +2672,7 @@ static void CalculateMIC(u8 KeyDescVer,
|
||||
os_alloc_mem(NULL, (u8 **) & OutBuffer, 512);
|
||||
|
||||
if (OutBuffer == NULL) {
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("!!!CalculateMIC: no memory!!!\n"));
|
||||
+ DBGPRINT(RT_DEBUG_ERROR, ("CalculateMIC: no memory!\n"));
|
||||
return;
|
||||
}
|
||||
/* make a frame for calculating MIC. */
|
||||
diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c
|
||||
index 8cd8f53..9fc34a8 100644
|
||||
--- a/drivers/staging/rt2860/common/mlme.c
|
||||
+++ b/drivers/staging/rt2860/common/mlme.c
|
||||
@@ -483,7 +483,7 @@ void MlmeHandler(struct rt_rtmp_adapter *pAd)
|
||||
#ifdef RTMP_MAC_USB
|
||||
if (Elem->MsgType == MT2_RESET_CONF) {
|
||||
DBGPRINT_RAW(RT_DEBUG_TRACE,
|
||||
- ("!!! reset MLME state machine !!!\n"));
|
||||
+ ("reset MLME state machine!\n"));
|
||||
MlmeRestartStateMachine(pAd);
|
||||
Elem->Occupied = FALSE;
|
||||
Elem->MsgLen = 0;
|
||||
@@ -4042,7 +4042,7 @@ void BssTableSsidSort(struct rt_rtmp_adapter *pAd,
|
||||
}
|
||||
/* Since the AP is using hidden SSID, and we are trying to connect to ANY */
|
||||
/* It definitely will fail. So, skip it. */
|
||||
- /* CCX also require not even try to connect it!! */
|
||||
+ /* CCX also require not even try to connect it! */
|
||||
if (SsidLen == 0)
|
||||
continue;
|
||||
|
||||
@@ -4600,8 +4600,8 @@ void MgtMacHeaderInit(struct rt_rtmp_adapter *pAd,
|
||||
* input params:
|
||||
* Buffer - pointer to a pre-allocated memory segment
|
||||
* args - a list of <int arg_size, arg> pairs.
|
||||
- * NOTE NOTE NOTE!!!! the last argument must be NULL, otherwise this
|
||||
- * function will FAIL!!!
|
||||
+ * NOTE NOTE NOTE! the last argument must be NULL, otherwise this
|
||||
+ * function will FAIL!
|
||||
* return:
|
||||
* Size of the buffer
|
||||
* usage:
|
||||
diff --git a/drivers/staging/rt2860/common/rt_rf.c b/drivers/staging/rt2860/common/rt_rf.c
|
||||
index fb0ca88..519121d 100644
|
||||
--- a/drivers/staging/rt2860/common/rt_rf.c
|
||||
+++ b/drivers/staging/rt2860/common/rt_rf.c
|
||||
@@ -72,7 +72,7 @@ int RT30xxWriteRFRegister(struct rt_rtmp_adapter *pAd,
|
||||
if ((i == RETRY_LIMIT)
|
||||
|| (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) {
|
||||
DBGPRINT_RAW(RT_DEBUG_ERROR,
|
||||
- ("Retry count exhausted or device removed!!!\n"));
|
||||
+ ("Retry count exhausted or device removed!\n"));
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
index d3c7c17..21a95ff 100644
|
||||
--- a/drivers/staging/rt2860/common/rtmp_init.c
|
||||
+++ b/drivers/staging/rt2860/common/rtmp_init.c
|
||||
@@ -75,7 +75,7 @@ struct rt_rtmp_reg_pair MACRegTable[] = {
|
||||
{BCN_OFFSET0, 0xece8e4e0}, /* 0x3800, 0x3A00, 0x3C00, 0x3E00, 512B for each beacon */
|
||||
{BCN_OFFSET1, 0xfcf8f4f0}, /* 0x3800, 0x3A00, 0x3C00, 0x3E00, 512B for each beacon */
|
||||
#else
|
||||
-#error You must re-calculate new value for BCN_OFFSET0 & BCN_OFFSET1 in MACRegTable[]!!!
|
||||
+#error You must re-calculate new value for BCN_OFFSET0 & BCN_OFFSET1 in MACRegTable[]!
|
||||
#endif /* HW_BEACON_OFFSET // */
|
||||
|
||||
{LEGACY_BASIC_RATE, 0x0000013f}, /* Basic rate set bitmap */
|
||||
@@ -1272,7 +1272,7 @@ void NICInitAsicFromEEPROM(struct rt_rtmp_adapter *pAd)
|
||||
pAd->bAutoTxAgcA = pAd->bAutoTxAgcG = FALSE;
|
||||
/* */
|
||||
/* Since BBP has been progamed, to make sure BBP setting will be */
|
||||
- /* upate inside of AsicAntennaSelect, so reset to UNKNOWN_BAND!! */
|
||||
+ /* upate inside of AsicAntennaSelect, so reset to UNKNOWN_BAND! */
|
||||
/* */
|
||||
pAd->CommonCfg.BandState = UNKNOWN_BAND;
|
||||
|
||||
@@ -3470,7 +3470,7 @@ err1:
|
||||
err0:
|
||||
#endif /* ST // */
|
||||
|
||||
- DBGPRINT(RT_DEBUG_ERROR, ("!!! rt28xx Initialized fail !!!\n"));
|
||||
+ DBGPRINT(RT_DEBUG_ERROR, ("rt28xx Initialized fail!\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
diff --git a/drivers/staging/rt2860/oid.h b/drivers/staging/rt2860/oid.h
|
||||
index fa4a2e6..fd1c141 100644
|
||||
--- a/drivers/staging/rt2860/oid.h
|
||||
+++ b/drivers/staging/rt2860/oid.h
|
||||
@@ -557,7 +557,7 @@ enum {
|
||||
/* New for MeetingHouse Api support */
|
||||
#define OID_MH_802_1X_SUPPORTED 0xFFEDC100
|
||||
|
||||
-/* MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!! */
|
||||
+/* MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition! */
|
||||
typedef union _HTTRANSMIT_SETTING {
|
||||
struct {
|
||||
u16 MCS:7; /* MCS */
|
||||
@@ -614,7 +614,7 @@ struct rt_802_11_event_table {
|
||||
struct rt_802_11_event_log Log[MAX_NUMBER_OF_EVENT];
|
||||
};
|
||||
|
||||
-/* MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!! */
|
||||
+/* MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition! */
|
||||
typedef union _MACHTTRANSMIT_SETTING {
|
||||
struct {
|
||||
u16 MCS:7; /* MCS */
|
||||
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
|
||||
index d84ac32..9357fb2 100644
|
||||
--- a/drivers/staging/rt2860/rt_linux.c
|
||||
+++ b/drivers/staging/rt2860/rt_linux.c
|
||||
@@ -51,7 +51,7 @@ char const *pWirelessSysEventText[IW_SYS_EVENT_TYPE_NUM] = {
|
||||
"connects with our wireless client", /* IW_STA_LINKUP_EVENT_FLAG */
|
||||
"disconnects with our wireless client", /* IW_STA_LINKDOWN_EVENT_FLAG */
|
||||
"scan completed" /* IW_SCAN_COMPLETED_EVENT_FLAG */
|
||||
- "scan terminate!! Busy!! Enqueue fail!!" /* IW_SCAN_ENQUEUE_FAIL_EVENT_FLAG */
|
||||
+ "scan terminate! Busy! Enqueue fail!" /* IW_SCAN_ENQUEUE_FAIL_EVENT_FLAG */
|
||||
};
|
||||
|
||||
/* for wireless IDS_spoof_attack event message */
|
||||
@@ -1282,7 +1282,7 @@ int RtmpOSNetDevDestory(struct rt_rtmp_adapter *pAd, struct net_device *pNetDev)
|
||||
{
|
||||
|
||||
/* TODO: Need to fix this */
|
||||
- printk("WARNING: This function(%s) not implement yet!!!\n", __func__);
|
||||
+ printk("WARNING: This function(%s) not implement yet!\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h
|
||||
index 7efc109..f85508d 100644
|
||||
--- a/drivers/staging/rt2860/rt_linux.h
|
||||
+++ b/drivers/staging/rt2860/rt_linux.h
|
||||
@@ -427,7 +427,7 @@ do{ \
|
||||
|
||||
#define DBGPRINT_ERR(Fmt) \
|
||||
{ \
|
||||
- printk("ERROR!!! "); \
|
||||
+ printk("ERROR! "); \
|
||||
printk Fmt; \
|
||||
}
|
||||
|
||||
diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c
|
||||
index fbbec9d..c3d9280 100644
|
||||
--- a/drivers/staging/rt2860/rt_main_dev.c
|
||||
+++ b/drivers/staging/rt2860/rt_main_dev.c
|
||||
@@ -321,7 +321,7 @@ int rt28xx_close(struct net_device *dev)
|
||||
|
||||
if (brc == FALSE) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("%s call RT28xxPciAsicRadioOff fail !!\n",
|
||||
+ ("%s call RT28xxPciAsicRadioOff fail!\n",
|
||||
__func__));
|
||||
}
|
||||
}
|
||||
diff --git a/drivers/staging/rt2860/rtmp_chip.h b/drivers/staging/rt2860/rtmp_chip.h
|
||||
index 32ff350..0adf2cd 100644
|
||||
--- a/drivers/staging/rt2860/rtmp_chip.h
|
||||
+++ b/drivers/staging/rt2860/rtmp_chip.h
|
||||
@@ -197,7 +197,7 @@ typedef union _EEPROM_NIC_CINFIG2_STRUC {
|
||||
u16 DynamicTxAgcControl:1; /* */
|
||||
u16 ExternalLNAForG:1; /* */
|
||||
u16 ExternalLNAForA:1; /* external LNA enable for 2.4G */
|
||||
- u16 CardbusAcceleration:1; /* !!! NOTE: 0 - enable, 1 - disable */
|
||||
+ u16 CardbusAcceleration:1; /* ! NOTE: 0 - enable, 1 - disable */
|
||||
u16 BW40MSidebandForG:1;
|
||||
u16 BW40MSidebandForA:1;
|
||||
u16 EnableWPSPBC:1; /* WPS PBC Control bit */
|
||||
diff --git a/drivers/staging/rt2860/rtmp_def.h b/drivers/staging/rt2860/rtmp_def.h
|
||||
index c79eceb..9c54bac 100644
|
||||
--- a/drivers/staging/rt2860/rtmp_def.h
|
||||
+++ b/drivers/staging/rt2860/rtmp_def.h
|
||||
@@ -409,7 +409,7 @@
|
||||
#define MAX_LEN_OF_MAC_TABLE MAX_NUMBER_OF_MAC /* if MAX_MBSSID_NUM is 8, this value can't be larger than 211 */
|
||||
|
||||
#if MAX_LEN_OF_MAC_TABLE>MAX_AVAILABLE_CLIENT_WCID
|
||||
-#error MAX_LEN_OF_MAC_TABLE can not be larger than MAX_AVAILABLE_CLIENT_WCID!!!!
|
||||
+#error MAX_LEN_OF_MAC_TABLE can not be larger than MAX_AVAILABLE_CLIENT_WCID!
|
||||
#endif
|
||||
|
||||
#define MAX_NUM_OF_WDS_LINK_PERBSSID 3
|
||||
diff --git a/drivers/staging/rt2860/sta/assoc.c b/drivers/staging/rt2860/sta/assoc.c
|
||||
index 733bc08..7055f22 100644
|
||||
--- a/drivers/staging/rt2860/sta/assoc.c
|
||||
+++ b/drivers/staging/rt2860/sta/assoc.c
|
||||
@@ -563,7 +563,7 @@ void MlmeAssocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *
|
||||
pAd->Mlme.AssocMachine.CurrState = ASSOC_WAIT_RSP;
|
||||
} else {
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("ASSOC - MlmeAssocReqAction() sanity check failed. BUG!!!!!! \n"));
|
||||
+ ("ASSOC - MlmeAssocReqAction() sanity check failed. BUG!\n"));
|
||||
pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE;
|
||||
Status = MLME_INVALID_FORMAT;
|
||||
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_ASSOC_CONF, 2,
|
||||
@@ -746,7 +746,7 @@ void MlmeReassocReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem
|
||||
pAd->Mlme.AssocMachine.CurrState = REASSOC_WAIT_RSP;
|
||||
} else {
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("ASSOC - MlmeReassocReqAction() sanity check failed. BUG!!!! \n"));
|
||||
+ ("ASSOC - MlmeReassocReqAction() sanity check failed. BUG!\n"));
|
||||
pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE;
|
||||
Status = MLME_INVALID_FORMAT;
|
||||
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_REASSOC_CONF, 2,
|
||||
diff --git a/drivers/staging/rt2860/sta/connect.c b/drivers/staging/rt2860/sta/connect.c
|
||||
index 9c77520..17e59ba 100644
|
||||
--- a/drivers/staging/rt2860/sta/connect.c
|
||||
+++ b/drivers/staging/rt2860/sta/connect.c
|
||||
@@ -214,7 +214,7 @@ void MlmeCntlMachinePerformAction(struct rt_rtmp_adapter *pAd,
|
||||
break;
|
||||
#endif /* RTMP_MAC_USB // */
|
||||
default:
|
||||
- DBGPRINT_ERR(("!ERROR! CNTL - Illegal message type(=%ld)",
|
||||
+ DBGPRINT_ERR(("ERROR! CNTL - Illegal message type(=%ld)",
|
||||
Elem->MsgType));
|
||||
break;
|
||||
}
|
||||
@@ -911,7 +911,7 @@ void CntlWaitStartProc(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *E
|
||||
pAd->CommonCfg.Bssid[5]));
|
||||
} else {
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("CNTL - Start IBSS fail. BUG!!!!!\n"));
|
||||
+ ("CNTL - Start IBSS fail. BUG!\n"));
|
||||
pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE;
|
||||
}
|
||||
}
|
||||
@@ -1184,7 +1184,7 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
|
||||
/* */
|
||||
/* ASSOC - DisassocTimeoutAction */
|
||||
/* CNTL - Dis-associate successful */
|
||||
- /* !!! LINK DOWN !!! */
|
||||
+ /* ! LINK DOWN ! */
|
||||
/* [88888] OID_802_11_SSID should have returned NDTEST_WEP_AP2(Returned: ) */
|
||||
/* */
|
||||
/* To prevent DisassocTimeoutAction to call Link down after we link up, */
|
||||
@@ -1218,12 +1218,12 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
|
||||
if (pAd->CommonCfg.PhyMode >= PHY_11ABGN_MIXED)
|
||||
AdhocTurnOnQos(pAd);
|
||||
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("!!!Adhoc LINK UP !!! \n"));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("Adhoc LINK UP!\n"));
|
||||
} else {
|
||||
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_INFRA_ON);
|
||||
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_ADHOC_ON);
|
||||
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("!!!Infra LINK UP !!! \n"));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("Infra LINK UP!\n"));
|
||||
}
|
||||
|
||||
/* 3*3 */
|
||||
@@ -1262,11 +1262,11 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
|
||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R69, 0x1A);
|
||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R70, 0x0A);
|
||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R73, 0x16);
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("!!!rt2860C !!! \n"));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("rt2860C !\n"));
|
||||
}
|
||||
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!!40MHz Lower LINK UP !!! Control Channel at Below. Central = %d \n",
|
||||
+ ("40MHz Lower LINK UP! Control Channel at Below. Central = %d \n",
|
||||
pAd->CommonCfg.CentralChannel));
|
||||
} else if ((pAd->CommonCfg.CentralChannel < pAd->CommonCfg.Channel)
|
||||
&& (pAd->MlmeAux.HtCapability.HtCapInfo.ChannelWidth ==
|
||||
@@ -1296,11 +1296,11 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
|
||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R69, 0x1A);
|
||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R70, 0x0A);
|
||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R73, 0x16);
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("!!!rt2860C !!! \n"));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("rt2860C !\n"));
|
||||
}
|
||||
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! 40MHz Upper LINK UP !!! Control Channel at UpperCentral = %d \n",
|
||||
+ ("40MHz Upper LINK UP! Control Channel at UpperCentral = %d \n",
|
||||
pAd->CommonCfg.CentralChannel));
|
||||
} else {
|
||||
pAd->CommonCfg.BBPCurrentBW = BW_20;
|
||||
@@ -1327,10 +1327,10 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
|
||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R69, 0x16);
|
||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R70, 0x08);
|
||||
RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R73, 0x11);
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("!!!rt2860C !!! \n"));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("rt2860C !\n"));
|
||||
}
|
||||
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("!!! 20MHz LINK UP !!! \n"));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("20MHz LINK UP!\n"));
|
||||
}
|
||||
|
||||
RTMPSetAGCInitValue(pAd, pAd->CommonCfg.BBPCurrentBW);
|
||||
@@ -1342,12 +1342,12 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
|
||||
&pAd->BbpTuning.R66CurrentValue);
|
||||
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! LINK UP !!! (BssType=%d, AID=%d, ssid=%s, Channel=%d, CentralChannel = %d)\n",
|
||||
+ ("LINK UP! (BssType=%d, AID=%d, ssid=%s, Channel=%d, CentralChannel = %d)\n",
|
||||
BssType, pAd->StaActive.Aid, pAd->CommonCfg.Ssid,
|
||||
pAd->CommonCfg.Channel, pAd->CommonCfg.CentralChannel));
|
||||
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! LINK UP !!! (Density =%d, )\n",
|
||||
+ ("LINK UP! (Density =%d, )\n",
|
||||
pAd->MacTab.Content[BSSID_WCID].MpduDensity));
|
||||
|
||||
AsicSetBssid(pAd, pAd->CommonCfg.Bssid);
|
||||
@@ -1634,13 +1634,13 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
|
||||
NdisReleaseSpinLock(&pAd->MacTabLock);
|
||||
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! LINK UP !!! ClientStatusFlags=%lx)\n",
|
||||
+ ("LINK UP! ClientStatusFlags=%lx)\n",
|
||||
pAd->MacTab.Content[BSSID_WCID].ClientStatusFlags));
|
||||
|
||||
MlmeUpdateTxRates(pAd, TRUE, BSS0);
|
||||
MlmeUpdateHtTxRates(pAd, BSS0);
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! LINK UP !! (StaActive.bHtEnable =%d, )\n",
|
||||
+ ("LINK UP! (StaActive.bHtEnable =%d, )\n",
|
||||
pAd->StaActive.SupportedPhyInfo.bHtEnable));
|
||||
|
||||
if (pAd->CommonCfg.bAggregationCapable) {
|
||||
@@ -1811,7 +1811,7 @@ void LinkUp(struct rt_rtmp_adapter *pAd, u8 BssType)
|
||||
pAd->CommonCfg.IOTestParm.bLastAtheros = FALSE;
|
||||
COPY_MAC_ADDR(pAd->CommonCfg.LastBssid, pAd->CommonCfg.Bssid);
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!!pAd->bNextDisableRxBA= %d \n",
|
||||
+ ("pAd->bNextDisableRxBA= %d \n",
|
||||
pAd->CommonCfg.IOTestParm.bNextDisableRxBA));
|
||||
/* BSSID add in one MAC entry too. Because in Tx, ASIC need to check Cipher and IV/EIV, BAbitmap */
|
||||
/* Pther information in MACTab.Content[BSSID_WCID] is not necessary for driver. */
|
||||
@@ -1893,7 +1893,7 @@ void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLEAN IsReqFromAP)
|
||||
BSS0, 0);
|
||||
}
|
||||
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK DOWN !!!\n"));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("LINK DOWN!\n"));
|
||||
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_AGGREGATION_INUSED);
|
||||
|
||||
#ifdef RTMP_MAC_PCI
|
||||
@@ -1921,7 +1921,7 @@ void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLEAN IsReqFromAP)
|
||||
|
||||
if (ADHOC_ON(pAd)) /* Adhoc mode link down */
|
||||
{
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK DOWN 1!!!\n"));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("LINK DOWN 1!\n"));
|
||||
|
||||
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_ADHOC_ON);
|
||||
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED);
|
||||
@@ -1931,10 +1931,10 @@ void LinkDown(struct rt_rtmp_adapter *pAd, IN BOOLEAN IsReqFromAP)
|
||||
BssTableDeleteEntry(&pAd->ScanTab, pAd->CommonCfg.Bssid,
|
||||
pAd->CommonCfg.Channel);
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! MacTab.Size=%d !!!\n", pAd->MacTab.Size));
|
||||
+ (" MacTab.Size=%d !\n", pAd->MacTab.Size));
|
||||
} else /* Infra structure mode */
|
||||
{
|
||||
- DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK DOWN 2!!!\n"));
|
||||
+ DBGPRINT(RT_DEBUG_TRACE, ("LINK DOWN 2!\n"));
|
||||
|
||||
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_INFRA_ON);
|
||||
OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED);
|
||||
diff --git a/drivers/staging/rt2860/sta/rtmp_data.c b/drivers/staging/rt2860/sta/rtmp_data.c
|
||||
index 8c0ab2d..c503947 100644
|
||||
--- a/drivers/staging/rt2860/sta/rtmp_data.c
|
||||
+++ b/drivers/staging/rt2860/sta/rtmp_data.c
|
||||
@@ -192,7 +192,7 @@ void STARxEAPOLFrameIndicate(struct rt_rtmp_adapter *pAd,
|
||||
pRxWI->RSSI1, pRxWI->RSSI2,
|
||||
pRxD->PlcpSignal);
|
||||
DBGPRINT_RAW(RT_DEBUG_TRACE,
|
||||
- ("!!! report EAPOL/AIRONET DATA to MLME (len=%d) !!!\n",
|
||||
+ ("report EAPOL/AIRONET DATA to MLME (len=%d) !\n",
|
||||
pRxBlk->DataSize));
|
||||
}
|
||||
}
|
||||
@@ -940,7 +940,7 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket)
|
||||
|
||||
if (pSrcBufVA == NULL) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("STASendPacket --> pSrcBufVA == NULL !!!SrcBufLen=%x\n",
|
||||
+ ("STASendPacket --> pSrcBufVA == NULL !SrcBufLen=%x\n",
|
||||
SrcBufLen));
|
||||
/* Resourece is low, system did not allocate virtual address */
|
||||
/* return NDIS_STATUS_FAILURE directly to upper layer */
|
||||
@@ -950,7 +950,7 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket)
|
||||
|
||||
if (SrcBufLen < 14) {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("STASendPacket --> Ndis Packet buffer error !!!\n"));
|
||||
+ ("STASendPacket --> Ndis Packet buffer error!\n"));
|
||||
RELEASE_NDIS_PACKET(pAd, pPacket, NDIS_STATUS_FAILURE);
|
||||
return (NDIS_STATUS_FAILURE);
|
||||
}
|
||||
@@ -1007,7 +1007,7 @@ int STASendPacket(struct rt_rtmp_adapter *pAd, void *pPacket)
|
||||
&& (RTMP_GET_PACKET_EAPOL(pPacket) == FALSE)
|
||||
) {
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("STASendPacket --> Drop packet before port secured !!!\n"));
|
||||
+ ("STASendPacket --> Drop packet before port secured!\n"));
|
||||
RELEASE_NDIS_PACKET(pAd, pPacket, NDIS_STATUS_FAILURE);
|
||||
|
||||
return (NDIS_STATUS_FAILURE);
|
||||
@@ -1680,7 +1680,7 @@ void STA_AMPDU_Frame_Tx(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk)
|
||||
|
||||
pMacEntry = pTxBlk->pMacEntry;
|
||||
if (pMacEntry->isCached) {
|
||||
- /* NOTE: Please make sure the size of pMacEntry->CachedBuf[] is smaller than pTxBlk->HeaderBuf[]!!!! */
|
||||
+ /* NOTE: Please make sure the size of pMacEntry->CachedBuf[] is smaller than pTxBlk->HeaderBuf[]! */
|
||||
NdisMoveMemory((u8 *)& pTxBlk->
|
||||
HeaderBuf[TXINFO_SIZE],
|
||||
(u8 *)& pMacEntry->CachedBuf[0],
|
||||
@@ -2506,7 +2506,7 @@ int STAHardTransmit(struct rt_rtmp_adapter *pAd,
|
||||
{
|
||||
/* It should not happened! */
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("Send a pacekt was not classified!! It should not happen!\n"));
|
||||
+ ("Send a packet was not classified! It should not happen!\n"));
|
||||
while (pTxBlk->TxPacketList.Number) {
|
||||
pQEntry =
|
||||
RemoveHeadQueue(&pTxBlk->TxPacketList);
|
||||
diff --git a/drivers/staging/rt2860/sta/sanity.c b/drivers/staging/rt2860/sta/sanity.c
|
||||
index 64a0e87..8f9fd19 100644
|
||||
--- a/drivers/staging/rt2860/sta/sanity.c
|
||||
+++ b/drivers/staging/rt2860/sta/sanity.c
|
||||
@@ -150,7 +150,7 @@ BOOLEAN PeerAssocRspSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned lo
|
||||
|
||||
case IE_HT_CAP:
|
||||
case IE_HT_CAP2:
|
||||
- if (pEid->Len >= SIZE_HT_CAP_IE) /*Note: allow extension.!! */
|
||||
+ if (pEid->Len >= SIZE_HT_CAP_IE) /*Note: allow extension! */
|
||||
{
|
||||
NdisMoveMemory(pHtCapability, pEid->Octet,
|
||||
SIZE_HT_CAP_IE);
|
||||
diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c
|
||||
index 04f81bd..d8fbe6c 100644
|
||||
--- a/drivers/staging/rt2860/sta_ioctl.c
|
||||
+++ b/drivers/staging/rt2860/sta_ioctl.c
|
||||
@@ -600,7 +600,7 @@ int rt_ioctl_siwap(struct net_device *dev,
|
||||
if (pAdapter->Mlme.CntlMachine.CurrState != CNTL_IDLE) {
|
||||
RTMP_MLME_RESET_STATE_MACHINE(pAdapter);
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! MLME busy, reset MLME state machine !!!\n"));
|
||||
+ ("MLME busy, reset MLME state machine!\n"));
|
||||
}
|
||||
/* tell CNTL state machine to call NdisMSetInformationComplete() after completing */
|
||||
/* this request, because this request is initiated by NDIS. */
|
||||
@@ -741,7 +741,7 @@ int rt_ioctl_siwscan(struct net_device *dev,
|
||||
|
||||
if (MONITOR_ON(pAdapter)) {
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! Driver is in Monitor Mode now !!!\n"));
|
||||
+ ("Driver is in Monitor Mode now!\n"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -758,7 +758,7 @@ int rt_ioctl_siwscan(struct net_device *dev,
|
||||
if ((pAdapter->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_ENABLE)
|
||||
&& (pAdapter->StaCfg.WpaSupplicantScanCount > 3)) {
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! WpaSupplicantScanCount > 3\n"));
|
||||
+ ("WpaSupplicantScanCount > 3\n"));
|
||||
Status = NDIS_STATUS_SUCCESS;
|
||||
break;
|
||||
}
|
||||
@@ -771,7 +771,7 @@ int rt_ioctl_siwscan(struct net_device *dev,
|
||||
&& (pAdapter->StaCfg.PortSecured ==
|
||||
WPA_802_1X_PORT_NOT_SECURED)) {
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! Link UP, Port Not Secured! ignore this set::OID_802_11_BSSID_LIST_SCAN\n"));
|
||||
+ ("Link UP, Port Not Secured! ignore this set::OID_802_11_BSSID_LIST_SCAN\n"));
|
||||
Status = NDIS_STATUS_SUCCESS;
|
||||
break;
|
||||
}
|
||||
@@ -779,7 +779,7 @@ int rt_ioctl_siwscan(struct net_device *dev,
|
||||
if (pAdapter->Mlme.CntlMachine.CurrState != CNTL_IDLE) {
|
||||
RTMP_MLME_RESET_STATE_MACHINE(pAdapter);
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! MLME busy, reset MLME state machine !!!\n"));
|
||||
+ ("MLME busy, reset MLME state machine!\n"));
|
||||
}
|
||||
/* tell CNTL state machine to call NdisMSetInformationComplete() after completing */
|
||||
/* this request, because this request is initiated by NDIS. */
|
||||
@@ -2256,7 +2256,7 @@ int rt_ioctl_siwpmksa(struct net_device *dev,
|
||||
break;
|
||||
default:
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("rt_ioctl_siwpmksa - Unknow Command!!\n"));
|
||||
+ ("rt_ioctl_siwpmksa - Unknown Command!\n"));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2664,7 +2664,7 @@ int Set_SSID_Proc(struct rt_rtmp_adapter *pAdapter, char *arg)
|
||||
if (pAdapter->Mlme.CntlMachine.CurrState != CNTL_IDLE) {
|
||||
RTMP_MLME_RESET_STATE_MACHINE(pAdapter);
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("!!! MLME busy, reset MLME state machine !!!\n"));
|
||||
+ ("MLME busy, reset MLME state machine!\n"));
|
||||
}
|
||||
|
||||
if ((pAdapter->StaCfg.WpaPassPhraseLen >= 8) &&
|
||||
diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c
|
||||
index c1d1fb5..925a236 100644
|
||||
--- a/drivers/staging/rt2860/usb_main_dev.c
|
||||
+++ b/drivers/staging/rt2860/usb_main_dev.c
|
||||
@@ -584,7 +584,7 @@ void RTUSBWatchDog(struct rt_rtmp_adapter *pAd)
|
||||
RTMP_IO_READ32(pAd, TXRXQ_PCNT, &MACValue);
|
||||
if ((MACValue & 0xff) != 0) {
|
||||
DBGPRINT(RT_DEBUG_TRACE,
|
||||
- ("TX QUEUE 0 Not EMPTY(Value=0x%0x). !!!!!!!!!!!!!!!\n",
|
||||
+ ("TX QUEUE 0 Not EMPTY(Value=0x%0x)!\n",
|
||||
MACValue));
|
||||
RTMP_IO_WRITE32(pAd, PBF_CFG, 0xf40012);
|
||||
while ((MACValue & 0xff) != 0 && (idx++ < 10)) {
|
||||
@@ -707,7 +707,7 @@ void RTUSBWatchDog(struct rt_rtmp_adapter *pAd)
|
||||
}
|
||||
} else {
|
||||
DBGPRINT(RT_DEBUG_ERROR,
|
||||
- ("Unkonw bulkOut URB maybe hanged!!!!!!!!!!!!\n"));
|
||||
+ ("Unknown bulkOut URB maybe hanged!\n"));
|
||||
}
|
||||
} else {
|
||||
RTMP_IRQ_UNLOCK(&pAd->BulkOutLock[idx],
|
||||
--
|
||||
1.7.1
|
||||
|
1222
debian/patches/features/all/rt28x0/0033-Staging-rt28x0-remove-no-longer-needed-common-cmm_da.patch
vendored
Normal file
1222
debian/patches/features/all/rt28x0/0033-Staging-rt28x0-remove-no-longer-needed-common-cmm_da.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,32 @@
|
|||
From dab868d7bd18571cf8510ce8566c503a73d8e86d Mon Sep 17 00:00:00 2001
|
||||
From: Roel Kluin <roel.kluin@gmail.com>
|
||||
Date: Sat, 26 Dec 2009 20:00:47 +0100
|
||||
Subject: [PATCH 34/42] Staging: rt2860: test off by one in RtmpAsicSendCommandToMcu()
|
||||
|
||||
commit 23a51a8061567a47347ade59edf2a0bde0eece30 upstream.
|
||||
|
||||
`i' reaches 101 after the loop, so if it was 100 then it succeeded in
|
||||
the last iteration. This is probably unlikely to cause problems.
|
||||
|
||||
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/common/rtmp_mcu.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
index 9f03901..e80f587 100644
|
||||
--- a/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
+++ b/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
@@ -221,7 +221,7 @@ int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd,
|
||||
("AsicSendCommanToMcu::Mail box is busy\n"));
|
||||
} while (i++ < 100);
|
||||
|
||||
- if (i >= 100) {
|
||||
+ if (i > 100) {
|
||||
DBGPRINT_ERR(("H2M_MAILBOX still hold by MCU. command fail\n"));
|
||||
return FALSE;
|
||||
}
|
||||
--
|
||||
1.7.1
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From 584d8be9af3bc71abe5bd2977c0f6f22935a7ab2 Mon Sep 17 00:00:00 2001
|
||||
From: Simon Horman <horms@verge.net.au>
|
||||
Date: Wed, 23 Dec 2009 19:54:50 +1100
|
||||
Subject: [PATCH 35/42] Staging: rt2870: rtusb_probe() should be in section __devinit
|
||||
|
||||
commit c33c2065fc4d424e23547b58900ded5eb4444e9d upstream.
|
||||
|
||||
$ make CONFIG_DEBUG_SECTION_MISMATCH=y
|
||||
WARNING: drivers/staging/rt2870/rt2870sta.o(.text+0x2f4c5): Section
|
||||
mismatch in reference from the function rtusb_probe() to the function .devinit.text:rt2870_probe()
|
||||
The function rtusb_probe() references
|
||||
the function __devinit rt2870_probe().
|
||||
This is often because rtusb_probe lacks a __devinit
|
||||
annotation or the annotation of rt2870_probe is wrong.
|
||||
|
||||
Signed-off-by: Simon Horman <horms@verge.net.au>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/usb_main_dev.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c
|
||||
index 925a236..1e6e8a3 100644
|
||||
--- a/drivers/staging/rt2860/usb_main_dev.c
|
||||
+++ b/drivers/staging/rt2860/usb_main_dev.c
|
||||
@@ -296,7 +296,7 @@ static BOOLEAN USBDevConfigInit(IN struct usb_device *dev,
|
||||
|
||||
}
|
||||
|
||||
-static int rtusb_probe(struct usb_interface *intf,
|
||||
+static int __devinit rtusb_probe(struct usb_interface *intf,
|
||||
const struct usb_device_id *id)
|
||||
{
|
||||
struct rt_rtmp_adapter *pAd;
|
||||
--
|
||||
1.7.1
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From f2366b77e8324bd004fcd959f9fe787c7d731661 Mon Sep 17 00:00:00 2001
|
||||
From: Simon Horman <horms@verge.net.au>
|
||||
Date: Wed, 23 Dec 2009 19:54:51 +1100
|
||||
Subject: [PATCH 36/42] Staging: rt2870: Remove unnecessary forward declarations
|
||||
|
||||
commit db15438cd5be7380cdf27c8adb8fc71a72da0210 upstream.
|
||||
|
||||
Remove unnecessary forward declaration of rtusb_probe() and rtusb_disconnect()
|
||||
|
||||
Signed-off-by: Simon Horman <horms@verge.net.au>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/usb_main_dev.c | 4 ----
|
||||
1 files changed, 0 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c
|
||||
index 1e6e8a3..1873a79 100644
|
||||
--- a/drivers/staging/rt2860/usb_main_dev.c
|
||||
+++ b/drivers/staging/rt2860/usb_main_dev.c
|
||||
@@ -216,10 +216,6 @@ static int rt2870_suspend(struct usb_interface *intf, pm_message_t state);
|
||||
static int rt2870_resume(struct usb_interface *intf);
|
||||
#endif /* CONFIG_PM // */
|
||||
|
||||
-static int rtusb_probe(struct usb_interface *intf,
|
||||
- const struct usb_device_id *id);
|
||||
-static void rtusb_disconnect(struct usb_interface *intf);
|
||||
-
|
||||
static BOOLEAN USBDevConfigInit(IN struct usb_device *dev,
|
||||
IN struct usb_interface *intf,
|
||||
struct rt_rtmp_adapter *pAd)
|
||||
--
|
||||
1.7.1
|
||||
|
79
debian/patches/features/all/rt28x0/0037-Staging-rt2860-Use-skb_tail_pointer.patch
vendored
Normal file
79
debian/patches/features/all/rt28x0/0037-Staging-rt2860-Use-skb_tail_pointer.patch
vendored
Normal file
|
@ -0,0 +1,79 @@
|
|||
From b3fe9d6202b44962e47ede26231866d9d657b129 Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Mahoney <jeffm@suse.com>
|
||||
Date: Mon, 11 Jan 2010 10:54:25 -0500
|
||||
Subject: [PATCH 37/42] Staging: rt2860: Use skb_tail_pointer
|
||||
|
||||
commit 53cf8743d227283e78c27ada407b506014c9223d upstream.
|
||||
|
||||
rt2860 uses skb->tail directly. This patch uses the tail pointer macros
|
||||
instead.
|
||||
|
||||
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/rt_linux.c | 10 +++++-----
|
||||
drivers/staging/rt2860/rt_linux.h | 4 ++--
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
|
||||
index 9357fb2..9d763b4 100644
|
||||
--- a/drivers/staging/rt2860/rt_linux.c
|
||||
+++ b/drivers/staging/rt2860/rt_linux.c
|
||||
@@ -462,9 +462,9 @@ void *duplicate_pkt(struct rt_rtmp_adapter *pAd,
|
||||
if ((skb =
|
||||
__dev_alloc_skb(HdrLen + DataSize + 2, MEM_ALLOC_FLAG)) != NULL) {
|
||||
skb_reserve(skb, 2);
|
||||
- NdisMoveMemory(skb->tail, pHeader802_3, HdrLen);
|
||||
+ NdisMoveMemory(skb_tail_pointer(skb), pHeader802_3, HdrLen);
|
||||
skb_put(skb, HdrLen);
|
||||
- NdisMoveMemory(skb->tail, pData, DataSize);
|
||||
+ NdisMoveMemory(skb_tail_pointer(skb), pData, DataSize);
|
||||
skb_put(skb, DataSize);
|
||||
skb->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
|
||||
pPacket = OSPKT_TO_RTPKT(skb);
|
||||
@@ -515,7 +515,7 @@ void *ClonePacket(struct rt_rtmp_adapter *pAd,
|
||||
pClonedPkt->dev = pRxPkt->dev;
|
||||
pClonedPkt->data = pData;
|
||||
pClonedPkt->len = DataSize;
|
||||
- pClonedPkt->tail = pClonedPkt->data + pClonedPkt->len;
|
||||
+ skb_set_tail_pointer(pClonedPkt, DataSize)
|
||||
ASSERT(DataSize < 1530);
|
||||
}
|
||||
return pClonedPkt;
|
||||
@@ -535,7 +535,7 @@ void update_os_packet_info(struct rt_rtmp_adapter *pAd,
|
||||
pOSPkt->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
|
||||
pOSPkt->data = pRxBlk->pData;
|
||||
pOSPkt->len = pRxBlk->DataSize;
|
||||
- pOSPkt->tail = pOSPkt->data + pOSPkt->len;
|
||||
+ skb_set_tail_pointer(pOSPkt, pOSPkt->len);
|
||||
}
|
||||
|
||||
void wlan_802_11_to_802_3_packet(struct rt_rtmp_adapter *pAd,
|
||||
@@ -553,7 +553,7 @@ void wlan_802_11_to_802_3_packet(struct rt_rtmp_adapter *pAd,
|
||||
pOSPkt->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
|
||||
pOSPkt->data = pRxBlk->pData;
|
||||
pOSPkt->len = pRxBlk->DataSize;
|
||||
- pOSPkt->tail = pOSPkt->data + pOSPkt->len;
|
||||
+ skb_set_tail_pointer(pOSPkt, pOSPkt->len);
|
||||
|
||||
/* */
|
||||
/* copy 802.3 header */
|
||||
diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h
|
||||
index f85508d..a7c540f 100644
|
||||
--- a/drivers/staging/rt2860/rt_linux.h
|
||||
+++ b/drivers/staging/rt2860/rt_linux.h
|
||||
@@ -658,9 +658,9 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size,
|
||||
(RTPKT_TO_OSPKT(_pkt)->len) = (_len)
|
||||
|
||||
#define GET_OS_PKT_DATATAIL(_pkt) \
|
||||
- (RTPKT_TO_OSPKT(_pkt)->tail)
|
||||
+ (skb_tail_pointer(RTPKT_TO_OSPKT(_pkt))
|
||||
#define SET_OS_PKT_DATATAIL(_pkt, _start, _len) \
|
||||
- ((RTPKT_TO_OSPKT(_pkt))->tail) = (u8 *)((_start) + (_len))
|
||||
+ (skb_set_tail_pointer(RTPKT_TO_OSPKT(_pkt), _len))
|
||||
|
||||
#define GET_OS_PKT_HEAD(_pkt) \
|
||||
(RTPKT_TO_OSPKT(_pkt)->head)
|
||||
--
|
||||
1.7.1
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From 8245311036fd129a9b1fcd2821e091933339e7d2 Mon Sep 17 00:00:00 2001
|
||||
From: Roel Kluin <roel.kluin@gmail.com>
|
||||
Date: Sun, 17 Jan 2010 16:44:37 +0100
|
||||
Subject: [PATCH 38/42] Staging: rt2860/sta_ioctl.c: Two branches the same in rt_ioctl_giwscan()
|
||||
|
||||
commit a2c3fdb996a926a45622428405a042f011eb03ba upstream.
|
||||
|
||||
Regardless of the condition, the branches execute the same code
|
||||
|
||||
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/sta_ioctl.c | 5 +----
|
||||
1 files changed, 1 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c
|
||||
index d8fbe6c..de4b627 100644
|
||||
--- a/drivers/staging/rt2860/sta_ioctl.c
|
||||
+++ b/drivers/staging/rt2860/sta_ioctl.c
|
||||
@@ -975,10 +975,7 @@ int rt_ioctl_giwscan(struct net_device *dev,
|
||||
/*================================ */
|
||||
memset(&iwe, 0, sizeof(iwe));
|
||||
iwe.cmd = SIOCGIWFREQ;
|
||||
- if (INFRA_ON(pAdapter) || ADHOC_ON(pAdapter))
|
||||
- iwe.u.freq.m = pAdapter->ScanTab.BssEntry[i].Channel;
|
||||
- else
|
||||
- iwe.u.freq.m = pAdapter->ScanTab.BssEntry[i].Channel;
|
||||
+ iwe.u.freq.m = pAdapter->ScanTab.BssEntry[i].Channel;
|
||||
iwe.u.freq.e = 0;
|
||||
iwe.u.freq.i = 0;
|
||||
|
||||
--
|
||||
1.7.1
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
From 375932a0c499d5e0e1945327993cb47c150f1537 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Mon, 18 Jan 2010 02:50:24 +0000
|
||||
Subject: [PATCH 39/42] Staging: rt2870sta: constify RTUSBMultiWrite(), RTUSBFirmwareWrite()
|
||||
|
||||
commit 8838d2560a8ccbc5e03688d55bf075793b36a04e upstream.
|
||||
|
||||
These functions do not modify the data they are passed.
|
||||
|
||||
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/rtmp.h | 6 +++---
|
||||
drivers/staging/rt2870/common/rtusb_io.c | 10 +++++-----
|
||||
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
|
||||
index c50abf4..6c6503d 100644
|
||||
--- a/drivers/staging/rt2860/rtmp.h
|
||||
+++ b/drivers/staging/rt2860/rtmp.h
|
||||
@@ -4043,10 +4043,10 @@ int RTUSBMultiRead(struct rt_rtmp_adapter *pAd,
|
||||
u16 Offset, u8 *pData, u16 length);
|
||||
|
||||
int RTUSBMultiWrite(struct rt_rtmp_adapter *pAd,
|
||||
- u16 Offset, u8 *pData, u16 length);
|
||||
+ u16 Offset, const u8 *pData, u16 length);
|
||||
|
||||
int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd,
|
||||
- u16 Offset, u8 *pData);
|
||||
+ u16 Offset, const u8 *pData);
|
||||
|
||||
int RTUSBReadBBPRegister(struct rt_rtmp_adapter *pAd,
|
||||
u8 Id, u8 *pValue);
|
||||
@@ -4112,7 +4112,7 @@ int RTUSBSingleWrite(struct rt_rtmp_adapter *pAd,
|
||||
u16 Offset, u16 Value);
|
||||
|
||||
int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd,
|
||||
- u8 *pFwImage, unsigned long FwLen);
|
||||
+ const u8 *pFwImage, unsigned long FwLen);
|
||||
|
||||
int RTUSBVenderReset(struct rt_rtmp_adapter *pAd);
|
||||
|
||||
diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c
|
||||
index 34443f2..cf0d2f5 100644
|
||||
--- a/drivers/staging/rt2870/common/rtusb_io.c
|
||||
+++ b/drivers/staging/rt2870/common/rtusb_io.c
|
||||
@@ -84,7 +84,7 @@ static int RTUSBFirmwareRun(struct rt_rtmp_adapter *pAd)
|
||||
========================================================================
|
||||
*/
|
||||
int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd,
|
||||
- u8 *pFwImage, unsigned long FwLen)
|
||||
+ const u8 *pFwImage, unsigned long FwLen)
|
||||
{
|
||||
u32 MacReg;
|
||||
int Status;
|
||||
@@ -167,7 +167,7 @@ int RTUSBMultiRead(struct rt_rtmp_adapter *pAd,
|
||||
========================================================================
|
||||
*/
|
||||
int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd,
|
||||
- u16 Offset, u8 *pData)
|
||||
+ u16 Offset, const u8 *pData)
|
||||
{
|
||||
int Status;
|
||||
|
||||
@@ -175,18 +175,18 @@ int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd,
|
||||
Status = RTUSB_VendorRequest(pAd,
|
||||
USBD_TRANSFER_DIRECTION_OUT,
|
||||
DEVICE_VENDOR_REQUEST_OUT,
|
||||
- 0x6, 0, Offset, pData, 1);
|
||||
+ 0x6, 0, Offset, (u8 *)pData, 1);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
int RTUSBMultiWrite(struct rt_rtmp_adapter *pAd,
|
||||
- u16 Offset, u8 *pData, u16 length)
|
||||
+ u16 Offset, const u8 *pData, u16 length)
|
||||
{
|
||||
int Status;
|
||||
|
||||
u16 index = 0, Value;
|
||||
- u8 *pSrc = pData;
|
||||
+ const u8 *pSrc = pData;
|
||||
u16 resude = 0;
|
||||
|
||||
resude = length % 2;
|
||||
--
|
||||
1.7.1
|
||||
|
291
debian/patches/features/all/rt28x0/0040-Staging-rt-2860-2870-sta-Use-request_firmware-to-loa.patch
vendored
Normal file
291
debian/patches/features/all/rt28x0/0040-Staging-rt-2860-2870-sta-Use-request_firmware-to-loa.patch
vendored
Normal file
|
@ -0,0 +1,291 @@
|
|||
From b31c3babea8aec7d093e23990041ca449a280841 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Sun, 18 Jul 2010 03:38:41 +0100
|
||||
Subject: [PATCH 40/42] Staging: rt{2860,2870}sta: Use request_firmware() to load firmware
|
||||
|
||||
commit c22202faade08b6b45f14fd86bfb57f79d73464c upstream.
|
||||
|
||||
When originally introduced into staging, these drivers had custom
|
||||
firmware-loading code which checked a version number and CRC at the
|
||||
end of each blob. This reintroduces those checks, using crc-ccitt
|
||||
instead of custom code.
|
||||
|
||||
The removed firmware will be added to the linux-firmware.git
|
||||
repository.
|
||||
|
||||
Based on work by Darren Salt <linux@youmustbejoking.demon.co.uk>.
|
||||
|
||||
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
Tested-By: Darren Salt <linux@youmustbejoking.demon.co.uk>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
[bwh: Strip firmware; adjust for Debian's 2.6.32]
|
||||
---
|
||||
drivers/staging/rt2860/Kconfig | 3 +-
|
||||
drivers/staging/rt2860/common/rtmp_mcu.c | 165 +++++++++++++++++++-----------
|
||||
drivers/staging/rt2860/rt_linux.c | 3 +
|
||||
drivers/staging/rt2860/rtmp.h | 1 +
|
||||
drivers/staging/rt2870/Kconfig | 3 +-
|
||||
5 files changed, 113 insertions(+), 62 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/Kconfig b/drivers/staging/rt2860/Kconfig
|
||||
index 40200d2..1b19a5f 100644
|
||||
--- a/drivers/staging/rt2860/Kconfig
|
||||
+++ b/drivers/staging/rt2860/Kconfig
|
||||
@@ -1,7 +1,8 @@
|
||||
config RT2860
|
||||
tristate "Ralink 2860/3090 wireless support"
|
||||
- depends on BROKEN
|
||||
depends on PCI && X86 && WLAN
|
||||
+ select CRC_CCITT
|
||||
+ select FW_LOADER
|
||||
---help---
|
||||
This is an experimental driver for the Ralink 2860 and 3090
|
||||
wireless chips.
|
||||
diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
index e80f587..844d4b9 100644
|
||||
--- a/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
+++ b/drivers/staging/rt2860/common/rtmp_mcu.c
|
||||
@@ -37,35 +37,38 @@
|
||||
|
||||
#include "../rt_config.h"
|
||||
|
||||
-#if defined(RT2860) || defined(RT3090)
|
||||
-#include "firmware.h"
|
||||
-#include "../../rt3090/firmware.h"
|
||||
-#endif
|
||||
-#ifdef RT2870
|
||||
-#include "../../rt3070/firmware.h"
|
||||
-#include "firmware_3070.h"
|
||||
-#endif
|
||||
-
|
||||
-#include <linux/bitrev.h>
|
||||
+#include <linux/crc-ccitt.h>
|
||||
+#include <linux/firmware.h>
|
||||
|
||||
#ifdef RTMP_MAC_USB
|
||||
-/* */
|
||||
-/* RT2870 Firmware Spec only used 1 oct for version expression */
|
||||
-/* */
|
||||
-#define FIRMWARE_MINOR_VERSION 7
|
||||
-#endif /* RTMP_MAC_USB // */
|
||||
|
||||
-/* New 8k byte firmware size for RT3071/RT3072 */
|
||||
-#define FIRMWAREIMAGE_MAX_LENGTH 0x2000
|
||||
-#define FIRMWAREIMAGE_LENGTH (sizeof (FirmwareImage) / sizeof(u8))
|
||||
-#define FIRMWARE_MAJOR_VERSION 0
|
||||
+#define FIRMWAREIMAGE_LENGTH 0x1000
|
||||
|
||||
-#define FIRMWAREIMAGEV1_LENGTH 0x1000
|
||||
-#define FIRMWAREIMAGEV2_LENGTH 0x1000
|
||||
+#define FIRMWARE_2870_MIN_VERSION 12
|
||||
+#define FIRMWARE_2870_FILENAME "rt2870.bin"
|
||||
+MODULE_FIRMWARE(FIRMWARE_2870_FILENAME);
|
||||
|
||||
-#ifdef RTMP_MAC_PCI
|
||||
-#define FIRMWARE_MINOR_VERSION 2
|
||||
-#endif /* RTMP_MAC_PCI // */
|
||||
+#define FIRMWARE_3070_MIN_VERSION 17
|
||||
+#define FIRMWARE_3070_FILENAME "rt3070.bin"
|
||||
+MODULE_FIRMWARE(FIRMWARE_3070_FILENAME);
|
||||
+
|
||||
+#define FIRMWARE_3071_MIN_VERSION 17
|
||||
+#define FIRMWARE_3071_FILENAME "rt3071.bin" /* for RT3071/RT3072 */
|
||||
+MODULE_FIRMWARE(FIRMWARE_3071_FILENAME);
|
||||
+
|
||||
+#else /* RTMP_MAC_PCI */
|
||||
+
|
||||
+#define FIRMWAREIMAGE_LENGTH 0x2000
|
||||
+
|
||||
+#define FIRMWARE_2860_MIN_VERSION 11
|
||||
+#define FIRMWARE_2860_FILENAME "rt2860.bin"
|
||||
+MODULE_FIRMWARE(FIRMWARE_2860_FILENAME);
|
||||
+
|
||||
+#define FIRMWARE_3090_MIN_VERSION 19
|
||||
+#define FIRMWARE_3090_FILENAME "rt3090.bin" /* for RT3090/RT3390 */
|
||||
+MODULE_FIRMWARE(FIRMWARE_3090_FILENAME);
|
||||
+
|
||||
+#endif
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
@@ -90,6 +93,78 @@ int RtmpAsicEraseFirmware(struct rt_rtmp_adapter *pAd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static const struct firmware *rtmp_get_firmware(struct rt_rtmp_adapter *adapter)
|
||||
+{
|
||||
+ const char *name;
|
||||
+ const struct firmware *fw = NULL;
|
||||
+ u8 min_version;
|
||||
+ struct device *dev;
|
||||
+ int err;
|
||||
+
|
||||
+ if (adapter->firmware)
|
||||
+ return adapter->firmware;
|
||||
+
|
||||
+#ifdef RTMP_MAC_USB
|
||||
+ if (IS_RT3071(adapter)) {
|
||||
+ name = FIRMWARE_3071_FILENAME;
|
||||
+ min_version = FIRMWARE_3071_MIN_VERSION;
|
||||
+ } else if (IS_RT3070(adapter)) {
|
||||
+ name = FIRMWARE_3070_FILENAME;
|
||||
+ min_version = FIRMWARE_3070_MIN_VERSION;
|
||||
+ } else {
|
||||
+ name = FIRMWARE_2870_FILENAME;
|
||||
+ min_version = FIRMWARE_2870_MIN_VERSION;
|
||||
+ }
|
||||
+ dev = &((struct os_cookie *)adapter->OS_Cookie)->pUsb_Dev->dev;
|
||||
+#else /* RTMP_MAC_PCI */
|
||||
+ if (IS_RT3090(adapter) || IS_RT3390(adapter)) {
|
||||
+ name = FIRMWARE_3090_FILENAME;
|
||||
+ min_version = FIRMWARE_3090_MIN_VERSION;
|
||||
+ } else {
|
||||
+ name = FIRMWARE_2860_FILENAME;
|
||||
+ min_version = FIRMWARE_2860_MIN_VERSION;
|
||||
+ }
|
||||
+ dev = &((struct os_cookie *)adapter->OS_Cookie)->pci_dev->dev;
|
||||
+#endif
|
||||
+
|
||||
+ err = request_firmware(&fw, name, dev);
|
||||
+ if (err) {
|
||||
+ dev_err(dev, "firmware file %s request failed (%d)\n",
|
||||
+ name, err);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (fw->size < FIRMWAREIMAGE_LENGTH) {
|
||||
+ dev_err(dev, "firmware file %s size is invalid\n", name);
|
||||
+ goto invalid;
|
||||
+ }
|
||||
+
|
||||
+ /* is it new enough? */
|
||||
+ adapter->FirmwareVersion = fw->data[FIRMWAREIMAGE_LENGTH - 3];
|
||||
+ if (adapter->FirmwareVersion < min_version) {
|
||||
+ dev_err(dev,
|
||||
+ "firmware file %s is too old;"
|
||||
+ " driver requires v%d or later\n",
|
||||
+ name, min_version);
|
||||
+ goto invalid;
|
||||
+ }
|
||||
+
|
||||
+ /* is the internal CRC correct? */
|
||||
+ if (crc_ccitt(0xffff, fw->data, FIRMWAREIMAGE_LENGTH - 2) !=
|
||||
+ (fw->data[FIRMWAREIMAGE_LENGTH - 2] |
|
||||
+ (fw->data[FIRMWAREIMAGE_LENGTH - 1] << 8))) {
|
||||
+ dev_err(dev, "firmware file %s failed internal CRC\n", name);
|
||||
+ goto invalid;
|
||||
+ }
|
||||
+
|
||||
+ adapter->firmware = fw;
|
||||
+ return fw;
|
||||
+
|
||||
+invalid:
|
||||
+ release_firmware(fw);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
========================================================================
|
||||
|
||||
@@ -109,46 +184,16 @@ int RtmpAsicEraseFirmware(struct rt_rtmp_adapter *pAd)
|
||||
*/
|
||||
int RtmpAsicLoadFirmware(struct rt_rtmp_adapter *pAd)
|
||||
{
|
||||
-
|
||||
+ const struct firmware *fw;
|
||||
int Status = NDIS_STATUS_SUCCESS;
|
||||
- u8 *pFirmwareImage = NULL;
|
||||
- unsigned long FileLength, Index;
|
||||
+ unsigned long Index;
|
||||
u32 MacReg = 0;
|
||||
-#ifdef RTMP_MAC_USB
|
||||
- u32 Version = (pAd->MACVersion >> 16);
|
||||
-#endif
|
||||
|
||||
- /* New 8k byte firmware size for RT3071/RT3072 */
|
||||
- {
|
||||
-#ifdef RTMP_MAC_PCI
|
||||
- if (IS_RT3090(pAd) || IS_RT3390(pAd)) {
|
||||
- pFirmwareImage = FirmwareImage_3090;
|
||||
- FileLength = FIRMWAREIMAGE_MAX_LENGTH;
|
||||
- } else {
|
||||
- pFirmwareImage = FirmwareImage_2860;
|
||||
- FileLength = FIRMWAREIMAGE_MAX_LENGTH;
|
||||
- }
|
||||
-#endif /* RTMP_MAC_PCI // */
|
||||
-#ifdef RTMP_MAC_USB
|
||||
- /* the firmware image consists of two parts */
|
||||
- if ((Version != 0x2860) && (Version != 0x2872) && (Version != 0x3070)) { /* use the second part */
|
||||
- /*printk("KH:Use New Version,part2\n"); */
|
||||
- pFirmwareImage =
|
||||
- (u8 *)&
|
||||
- FirmwareImage_3070[FIRMWAREIMAGEV1_LENGTH];
|
||||
- FileLength = FIRMWAREIMAGEV2_LENGTH;
|
||||
- } else {
|
||||
- /*printk("KH:Use New Version,part1\n"); */
|
||||
- if (Version == 0x3070)
|
||||
- pFirmwareImage = FirmwareImage_3070;
|
||||
- else
|
||||
- pFirmwareImage = FirmwareImage_2870;
|
||||
- FileLength = FIRMWAREIMAGEV1_LENGTH;
|
||||
- }
|
||||
-#endif /* RTMP_MAC_USB // */
|
||||
- }
|
||||
+ fw = rtmp_get_firmware(pAd);
|
||||
+ if (!fw)
|
||||
+ return NDIS_STATUS_FAILURE;
|
||||
|
||||
- RTMP_WRITE_FIRMWARE(pAd, pFirmwareImage, FileLength);
|
||||
+ RTMP_WRITE_FIRMWARE(pAd, fw->data, FIRMWAREIMAGE_LENGTH);
|
||||
|
||||
/* check if MCU is ready */
|
||||
Index = 0;
|
||||
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
|
||||
index 9d763b4..b5c78ae 100644
|
||||
--- a/drivers/staging/rt2860/rt_linux.c
|
||||
+++ b/drivers/staging/rt2860/rt_linux.c
|
||||
@@ -25,6 +25,7 @@
|
||||
*************************************************************************
|
||||
*/
|
||||
|
||||
+#include <linux/firmware.h>
|
||||
#include <linux/sched.h>
|
||||
#include "rt_config.h"
|
||||
|
||||
@@ -260,6 +261,8 @@ void RTMPFreeAdapter(struct rt_rtmp_adapter *pAd)
|
||||
|
||||
NdisFreeSpinLock(&pAd->irq_lock);
|
||||
|
||||
+ release_firmware(pAd->firmware);
|
||||
+
|
||||
vfree(pAd); /* pci_free_consistent(os_cookie->pci_dev,sizeof(struct rt_rtmp_adapter),pAd,os_cookie->pAd_pa); */
|
||||
if (os_cookie)
|
||||
kfree(os_cookie);
|
||||
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
|
||||
index 6c6503d..4401a55 100644
|
||||
--- a/drivers/staging/rt2860/rtmp.h
|
||||
+++ b/drivers/staging/rt2860/rtmp.h
|
||||
@@ -1719,6 +1719,7 @@ struct rt_rtmp_adapter {
|
||||
void *OS_Cookie; /* save specific structure relative to OS */
|
||||
struct net_device *net_dev;
|
||||
unsigned long VirtualIfCnt;
|
||||
+ const struct firmware *firmware;
|
||||
|
||||
struct rt_rtmp_chip_op chipOps;
|
||||
u16 ThisTbttNumToNextWakeUp;
|
||||
diff --git a/drivers/staging/rt2870/Kconfig b/drivers/staging/rt2870/Kconfig
|
||||
index 05ee373..a0c9eb3 100644
|
||||
--- a/drivers/staging/rt2870/Kconfig
|
||||
+++ b/drivers/staging/rt2870/Kconfig
|
||||
@@ -1,6 +1,7 @@
|
||||
config RT2870
|
||||
tristate "Ralink 2870/3070 wireless support"
|
||||
- depends on BROKEN
|
||||
depends on USB && X86 && WLAN
|
||||
+ select CRC_CCITT
|
||||
+ select FW_LOADER
|
||||
---help---
|
||||
This is an experimental driver for the Ralink xx70 wireless chips.
|
||||
--
|
||||
1.7.1
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
From f08a92184c7ada338949b7cb682626f939853d7a Mon Sep 17 00:00:00 2001
|
||||
From: Yong Zhang <yong.zhang0@gmail.com>
|
||||
Date: Fri, 5 Feb 2010 21:52:40 +0800
|
||||
Subject: [PATCH 41/42] Staging: rt2860: correct onstack wait_queue_head declaration
|
||||
|
||||
commit e41e5d601e1c035fde488f9543c978b8ae86e1be upstream.
|
||||
|
||||
Use DECLARE_WAIT_QUEUE_HEAD_ONSTACK to make lockdep happy
|
||||
|
||||
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
|
||||
Cc: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
||||
Cc: Alexander Beregalov <a.beregalov@gmail.com>
|
||||
Cc: David S. Miller <davem@davemloft.net>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/rt_main_dev.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c
|
||||
index c3d9280..fbddb00 100644
|
||||
--- a/drivers/staging/rt2860/rt_main_dev.c
|
||||
+++ b/drivers/staging/rt2860/rt_main_dev.c
|
||||
@@ -216,7 +216,7 @@ int rt28xx_close(struct net_device *dev)
|
||||
u32 i = 0;
|
||||
|
||||
#ifdef RTMP_MAC_USB
|
||||
- DECLARE_WAIT_QUEUE_HEAD(unlink_wakeup);
|
||||
+ DECLARE_WAIT_QUEUE_HEAD_ONSTACK(unlink_wakeup);
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
#endif /* RTMP_MAC_USB // */
|
||||
|
||||
--
|
||||
1.7.1
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
From bd87a2b1bbd0352a8cfbb43edc878f45feadb555 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Largret <largret@gmail.com>
|
||||
Date: Wed, 3 Mar 2010 05:24:26 -0600
|
||||
Subject: [PATCH 42/42] Staging: rt2860: add Belkin F5D8055 Wireless-N USB Dongle device id
|
||||
|
||||
commit 12840c63b0679f7fab88ea1cc26b52db8b574ce7 upstream.
|
||||
|
||||
Add Belkin F5D8055 Wireless-N USB support to the rt2870
|
||||
staging driver.
|
||||
|
||||
Signed-off-by: Chris Largret <largret@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
---
|
||||
drivers/staging/rt2860/usb_main_dev.c | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c
|
||||
index 1873a79..740db0c 100644
|
||||
--- a/drivers/staging/rt2860/usb_main_dev.c
|
||||
+++ b/drivers/staging/rt2860/usb_main_dev.c
|
||||
@@ -63,6 +63,7 @@ struct usb_device_id rtusb_usb_id[] = {
|
||||
{USB_DEVICE(0x07D1, 0x3C11)}, /* D-Link */
|
||||
{USB_DEVICE(0x14B2, 0x3C07)}, /* AL */
|
||||
{USB_DEVICE(0x050D, 0x8053)}, /* Belkin */
|
||||
+ {USB_DEVICE(0x050D, 0x825B)}, /* Belkin */
|
||||
{USB_DEVICE(0x14B2, 0x3C23)}, /* Airlink */
|
||||
{USB_DEVICE(0x14B2, 0x3C27)}, /* Airlink */
|
||||
{USB_DEVICE(0x07AA, 0x002F)}, /* Corega */
|
||||
--
|
||||
1.7.1
|
||||
|
|
@ -0,0 +1 @@
|
|||
rm drivers/staging/rt3090
|
|
@ -15,3 +15,49 @@
|
|||
+ features/arm/arm-add-pci_sys_data.patch
|
||||
+ features/arm/kirkwood-add-pcie1.patch
|
||||
+ features/arm/kirkwood-factorize-pcie-init-code
|
||||
- features/all/rt3090sta-use-request_firmware.patch
|
||||
- features/all/rt28x0sta-use-request_firmware.patch
|
||||
- features/all/rt28x0sta-constify-RTUSBMultiWrite-RTUSBFirmwareWrite.patch
|
||||
+ features/all/rt28x0/0001-Staging-rt28x0-updates-from-vendor-s-V2.1.0.0-driver.patch
|
||||
+ features/all/rt28x0/0002-Staging-rt28x0-remove-unused-code-from-common-dfs.c.patch
|
||||
+ features/all/rt28x0/0003-Staging-rt2860-add-RT3090-chipset-support.patch
|
||||
+ features/all/rt28x0/0004-Staging-remove-no-longer-needed-rt3090-driver.patch
|
||||
X features/all/rt28x0/remove-rt3090-driver.commands
|
||||
+ features/all/rt28x0/0005-Staging-rt28x0-remove-unused-eewrite-methods.patch
|
||||
+ features/all/rt28x0/0006-Staging-rt28x0-remove-unused-code-from-common-ee_efu.patch
|
||||
+ features/all/rt28x0/0007-Staging-rt28x0-remove-private-RTPRIV_IOCTL_SET-ioctl.patch
|
||||
+ features/all/rt28x0/0008-Staging-rt28x0-remove-private-RTPRIV_IOCTL_GSITESURV.patch
|
||||
+ features/all/rt28x0/0009-Staging-rt28x0-remove-private-WEXT-handlers.patch
|
||||
+ features/all/rt28x0/0010-Staging-rt28x0-remove-support-for-private-driver-par.patch
|
||||
+ features/all/rt28x0/0011-Staging-rt28x0-remove-optional-loading-of-EEPROM-fro.patch
|
||||
+ features/all/rt28x0/0012-Staging-rt28x0-fix-some-build-warnings.patch
|
||||
+ features/all/rt28x0/0013-Staging-rt28x0-remove-optional-cmm-profile-parameter.patch
|
||||
+ features/all/rt28x0/0014-Staging-rt28x0-remove-dead-code-from-rtmp_phy.h.patch
|
||||
+ features/all/rt28x0/0015-Staging-rt28x0-remove-unused-SHA256-code.patch
|
||||
+ features/all/rt28x0/0016-Staging-rt28x0-remove-dead-code.patch
|
||||
+ features/all/rt28x0/0017-Staging-rt28x0-remove-__LINE__-instances.patch
|
||||
+ features/all/rt28x0/0018-Staging-rt28x0-run-.c-files-through-Lindent.patch
|
||||
+ features/all/rt28x0/0019-Staging-rt28x0-run-common-.c-files-through-Lindent.patch
|
||||
+ features/all/rt28x0/0020-Staging-rt28x0-run-sta-.c-files-through-Lindent.patch
|
||||
+ features/all/rt28x0/0021-Staging-rt28x0-run-.h-files-through-Lindent.patch
|
||||
+ features/all/rt28x0/0022-Staging-rt28x0-fix-comments-in-.c-files.patch
|
||||
+ features/all/rt28x0/0023-Staging-rt28x0-fix-comments-in-common-.c-files.patch
|
||||
+ features/all/rt28x0/0024-Staging-rt28x0-fix-comments-in-sta-.c-files.patch
|
||||
+ features/all/rt28x0/0025-Staging-rt28x0-fix-comments-in-.h-files.patch
|
||||
+ features/all/rt28x0/0026-Staging-rt28x0-remove-typedefs-part-one.patch
|
||||
+ features/all/rt28x0/0027-Staging-rt28x0-remove-typedefs-part-two.patch
|
||||
+ features/all/rt28x0/0028-Staging-rt28x0-remove-typedefs-part-three.patch
|
||||
+ features/all/rt28x0/0029-Staging-rt2860-remove-remainders-of-etc-reading-stuf.patch
|
||||
+ features/all/rt28x0/0030-Staging-rt2860-remove-superfluous-newlines.patch
|
||||
+ features/all/rt28x0/0031-Staging-rt28x0-fix-comments-in-chip-mac_pci.h.patch
|
||||
+ features/all/rt28x0/0032-Staging-rt2860-reduce-superfluous-exclamation-marks.patch
|
||||
+ features/all/rt28x0/0033-Staging-rt28x0-remove-no-longer-needed-common-cmm_da.patch
|
||||
+ features/all/rt28x0/0034-Staging-rt2860-test-off-by-one-in-RtmpAsicSendComman.patch
|
||||
+ features/all/rt28x0/0035-Staging-rt2870-rtusb_probe-should-be-in-section-__de.patch
|
||||
+ features/all/rt28x0/0036-Staging-rt2870-Remove-unnecessary-forward-declaratio.patch
|
||||
+ features/all/rt28x0/0037-Staging-rt2860-Use-skb_tail_pointer.patch
|
||||
+ features/all/rt28x0/0038-Staging-rt2860-sta_ioctl.c-Two-branches-the-same-in-.patch
|
||||
+ features/all/rt28x0/0039-Staging-rt2870sta-constify-RTUSBMultiWrite-RTUSBFirm.patch
|
||||
+ features/all/rt28x0/0040-Staging-rt-2860-2870-sta-Use-request_firmware-to-loa.patch
|
||||
+ features/all/rt28x0/0041-Staging-rt2860-correct-onstack-wait_queue_head-decla.patch
|
||||
+ features/all/rt28x0/0042-Staging-rt2860-add-Belkin-F5D8055-Wireless-N-USB-Don.patch
|
||||
|
|
Loading…
Reference in New Issue