Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2e5af14 authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192u: Convert timers to use timer_setup()



In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Derek Robson <robsonde@gmail.com>
Cc: simran singhal <singhalsimran0@gmail.com>
Cc: Riccardo Marotti <riccardo.marotti@gmail.com>
Cc: Fabrizio Perria <fabrizio.perria@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Baoyou Xie <baoyou.xie@linaro.org>
Cc: Tuomo Rinne <tuomo.rinne@gmail.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: devel@driverdev.osuosl.org
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fd5b9b83
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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(
+2 −2
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);

+2 −2
Original line number Diff line number Diff line
@@ -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);
+6 −6
Original line number Diff line number Diff line
@@ -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);
Loading