Commit b4001982 authored by Vikram Dhillon's avatar Vikram Dhillon Committed by Greg Kroah-Hartman

Staging: Otus: Hal: hpani.c Fixed some style issues

Fixed some style issues in accordance with checkpatch.pl
Signed-by: default avatarVikram Dhillon <opensolarisdev@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 263974d9
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
#include "hpusb.h" #include "hpusb.h"
extern u16_t zfDelayWriteInternalReg(zdev_t* dev, u32_t addr, u32_t val); extern u16_t zfDelayWriteInternalReg(zdev_t *dev, u32_t addr, u32_t val);
extern u16_t zfFlushDelayWrite(zdev_t* dev); extern u16_t zfFlushDelayWrite(zdev_t *dev);
/* /*
* Anti noise immunity support. We track phy errors and react * Anti noise immunity support. We track phy errors and react
...@@ -52,13 +52,13 @@ extern u16_t zfFlushDelayWrite(zdev_t* dev); ...@@ -52,13 +52,13 @@ extern u16_t zfFlushDelayWrite(zdev_t* dev);
#define ZM_HAL_EP_RND(x, mul) \ #define ZM_HAL_EP_RND(x, mul) \
((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul)) ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul))
s32_t BEACON_RSSI(zdev_t* dev) s32_t BEACON_RSSI(zdev_t *dev)
{ {
s32_t rssi; s32_t rssi;
struct zsHpPriv *HpPriv; struct zsHpPriv *HpPriv;
zmw_get_wlan_dev(dev); zmw_get_wlan_dev(dev);
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); rssi = ZM_HAL_EP_RND(HpPriv->stats.ast_nodestats.ns_avgbrssi, ZM_HAL_RSSI_EP_MULTIPLIER);
...@@ -70,7 +70,7 @@ s32_t BEACON_RSSI(zdev_t* dev) ...@@ -70,7 +70,7 @@ s32_t BEACON_RSSI(zdev_t* dev)
* resets the channel statistics * resets the channel statistics
*/ */
void zfHpAniAttach(zdev_t* dev) void zfHpAniAttach(zdev_t *dev)
{ {
#define N(a) (sizeof(a) / sizeof(a[0])) #define N(a) (sizeof(a) / sizeof(a[0]))
u32_t i; u32_t i;
...@@ -82,10 +82,9 @@ void zfHpAniAttach(zdev_t* dev) ...@@ -82,10 +82,9 @@ void zfHpAniAttach(zdev_t* dev)
const int firpwr[] = { -78, -78, -78, -78, -80 }; const int firpwr[] = { -78, -78, -78, -78, -80 };
zmw_get_wlan_dev(dev); zmw_get_wlan_dev(dev);
HpPriv = (struct zsHpPriv*)wd->hpPrivate; HpPriv = (struct zsHpPriv *)wd->hpPrivate;
for (i = 0; i < 5; i++) for (i = 0; i < 5; i++) {
{
HpPriv->totalSizeDesired[i] = totalSizeDesired[i]; HpPriv->totalSizeDesired[i] = totalSizeDesired[i];
HpPriv->coarseHigh[i] = coarseHigh[i]; HpPriv->coarseHigh[i] = coarseHigh[i];
HpPriv->coarseLow[i] = coarseLow[i]; HpPriv->coarseLow[i] = coarseLow[i];
...@@ -96,8 +95,7 @@ void zfHpAniAttach(zdev_t* dev) ...@@ -96,8 +95,7 @@ void zfHpAniAttach(zdev_t* dev)
HpPriv->hasHwPhyCounters = 1; HpPriv->hasHwPhyCounters = 1;
memset((char *)&HpPriv->ani, 0, sizeof(HpPriv->ani)); memset((char *)&HpPriv->ani, 0, sizeof(HpPriv->ani));
for (i = 0; i < ARRAY_SIZE(HpPriv->ani); i++) for (i = 0; i < ARRAY_SIZE(HpPriv->ani); i++) {
{
/* New ANI stuff */ /* New ANI stuff */
HpPriv->ani[i].ofdmTrigHigh = ZM_HAL_ANI_OFDM_TRIG_HIGH; HpPriv->ani[i].ofdmTrigHigh = ZM_HAL_ANI_OFDM_TRIG_HIGH;
HpPriv->ani[i].ofdmTrigLow = ZM_HAL_ANI_OFDM_TRIG_LOW; HpPriv->ani[i].ofdmTrigLow = ZM_HAL_ANI_OFDM_TRIG_LOW;
...@@ -109,14 +107,12 @@ void zfHpAniAttach(zdev_t* dev) ...@@ -109,14 +107,12 @@ void zfHpAniAttach(zdev_t* dev)
HpPriv->ani[i].cckWeakSigThreshold = ZM_HAL_ANI_CCK_WEAK_SIG_THR; HpPriv->ani[i].cckWeakSigThreshold = ZM_HAL_ANI_CCK_WEAK_SIG_THR;
HpPriv->ani[i].spurImmunityLevel = ZM_HAL_ANI_SPUR_IMMUNE_LVL; HpPriv->ani[i].spurImmunityLevel = ZM_HAL_ANI_SPUR_IMMUNE_LVL;
HpPriv->ani[i].firstepLevel = ZM_HAL_ANI_FIRSTEP_LVL; HpPriv->ani[i].firstepLevel = ZM_HAL_ANI_FIRSTEP_LVL;
if (HpPriv->hasHwPhyCounters) if (HpPriv->hasHwPhyCounters) {
{
HpPriv->ani[i].ofdmPhyErrBase = 0;//AR_PHY_COUNTMAX - ZM_HAL_ANI_OFDM_TRIG_HIGH; HpPriv->ani[i].ofdmPhyErrBase = 0;//AR_PHY_COUNTMAX - ZM_HAL_ANI_OFDM_TRIG_HIGH;
HpPriv->ani[i].cckPhyErrBase = 0;//AR_PHY_COUNTMAX - ZM_HAL_ANI_CCK_TRIG_HIGH; HpPriv->ani[i].cckPhyErrBase = 0;//AR_PHY_COUNTMAX - ZM_HAL_ANI_CCK_TRIG_HIGH;
} }
} }
if (HpPriv->hasHwPhyCounters) if (HpPriv->hasHwPhyCounters) {
{
//zm_debug_msg2("Setting OfdmErrBase = 0x", HpPriv->ani[0].ofdmPhyErrBase); //zm_debug_msg2("Setting OfdmErrBase = 0x", HpPriv->ani[0].ofdmPhyErrBase);
//zm_debug_msg2("Setting cckErrBase = 0x", HpPriv->ani[0].cckPhyErrBase); //zm_debug_msg2("Setting cckErrBase = 0x", HpPriv->ani[0].cckPhyErrBase);
//OS_REG_WRITE(ah, AR_PHY_ERR_1, HpPriv->ani[0].ofdmPhyErrBase); //OS_REG_WRITE(ah, AR_PHY_ERR_1, HpPriv->ani[0].ofdmPhyErrBase);
...@@ -135,7 +131,7 @@ void zfHpAniAttach(zdev_t* dev) ...@@ -135,7 +131,7 @@ void zfHpAniAttach(zdev_t* dev)
/* /*
* Control Adaptive Noise Immunity Parameters * Control Adaptive Noise Immunity Parameters
*/ */
u8_t zfHpAniControl(zdev_t* dev, ZM_HAL_ANI_CMD cmd, int param) u8_t zfHpAniControl(zdev_t *dev, ZM_HAL_ANI_CMD cmd, int param)
{ {
#define N(a) (sizeof(a)/sizeof(a[0])) #define N(a) (sizeof(a)/sizeof(a[0]))
typedef s32_t TABLE[]; typedef s32_t TABLE[];
...@@ -143,7 +139,7 @@ u8_t zfHpAniControl(zdev_t* dev, ZM_HAL_ANI_CMD cmd, int param) ...@@ -143,7 +139,7 @@ u8_t zfHpAniControl(zdev_t* dev, ZM_HAL_ANI_CMD cmd, int param)
struct zsAniState *aniState; struct zsAniState *aniState;
zmw_get_wlan_dev(dev); zmw_get_wlan_dev(dev);
HpPriv = (struct zsHpPriv*)wd->hpPrivate; HpPriv = (struct zsHpPriv *)wd->hpPrivate;
aniState = HpPriv->curani; aniState = HpPriv->curani;
switch (cmd) switch (cmd)
...@@ -152,8 +148,7 @@ u8_t zfHpAniControl(zdev_t* dev, ZM_HAL_ANI_CMD cmd, int param) ...@@ -152,8 +148,7 @@ u8_t zfHpAniControl(zdev_t* dev, ZM_HAL_ANI_CMD cmd, int param)
{ {
u32_t level = param; u32_t level = param;
if (level >= N(HpPriv->totalSizeDesired)) if (level >= N(HpPriv->totalSizeDesired)) {
{
zm_debug_msg1("level out of range, desired level : ", level); zm_debug_msg1("level out of range, desired level : ", level);
zm_debug_msg1("max level : ", N(HpPriv->totalSizeDesired)); zm_debug_msg1("max level : ", N(HpPriv->totalSizeDesired));
return FALSE; return FALSE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment