* [patch 0/6] otus: build fixes
@ 2010-01-08 7:57 horms
2010-01-08 7:57 ` [patch 1/6] otus: dont mix declarations and code horms
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: horms @ 2010-01-08 7:57 UTC (permalink / raw)
To: devel, linux-kernel; +Cc: Greg Kroah-Hartman, Peter Huewe
Hi,
here are some minor build fixes for the staging/otus driver.
^ permalink raw reply [flat|nested] 11+ messages in thread* [patch 1/6] otus: dont mix declarations and code 2010-01-08 7:57 [patch 0/6] otus: build fixes horms @ 2010-01-08 7:57 ` horms 2010-01-08 7:57 ` [patch 2/6] otus: remove unused variables horms ` (4 subsequent siblings) 5 siblings, 0 replies; 11+ messages in thread From: horms @ 2010-01-08 7:57 UTC (permalink / raw) To: devel, linux-kernel; +Cc: Greg Kroah-Hartman, Peter Huewe [-- Attachment #1: otus-c99.patch --] [-- Type: text/plain, Size: 1595 bytes --] $ gcc (Debian 4.4.2-8) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/otus/ioctl.c: In function 'usbdrv_wpa_ioctl': drivers/staging/otus/ioctl.c:2253: warning: ISO C90 forbids mixed declarations and code ... Signed-off-by: Simon Horman <horms@verge.net.au> Index: linux-2.6/drivers/staging/otus/ioctl.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/ioctl.c 2010-01-08 16:52:19.000000000 +1100 +++ linux-2.6/drivers/staging/otus/ioctl.c 2010-01-08 17:07:55.000000000 +1100 @@ -2227,7 +2227,8 @@ int usbdrv_wpa_ioctl(struct net_device * case ZD_CMD_SCAN_REQ: printk(KERN_ERR "usbdrv_wpa_ioctl: ZD_CMD_SCAN_REQ\n"); break; - case ZD_CMD_SET_GENERIC_ELEMENT: + case ZD_CMD_SET_GENERIC_ELEMENT: { + u8_t len, *wpaie; printk(KERN_ERR "usbdrv_wpa_ioctl:" " ZD_CMD_SET_GENERIC_ELEMENT\n"); @@ -2250,8 +2251,8 @@ int usbdrv_wpa_ioctl(struct net_device * /* zfiWlanSetWpaIe(dev, zdparm->u.generic_elem.data, * zdparm->u.generic_elem.len); */ - u8_t len = zdparm->u.generic_elem.len; - u8_t *wpaie = (u8_t *)zdparm->u.generic_elem.data; + len = zdparm->u.generic_elem.len; + wpaie = zdparm->u.generic_elem.data; printk(KERN_ERR "wd->ap.wpaLen : % d\n", len); @@ -2273,6 +2274,7 @@ int usbdrv_wpa_ioctl(struct net_device * * #endif */ break; + } /* #ifdef ZM_HOSTAPD_SUPPORT */ case ZD_CMD_GET_TSC: ^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch 2/6] otus: remove unused variables 2010-01-08 7:57 [patch 0/6] otus: build fixes horms 2010-01-08 7:57 ` [patch 1/6] otus: dont mix declarations and code horms @ 2010-01-08 7:57 ` horms 2010-01-08 7:57 ` [patch 3/6] otus: remove unused constants horms ` (3 subsequent siblings) 5 siblings, 0 replies; 11+ messages in thread From: horms @ 2010-01-08 7:57 UTC (permalink / raw) To: devel, linux-kernel; +Cc: Greg Kroah-Hartman, Peter Huewe [-- Attachment #1: otus-unused-variables.patch --] [-- Type: text/plain, Size: 7957 bytes --] Signed-off-by: Simon Horman <horms@verge.net.au> Index: linux-2.6/drivers/staging/otus/hal/hprw.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/hal/hprw.c 2010-01-08 16:16:40.000000000 +1100 +++ linux-2.6/drivers/staging/otus/hal/hprw.c 2010-01-08 16:17:51.000000000 +1100 @@ -282,7 +282,6 @@ void zfIdlRsp(zdev_t* dev, u32_t* rsp, u else if (src == ZM_OID_FLASH_READ) { u32_t datalen; - u16_t i; datalen = (rsp[0] & 255); Index: linux-2.6/drivers/staging/otus/80211core/cagg.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/cagg.c 2010-01-08 16:16:40.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/cagg.c 2010-01-08 16:17:51.000000000 +1100 @@ -1832,8 +1832,7 @@ u16_t zfAggRxClear(zdev_t* dev, u32_t ti struct agg_tid_rx* zfAggRxEnabled(zdev_t* dev, zbuf_t* buf) { - u16_t dst0, src[3], ac, aid, fragOff; - u8_t up; + u16_t dst0, src[3], aid; u16_t offset = 0; u16_t seq_no; u16_t frameType; Index: linux-2.6/drivers/staging/otus/80211core/ledmgr.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/ledmgr.c 2010-01-08 16:16:40.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/ledmgr.c 2010-01-08 16:17:51.000000000 +1100 @@ -187,7 +187,6 @@ void zfLedCtrlType2_scan(zdev_t* dev); void zfLedCtrlType2(zdev_t* dev) { - u32_t ton, toff, tmp, period; u16_t OperateLED; zmw_get_wlan_dev(dev); Index: linux-2.6/drivers/staging/otus/80211core/cmm.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/cmm.c 2010-01-08 16:19:35.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/cmm.c 2010-01-08 16:19:51.000000000 +1100 @@ -346,8 +346,6 @@ u16_t zfFindSuperGElement(zdev_t* dev, z u8_t super_feature; u8_t ouiSuperG[6] = {0x00,0x03,0x7f,0x01, 0x01, 0x00}; - zmw_get_wlan_dev(dev); - /* Get offset of first element */ subType = (zmw_rx_buf_readb(dev, buf, 0) >> 4); if ((offset = zgElementOffsetTable[subType]) == 0xff) @@ -411,8 +409,6 @@ u16_t zfFindXRElement(zdev_t* dev, zbuf_ u8_t id; u8_t ouixr[6] = {0x00,0x03,0x7f,0x03, 0x01, 0x00}; - zmw_get_wlan_dev(dev); - /* Get offset of first element */ subType = (zmw_rx_buf_readb(dev, buf, 0) >> 4); if ((offset = zgElementOffsetTable[subType]) == 0xff) Index: linux-2.6/drivers/staging/otus/80211core/cmmsta.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/cmmsta.c 2010-01-08 16:20:01.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/cmmsta.c 2010-01-08 16:28:16.000000000 +1100 @@ -4848,8 +4848,6 @@ u16_t zfStaAddIePowerCap(zdev_t* dev, zb u8_t MaxTxPower; u8_t MinTxPower; - zmw_get_wlan_dev(dev); - /* Element ID */ zmw_tx_buf_writeb(dev, buf, offset++, ZM_WLAN_EID_POWER_CAPABILITY); @@ -5276,7 +5274,6 @@ u16_t zfStaRxValidateFrame(zdev_t* dev, u8_t da0; //u16_t sa[3]; u16_t ret; - u16_t i; //u8_t sa0; zmw_get_wlan_dev(dev); @@ -5738,8 +5735,6 @@ u16_t zfComputeBssInfoWeightValue(zdev_t u8_t weightOfN40BelowThr = 16; u8_t weightOfN40UpThr = 32; - zmw_get_wlan_dev(dev); - if( isBMode == 0 ) return (signalStrength + weightOfB); // pure b mode , do not add the weight value for this AP ! else Index: linux-2.6/drivers/staging/otus/80211core/ctxrx.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/ctxrx.c 2010-01-08 16:18:23.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/ctxrx.c 2010-01-08 16:26:59.000000000 +1100 @@ -882,7 +882,6 @@ zlError: /************************************************************************/ u16_t zfTxSendEth(zdev_t* dev, zbuf_t* buf, u16_t port, u16_t bufType, u16_t flag) { - u16_t err; //u16_t addrTblSize; //struct zsAddrTbl addrTbl; u16_t removeLen; @@ -904,7 +903,6 @@ u16_t zfTxSendEth(zdev_t* dev, zbuf_t* b u8_t qosType, keyIdx = 0; u16_t fragOff; u16_t newFlag; - struct zsMicVar* pMicKey; u8_t tkipFrameOffset = 0; zmw_get_wlan_dev(dev); @@ -1692,8 +1690,6 @@ void zfShowTxEAPOL(zdev_t* dev, zbuf_t* u16_t packetLen, keyInfo, keyLen, keyDataLen, length, Op_Code; u32_t replayCounterH, replayCounterL, vendorId, VendorType; - zmw_get_wlan_dev(dev); - zm_debug_msg1("EAPOL Packet size = ", zfwBufGetSize(dev, buf)); /* EAPOL packet type */ @@ -2436,7 +2432,6 @@ void zfiRecv80211(zdev_t* dev, zbuf_t* b u16_t IvOffset; u8_t keyLen = 5; u8_t iv[3]; - u8_t *wepKey; u8_t keyIdx; IvOffset = offset + ZM_SIZE_OF_WLAN_DATA_HEADER; Index: linux-2.6/drivers/staging/otus/hal/hpmain.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/hal/hpmain.c 2010-01-08 16:16:09.000000000 +1100 +++ linux-2.6/drivers/staging/otus/hal/hpmain.c 2010-01-08 16:17:55.000000000 +1100 @@ -1316,7 +1316,6 @@ void zfHpSetFrequencyEx(zdev_t* dev, u32 u8_t extOffset, u8_t initRF) { u32_t cmd[9]; - u32_t cmdB[3]; u16_t ret; u8_t old_band; u8_t new_band; @@ -3434,7 +3433,6 @@ void zfSetPowerCalTable(zdev_t* dev, u32 /* Write PHY regs 672-703 */ for (i=0; i<128; i+=4) { - u32_t regAddr = 0x9800 + (672 * 4); u32_t val; val = ((u32_t)vpd_chain1[i+3]<<24) | @@ -3485,7 +3483,6 @@ void zfSetPowerCalTable(zdev_t* dev, u32 /* Write PHY regs 672-703 + 0x1000 */ for (i=0; i<128; i+=4) { - u32_t regAddr = 0x9800 + (672 * 4) + 0x1000; u32_t val; val = ((u32_t)vpd_chain3[i+3]<<24) | @@ -4584,7 +4581,6 @@ void zfHpSetRollCallTable(zdev_t* dev) void zfHpSetTTSIFSTime(zdev_t* dev, u8_t sifs_time) { u32_t reg_value = 0; - zmw_get_wlan_dev(dev); sifs_time &= 0x3f; reg_value = 0x14400b | (((u32_t)sifs_time)<<24); Index: linux-2.6/drivers/staging/otus/80211core/cfunc.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/cfunc.c 2010-01-08 16:21:00.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/cfunc.c 2010-01-08 16:21:06.000000000 +1100 @@ -1194,8 +1194,6 @@ u16_t zfFindMinimumUtilizationChannelInd u8_t i; u16_t tempMinIndex, tempMinValue; - zmw_get_wlan_dev(dev); - i = 1; tempMinIndex = 0; tempMinValue = array[tempMinIndex]; Index: linux-2.6/drivers/staging/otus/80211core/cpsmgr.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/cpsmgr.c 2010-01-08 16:28:42.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/cpsmgr.c 2010-01-08 16:28:59.000000000 +1100 @@ -381,8 +381,6 @@ static void zfPowerSavingMgrSleepIfIdle( static void zfPowerSavingMgrDisconnectMain(zdev_t* dev) { - zmw_get_wlan_dev(dev); - #ifdef ZM_ENABLE_DISCONNECT_PS switch(wd->sta.psMgr.state) { Index: linux-2.6/drivers/staging/otus/80211core/cscanmgr.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/cscanmgr.c 2010-01-08 16:29:15.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/cscanmgr.c 2010-01-08 16:29:23.000000000 +1100 @@ -289,8 +289,6 @@ static void zfScanMgrEventSetFreqComplet static void zfScanMgrEventScanCompleteCb(zdev_t* dev) { - zmw_get_wlan_dev(dev); - if ((zfStaIsConnected(dev)) && (!zfPowerSavingMgrIsSleeping(dev))) { zfSendNullData(dev, 0); ^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch 3/6] otus: remove unused constants 2010-01-08 7:57 [patch 0/6] otus: build fixes horms 2010-01-08 7:57 ` [patch 1/6] otus: dont mix declarations and code horms 2010-01-08 7:57 ` [patch 2/6] otus: remove unused variables horms @ 2010-01-08 7:57 ` horms 2010-01-08 7:57 ` [patch 4/6] otus: Fix ZM_SEQ_DEBUG macro for no-debug case horms ` (2 subsequent siblings) 5 siblings, 0 replies; 11+ messages in thread From: horms @ 2010-01-08 7:57 UTC (permalink / raw) To: devel, linux-kernel; +Cc: Greg Kroah-Hartman, Peter Huewe [-- Attachment #1: otus-unused-function.patch --] [-- Type: text/plain, Size: 8049 bytes --] Signed-off-by: Simon Horman <horms@verge.net.au> Index: linux-2.6/drivers/staging/otus/hal/hpreg.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/hal/hpreg.c 2010-01-08 16:30:16.000000000 +1100 +++ linux-2.6/drivers/staging/otus/hal/hpreg.c 2010-01-08 16:33:30.000000000 +1100 @@ -786,45 +786,6 @@ enum { WT1_5760_5800, }; -static REG_DMN_FREQ_BAND regDmn5GhzTurboFreq[] = { - { 5130, 5210, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5130_5210 */ - { 5250, 5330, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5250_5330 */ - { 5370, 5490, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5370_5490 */ - { 5530, 5650, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5530_5650 */ - - { 5150, 5190, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5150_5190 */ - { 5230, 5310, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5230_5310 */ - { 5350, 5470, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5350_5470 */ - { 5510, 5670, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5510_5670 */ - - { 5200, 5240, 17, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5200_5240 */ - { 5200, 5240, 23, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T2_5200_5240 */ - { 5210, 5210, 17, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5210_5210 */ - { 5210, 5210, 23, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T2_5210_5210 */ - - { 5280, 5280, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5280_5280 */ - { 5280, 5280, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T2_5280_5280 */ - { 5250, 5250, 17, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5250_5250 */ - { 5290, 5290, 20, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5290_5290 */ - { 5250, 5290, 20, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5250_5290 */ - { 5250, 5290, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T2_5250_5290 */ - - { 5540, 5660, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5540_5660 */ - { 5760, 5800, 20, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5760_5800 */ - { 5760, 5800, 30, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T2_5760_5800 */ - - { 5765, 5805, 30, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5765_5805 */ - - /* - * Below are the WWR frequencies - */ - - { 5210, 5250, 15, 0, 40, 40, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, 0, 0}, /* WT1_5210_5250 */ - { 5290, 5290, 18, 0, 40, 40, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, 0, 0}, /* WT1_5290_5290 */ - { 5540, 5660, 20, 0, 40, 40, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, 0, 0}, /* WT1_5540_5660 */ - { 5760, 5800, 20, 0, 40, 40, NO_DFS, PSCAN_WWR, 0, 0}, /* WT1_5760_5800 */ -}; - /* * 2GHz 11b channel tags */ @@ -864,45 +825,6 @@ enum { W2_2484_2484, }; -static REG_DMN_FREQ_BAND regDmn2GhzFreq[] = { - { 2312, 2372, 5, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2312_2372 */ - { 2312, 2372, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F2_2312_2372 */ - - { 2412, 2472, 5, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2412_2472 */ - { 2412, 2472, 20, 0, 20, 5, NO_DFS, PSCAN_MKKA, 0, 0}, /* F2_2412_2472 */ - { 2412, 2472, 30, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F3_2412_2472 */ - - { 2412, 2462, 27, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2412_2462 */ - { 2412, 2462, 20, 0, 20, 5, NO_DFS, PSCAN_MKKA, 0, 0}, /* F2_2412_2462 */ - { 2432, 2442, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2432_2442 */ - - { 2457, 2472, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2457_2472 */ - - { 2467, 2472, 20, 0, 20, 5, NO_DFS, PSCAN_MKKA2 | PSCAN_MKKA, 0, 0}, /* F1_2467_2472 */ - - { 2484, 2484, 5, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2484_2484 */ - { 2484, 2484, 20, 0, 20, 5, NO_DFS, PSCAN_MKKA | PSCAN_MKKA1 | PSCAN_MKKA2, 0, 0}, /* F2_2484_2484 */ - - { 2512, 2732, 5, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2512_2732 */ - - /* - * WWR have powers opened up to 20dBm. Limits should often come from CTL/Max powers - */ - - { 2312, 2372, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2312_2372 */ - { 2412, 2412, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2412_2412 */ - { 2417, 2432, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2417_2432 */ - { 2437, 2442, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2437_2442 */ - { 2447, 2457, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2447_2457 */ - { 2462, 2462, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2462_2462 */ - { 2467, 2467, 20, 0, 20, 5, NO_DFS, PSCAN_WWR | IS_ECM_CHAN, 0, 0}, /* W1_2467_2467 */ - { 2467, 2467, 20, 0, 20, 5, NO_DFS, NO_PSCAN | IS_ECM_CHAN, 0, 0}, /* W2_2467_2467 */ - { 2472, 2472, 20, 0, 20, 5, NO_DFS, PSCAN_WWR | IS_ECM_CHAN, 0, 0}, /* W1_2472_2472 */ - { 2472, 2472, 20, 0, 20, 5, NO_DFS, NO_PSCAN | IS_ECM_CHAN, 0, 0}, /* W2_2472_2472 */ - { 2484, 2484, 20, 0, 20, 5, NO_DFS, PSCAN_WWR | IS_ECM_CHAN, 0, 0}, /* W1_2484_2484 */ - { 2484, 2484, 20, 0, 20, 5, NO_DFS, NO_PSCAN | IS_ECM_CHAN, 0, 0}, /* W2_2484_2484 */ -}; - /* * 2GHz 11g channel tags @@ -984,16 +906,6 @@ enum { T1_2512_2732 }; -static REG_DMN_FREQ_BAND regDmn2Ghz11gTurboFreq[] = { - { 2312, 2372, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_2312_2372 */ - { 2437, 2437, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_2437_2437 */ - { 2437, 2437, 20, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T2_2437_2437 */ - { 2437, 2437, 18, 6, 40, 40, NO_DFS, PSCAN_WWR, 0, 0}, /* T3_2437_2437 */ - { 2512, 2732, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_2512_2732 */ -}; - - - /* * 2GHz 11n frequency tags */ @@ -1005,15 +917,6 @@ enum { NG_DEMO_ALL_CHANNELS, }; -static REG_DMN_FREQ_BAND regDmn2Ghz11ngFreq[] = { - { 2422, 2452, 20, 0, 40, 5, NO_DFS, NO_PSCAN, 0, 0}, /* NG1_2422_2452 */ - { 2422, 2452, 27, 0, 40, 5, NO_DFS, NO_PSCAN, 0, 0}, /* NG2_2422_2452 */ - { 2422, 2452, 30, 0, 40, 5, NO_DFS, NO_PSCAN, 0, 0}, /* NG3_2422_2452 */ - - { 2312, 2732, 27, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* NG_DEMO_ALL_CHANNELS */ -}; - - /* * 5GHz 11n frequency tags */ @@ -1050,42 +953,6 @@ enum { NA_DEMO_ALL_CHANNELS, }; -static REG_DMN_FREQ_BAND regDmn5Ghz11naFreq[] = { - /* - * ToDo: This table needs to be completely populated with 5GHz 11n properties - */ - { 5190, 5230, 15, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA1_5190_5230 */ - { 5190, 5230, 17, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA2_5190_5230 */ - { 5190, 5230, 18, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA3_5190_5230 */ - { 5190, 5230, 20, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA4_5190_5230 */ - { 5190, 5230, 23, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA5_5190_5230 */ - - { 5270, 5270, 23, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA1_5270_5270 */ - - { 5270, 5310, 18, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA1_5270_5310 */ - { 5270, 5310, 20, 0, 40, 40, DFS_FCC3|DFS_ETSI|DFS_MKK4, NO_PSCAN, 0, 1}, /* NA2_5270_5310 */ - { 5270, 5310, 23, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA3_5270_5310 */ - { 5270, 5310, 30, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA4_5270_5310 */ - - { 5310, 5310, 17, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA1_5310_5310 */ - - { 5510, 5630, 30, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA1_5510_5630 */ - - { 5510, 5670, 20, 6, 40, 40, DFS_FCC3|DFS_ETSI|DFS_MKK4, NO_PSCAN, 0, 1}, /* NA1_5510_5670 */ - { 5510, 5670, 27, 0, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA2_5510_5670 */ - { 5510, 5670, 30, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 1}, /* NA3_5510_5670 */ - - { 5755, 5795, 17, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA1_5755_5795 */ - { 5755, 5795, 20, 6, 40, 40, DFS_ETSI, NO_PSCAN, 0, 0}, /* NA2_5755_5795 */ - { 5755, 5795, 23, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA3_5755_5795 */ - { 5755, 5795, 30, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA4_5755_5795 */ - { 5755, 5795, 30, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA5_5755_5795 */ - - { 5795, 5795, 30, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA1_5795_5795 */ - - { 4920, 6100, 30, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA_DEMO_ALL_CHANNELS */ -}; - typedef struct regDomain { u16_t regDmnEnum; /* value from EnumRd table */ u8_t conformanceTestLimit; ^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch 4/6] otus: Fix ZM_SEQ_DEBUG macro for no-debug case 2010-01-08 7:57 [patch 0/6] otus: build fixes horms ` (2 preceding siblings ...) 2010-01-08 7:57 ` [patch 3/6] otus: remove unused constants horms @ 2010-01-08 7:57 ` horms 2010-01-08 7:57 ` [patch 5/6] otus: zfTkipInit(): increment pointer horms 2010-01-08 7:57 ` [patch 6/6] otus: zfRateCtrlRateDiff(): remove duplicate comparison horms 5 siblings, 0 replies; 11+ messages in thread From: horms @ 2010-01-08 7:57 UTC (permalink / raw) To: devel, linux-kernel; +Cc: Greg Kroah-Hartman, Peter Huewe [-- Attachment #1: otus-no-effect.patch --] [-- Type: text/plain, Size: 3150 bytes --] tcp_seq is only initialised in case where ZM_ENABLE_PERFORMANCE_EVALUATION is defined. So move the call to ZM_SEQ_DEBUG() and the decleration of tcp_seq in there too. This allows ZM_SEQ_DEBUG() to be removed from the non-ZM_ENABLE_PERFORMANCE_EVALUATION case in the header file. This resolves several compile warnings for the non-ZM_ENABLE_PERFORMANCE_EVALUATION case. However, the ZM_ENABLE_PERFORMANCE_EVALUATION case seems to be completely broken. $ gcc (Debian 4.4.2-8) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/otus/80211core/cagg.c: In function 'zfAggRxEnabled': drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of comma expression has no effect drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of comma expression has no effect drivers/staging/otus/80211core/cagg.c:1872: warning: statement with no effect ... Signed-off-by: Simon Horman <horms@verge.net.au> Index: linux-2.6/drivers/staging/otus/80211core/pub_zfi.h =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/pub_zfi.h 2010-01-08 17:36:50.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/pub_zfi.h 2010-01-08 17:39:03.000000000 +1100 @@ -814,7 +814,6 @@ extern void zfiRxPerformanceReg(zdev_t* #define ZM_PERFORMANCE_RX_AMSDU(dev, buf, len) #define ZM_PERFORMANCE_RX_FLUSH(dev) #define ZM_PERFORMANCE_RX_CLEAR(dev) -#define ZM_SEQ_DEBUG #define ZM_PERFORMANCE_RX_REORDER(dev) #endif /***** End of section 3 *****/ Index: linux-2.6/drivers/staging/otus/80211core/cagg.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/cagg.c 2010-01-08 17:38:36.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/cagg.c 2010-01-08 17:38:46.000000000 +1100 @@ -1838,7 +1838,6 @@ struct agg_tid_rx* zfAggRxEnabled(zdev_t u16_t frameType; u16_t frameCtrl; u16_t frameSubtype; - u32_t tcp_seq; //struct aggSta *agg_sta; #if ZM_AGG_FPGA_REORDERING struct agg_tid_rx *tid_rx; @@ -1863,13 +1862,17 @@ struct agg_tid_rx* zfAggRxEnabled(zdev_t return NULL; } #ifdef ZM_ENABLE_PERFORMANCE_EVALUATION - tcp_seq = zmw_rx_buf_readb(dev, buf, 22+36) << 24; - tcp_seq += zmw_rx_buf_readb(dev, buf, 22+37) << 16; - tcp_seq += zmw_rx_buf_readb(dev, buf, 22+38) << 8; - tcp_seq += zmw_rx_buf_readb(dev, buf, 22+39); + { + u32_t tcp_seq; + + tcp_seq = zmw_rx_buf_readb(dev, buf, 22+36) << 24; + tcp_seq += zmw_rx_buf_readb(dev, buf, 22+37) << 16; + tcp_seq += zmw_rx_buf_readb(dev, buf, 22+38) << 8; + tcp_seq += zmw_rx_buf_readb(dev, buf, 22+39); + ZM_SEQ_DEBUG("In %5d, %12u\n", seq_no, tcp_seq); + } #endif - ZM_SEQ_DEBUG("In %5d, %12u\n", seq_no, tcp_seq); dst0 = zmw_rx_buf_readh(dev, buf, offset+4); src[0] = zmw_rx_buf_readh(dev, buf, offset+10); ^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch 5/6] otus: zfTkipInit(): increment pointer 2010-01-08 7:57 [patch 0/6] otus: build fixes horms ` (3 preceding siblings ...) 2010-01-08 7:57 ` [patch 4/6] otus: Fix ZM_SEQ_DEBUG macro for no-debug case horms @ 2010-01-08 7:57 ` horms 2010-01-09 8:44 ` [patch] otus: zfTkipInit(): increment another pointer Dan Carpenter 2010-01-08 7:57 ` [patch 6/6] otus: zfRateCtrlRateDiff(): remove duplicate comparison horms 5 siblings, 1 reply; 11+ messages in thread From: horms @ 2010-01-08 7:57 UTC (permalink / raw) To: devel, linux-kernel; +Cc: Greg Kroah-Hartman, Peter Huewe [-- Attachment #1: otus-unused-value.patch --] [-- Type: text/plain, Size: 1101 bytes --] Increment the pointer rather than its value. This appears to be a logic error. $ gcc (Debian 4.4.2-8) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/otus/80211core/ctkip.c: In function 'zfTkipInit': drivers/staging/otus/80211core/ctkip.c:267: warning: value computed is not used ... Signed-off-by: Simon Horman <horms@verge.net.au> Index: linux-2.6/drivers/staging/otus/80211core/ctkip.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/ctkip.c 2010-01-08 17:08:37.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/ctkip.c 2010-01-08 17:09:40.000000000 +1100 @@ -264,7 +264,7 @@ void zfTkipInit(u8_t* key, u8_t* ta, str for(i=0; i<4; i++) // initiv is little endian { iv32 += *initIv<<(i*8); - *initIv++; + initIv++; } pSeed->iv32 = iv32+1; // Force Recalculating on Tkip Phase1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch] otus: zfTkipInit(): increment another pointer 2010-01-08 7:57 ` [patch 5/6] otus: zfTkipInit(): increment pointer horms @ 2010-01-09 8:44 ` Dan Carpenter 2010-01-12 0:50 ` [patch] tch 5/6 v2] " Simon Horman 0 siblings, 1 reply; 11+ messages in thread From: Dan Carpenter @ 2010-01-09 8:44 UTC (permalink / raw) To: horms; +Cc: devel, linux-kernel, Greg Kroah-Hartman, Peter Huewe This applies on top of Simon Horman's patch set, particularly [patch 5/6]. Feel free to roll them into one and change the sign-off to yourself. There was another pointer that needed to be incremented. Now all six of the bytes are used. Signed-off-by: Dan Carpenter <error27@gmail.com> --- orig/drivers/staging/otus/80211core/ctkip.c 2010-01-09 00:46:14.000000000 +0300 +++ devel/drivers/staging/otus/80211core/ctkip.c 2010-01-09 00:48:39.000000000 +0300 @@ -255,7 +255,8 @@ void zfTkipInit(u8_t* key, u8_t* ta, str zfMemoryCopy(pSeed->ta, ta, 6); zfMemoryCopy(pSeed->tk, key, 16); - iv16 = *initIv++; + iv16 = *initIv; + initIv++; iv16 += *initIv<<8; initIv++; ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] tch 5/6 v2] otus: zfTkipInit(): increment another pointer 2010-01-09 8:44 ` [patch] otus: zfTkipInit(): increment another pointer Dan Carpenter @ 2010-01-12 0:50 ` Simon Horman 0 siblings, 0 replies; 11+ messages in thread From: Simon Horman @ 2010-01-12 0:50 UTC (permalink / raw) To: Dan Carpenter, devel, linux-kernel, Greg Kroah-Hartman, Peter Huewe Increment the pointer rather than its value. These appear to be logic errors. Thanks to Dan Carpenter for the first hunk of this change. Cc: Dan Carpenter <error27@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au> Index: linux-2.6/drivers/staging/otus/80211core/ctkip.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/ctkip.c 2010-01-12 11:45:55.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/ctkip.c 2010-01-12 11:46:28.000000000 +1100 @@ -255,7 +255,8 @@ void zfTkipInit(u8_t* key, u8_t* ta, str zfMemoryCopy(pSeed->ta, ta, 6); zfMemoryCopy(pSeed->tk, key, 16); - iv16 = *initIv++; + iv16 = *initIv; + initIv++; iv16 += *initIv<<8; initIv++; @@ -264,7 +265,7 @@ void zfTkipInit(u8_t* key, u8_t* ta, str for(i=0; i<4; i++) // initiv is little endian { iv32 += *initIv<<(i*8); - *initIv++; + initIv++; } pSeed->iv32 = iv32+1; // Force Recalculating on Tkip Phase1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch 6/6] otus: zfRateCtrlRateDiff(): remove duplicate comparison 2010-01-08 7:57 [patch 0/6] otus: build fixes horms ` (4 preceding siblings ...) 2010-01-08 7:57 ` [patch 5/6] otus: zfTkipInit(): increment pointer horms @ 2010-01-08 7:57 ` horms 2010-01-09 8:44 ` Dan Carpenter 5 siblings, 1 reply; 11+ messages in thread From: horms @ 2010-01-08 7:57 UTC (permalink / raw) To: devel, linux-kernel; +Cc: Greg Kroah-Hartman, Peter Huewe [-- Attachment #1: otus-no-duplicate-compre.patch --] [-- Type: text/plain, Size: 1152 bytes --] I think this is correct. $ gcc (Debian 4.4.2-8) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/otus/80211core/ratectrl.c: In function 'zfRateCtrlRateDiff': drivers/staging/otus/80211core/ratectrl.c:433: warning: suggest parentheses around comparison in operand of '==' ... Signed-off-by: Simon Horman <horms@verge.net.au> Index: linux-2.6/drivers/staging/otus/80211core/ratectrl.c =================================================================== --- linux-2.6.orig/drivers/staging/otus/80211core/ratectrl.c 2010-01-08 17:13:44.000000000 +1100 +++ linux-2.6/drivers/staging/otus/80211core/ratectrl.c 2010-01-08 17:14:02.000000000 +1100 @@ -430,7 +430,7 @@ u8_t zfRateCtrlRateDiff(struct zsRcCell* { return ((rcCell->currentRateIndex - i)+1)>>1; } - else if (i == rcCell->currentRateIndex == 0) + else if (i == rcCell->currentRateIndex) { return 1; } ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 6/6] otus: zfRateCtrlRateDiff(): remove duplicate comparison 2010-01-08 7:57 ` [patch 6/6] otus: zfRateCtrlRateDiff(): remove duplicate comparison horms @ 2010-01-09 8:44 ` Dan Carpenter 2010-01-11 13:06 ` Simon Horman 0 siblings, 1 reply; 11+ messages in thread From: Dan Carpenter @ 2010-01-09 8:44 UTC (permalink / raw) To: horms; +Cc: devel, linux-kernel, Greg Kroah-Hartman, Peter Huewe On Fri, Jan 08, 2010 at 06:57:54PM +1100, horms@vergenet.net wrote: > I think this is correct. > > $ gcc (Debian 4.4.2-8) 4.4.2 > Copyright (C) 2009 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $ make > ... > drivers/staging/otus/80211core/ratectrl.c: In function > 'zfRateCtrlRateDiff': > drivers/staging/otus/80211core/ratectrl.c:433: warning: suggest parentheses > around comparison in operand of '==' > ... > > Signed-off-by: Simon Horman <horms@verge.net.au> > > Index: linux-2.6/drivers/staging/otus/80211core/ratectrl.c > =================================================================== > --- linux-2.6.orig/drivers/staging/otus/80211core/ratectrl.c 2010-01-08 17:13:44.000000000 +1100 > +++ linux-2.6/drivers/staging/otus/80211core/ratectrl.c 2010-01-08 17:14:02.000000000 +1100 > @@ -430,7 +430,7 @@ u8_t zfRateCtrlRateDiff(struct zsRcCell* > { > return ((rcCell->currentRateIndex - i)+1)>>1; > } > - else if (i == rcCell->currentRateIndex == 0) > + else if (i == rcCell->currentRateIndex) You realize you have reversed the meaning of the test? The original was the same as if (i != rcCell->currentRateIndex). Your patch is possibly correct, but it's hard to know. I would leave this for now until someone grovels through the code to find out for sure if it should be == or !=. If we silence the warning, no one will ever look at this code again. regards, dan carpenter ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 6/6] otus: zfRateCtrlRateDiff(): remove duplicate comparison 2010-01-09 8:44 ` Dan Carpenter @ 2010-01-11 13:06 ` Simon Horman 0 siblings, 0 replies; 11+ messages in thread From: Simon Horman @ 2010-01-11 13:06 UTC (permalink / raw) To: Dan Carpenter, devel, linux-kernel, Greg Kroah-Hartman, Peter Huewe On Sat, Jan 09, 2010 at 11:44:38AM +0300, Dan Carpenter wrote: > On Fri, Jan 08, 2010 at 06:57:54PM +1100, horms@vergenet.net wrote: > > I think this is correct. > > > > $ gcc (Debian 4.4.2-8) 4.4.2 > > Copyright (C) 2009 Free Software Foundation, Inc. > > This is free software; see the source for copying conditions. There is NO > > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > > > $ make > > ... > > drivers/staging/otus/80211core/ratectrl.c: In function > > 'zfRateCtrlRateDiff': > > drivers/staging/otus/80211core/ratectrl.c:433: warning: suggest parentheses > > around comparison in operand of '==' > > ... > > > > Signed-off-by: Simon Horman <horms@verge.net.au> > > > > Index: linux-2.6/drivers/staging/otus/80211core/ratectrl.c > > =================================================================== > > --- linux-2.6.orig/drivers/staging/otus/80211core/ratectrl.c 2010-01-08 17:13:44.000000000 +1100 > > +++ linux-2.6/drivers/staging/otus/80211core/ratectrl.c 2010-01-08 17:14:02.000000000 +1100 > > @@ -430,7 +430,7 @@ u8_t zfRateCtrlRateDiff(struct zsRcCell* > > { > > return ((rcCell->currentRateIndex - i)+1)>>1; > > } > > - else if (i == rcCell->currentRateIndex == 0) > > + else if (i == rcCell->currentRateIndex) > > You realize you have reversed the meaning of the test? The original > was the same as if (i != rcCell->currentRateIndex). > > Your patch is possibly correct, but it's hard to know. I would > leave this for now until someone grovels through the code to find > out for sure if it should be == or !=. If we silence the warning, > no one will ever look at this code again. Good point, I withdraw this patch. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-01-12 0:50 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-01-08 7:57 [patch 0/6] otus: build fixes horms 2010-01-08 7:57 ` [patch 1/6] otus: dont mix declarations and code horms 2010-01-08 7:57 ` [patch 2/6] otus: remove unused variables horms 2010-01-08 7:57 ` [patch 3/6] otus: remove unused constants horms 2010-01-08 7:57 ` [patch 4/6] otus: Fix ZM_SEQ_DEBUG macro for no-debug case horms 2010-01-08 7:57 ` [patch 5/6] otus: zfTkipInit(): increment pointer horms 2010-01-09 8:44 ` [patch] otus: zfTkipInit(): increment another pointer Dan Carpenter 2010-01-12 0:50 ` [patch] tch 5/6 v2] " Simon Horman 2010-01-08 7:57 ` [patch 6/6] otus: zfRateCtrlRateDiff(): remove duplicate comparison horms 2010-01-09 8:44 ` Dan Carpenter 2010-01-11 13:06 ` Simon Horman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox