aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2009-02-11 13:17:35 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:29 -0700
commit0009e125b629b83a540273ecf35ce18c5334e4fc (patch)
treeb451db36649ae0f063baaaa9a8c43eba399105fb /drivers
parentd0fe19119efe389ea1e0fe6ce0f1b3b4a6521ea8 (diff)
Staging: otus: fix mixed declarations
Fix otus ISO C90 warnings: drivers/staging/otus/80211core/cmmsta.c:740: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/80211core/coid.c:219: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/80211core/coid.c:1437: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:33: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:53: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:82: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:163: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:219: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:831: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:896: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:332: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:1329: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:1565: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:1606: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:1923: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:1997: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2264: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2296: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2330: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2350: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2387: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2425: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4223: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4283: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4314: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4380: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4425: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4531: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4539: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpusb.c:69: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpusb.c:334: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpusb.c:580: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpreg.c:1774: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpreg.c:2478: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:61: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:80: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:145: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:352: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:393: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:472: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:517: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:592: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:633: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/otus/80211core/cmmsta.c5
-rw-r--r--drivers/staging/otus/80211core/coid.c8
-rw-r--r--drivers/staging/otus/hal/hpani.c46
-rw-r--r--drivers/staging/otus/hal/hpmain.c99
-rw-r--r--drivers/staging/otus/hal/hpreg.c9
-rw-r--r--drivers/staging/otus/hal/hprw.c30
-rw-r--r--drivers/staging/otus/hal/hpusb.c11
7 files changed, 131 insertions, 77 deletions
diff --git a/drivers/staging/otus/80211core/cmmsta.c b/drivers/staging/otus/80211core/cmmsta.c
index c75ba11ee43..b28a4e25e10 100644
--- a/drivers/staging/otus/80211core/cmmsta.c
+++ b/drivers/staging/otus/80211core/cmmsta.c
@@ -724,6 +724,9 @@ void zfStaUpdateWmeParameter(zdev_t* dev, zbuf_t* buf)
/* process 802.11h Dynamic Frequency Selection */
void zfStaUpdateDot11HDFS(zdev_t* dev, zbuf_t* buf)
{
+ //u8_t length, channel, is5G;
+ u16_t offset;
+
zmw_get_wlan_dev(dev);
/*
@@ -736,8 +739,6 @@ void zfStaUpdateDot11HDFS(zdev_t* dev, zbuf_t* buf)
|Value | 37 | 3 | 0 or 1 |unsigned integer |unsigned integer |
+------+----------+------+-------------------+------------------+--------------------+
*/
- //u8_t length, channel, is5G;
- u16_t offset;
/* get EID(Channel Switch Announcement) */
if ( (offset = zfFindElement(dev, buf, ZM_WLAN_EID_CHANNEL_SWITCH_ANNOUNCE)) == 0xffff )
diff --git a/drivers/staging/otus/80211core/coid.c b/drivers/staging/otus/80211core/coid.c
index 6007f3131f8..88f8d3491a8 100644
--- a/drivers/staging/otus/80211core/coid.c
+++ b/drivers/staging/otus/80211core/coid.c
@@ -214,10 +214,10 @@ u32_t zfiWlanQuerySupportMode(zdev_t* dev)
u32_t zfiWlanQueryTransmitPower(zdev_t* dev)
{
- zmw_get_wlan_dev(dev);
-
u32_t ret = 0;
+ zmw_get_wlan_dev(dev);
+
if (zfStaIsConnected(dev)) {
ret = wd->sta.connPowerInHalfDbm;
} else {
@@ -1432,12 +1432,12 @@ u32_t zfiWlanQueryCurrentFrequency(zdev_t* dev, u8_t qmode)
u32_t zfiWlanQueryFrequencyAttribute(zdev_t* dev, u32_t freq)
{
- zmw_get_wlan_dev(dev);
-
u8_t i;
u16_t frequency = (u16_t) (freq/1000);
u32_t ret = 0;
+ zmw_get_wlan_dev(dev);
+
for (i = 0; i < wd->regulationTable.allowChannelCnt; i++)
{
if ( wd->regulationTable.allowChannel[i].channel == frequency )
diff --git a/drivers/staging/otus/hal/hpani.c b/drivers/staging/otus/hal/hpani.c
index ba95b5d012a..0afecd8c2de 100644
--- a/drivers/staging/otus/hal/hpani.c
+++ b/drivers/staging/otus/hal/hpani.c
@@ -55,10 +55,10 @@ extern u16_t zfFlushDelayWrite(zdev_t* dev);
s32_t BEACON_RSSI(zdev_t* dev)
{
s32_t rssi;
+ struct zsHpPriv *HpPriv;
zmw_get_wlan_dev(dev);
-
- struct zsHpPriv *HpPriv = (struct zsHpPriv*)wd->hpPrivate;
+ HpPriv = (struct zsHpPriv*)wd->hpPrivate;
rssi = ZM_HAL_EP_RND(HpPriv->stats.ast_nodestats.ns_avgbrssi, ZM_HAL_RSSI_EP_MULTIPLIER);
@@ -74,16 +74,16 @@ void zfHpAniAttach(zdev_t* dev)
{
#define N(a) (sizeof(a) / sizeof(a[0]))
u32_t i;
-
- zmw_get_wlan_dev(dev);
-
- struct zsHpPriv *HpPriv = (struct zsHpPriv*)wd->hpPrivate;
+ struct zsHpPriv *HpPriv;
const int totalSizeDesired[] = { -55, -55, -55, -55, -62 };
const int coarseHigh[] = { -14, -14, -14, -14, -12 };
const int coarseLow[] = { -64, -64, -64, -64, -70 };
const int firpwr[] = { -78, -78, -78, -78, -80 };
+ zmw_get_wlan_dev(dev);
+ HpPriv = (struct zsHpPriv*)wd->hpPrivate;
+
for (i = 0; i < 5; i++)
{
HpPriv->totalSizeDesired[i] = totalSizeDesired[i];
@@ -139,12 +139,12 @@ u8_t zfHpAniControl(zdev_t* dev, ZM_HAL_ANI_CMD cmd, int param)
{
#define N(a) (sizeof(a)/sizeof(a[0]))
typedef s32_t TABLE[];
+ struct zsHpPriv *HpPriv;
+ struct zsAniState *aniState;
zmw_get_wlan_dev(dev);
-
- struct zsHpPriv *HpPriv = (struct zsHpPriv*)wd->hpPrivate;
-
- struct zsAniState *aniState = HpPriv->curani;
+ HpPriv = (struct zsHpPriv*)wd->hpPrivate;
+ aniState = HpPriv->curani;
switch (cmd)
{
@@ -346,11 +346,10 @@ u8_t zfHpAniControl(zdev_t* dev, ZM_HAL_ANI_CMD cmd, int param)
void zfHpAniRestart(zdev_t* dev)
{
struct zsAniState *aniState;
+ struct zsHpPriv *HpPriv;
zmw_get_wlan_dev(dev);
-
- struct zsHpPriv *HpPriv = (struct zsHpPriv*)wd->hpPrivate;
-
+ HpPriv = (struct zsHpPriv*)wd->hpPrivate;
aniState = HpPriv->curani;
aniState->listenTime = 0;
@@ -387,10 +386,10 @@ void zfHpAniOfdmErrTrigger(zdev_t* dev)
{
struct zsAniState *aniState;
s32_t rssi;
+ struct zsHpPriv *HpPriv;
zmw_get_wlan_dev(dev);
-
- struct zsHpPriv *HpPriv = (struct zsHpPriv*)wd->hpPrivate;
+ HpPriv = (struct zsHpPriv*)wd->hpPrivate;
//HALASSERT(chan != NULL);
@@ -466,10 +465,10 @@ void zfHpAniCckErrTrigger(zdev_t* dev)
{
struct zsAniState *aniState;
s32_t rssi;
+ struct zsHpPriv *HpPriv;
zmw_get_wlan_dev(dev);
-
- struct zsHpPriv *HpPriv = (struct zsHpPriv*)wd->hpPrivate;
+ HpPriv = (struct zsHpPriv*)wd->hpPrivate;
//HALASSERT(chan != NULL);
@@ -511,11 +510,10 @@ void zfHpAniLowerImmunity(zdev_t* dev)
{
struct zsAniState *aniState;
s32_t rssi;
+ struct zsHpPriv *HpPriv;
zmw_get_wlan_dev(dev);
-
- struct zsHpPriv *HpPriv = (struct zsHpPriv*)wd->hpPrivate;
-
+ HpPriv = (struct zsHpPriv*)wd->hpPrivate;
aniState = HpPriv->curani;
rssi = BEACON_RSSI(dev);
@@ -586,10 +584,10 @@ s32_t zfHpAniGetListenTime(zdev_t* dev)
struct zsAniState *aniState;
u32_t txFrameCount, rxFrameCount, cycleCount;
s32_t listenTime;
+ struct zsHpPriv *HpPriv;
zmw_get_wlan_dev(dev);
-
- struct zsHpPriv *HpPriv = (struct zsHpPriv*)wd->hpPrivate;
+ HpPriv = (struct zsHpPriv*)wd->hpPrivate;
txFrameCount = 0;//OS_REG_READ(ah, AR_TFCNT);
rxFrameCount = 0;//OS_REG_READ(ah, AR_RFCNT);
@@ -627,10 +625,10 @@ void zfHpAniArPoll(zdev_t* dev, u32_t listenTime, u32_t phyCnt1, u32_t phyCnt2)
{
struct zsAniState *aniState;
//s32_t listenTime;
+ struct zsHpPriv *HpPriv;
zmw_get_wlan_dev(dev);
-
- struct zsHpPriv *HpPriv = (struct zsHpPriv*)wd->hpPrivate;
+ HpPriv = (struct zsHpPriv*)wd->hpPrivate;
/*
* Since we're called from end of rx tasklet, we also check for
diff --git a/drivers/staging/otus/hal/hpmain.c b/drivers/staging/otus/hal/hpmain.c
index 2e65c466aae..72c9e89979c 100644
--- a/drivers/staging/otus/hal/hpmain.c
+++ b/drivers/staging/otus/hal/hpmain.c
@@ -328,8 +328,8 @@ void zfInitPhy(zdev_t* dev, u32_t frequency, u8_t bw40)
u16_t modesIndex = 0;
u16_t freqIndex = 0;
u32_t tmp, tmp1;
- zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ struct zsHpPriv* hpPriv;
+
u32_t eepromBoardData[15][6] = {
/* Register A-20 A-20/40 G-20/40 G-20 G-Turbo */
{0x9964, 0, 0, 0, 0, 0},
@@ -349,6 +349,9 @@ void zfInitPhy(zdev_t* dev, u32_t frequency, u8_t bw40)
{0xa258, 0, 0, 0, 0, 0},
};
+ zmw_get_wlan_dev(dev);
+ hpPriv=wd->hpPrivate;
+
/* #1 Save the initial value of the related RIFS register settings */
//((struct zsHpPriv*)wd->hpPrivate)->isInitialPhy++;
@@ -1324,9 +1327,10 @@ void zfHpSetFrequencyEx(zdev_t* dev, u32_t frequency, u8_t bw40,
int delta_slope_coeff_man;
int delta_slope_coeff_exp_shgi;
int delta_slope_coeff_man_shgi;
+ struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ hpPriv = wd->hpPrivate;
zm_msg1_scan(ZM_LV_1, "Frequency = ", frequency);
zm_msg1_scan(ZM_LV_1, "bw40 = ", bw40);
@@ -1560,9 +1564,10 @@ u16_t zfHpResetKeyCache(zdev_t* dev)
{
u8_t i;
u32_t key[4] = {0, 0, 0, 0};
+ struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
for(i=0;i<4;i++)
{
@@ -1601,9 +1606,10 @@ u32_t zfHpSetKey(zdev_t* dev, u8_t user, u8_t keyId, u8_t type,
u32_t cmd[(ZM_MAX_CMD_SIZE/4)];
u16_t ret;
u16_t i;
+ struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
#if 0 /* remove to zfCoreSetKey() */
zmw_declare_for_critical_section();
@@ -1670,8 +1676,10 @@ u32_t zfHpSetDefaultKey(zdev_t* dev, u8_t keyId, u8_t type, u32_t* key, u32_t* m
u16_t macAddr[3] = {0, 0, 0};
#ifdef ZM_ENABLE_IBSS_WPA2PSK
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ hpPriv = wd->hpPrivate;
if ( hpPriv->dot11Mode == ZM_HAL_80211_MODE_IBSS_WPA2PSK )
{ /* If not wpa2psk , use traditional */
@@ -1702,8 +1710,10 @@ u32_t zfHpSetDefaultKey(zdev_t* dev, u8_t keyId, u8_t type, u32_t* key, u32_t* m
u32_t zfHpSetPerUserKey(zdev_t* dev, u8_t user, u8_t keyId, u8_t* mac, u8_t type, u32_t* key, u32_t* micKey)
{
#ifdef ZM_ENABLE_IBSS_WPA2PSK
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ hpPriv = wd->hpPrivate;
if ( hpPriv->dot11Mode == ZM_HAL_80211_MODE_IBSS_WPA2PSK )
{ /* If not wpa2psk , use traditional */
@@ -1918,9 +1928,10 @@ u16_t zfHpSetSnifferMode(zdev_t* dev, u16_t on)
u16_t zfHpSetApStaMode(zdev_t* dev, u8_t mode)
{
- zmw_get_wlan_dev(dev);
+ struct zsHpPriv* hpPriv;
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ zmw_get_wlan_dev(dev);
+ hpPriv = wd->hpPrivate;
hpPriv->dot11Mode = mode;
switch(mode)
@@ -1993,8 +2004,10 @@ u16_t zfHpSetBssid(zdev_t* dev, u8_t* bssidSrc)
u8_t zfHpUpdateQosParameter(zdev_t* dev, u16_t* cwminTbl, u16_t* cwmaxTbl,
u16_t* aifsTbl, u16_t* txopTbl)
{
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ hpPriv = wd->hpPrivate;
zm_msg0_mm(ZM_LV_0, "zfHalUpdateQosParameter()");
@@ -2259,9 +2272,11 @@ u32_t zfHpCwmUpdate(zdev_t* dev)
//
//ret = zfIssueCmd(dev, cmd, 12, ZM_CWM_READ, 0);
//return ret;
- zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ struct zsHpPriv* hpPriv;
+
+ zmw_get_wlan_dev(dev);
+ hpPriv=wd->hpPrivate;
zfCoreCwmBusy(dev, zfCwmIsExtChanBusy(hpPriv->ctlBusy, hpPriv->extBusy));
@@ -2291,9 +2306,10 @@ u32_t zfHpAniUpdate(zdev_t* dev)
*/
u32_t zfHpAniUpdateRssi(zdev_t* dev, u8_t rssi)
{
- zmw_get_wlan_dev(dev);
+ struct zsHpPriv* hpPriv;
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ zmw_get_wlan_dev(dev);
+ hpPriv=wd->hpPrivate;
hpPriv->stats.ast_nodestats.ns_avgbrssi = rssi;
@@ -2325,11 +2341,12 @@ u32_t zfHpGetMacAddress(zdev_t* dev)
u32_t zfHpGetTransmitPower(zdev_t* dev)
{
- zmw_get_wlan_dev(dev);
-
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ struct zsHpPriv* hpPriv;
u16_t tpc = 0;
+ zmw_get_wlan_dev(dev);
+ hpPriv = wd->hpPrivate;
+
if (hpPriv->hwFrequency < 3000) {
tpc = hpPriv->tPow2x2g[0] & 0x3f;
wd->maxTxPower2 &= 0x3f;
@@ -2345,11 +2362,12 @@ u32_t zfHpGetTransmitPower(zdev_t* dev)
u8_t zfHpGetMinTxPower(zdev_t* dev)
{
- zmw_get_wlan_dev(dev);
-
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ struct zsHpPriv* hpPriv;
u8_t tpc = 0;
+ zmw_get_wlan_dev(dev);
+ hpPriv = wd->hpPrivate;
+
if (hpPriv->hwFrequency < 3000)
{
if(wd->BandWidth40)
@@ -2382,11 +2400,12 @@ u8_t zfHpGetMinTxPower(zdev_t* dev)
u8_t zfHpGetMaxTxPower(zdev_t* dev)
{
- zmw_get_wlan_dev(dev);
-
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ struct zsHpPriv* hpPriv;
u8_t tpc = 0;
+ zmw_get_wlan_dev(dev);
+ hpPriv = wd->hpPrivate;
+
if (hpPriv->hwFrequency < 3000)
{
tpc = (hpPriv->tPow2xCck[0]&0x3f);
@@ -2421,11 +2440,13 @@ u32_t zfHpLoadEEPROMFromFW(zdev_t* dev)
void zfHpHeartBeat(zdev_t* dev)
{
- zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ struct zsHpPriv* hpPriv;
u8_t polluted = 0;
u8_t ackTpc;
+ zmw_get_wlan_dev(dev);
+ hpPriv=wd->hpPrivate;
+
/* Workaround : Make OTUS fire more beacon in ad hoc mode in 2.4GHz */
if (hpPriv->ibssBcnEnabled != 0)
{
@@ -4219,8 +4240,10 @@ void zfHpPowerSaveSetMode(zdev_t* dev, u8_t staMode, u8_t psMode, u16_t bcnInter
void zfHpPowerSaveSetState(zdev_t* dev, u8_t psState)
{
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ hpPriv = wd->hpPrivate;
//DbgPrint("INTO zfHpPowerSaveSetState");
@@ -4279,8 +4302,10 @@ void zfHpPowerSaveSetState(zdev_t* dev, u8_t psState)
void zfHpSetAggPktNum(zdev_t* dev, u32_t num)
{
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ hpPriv = wd->hpPrivate;
num = (num << 16) | (0xa);
@@ -4310,8 +4335,10 @@ void zfHpSetMPDUDensity(zdev_t* dev, u8_t density)
void zfHpSetSlotTime(zdev_t* dev, u8_t type)
{
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv = wd->hpPrivate;
+ hpPriv = wd->hpPrivate;
if (type == 0)
{
@@ -4376,8 +4403,10 @@ void zfHpSetRifs(zdev_t* dev, u8_t ht_enable, u8_t ht2040, u8_t g_mode)
void zfHpBeginSiteSurvey(zdev_t* dev, u8_t status)
{
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
if ( status == 1 )
{ // Connected
@@ -4421,8 +4450,10 @@ void zfHpBeginSiteSurvey(zdev_t* dev, u8_t status)
void zfHpFinishSiteSurvey(zdev_t* dev, u8_t status)
{
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
zmw_declare_for_critical_section();
@@ -4527,16 +4558,20 @@ void zfHpSWEncrypt(zdev_t* dev, u8_t enable)
u32_t zfHpCapability(zdev_t* dev)
{
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
return hpPriv->halCapability;
}
void zfHpSetRollCallTable(zdev_t* dev)
{
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
if (hpPriv->camRollCallTable != (u64_t) 0)
{
diff --git a/drivers/staging/otus/hal/hpreg.c b/drivers/staging/otus/hal/hpreg.c
index 3cfeba8620f..d9894fe5f4e 100644
--- a/drivers/staging/otus/hal/hpreg.c
+++ b/drivers/staging/otus/hal/hpreg.c
@@ -1770,8 +1770,10 @@ void zfHpGetRegulationTable(zdev_t* dev, u16_t regionCode, u16_t c_lo, u16_t c_h
REG_DOMAIN rd5GHz, rd2GHz;
const struct cmode *cm;
s16_t next=0,b;
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
zmw_declare_for_critical_section();
@@ -2473,9 +2475,10 @@ u8_t zfHpGetRegulatoryDomain(zdev_t* dev)
void zfHpDisableDfsChannel(zdev_t* dev, u8_t disableFlag)
{
- zmw_get_wlan_dev(dev);
+ struct zsHpPriv* hpPriv;
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ zmw_get_wlan_dev(dev);
+ hpPriv=wd->hpPrivate;
hpPriv->disableDfsCh = disableFlag;
return;
}
diff --git a/drivers/staging/otus/hal/hprw.c b/drivers/staging/otus/hal/hprw.c
index db7d4957645..d9fad47d5d5 100644
--- a/drivers/staging/otus/hal/hprw.c
+++ b/drivers/staging/otus/hal/hprw.c
@@ -29,8 +29,10 @@ u16_t zfFlushDelayWrite(zdev_t* dev);
void zfInitCmdQueue(zdev_t* dev)
{
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv = (struct zsHpPriv*)(wd->hpPrivate);
+ hpPriv = (struct zsHpPriv*)(wd->hpPrivate);
zmw_declare_for_critical_section();
@@ -48,9 +50,10 @@ void zfInitCmdQueue(zdev_t* dev)
u16_t zfPutCmd(zdev_t* dev, u32_t* cmd, u16_t cmdLen, u16_t src, u8_t* buf)
{
u16_t i;
+ struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
/* Make sure command length < ZM_MAX_CMD_SIZE */
zm_assert(cmdLen <= ZM_MAX_CMD_SIZE);
@@ -77,9 +80,10 @@ u16_t zfPutCmd(zdev_t* dev, u32_t* cmd, u16_t cmdLen, u16_t src, u8_t* buf)
u16_t zfGetCmd(zdev_t* dev, u32_t* cmd, u16_t* cmdLen, u16_t* src, u8_t** buf)
{
u16_t i;
+ struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
if (hpPriv->cmdTail == hpPriv->cmdHead)
{
@@ -106,9 +110,10 @@ void zfSendCmdEx(zdev_t* dev)
u16_t ncmdLen = 0;
u16_t cmdFlag = 0;
u16_t i;
+ struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
zmw_declare_for_critical_section();
@@ -141,8 +146,10 @@ void zfSendCmdEx(zdev_t* dev)
void zfiSendCmdComp(zdev_t* dev)
{
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
zmw_declare_for_critical_section();
@@ -158,9 +165,10 @@ u16_t zfIssueCmd(zdev_t* dev, u32_t* cmd, u16_t cmdLen, u16_t src, u8_t* buf)
{
u16_t cmdFlag = 0;
u16_t ret;
+ struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
zmw_declare_for_critical_section();
@@ -214,9 +222,10 @@ void zfIdlRsp(zdev_t* dev, u32_t* rsp, u16_t rspLen)
u16_t i;
s32_t nf;
s32_t noisefloor[4];
+ struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
zmw_declare_for_critical_section();
@@ -826,9 +835,10 @@ u16_t zfDelayWriteInternalReg(zdev_t* dev, u32_t addr, u32_t val)
u32_t cmd[(ZM_MAX_CMD_SIZE/4)];
u16_t i;
u16_t ret;
+ struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
zmw_declare_for_critical_section();
@@ -892,8 +902,10 @@ u16_t zfFlushDelayWrite(zdev_t* dev)
u32_t cmd[(ZM_MAX_CMD_SIZE/4)];
u16_t i;
u16_t ret;
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
zmw_declare_for_critical_section();
diff --git a/drivers/staging/otus/hal/hpusb.c b/drivers/staging/otus/hal/hpusb.c
index 4b76de93fff..ee939005be7 100644
--- a/drivers/staging/otus/hal/hpusb.c
+++ b/drivers/staging/otus/hal/hpusb.c
@@ -64,9 +64,10 @@ void zfAdjustCtrlSetting(zdev_t* dev, u16_t* header, zbuf_t* buf)
u32_t oldPhyCtrl;
u16_t tpc = 0;
+ struct zsHpPriv* hpPriv;
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
/* mm */
if (header == NULL)
@@ -330,8 +331,10 @@ u16_t zfHpSend(zdev_t* dev, u16_t* header, u16_t headerLen,
u16_t i;
u16_t swlpOffset;
#endif /* #if ZM_SW_LOOP_BACK == 1 */
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
zm_msg1_tx(ZM_LV_1, "zfHpSend(), len = ", 12 + headerLen-8 + snapLen + zfwBufGetSize(dev, buf) + 4 + 8);
@@ -576,8 +579,10 @@ void zfiUsbRecv(zdev_t *dev, zbuf_t *buf)
u32_t rxMCS;
u32_t rxBW;
u32_t rxSG;
+ struct zsHpPriv* hpPriv;
+
zmw_get_wlan_dev(dev);
- struct zsHpPriv* hpPriv=wd->hpPrivate;
+ hpPriv=wd->hpPrivate;
//zm_msg0_rx(ZM_LV_0, "zfiUsbRecv()");