From f751ffab11050e2da24f90f052c8d8b6611f751d Mon Sep 17 00:00:00 2001 From: Niadh Date: Mon, 7 Jun 2010 00:09:18 +0100 Subject: Staging: RT2860 Fixed all errors in mlme.h and all but one in rtmp.h. I have fixed all errors in mlme.h and fixed all bar one in rtmp.h. I think I can fix rtmp.h too by moving a brace up two lines, I just dont know if it will work. If someone can confirm it will work I will change it. Signed-off-by: Neil Munro Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/mlme.h | 21 ++++++++++----------- drivers/staging/rt2860/rtmp.h | 4 ++-- 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'drivers/staging/rt2860') diff --git a/drivers/staging/rt2860/mlme.h b/drivers/staging/rt2860/mlme.h index 99c9362..01414c3 100644 --- a/drivers/staging/rt2860/mlme.h +++ b/drivers/staging/rt2860/mlme.h @@ -31,7 +31,7 @@ Revision History: Who When What - -------- ---------- ---------------------------------------------- + -------- ---------- ------------------------------ John Chang 2003-08-28 Created John Chang 2004-09-06 modified for RT2600 @@ -50,7 +50,7 @@ #define MLME_TASK_EXEC_INTV 100/*200*/ /* */ #define LEAD_TIME 5 #define MLME_TASK_EXEC_MULTIPLE 10 /*5*/ /* MLME_TASK_EXEC_MULTIPLE * MLME_TASK_EXEC_INTV = 1 sec */ -#define REORDER_EXEC_INTV 100 /* 0.1 sec */ +#define REORDER_EXEC_INTV 100 /* 0.1 sec */ /* The definition of Radar detection duration region */ #define CE 0 @@ -60,7 +60,7 @@ #define JAP_W56 4 #define MAX_RD_REGION 5 -#define BEACON_LOST_TIME 4 * OS_HZ /* 2048 msec = 2 sec */ +#define BEACON_LOST_TIME (4 * OS_HZ) /* 2048 msec = 2 sec */ #define DLS_TIMEOUT 1200 /* unit: msec */ #define AUTH_TIMEOUT 300 /* unit: msec */ @@ -119,8 +119,8 @@ #define MAC_ADDR_IS_GROUP(Addr) (((Addr[0]) & 0x01)) #define MAC_ADDR_HASH(Addr) (Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5]) #define MAC_ADDR_HASH_INDEX(Addr) (MAC_ADDR_HASH(Addr) % HASH_TABLE_SIZE) -#define TID_MAC_HASH(Addr,TID) (TID^Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5]) -#define TID_MAC_HASH_INDEX(Addr,TID) (TID_MAC_HASH(Addr,TID) % HASH_TABLE_SIZE) +#define TID_MAC_HASH(Addr, TID) (TID^Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5]) +#define TID_MAC_HASH_INDEX(Addr, TID) (TID_MAC_HASH(Addr, TID) % HASH_TABLE_SIZE) /* LED Control */ /* assoiation ON. one LED ON. another blinking when TX, OFF when idle */ @@ -145,7 +145,7 @@ #define CAP_IS_DSSS_OFDM(x) (((x) & 0x2000) != 0) #define CAP_IS_DELAY_BA(x) (((x) & 0x4000) != 0) /* 802.11e d9 */ -#define CAP_GENERATE(ess,ibss,priv,s_pre,s_slot,spectrum) (((ess) ? 0x0001 : 0x0000) | ((ibss) ? 0x0002 : 0x0000) | ((priv) ? 0x0010 : 0x0000) | ((s_pre) ? 0x0020 : 0x0000) | ((s_slot) ? 0x0400 : 0x0000) | ((spectrum) ? 0x0100 : 0x0000)) +#define CAP_GENERATE(ess, ibss, priv, s_pre, s_slot, spectrum) (((ess) ? 0x0001 : 0x0000) | ((ibss) ? 0x0002 : 0x0000) | ((priv) ? 0x0010 : 0x0000) | ((s_pre) ? 0x0020 : 0x0000) | ((s_slot) ? 0x0400 : 0x0000) | ((spectrum) ? 0x0100 : 0x0000)) #define ERP_IS_NON_ERP_PRESENT(x) (((x) & 0x01) != 0) /* 802.11g */ #define ERP_IS_USE_PROTECTION(x) (((x) & 0x02) != 0) /* 802.11g */ @@ -154,9 +154,9 @@ #define DRS_TX_QUALITY_WORST_BOUND 8 /* 3 // just test by gary */ #define DRS_PENALTY 8 -#define BA_NOTUSE 2 +#define BA_NOTUSE 2 /*BA Policy subfiled value in ADDBA frame */ -#define IMMED_BA 1 +#define IMMED_BA 1 #define DELAY_BA 0 /* BA Initiator subfield in DELBA frame */ @@ -176,8 +176,7 @@ /* reset all OneSecTx counters */ #define RESET_ONE_SEC_TX_CNT(__pEntry) \ -if (((__pEntry)) != NULL) \ -{ \ +if (((__pEntry)) != NULL) { \ (__pEntry)->OneSecTxRetryOkCount = 0; \ (__pEntry)->OneSecTxFailCount = 0; \ (__pEntry)->OneSecTxNoRetryOkCount = 0; \ @@ -846,7 +845,7 @@ struct rt_mlme_queue { struct rt_mlme_queue_elem Entry[MAX_LEN_OF_MLME_QUEUE]; }; -typedef void(*STATE_MACHINE_FUNC) (void * Adaptor, struct rt_mlme_queue_elem *Elem); +typedef void(*STATE_MACHINE_FUNC) (void *Adaptor, struct rt_mlme_queue_elem *Elem); struct rt_state_machine { unsigned long Base; diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h index 82b6e78..282935c 100644 --- a/drivers/staging/rt2860/rtmp.h +++ b/drivers/staging/rt2860/rtmp.h @@ -2511,7 +2511,7 @@ void RTMPWriteTxWI(struct rt_rtmp_adapter *pAd, struct rt_txwi * pTxWI, IN BOOLE u8 TID, u8 TxRate, u8 Txopmode, - IN BOOLEAN CfAck, IN HTTRANSMIT_SETTING * pTransmit); + IN BOOLEAN CfAck, IN HTTRANSMIT_SETTING *pTransmit); void RTMPWriteTxWI_Data(struct rt_rtmp_adapter *pAd, struct rt_txwi *pTxWI, struct rt_tx_blk *pTxBlk); @@ -3059,7 +3059,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(struct rt_rtmp_adapter *pAd, u16 *pBeaconPeriod, u8 *pChannel, u8 *pNewChannel, - OUT LARGE_INTEGER * pTimestamp, + OUT LARGE_INTEGER *pTimestamp, struct rt_cf_parm *pCfParm, u16 *pAtimWin, u16 *pCapabilityInfo, -- cgit v1.1 From 37523e84cbf1d82fcc8237ed10818d37b951144e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 11 Jun 2010 12:17:03 +0200 Subject: staging/trivial: fix typos concerning "initiali[zs]e" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/common/cmm_wpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/staging/rt2860') diff --git a/drivers/staging/rt2860/common/cmm_wpa.c b/drivers/staging/rt2860/common/cmm_wpa.c index c16f376..9414aa3 100644 --- a/drivers/staging/rt2860/common/cmm_wpa.c +++ b/drivers/staging/rt2860/common/cmm_wpa.c @@ -427,7 +427,7 @@ void RTMPToWirelessSta(struct rt_rtmp_adapter *pAd, /* ========================================================================== Description: - This is a function to initilize 4-way handshake + This is a function to initialize 4-way handshake Return: @@ -867,7 +867,7 @@ void PeerPairMsg3Action(struct rt_rtmp_adapter *pAd, ========================================================================== Description: When receiving the last packet of 4-way pairwisekey handshake. - Initilize 2-way groupkey handshake following. + Initialize 2-way groupkey handshake following. Return: ========================================================================== */ -- cgit v1.1 From 8e72c6411552b3ba25da7d983cb68f214b4886ac Mon Sep 17 00:00:00 2001 From: Niadh Date: Mon, 28 Jun 2010 02:23:14 +0100 Subject: Staging: RT2860: Fixed everything in ap.h. Fixed the single two warnings in ap.h which left this file with nothing left to clean. Signed-off-by: Neil Munro Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/ap.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/staging/rt2860') diff --git a/drivers/staging/rt2860/ap.h b/drivers/staging/rt2860/ap.h index 3f744a5..faac85d 100644 --- a/drivers/staging/rt2860/ap.h +++ b/drivers/staging/rt2860/ap.h @@ -42,7 +42,8 @@ /* ap_wpa.c */ void WpaStateMachineInit(struct rt_rtmp_adapter *pAd, - struct rt_state_machine *Sm, OUT STATE_MACHINE_FUNC Trans[]); + struct rt_state_machine *Sm, + OUT STATE_MACHINE_FUNC Trans[]); #ifdef RTMP_MAC_USB void BeaconUpdateExec(void *SystemSpecific1, @@ -61,6 +62,7 @@ struct rt_mac_table_entry *MacTableInsertEntry(struct rt_rtmp_adapter *pAd, BOOLEAN MacTableDeleteEntry(struct rt_rtmp_adapter *pAd, u16 wcid, u8 *pAddr); -struct rt_mac_table_entry *MacTableLookup(struct rt_rtmp_adapter *pAd, u8 *pAddr); +struct rt_mac_table_entry *MacTableLookup(struct rt_rtmp_adapter *pAd, + u8 *pAddr); #endif /* __AP_H__ */ -- cgit v1.1 From 11ed93566f829130e596555ad0784a44587b4145 Mon Sep 17 00:00:00 2001 From: Kulikov Vasiliy Date: Tue, 29 Jun 2010 14:16:04 +0400 Subject: Staging: rt2860: rtmp_timer: remove casts from void* Remove unnesessary casts from void*. Signed-off-by: Kulikov Vasiliy Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/common/rtmp_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/staging/rt2860') diff --git a/drivers/staging/rt2860/common/rtmp_timer.c b/drivers/staging/rt2860/common/rtmp_timer.c index 42e47d9..ab52090 100644 --- a/drivers/staging/rt2860/common/rtmp_timer.c +++ b/drivers/staging/rt2860/common/rtmp_timer.c @@ -143,8 +143,8 @@ int RtmpTimerQThread(IN void *Context) struct rt_rtmp_os_task *pTask; struct rt_rtmp_adapter *pAd; - pTask = (struct rt_rtmp_os_task *)Context; - pAd = (struct rt_rtmp_adapter *)pTask->priv; + pTask = Context; + pAd = pTask->priv; RtmpOSTaskCustomize(pTask); -- cgit v1.1 From 5401843d19c6484d26646de24d679545ec51be0b Mon Sep 17 00:00:00 2001 From: Kulikov Vasiliy Date: Tue, 29 Jun 2010 14:16:08 +0400 Subject: Staging: rt2860: rt_linux: remove casts from void* Remove unnesessary casts from void*. Signed-off-by: Kulikov Vasiliy Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/rt_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/rt2860') diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index 0029b2d..6536965 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c @@ -1015,7 +1015,7 @@ int RtmpOSTaskKill(struct rt_rtmp_os_task *pTask) struct rt_rtmp_adapter *pAd; int ret = NDIS_STATUS_FAILURE; - pAd = (struct rt_rtmp_adapter *)pTask->priv; + pAd = pTask->priv; #ifdef KTHREAD_SUPPORT if (pTask->kthread_task) { -- cgit v1.1 From ef7d8ba135042e5da15b861e11ff48385308632a Mon Sep 17 00:00:00 2001 From: Kulikov Vasiliy Date: Tue, 29 Jun 2010 14:16:12 +0400 Subject: Staging: rt2860: usb_main_dev: remove casts from void* Remove unnesessary casts from void*. Signed-off-by: Kulikov Vasiliy Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/usb_main_dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/staging/rt2860') diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c index b740662..40eab25 100644 --- a/drivers/staging/rt2860/usb_main_dev.c +++ b/drivers/staging/rt2860/usb_main_dev.c @@ -421,8 +421,8 @@ int MlmeThread(IN void *Context) int status; status = 0; - pTask = (struct rt_rtmp_os_task *)Context; - pAd = (struct rt_rtmp_adapter *)pTask->priv; + pTask = Context; + pAd = pTask->priv; RtmpOSTaskCustomize(pTask); @@ -490,8 +490,8 @@ int RTUSBCmdThread(IN void *Context) int status; status = 0; - pTask = (struct rt_rtmp_os_task *)Context; - pAd = (struct rt_rtmp_adapter *)pTask->priv; + pTask = Context; + pAd = pTask->priv; RtmpOSTaskCustomize(pTask); -- cgit v1.1 From e7d122b55d6031c748a9f264c1f6f28f948852a2 Mon Sep 17 00:00:00 2001 From: Neil Munro Date: Sun, 18 Jul 2010 23:09:37 +0100 Subject: Staging: RT2860: Cleaned all bar one in chlist.h I have cleaned all errors and all bar one warning in chlist.h. The remaining warning is a line over 80 characters warning. Breaking it doesnt look all that easy. Signed-off-by: Neil Munro Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/chlist.h | 50 +++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 27 deletions(-) (limited to 'drivers/staging/rt2860') diff --git a/drivers/staging/rt2860/chlist.h b/drivers/staging/rt2860/chlist.h index ada65e5..1231e69 100644 --- a/drivers/staging/rt2860/chlist.h +++ b/drivers/staging/rt2860/chlist.h @@ -73,35 +73,31 @@ struct rt_ch_freq_map { extern struct rt_ch_freq_map CH_HZ_ID_MAP[]; extern int CH_HZ_ID_MAP_NUM; -#define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \ - do{ \ - int _chIdx; \ - for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++)\ - { \ - if ((_ch) == CH_HZ_ID_MAP[_chIdx].channel) \ - { \ - (_khz) = CH_HZ_ID_MAP[_chIdx].freqKHz * 1000; \ - break; \ - } \ - } \ - if (_chIdx == CH_HZ_ID_MAP_NUM) \ - (_khz) = 2412000; \ - }while(0) +#define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \ + do { \ + int _chIdx; \ + for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++) {\ + if ((_ch) == CH_HZ_ID_MAP[_chIdx].channel) { \ + (_khz) = CH_HZ_ID_MAP[_chIdx].freqKHz * 1000;\ + break; \ + } \ + } \ + if (_chIdx == CH_HZ_ID_MAP_NUM) \ + (_khz) = 2412000; \ + } while (0) #define MAP_KHZ_TO_CHANNEL_ID(_khz, _ch) \ - do{ \ - int _chIdx; \ - for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++)\ - { \ - if ((_khz) == CH_HZ_ID_MAP[_chIdx].freqKHz) \ - { \ - (_ch) = CH_HZ_ID_MAP[_chIdx].channel; \ - break; \ - } \ - } \ - if (_chIdx == CH_HZ_ID_MAP_NUM) \ - (_ch) = 1; \ - }while(0) + do { \ + int _chIdx; \ + for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++) {\ + if ((_khz) == CH_HZ_ID_MAP[_chIdx].freqKHz) {\ + (_ch) = CH_HZ_ID_MAP[_chIdx].channel; \ + break; \ + } \ + } \ + if (_chIdx == CH_HZ_ID_MAP_NUM) \ + (_ch) = 1; \ + } while (0) void BuildChannelListEx(struct rt_rtmp_adapter *pAd); -- cgit v1.1 From 5d92fe3387d086fc2f10426fbdb6b86d6cce5a47 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sun, 25 Jul 2010 16:14:53 -0500 Subject: staging: rt2870: Add USB ID for Belkin F6D4050 v2 Device missing from current tables. Signed-off-by: Larry Finger Tested-by: Rod Huffaker Cc: Stable Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/usb_main_dev.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/staging/rt2860') diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c index 40eab25..913aa9e 100644 --- a/drivers/staging/rt2860/usb_main_dev.c +++ b/drivers/staging/rt2860/usb_main_dev.c @@ -64,6 +64,7 @@ struct usb_device_id rtusb_usb_id[] = { {USB_DEVICE(0x14B2, 0x3C07)}, /* AL */ {USB_DEVICE(0x050D, 0x8053)}, /* Belkin */ {USB_DEVICE(0x050D, 0x825B)}, /* Belkin */ + {USB_DEVICE(0x050D, 0x935B)}, /* Belkin F6D4050 v2 */ {USB_DEVICE(0x14B2, 0x3C23)}, /* Airlink */ {USB_DEVICE(0x14B2, 0x3C27)}, /* Airlink */ {USB_DEVICE(0x07AA, 0x002F)}, /* Corega */ -- cgit v1.1