diff options
Diffstat (limited to 'drivers/staging/rtl8192u/ieee80211')
6 files changed, 36 insertions, 38 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 3f434411247a..3addaa65085a 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2392,9 +2392,9 @@ void TsInitAddBA(struct ieee80211_device *ieee, PTX_TS_RECORD pTS, u8 Policy, u8 bOverwritePending); void TsInitDelBA(struct ieee80211_device *ieee, PTS_COMMON_INFO pTsCommonInfo, TR_SELECT TxRxSelect); -void BaSetupTimeOut(unsigned long data); -void TxBaInactTimeout(unsigned long data); -void RxBaInactTimeout(unsigned long data); +void BaSetupTimeOut(struct timer_list *t); +void TxBaInactTimeout(struct timer_list *t); +void RxBaInactTimeout(struct timer_list *t); void ResetBaEntry(PBA_RECORD pBA); //function in TS.c bool GetTs( diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c index 48e80be90ba5..6f457812e5a3 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c @@ -57,9 +57,9 @@ void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, } } -void ieee80211_crypt_deinit_handler(unsigned long data) +void ieee80211_crypt_deinit_handler(struct timer_list *t) { - struct ieee80211_device *ieee = (struct ieee80211_device *)data; + struct ieee80211_device *ieee = from_timer(ieee, t, crypt_deinit_timer); unsigned long flags; spin_lock_irqsave(&ieee->lock, flags); diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h index a0aa0f5be63a..1f2aea7e0e55 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h @@ -83,7 +83,7 @@ int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name); void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force); -void ieee80211_crypt_deinit_handler(unsigned long data); +void ieee80211_crypt_deinit_handler(struct timer_list *t); void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, struct ieee80211_crypt_data **crypt); diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c index 8f236b332a47..90a097f2cd4e 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c @@ -133,8 +133,8 @@ struct net_device *alloc_ieee80211(int sizeof_priv) ieee->ieee802_1x = 1; /* Default to supporting 802.1x */ INIT_LIST_HEAD(&ieee->crypt_deinit_list); - setup_timer(&ieee->crypt_deinit_timer, - ieee80211_crypt_deinit_handler, (unsigned long)ieee); + timer_setup(&ieee->crypt_deinit_timer, ieee80211_crypt_deinit_handler, + 0); spin_lock_init(&ieee->lock); spin_lock_init(&ieee->wpax_suitlist_lock); diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 0f86195680e8..4ef7d4e63931 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -672,18 +672,18 @@ TsInitDelBA( struct ieee80211_device *ieee, PTS_COMMON_INFO pTsCommonInfo, TR_SE * return: NULL * notice: ********************************************************************************************************************/ -void BaSetupTimeOut(unsigned long data) +void BaSetupTimeOut(struct timer_list *t) { - PTX_TS_RECORD pTxTs = (PTX_TS_RECORD)data; + PTX_TS_RECORD pTxTs = from_timer(pTxTs, t, TxPendingBARecord.Timer); pTxTs->bAddBaReqInProgress = false; pTxTs->bAddBaReqDelayed = true; pTxTs->TxPendingBARecord.bValid = false; } -void TxBaInactTimeout(unsigned long data) +void TxBaInactTimeout(struct timer_list *t) { - PTX_TS_RECORD pTxTs = (PTX_TS_RECORD)data; + PTX_TS_RECORD pTxTs = from_timer(pTxTs, t, TxAdmittedBARecord.Timer); struct ieee80211_device *ieee = container_of(pTxTs, struct ieee80211_device, TxTsRecord[pTxTs->num]); TxTsDeleteBA(ieee, pTxTs); ieee80211_send_DELBA( @@ -694,9 +694,9 @@ void TxBaInactTimeout(unsigned long data) DELBA_REASON_TIMEOUT); } -void RxBaInactTimeout(unsigned long data) +void RxBaInactTimeout(struct timer_list *t) { - PRX_TS_RECORD pRxTs = (PRX_TS_RECORD)data; + PRX_TS_RECORD pRxTs = from_timer(pRxTs, t, RxAdmittedBARecord.Timer); struct ieee80211_device *ieee = container_of(pRxTs, struct ieee80211_device, RxTsRecord[pRxTs->num]); RxTsDeleteBA(ieee, pRxTs); diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c index f98bb03aa293..602be096fa73 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c @@ -3,13 +3,13 @@ #include <linux/slab.h> #include "rtl819x_TS.h" -static void TsSetupTimeOut(unsigned long data) +static void TsSetupTimeOut(struct timer_list *unused) { // Not implement yet // This is used for WMMSA and ACM , that would send ADDTSReq frame. } -static void TsInactTimeout(unsigned long data) +static void TsInactTimeout(struct timer_list *unused) { // Not implement yet // This is used for WMMSA and ACM. @@ -22,9 +22,9 @@ static void TsInactTimeout(unsigned long data) * return: NULL * notice: ********************************************************************************************************************/ -static void RxPktPendingTimeout(unsigned long data) +static void RxPktPendingTimeout(struct timer_list *t) { - PRX_TS_RECORD pRxTs = (PRX_TS_RECORD)data; + PRX_TS_RECORD pRxTs = from_timer(pRxTs, t, RxPktPendingTimer); struct ieee80211_device *ieee = container_of(pRxTs, struct ieee80211_device, RxTsRecord[pRxTs->num]); PRX_REORDER_ENTRY pReorderEntry = NULL; @@ -89,9 +89,9 @@ static void RxPktPendingTimeout(unsigned long data) * return: NULL * notice: ********************************************************************************************************************/ -static void TsAddBaProcess(unsigned long data) +static void TsAddBaProcess(struct timer_list *t) { - PTX_TS_RECORD pTxTs = (PTX_TS_RECORD)data; + PTX_TS_RECORD pTxTs = from_timer(pTxTs, t, TsAddBaTimer); u8 num = pTxTs->num; struct ieee80211_device *ieee = container_of(pTxTs, struct ieee80211_device, TxTsRecord[num]); @@ -145,16 +145,15 @@ void TSInitialize(struct ieee80211_device *ieee) pTxTS->num = count; // The timers for the operation of Traffic Stream and Block Ack. // DLS related timer will be add here in the future!! - setup_timer(&pTxTS->TsCommonInfo.SetupTimer, TsSetupTimeOut, - (unsigned long)pTxTS); - setup_timer(&pTxTS->TsCommonInfo.InactTimer, TsInactTimeout, - (unsigned long)pTxTS); - setup_timer(&pTxTS->TsAddBaTimer, TsAddBaProcess, - (unsigned long)pTxTS); - setup_timer(&pTxTS->TxPendingBARecord.Timer, BaSetupTimeOut, - (unsigned long)pTxTS); - setup_timer(&pTxTS->TxAdmittedBARecord.Timer, - TxBaInactTimeout, (unsigned long)pTxTS); + timer_setup(&pTxTS->TsCommonInfo.SetupTimer, TsSetupTimeOut, + 0); + timer_setup(&pTxTS->TsCommonInfo.InactTimer, TsInactTimeout, + 0); + timer_setup(&pTxTS->TsAddBaTimer, TsAddBaProcess, 0); + timer_setup(&pTxTS->TxPendingBARecord.Timer, BaSetupTimeOut, + 0); + timer_setup(&pTxTS->TxAdmittedBARecord.Timer, + TxBaInactTimeout, 0); ResetTxTsEntry(pTxTS); list_add_tail(&pTxTS->TsCommonInfo.List, &ieee->Tx_TS_Unused_List); pTxTS++; @@ -167,14 +166,13 @@ void TSInitialize(struct ieee80211_device *ieee) for(count = 0; count < TOTAL_TS_NUM; count++) { pRxTS->num = count; INIT_LIST_HEAD(&pRxTS->RxPendingPktList); - setup_timer(&pRxTS->TsCommonInfo.SetupTimer, TsSetupTimeOut, - (unsigned long)pRxTS); - setup_timer(&pRxTS->TsCommonInfo.InactTimer, TsInactTimeout, - (unsigned long)pRxTS); - setup_timer(&pRxTS->RxAdmittedBARecord.Timer, - RxBaInactTimeout, (unsigned long)pRxTS); - setup_timer(&pRxTS->RxPktPendingTimer, RxPktPendingTimeout, - (unsigned long)pRxTS); + timer_setup(&pRxTS->TsCommonInfo.SetupTimer, TsSetupTimeOut, + 0); + timer_setup(&pRxTS->TsCommonInfo.InactTimer, TsInactTimeout, + 0); + timer_setup(&pRxTS->RxAdmittedBARecord.Timer, + RxBaInactTimeout, 0); + timer_setup(&pRxTS->RxPktPendingTimer, RxPktPendingTimeout, 0); ResetRxTsEntry(pRxTS); list_add_tail(&pRxTS->TsCommonInfo.List, &ieee->Rx_TS_Unused_List); pRxTS++; |