Skip to content

Commit

Permalink
Staging: otus: fix mixed declarations
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Randy Dunlap authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent d0fe191 commit 0009e12
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 77 deletions.
5 changes: 3 additions & 2 deletions drivers/staging/otus/80211core/cmmsta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand All @@ -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 )
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/otus/80211core/coid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 )
Expand Down
46 changes: 22 additions & 24 deletions drivers/staging/otus/hal/hpani.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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];
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 0009e12

Please sign in to comment.