Skip to content

Commit

Permalink
wireless: intersil: convert tasklets to use new tasklet_setup() API
Browse files Browse the repository at this point in the history
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly
and remove .data field.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
  • Loading branch information
Allen Pais authored and intel-lab-lkp committed Aug 17, 2020
1 parent e3933c8 commit 7422b54
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
18 changes: 9 additions & 9 deletions drivers/net/wireless/intersil/hostap/hostap_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,9 +2083,9 @@ static void hostap_rx_skb(local_info_t *local, struct sk_buff *skb)


/* Called only as a tasklet (software IRQ) */
static void hostap_rx_tasklet(unsigned long data)
static void hostap_rx_tasklet(struct tasklet_struct *t)
{
local_info_t *local = (local_info_t *) data;
local_info_t *local = from_tasklet(local, t, rx_tasklet);
struct sk_buff *skb;

while ((skb = skb_dequeue(&local->rx_list)) != NULL)
Expand Down Expand Up @@ -2288,9 +2288,9 @@ static void prism2_tx_ev(local_info_t *local)


/* Called only as a tasklet (software IRQ) */
static void hostap_sta_tx_exc_tasklet(unsigned long data)
static void hostap_sta_tx_exc_tasklet(struct tasklet_struct *t)
{
local_info_t *local = (local_info_t *) data;
local_info_t *local = from_tasklet(local, t, sta_tx_exc_tasklet);
struct sk_buff *skb;

while ((skb = skb_dequeue(&local->sta_tx_exc_list)) != NULL) {
Expand Down Expand Up @@ -2390,9 +2390,9 @@ static void prism2_txexc(local_info_t *local)


/* Called only as a tasklet (software IRQ) */
static void hostap_info_tasklet(unsigned long data)
static void hostap_info_tasklet(struct tasklet_struct *t)
{
local_info_t *local = (local_info_t *) data;
local_info_t *local = from_tasklet(local, t, info_tasklet);
struct sk_buff *skb;

while ((skb = skb_dequeue(&local->info_list)) != NULL) {
Expand Down Expand Up @@ -2469,9 +2469,9 @@ static void prism2_info(local_info_t *local)


/* Called only as a tasklet (software IRQ) */
static void hostap_bap_tasklet(unsigned long data)
static void hostap_bap_tasklet(struct tasklet_struct *t)
{
local_info_t *local = (local_info_t *) data;
local_info_t *local = from_tasklet(local, t, bap_tasklet);
struct net_device *dev = local->dev;
u16 ev;
int frames = 30;
Expand Down Expand Up @@ -3183,7 +3183,7 @@ prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx,
/* Initialize tasklets for handling hardware IRQ related operations
* outside hw IRQ handler */
#define HOSTAP_TASKLET_INIT(q, f, d) \
do { memset((q), 0, sizeof(*(q))); (q)->func = (f); (q)->data = (d); } \
do { memset((q), 0, sizeof(*(q))); (q)->func = (void(*)(unsigned long))(f); } \
while (0)
HOSTAP_TASKLET_INIT(&local->bap_tasklet, hostap_bap_tasklet,
(unsigned long) local);
Expand Down
7 changes: 3 additions & 4 deletions drivers/net/wireless/intersil/orinoco/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,9 +1062,9 @@ static void orinoco_rx(struct net_device *dev,
stats->rx_dropped++;
}

static void orinoco_rx_isr_tasklet(unsigned long data)
static void orinoco_rx_isr_tasklet(struct tasklet_struct *t)
{
struct orinoco_private *priv = (struct orinoco_private *) data;
struct orinoco_private *priv = from_tasklet(priv, t, rx_tasklet);
struct net_device *dev = priv->ndev;
struct orinoco_rx_data *rx_data, *temp;
struct hermes_rx_descriptor *desc;
Expand Down Expand Up @@ -2198,8 +2198,7 @@ struct orinoco_private
INIT_WORK(&priv->wevent_work, orinoco_send_wevents);

INIT_LIST_HEAD(&priv->rx_list);
tasklet_init(&priv->rx_tasklet, orinoco_rx_isr_tasklet,
(unsigned long) priv);
tasklet_setup(&priv->rx_tasklet, orinoco_rx_isr_tasklet);

spin_lock_init(&priv->scan_lock);
INIT_LIST_HEAD(&priv->scan_list);
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/intersil/p54/p54pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ static void p54p_check_tx_ring(struct ieee80211_hw *dev, u32 *index,
}
}

static void p54p_tasklet(unsigned long dev_id)
static void p54p_tasklet(struct tasklet_struct *t)
{
struct ieee80211_hw *dev = (struct ieee80211_hw *)dev_id;
struct p54p_priv *priv = dev->priv;
struct p54p_priv *priv = from_tasklet(priv, t, tasklet);
struct ieee80211_hw *dev = pci_get_drvdata(priv->pdev);
struct p54p_ring_control *ring_control = priv->ring_control;

p54p_check_tx_ring(dev, &priv->tx_idx_mgmt, 3, ring_control->tx_mgmt,
Expand Down Expand Up @@ -620,7 +620,7 @@ static int p54p_probe(struct pci_dev *pdev,
priv->common.tx = p54p_tx;

spin_lock_init(&priv->lock);
tasklet_init(&priv->tasklet, p54p_tasklet, (unsigned long)dev);
tasklet_setup(&priv->tasklet, p54p_tasklet);

err = request_firmware_nowait(THIS_MODULE, 1, "isl3886pci",
&priv->pdev->dev, GFP_KERNEL,
Expand Down

0 comments on commit 7422b54

Please sign in to comment.