| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * at76c503/at76c505 USB driver |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 9 | 10 | * Copyright (c) 2007 Kalle Valo <kalle.valo@iki.fi> |
|---|
| 10 | 11 | * Copyright (c) 2010 Sebastian Smolorz <sesmo@gmx.net> |
|---|
| 11 | 12 | * |
|---|
| 12 | | - * This program is free software; you can redistribute it and/or |
|---|
| 13 | | - * modify it under the terms of the GNU General Public License as |
|---|
| 14 | | - * published by the Free Software Foundation; either version 2 of |
|---|
| 15 | | - * the License, or (at your option) any later version. |
|---|
| 16 | | - * |
|---|
| 17 | 13 | * This file is part of the Berlios driver for WLAN USB devices based on the |
|---|
| 18 | 14 | * Atmel AT76C503A/505/505A. |
|---|
| 19 | 15 | * |
|---|
| .. | .. |
|---|
| 21 | 17 | * |
|---|
| 22 | 18 | * TODO list is at the wiki: |
|---|
| 23 | 19 | * |
|---|
| 24 | | - * http://wireless.kernel.org/en/users/Drivers/at76c50x-usb#TODO |
|---|
| 25 | | - * |
|---|
| 20 | + * https://wireless.wiki.kernel.org/en/users/Drivers/at76c50x-usb#TODO |
|---|
| 26 | 21 | */ |
|---|
| 27 | 22 | |
|---|
| 28 | 23 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 437 | 432 | |
|---|
| 438 | 433 | case STATE_DFU_DOWNLOAD_IDLE: |
|---|
| 439 | 434 | at76_dbg(DBG_DFU, "DOWNLOAD..."); |
|---|
| 440 | | - /* fall through */ |
|---|
| 435 | + fallthrough; |
|---|
| 441 | 436 | case STATE_DFU_IDLE: |
|---|
| 442 | 437 | at76_dbg(DBG_DFU, "DFU IDLE"); |
|---|
| 443 | 438 | |
|---|
| .. | .. |
|---|
| 1204 | 1199 | { |
|---|
| 1205 | 1200 | struct at76_priv *priv = urb->context; |
|---|
| 1206 | 1201 | |
|---|
| 1207 | | - priv->rx_tasklet.data = (unsigned long)urb; |
|---|
| 1208 | 1202 | tasklet_schedule(&priv->rx_tasklet); |
|---|
| 1209 | 1203 | } |
|---|
| 1210 | 1204 | |
|---|
| .. | .. |
|---|
| 1550 | 1544 | return ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ); |
|---|
| 1551 | 1545 | } |
|---|
| 1552 | 1546 | |
|---|
| 1553 | | -static void at76_rx_tasklet(unsigned long param) |
|---|
| 1547 | +static void at76_rx_tasklet(struct tasklet_struct *t) |
|---|
| 1554 | 1548 | { |
|---|
| 1555 | | - struct urb *urb = (struct urb *)param; |
|---|
| 1556 | | - struct at76_priv *priv = urb->context; |
|---|
| 1549 | + struct at76_priv *priv = from_tasklet(priv, t, rx_tasklet); |
|---|
| 1550 | + struct urb *urb = priv->rx_urb; |
|---|
| 1557 | 1551 | struct at76_rx_buffer *buf; |
|---|
| 1558 | 1552 | struct ieee80211_rx_status rx_status = { 0 }; |
|---|
| 1559 | 1553 | |
|---|
| .. | .. |
|---|
| 2220 | 2214 | INIT_WORK(&priv->work_join_bssid, at76_work_join_bssid); |
|---|
| 2221 | 2215 | INIT_DELAYED_WORK(&priv->dwork_hw_scan, at76_dwork_hw_scan); |
|---|
| 2222 | 2216 | |
|---|
| 2223 | | - tasklet_init(&priv->rx_tasklet, at76_rx_tasklet, 0); |
|---|
| 2217 | + tasklet_setup(&priv->rx_tasklet, at76_rx_tasklet); |
|---|
| 2224 | 2218 | |
|---|
| 2225 | 2219 | priv->pm_mode = AT76_PM_OFF; |
|---|
| 2226 | 2220 | priv->pm_period = 0; |
|---|
| .. | .. |
|---|
| 2241 | 2235 | at76_dbg(DBG_PROC_ENTRY, "%s: ENTER", __func__); |
|---|
| 2242 | 2236 | |
|---|
| 2243 | 2237 | at76_dbg(DBG_URB, "%s: NumEndpoints %d ", __func__, |
|---|
| 2244 | | - interface->altsetting[0].desc.bNumEndpoints); |
|---|
| 2238 | + interface->cur_altsetting->desc.bNumEndpoints); |
|---|
| 2245 | 2239 | |
|---|
| 2246 | 2240 | ep_in = NULL; |
|---|
| 2247 | 2241 | ep_out = NULL; |
|---|