diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-05 11:06:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-05 11:06:45 -0700 |
commit | 3516c6a8dc0b1153c611c4cf0dc4a51631f052bb (patch) | |
tree | c54a5fc916cbe73e43dee20902642f367f44a551 /drivers/staging/otus/hal/hpmain.c | |
parent | 714f83d5d9f7c785f622259dad1f4fad12d64664 (diff) | |
parent | ba0e1ebb7ea0616eebc29d2077355bacea62a9d8 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (714 commits)
Staging: sxg: slicoss: Specify the license for Sahara SXG and Slicoss drivers
Staging: serqt_usb: fix build due to proc tty changes
Staging: serqt_usb: fix checkpatch errors
Staging: serqt_usb: add TODO file
Staging: serqt_usb: Lindent the code
Staging: add USB serial Quatech driver
staging: document that the wifi staging drivers a bit better
Staging: echo cleanup
Staging: BUG to BUG_ON changes
Staging: remove some pointless conditionals before kfree_skb()
Staging: line6: fix build error, select SND_RAWMIDI
Staging: line6: fix checkpatch errors in variax.c
Staging: line6: fix checkpatch errors in toneport.c
Staging: line6: fix checkpatch errors in pcm.c
Staging: line6: fix checkpatch errors in midibuf.c
Staging: line6: fix checkpatch errors in midi.c
Staging: line6: fix checkpatch errors in dumprequest.c
Staging: line6: fix checkpatch errors in driver.c
Staging: line6: fix checkpatch errors in audio.c
Staging: line6: fix checkpatch errors in pod.c
...
Diffstat (limited to 'drivers/staging/otus/hal/hpmain.c')
-rw-r--r-- | drivers/staging/otus/hal/hpmain.c | 99 |
1 files changed, 67 insertions, 32 deletions
diff --git a/drivers/staging/otus/hal/hpmain.c b/drivers/staging/otus/hal/hpmain.c index dab27832693..322585be2c8 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) { |