.. | .. |
---|
| 1 | +// SPDX-License-Identifier: ISC |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. |
---|
3 | | - * Copyright (c) 2018, The Linux Foundation. All rights reserved. |
---|
4 | | - * |
---|
5 | | - * Permission to use, copy, modify, and/or distribute this software for any |
---|
6 | | - * purpose with or without fee is hereby granted, provided that the above |
---|
7 | | - * copyright notice and this permission notice appear in all copies. |
---|
8 | | - * |
---|
9 | | - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
---|
10 | | - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
---|
11 | | - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
---|
12 | | - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
13 | | - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
---|
14 | | - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
---|
15 | | - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
| 4 | + * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. |
---|
16 | 5 | */ |
---|
17 | 6 | |
---|
18 | 7 | #include <linux/etherdevice.h> |
---|
.. | .. |
---|
27 | 16 | struct wil6210_vif *vif; |
---|
28 | 17 | struct net_device *ndev_i; |
---|
29 | 18 | |
---|
30 | | - for (i = 0; i < wil->max_vifs; i++) { |
---|
| 19 | + for (i = 0; i < GET_MAX_VIFS(wil); i++) { |
---|
31 | 20 | vif = wil->vifs[i]; |
---|
32 | 21 | if (vif) { |
---|
33 | 22 | ndev_i = vif_to_ndev(vif); |
---|
.. | .. |
---|
155 | 144 | struct wil6210_vif *vif; |
---|
156 | 145 | |
---|
157 | 146 | if (!ring->va || !txdata->enabled || |
---|
158 | | - txdata->mid >= wil->max_vifs) |
---|
| 147 | + txdata->mid >= GET_MAX_VIFS(wil)) |
---|
159 | 148 | continue; |
---|
160 | 149 | |
---|
161 | 150 | vif = wil->vifs[txdata->mid]; |
---|
.. | .. |
---|
218 | 207 | cancel_work_sync(&vif->p2p.delayed_listen_work); |
---|
219 | 208 | wil_probe_client_flush(vif); |
---|
220 | 209 | cancel_work_sync(&vif->probe_client_worker); |
---|
| 210 | + cancel_work_sync(&vif->enable_tx_key_worker); |
---|
221 | 211 | } |
---|
222 | 212 | |
---|
223 | 213 | void wil_vif_free(struct wil6210_vif *vif) |
---|
.. | .. |
---|
283 | 273 | |
---|
284 | 274 | INIT_WORK(&vif->probe_client_worker, wil_probe_client_worker); |
---|
285 | 275 | INIT_WORK(&vif->disconnect_worker, wil_disconnect_worker); |
---|
| 276 | + INIT_WORK(&vif->p2p.discovery_expired_work, wil_p2p_listen_expired); |
---|
286 | 277 | INIT_WORK(&vif->p2p.delayed_listen_work, wil_p2p_delayed_listen_work); |
---|
| 278 | + INIT_WORK(&vif->enable_tx_key_worker, wil_enable_tx_key_worker); |
---|
287 | 279 | |
---|
288 | 280 | INIT_LIST_HEAD(&vif->probe_client_pending); |
---|
289 | 281 | |
---|
.. | .. |
---|
294 | 286 | { |
---|
295 | 287 | u8 i; |
---|
296 | 288 | |
---|
297 | | - for (i = 0; i < wil->max_vifs; i++) { |
---|
| 289 | + for (i = 0; i < GET_MAX_VIFS(wil); i++) { |
---|
298 | 290 | if (!wil->vifs[i]) |
---|
299 | 291 | return i; |
---|
300 | 292 | } |
---|
.. | .. |
---|
345 | 337 | ndev->ieee80211_ptr = wdev; |
---|
346 | 338 | ndev->hw_features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM | |
---|
347 | 339 | NETIF_F_SG | NETIF_F_GRO | |
---|
348 | | - NETIF_F_TSO | NETIF_F_TSO6 | |
---|
349 | | - NETIF_F_RXHASH; |
---|
| 340 | + NETIF_F_TSO | NETIF_F_TSO6; |
---|
350 | 341 | |
---|
351 | 342 | ndev->features |= ndev->hw_features; |
---|
352 | 343 | SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy)); |
---|
.. | .. |
---|
501 | 492 | bool any_active = wil_has_active_ifaces(wil, true, false); |
---|
502 | 493 | |
---|
503 | 494 | ASSERT_RTNL(); |
---|
504 | | - if (mid >= wil->max_vifs) { |
---|
| 495 | + if (mid >= GET_MAX_VIFS(wil)) { |
---|
505 | 496 | wil_err(wil, "invalid MID: %d\n", mid); |
---|
506 | 497 | return; |
---|
507 | 498 | } |
---|
.. | .. |
---|
513 | 504 | } |
---|
514 | 505 | |
---|
515 | 506 | mutex_lock(&wil->mutex); |
---|
516 | | - wil6210_disconnect(vif, NULL, WLAN_REASON_DEAUTH_LEAVING, false); |
---|
| 507 | + wil6210_disconnect(vif, NULL, WLAN_REASON_DEAUTH_LEAVING); |
---|
517 | 508 | mutex_unlock(&wil->mutex); |
---|
518 | 509 | |
---|
519 | 510 | ndev = vif_to_ndev(vif); |
---|
.. | .. |
---|
541 | 532 | cancel_work_sync(&vif->disconnect_worker); |
---|
542 | 533 | wil_probe_client_flush(vif); |
---|
543 | 534 | cancel_work_sync(&vif->probe_client_worker); |
---|
| 535 | + cancel_work_sync(&vif->enable_tx_key_worker); |
---|
544 | 536 | /* for VIFs, ndev will be freed by destructor after RTNL is unlocked. |
---|
545 | 537 | * the main interface will be freed in wil_if_free, we need to keep it |
---|
546 | 538 | * a bit longer so logging macros will work. |
---|