diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 20:53:28 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-13 20:53:28 -0800 |
commit | 449fcf3ab0baf3dde9952385e6789f2ca10c3980 (patch) | |
tree | 180f10c2cdd63836e47725cddc8850ca7144091a /drivers/staging/rtl8192e | |
parent | 3c073991eb417b6f785ddc6afbbdc369eb84aa6a (diff) | |
parent | c14dd9d5f8beda9d8c621683b4e7d6cb5cd3cda7 (diff) | |
download | talos-obmc-linux-449fcf3ab0baf3dde9952385e6789f2ca10c3980.tar.gz talos-obmc-linux-449fcf3ab0baf3dde9952385e6789f2ca10c3980.zip |
Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here is the "big" staging and IIO driver update for 4.15-rc1.
Lots and lots of little changes, almost all minor code cleanups as the
Outreachy application process happened during this development cycle.
Also happened was a lot of IIO driver activity, and the typec USB code
moving out of staging to drivers/usb (same commits are in the USB tree
on a persistent branch to not cause merge issues.)
Overall, it's a wash, I think we added a few hundred more lines than
removed, but really only a few thousand were modified at all.
All of these have been in linux-next for a while. There might be a
merge issue with Al's vfs tree in the pi433 driver (take his changes,
they are always better), and the media tree with some of the odd
atomisp cleanups (take the media tree's version)"
* tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits)
staging: lustre: add SPDX identifiers to all lustre files
staging: greybus: Remove redundant license text
staging: greybus: add SPDX identifiers to all greybus driver files
staging: ccree: simplify ioread/iowrite
staging: ccree: simplify registers access
staging: ccree: simplify error handling logic
staging: ccree: remove dead code
staging: ccree: handle limiting of DMA masks
staging: ccree: copy IV to DMAable memory
staging: fbtft: remove redundant initialization of buf
staging: sm750fb: Fix parameter mistake in poke32
staging: wilc1000: Fix bssid buffer offset in Txq
staging: fbtft: fb_ssd1331: fix mirrored display
staging: android: Fix checkpatch.pl error
staging: greybus: loopback: convert loopback to use generic async operations
staging: greybus: operation: add private data with get/set accessors
staging: greybus: loopback: Fix iteration count on async path
staging: greybus: loopback: Hold per-connection mutex across operations
staging: greybus/loopback: use ktime_get() for time intervals
staging: fsl-dpaa2/eth: Extra headroom in RX buffers
...
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/dot11d.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 25 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 11 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_pm.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_BAProc.c | 15 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_TSProc.c | 56 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib.h | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 23 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_wx.c | 3 |
10 files changed, 71 insertions, 80 deletions
diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c index 017fe04ebe2d..88f89d77b511 100644 --- a/drivers/staging/rtl8192e/dot11d.c +++ b/drivers/staging/rtl8192e/dot11d.c @@ -128,12 +128,16 @@ void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr, pTriple = (struct chnl_txpow_triple *)(pCoutryIe + 3); for (i = 0; i < NumTriples; i++) { if (MaxChnlNum >= pTriple->FirstChnl) { - netdev_info(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n"); + netdev_info(dev->dev, + "%s: Invalid country IE, skip it......1\n", + __func__); return; } if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls)) { - netdev_info(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n"); + netdev_info(dev->dev, + "%s: Invalid country IE, skip it......2\n", + __func__); return; } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index aca52654825b..d2605158546b 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -85,7 +85,7 @@ static struct pci_driver rtl8192_pci_driver = { static short _rtl92e_is_tx_queue_empty(struct net_device *dev); static void _rtl92e_watchdog_wq_cb(void *data); -static void _rtl92e_watchdog_timer_cb(unsigned long data); +static void _rtl92e_watchdog_timer_cb(struct timer_list *t); static void _rtl92e_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rate); static int _rtl92e_hard_start_xmit(struct sk_buff *skb, struct net_device *dev); @@ -766,12 +766,12 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset) priv->bfirst_init = false; if (priv->polling_timer_on == 0) - rtl92e_check_rfctrl_gpio_timer((unsigned long)dev); + rtl92e_check_rfctrl_gpio_timer(&priv->gpio_polling_timer); if (priv->rtllib->state != RTLLIB_LINKED) rtllib_softmac_start_protocol(priv->rtllib, 0); rtllib_reset_queue(priv->rtllib); - _rtl92e_watchdog_timer_cb((unsigned long)dev); + _rtl92e_watchdog_timer_cb(&priv->watch_dog_timer); if (!netif_queue_stopped(dev)) netif_start_queue(dev); @@ -1075,13 +1075,10 @@ static short _rtl92e_init(struct net_device *dev) rtl92e_dm_init(dev); - setup_timer(&priv->watch_dog_timer, - _rtl92e_watchdog_timer_cb, - (unsigned long)dev); + timer_setup(&priv->watch_dog_timer, _rtl92e_watchdog_timer_cb, 0); - setup_timer(&priv->gpio_polling_timer, - rtl92e_check_rfctrl_gpio_timer, - (unsigned long)dev); + timer_setup(&priv->gpio_polling_timer, rtl92e_check_rfctrl_gpio_timer, + 0); rtl92e_irq_disable(dev); if (request_irq(dev->irq, _rtl92e_irq, IRQF_SHARED, dev->name, dev)) { @@ -1531,9 +1528,9 @@ static void _rtl92e_watchdog_wq_cb(void *data) RT_TRACE(COMP_TRACE, " <==RtUsbCheckForHangWorkItemCallback()\n"); } -static void _rtl92e_watchdog_timer_cb(unsigned long data) +static void _rtl92e_watchdog_timer_cb(struct timer_list *t) { - struct r8192_priv *priv = rtllib_priv((struct net_device *)data); + struct r8192_priv *priv = from_timer(priv, t, watch_dog_timer); schedule_delayed_work(&priv->watch_dog_wq, 0); mod_timer(&priv->watch_dog_timer, jiffies + @@ -2535,7 +2532,7 @@ static int _rtl92e_pci_probe(struct pci_dev *pdev, RT_TRACE(COMP_INIT, "dev name: %s\n", dev->name); if (priv->polling_timer_on == 0) - rtl92e_check_rfctrl_gpio_timer((unsigned long)dev); + rtl92e_check_rfctrl_gpio_timer(&priv->gpio_polling_timer); RT_TRACE(COMP_INIT, "Driver probe completed\n"); return 0; @@ -2648,9 +2645,9 @@ bool rtl92e_disable_nic(struct net_device *dev) module_pci_driver(rtl8192_pci_driver); -void rtl92e_check_rfctrl_gpio_timer(unsigned long data) +void rtl92e_check_rfctrl_gpio_timer(struct timer_list *t) { - struct r8192_priv *priv = rtllib_priv((struct net_device *)data); + struct r8192_priv *priv = from_timer(priv, t, gpio_polling_timer); priv->polling_timer_on = 1; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 9d3089cb6a5a..866fe4d4cb28 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -587,7 +587,7 @@ void rtl92e_tx_enable(struct net_device *); void rtl92e_hw_sleep_wq(void *data); void rtl92e_commit(struct net_device *dev); -void rtl92e_check_rfctrl_gpio_timer(unsigned long data); +void rtl92e_check_rfctrl_gpio_timer(struct timer_list *t); void rtl92e_hw_wakeup_wq(void *data); diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index b8205ebafd72..9bf95bd0ad13 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -196,7 +196,7 @@ static void _rtl92e_dm_check_txrateandretrycount(struct net_device *dev); static void _rtl92e_dm_check_ac_dc_power(struct net_device *dev); static void _rtl92e_dm_check_fsync(struct net_device *dev); static void _rtl92e_dm_check_rf_ctrl_gpio(void *data); -static void _rtl92e_dm_fsync_timer_callback(unsigned long data); +static void _rtl92e_dm_fsync_timer_callback(struct timer_list *t); /*---------------------Define local function prototype-----------------------*/ @@ -2125,8 +2125,7 @@ static void _rtl92e_dm_init_fsync(struct net_device *dev) priv->rtllib->fsync_state = Default_Fsync; priv->framesyncMonitor = 1; - setup_timer(&priv->fsync_timer, _rtl92e_dm_fsync_timer_callback, - (unsigned long)dev); + timer_setup(&priv->fsync_timer, _rtl92e_dm_fsync_timer_callback, 0); } @@ -2137,10 +2136,10 @@ static void _rtl92e_dm_deinit_fsync(struct net_device *dev) del_timer_sync(&priv->fsync_timer); } -static void _rtl92e_dm_fsync_timer_callback(unsigned long data) +static void _rtl92e_dm_fsync_timer_callback(struct timer_list *t) { - struct net_device *dev = (struct net_device *)data; - struct r8192_priv *priv = rtllib_priv((struct net_device *)data); + struct r8192_priv *priv = from_timer(priv, t, fsync_timer); + struct net_device *dev = priv->rtllib->dev; u32 rate_index, rate_count = 0, rate_count_diff = 0; bool bSwitchFromCountDiff = false; bool bDoubleTimeInterval = false; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c index 3e3273d3e043..81a68b0b4a7f 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c @@ -91,7 +91,7 @@ int rtl92e_resume(struct pci_dev *pdev) pci_enable_wake(pdev, PCI_D0, 0); if (priv->polling_timer_on == 0) - rtl92e_check_rfctrl_gpio_timer((unsigned long)dev); + rtl92e_check_rfctrl_gpio_timer(&priv->gpio_polling_timer); if (!netif_running(dev)) { netdev_info(dev, diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c index 1720e1b6ae04..eb6d841f7c45 100644 --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c @@ -528,18 +528,20 @@ void TsInitDelBA(struct rtllib_device *ieee, } } -void BaSetupTimeOut(unsigned long data) +void BaSetupTimeOut(struct timer_list *t) { - struct tx_ts_record *pTxTs = (struct tx_ts_record *)data; + struct tx_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) { - struct tx_ts_record *pTxTs = (struct tx_ts_record *)data; + struct tx_ts_record *pTxTs = from_timer(pTxTs, t, + TxAdmittedBARecord.Timer); struct rtllib_device *ieee = container_of(pTxTs, struct rtllib_device, TxTsRecord[pTxTs->num]); TxTsDeleteBA(ieee, pTxTs); @@ -548,9 +550,10 @@ void TxBaInactTimeout(unsigned long data) DELBA_REASON_TIMEOUT); } -void RxBaInactTimeout(unsigned long data) +void RxBaInactTimeout(struct timer_list *t) { - struct rx_ts_record *pRxTs = (struct rx_ts_record *)data; + struct rx_ts_record *pRxTs = from_timer(pRxTs, t, + RxAdmittedBARecord.Timer); struct rtllib_device *ieee = container_of(pRxTs, struct rtllib_device, RxTsRecord[pRxTs->num]); diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c index dcc4eb691889..f839d2447b85 100644 --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c @@ -16,17 +16,18 @@ #include <linux/etherdevice.h> #include "rtl819x_TS.h" -static void TsSetupTimeOut(unsigned long data) +static void TsSetupTimeOut(struct timer_list *unused) { } -static void TsInactTimeout(unsigned long data) +static void TsInactTimeout(struct timer_list *unused) { } -static void RxPktPendingTimeout(unsigned long data) +static void RxPktPendingTimeout(struct timer_list *t) { - struct rx_ts_record *pRxTs = (struct rx_ts_record *)data; + struct rx_ts_record *pRxTs = from_timer(pRxTs, t, + RxPktPendingTimer); struct rtllib_device *ieee = container_of(pRxTs, struct rtllib_device, RxTsRecord[pRxTs->num]); @@ -96,9 +97,9 @@ static void RxPktPendingTimeout(unsigned long data) spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags); } -static void TsAddBaProcess(unsigned long data) +static void TsAddBaProcess(struct timer_list *t) { - struct tx_ts_record *pTxTs = (struct tx_ts_record *)data; + struct tx_ts_record *pTxTs = from_timer(pTxTs, t, TsAddBaTimer); u8 num = pTxTs->num; struct rtllib_device *ieee = container_of(pTxTs, struct rtllib_device, TxTsRecord[num]); @@ -150,24 +151,18 @@ void TSInitialize(struct rtllib_device *ieee) for (count = 0; count < TOTAL_TS_NUM; count++) { pTxTS->num = count; - setup_timer(&pTxTS->TsCommonInfo.SetupTimer, - TsSetupTimeOut, - (unsigned long) pTxTS); + timer_setup(&pTxTS->TsCommonInfo.SetupTimer, TsSetupTimeOut, + 0); - setup_timer(&pTxTS->TsCommonInfo.InactTimer, - TsInactTimeout, - (unsigned long) pTxTS); + timer_setup(&pTxTS->TsCommonInfo.InactTimer, TsInactTimeout, + 0); - setup_timer(&pTxTS->TsAddBaTimer, - TsAddBaProcess, - (unsigned long) pTxTS); + timer_setup(&pTxTS->TsAddBaTimer, TsAddBaProcess, 0); - setup_timer(&pTxTS->TxPendingBARecord.Timer, - BaSetupTimeOut, - (unsigned long) pTxTS); - setup_timer(&pTxTS->TxAdmittedBARecord.Timer, - TxBaInactTimeout, - (unsigned long) pTxTS); + timer_setup(&pTxTS->TxPendingBARecord.Timer, BaSetupTimeOut, + 0); + timer_setup(&pTxTS->TxAdmittedBARecord.Timer, + TxBaInactTimeout, 0); ResetTxTsEntry(pTxTS); list_add_tail(&pTxTS->TsCommonInfo.List, @@ -182,21 +177,16 @@ void TSInitialize(struct rtllib_device *ieee) pRxTS->num = count; INIT_LIST_HEAD(&pRxTS->RxPendingPktList); - setup_timer(&pRxTS->TsCommonInfo.SetupTimer, - TsSetupTimeOut, - (unsigned long) pRxTS); + timer_setup(&pRxTS->TsCommonInfo.SetupTimer, TsSetupTimeOut, + 0); - setup_timer(&pRxTS->TsCommonInfo.InactTimer, - TsInactTimeout, - (unsigned long) pRxTS); + timer_setup(&pRxTS->TsCommonInfo.InactTimer, TsInactTimeout, + 0); - setup_timer(&pRxTS->RxAdmittedBARecord.Timer, - RxBaInactTimeout, - (unsigned long) pRxTS); + timer_setup(&pRxTS->RxAdmittedBARecord.Timer, + RxBaInactTimeout, 0); - setup_timer(&pRxTS->RxPktPendingTimer, - RxPktPendingTimeout, - (unsigned long) pRxTS); + timer_setup(&pRxTS->RxPktPendingTimer, RxPktPendingTimeout, 0); ResetRxTsEntry(pRxTS); list_add_tail(&pRxTS->TsCommonInfo.List, diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 0042a0f6cf79..c01474a6db1e 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -2113,9 +2113,9 @@ void TsInitAddBA(struct rtllib_device *ieee, struct tx_ts_record *pTS, void TsInitDelBA(struct rtllib_device *ieee, struct ts_common_info *pTsCommonInfo, enum 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(struct ba_record *pBA); bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS, u8 *Addr, u8 TID, enum tr_select TxRxSelect, bool bAddNewTs); diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index e4be85af31e7..c2b9ffba354a 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -393,10 +393,10 @@ static void rtllib_send_beacon(struct rtllib_device *ieee) } -static void rtllib_send_beacon_cb(unsigned long _ieee) +static void rtllib_send_beacon_cb(struct timer_list *t) { struct rtllib_device *ieee = - (struct rtllib_device *) _ieee; + from_timer(ieee, t, beacon_timer); unsigned long flags; spin_lock_irqsave(&ieee->beacon_lock, flags); @@ -1427,9 +1427,11 @@ static void rtllib_associate_abort(struct rtllib_device *ieee) spin_unlock_irqrestore(&ieee->lock, flags); } -static void rtllib_associate_abort_cb(unsigned long dev) +static void rtllib_associate_abort_cb(struct timer_list *t) { - rtllib_associate_abort((struct rtllib_device *) dev); + struct rtllib_device *dev = from_timer(dev, t, associate_timer); + + rtllib_associate_abort(dev); } static void rtllib_associate_step1(struct rtllib_device *ieee, u8 *daddr) @@ -2811,8 +2813,9 @@ exit: static struct sk_buff *rtllib_get_beacon_(struct rtllib_device *ieee) { - const u8 broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - + static const u8 broadcast_addr[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }; struct sk_buff *skb; struct rtllib_probe_response *b; @@ -3011,13 +3014,9 @@ void rtllib_softmac_init(struct rtllib_device *ieee) ieee->tx_pending.txb = NULL; - setup_timer(&ieee->associate_timer, - rtllib_associate_abort_cb, - (unsigned long) ieee); + timer_setup(&ieee->associate_timer, rtllib_associate_abort_cb, 0); - setup_timer(&ieee->beacon_timer, - rtllib_send_beacon_cb, - (unsigned long) ieee); + timer_setup(&ieee->beacon_timer, rtllib_send_beacon_cb, 0); INIT_DELAYED_WORK_RSL(&ieee->link_change_wq, (void *)rtllib_link_change_wq, ieee); diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c index f7eba01b5d15..03fbff067fa4 100644 --- a/drivers/staging/rtl8192e/rtllib_wx.c +++ b/drivers/staging/rtl8192e/rtllib_wx.c @@ -694,8 +694,7 @@ int rtllib_wx_set_mlme(struct rtllib_device *ieee, switch (mlme->cmd) { case IW_MLME_DEAUTH: deauth = true; - /* leave break out intentionly */ - + /* fall through */ case IW_MLME_DISASSOC: if (deauth) netdev_info(ieee->dev, "disauth packet !\n"); |