1 /******************************************************************************
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
8 * Copyright(c) 2012 - 2013 Intel Corporation. All rights reserved.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of version 2 of the GNU General Public License as
12 * published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
24 * The full GNU General Public License is included in this distribution
25 * in the file called LICENSE.GPL.
27 * Contact Information:
28 * Intel Linux Wireless <ilw@linux.intel.com>
29 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
33 * Copyright(c) 2012 - 2013 Intel Corporation. All rights reserved.
34 * All rights reserved.
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
40 * * Redistributions of source code must retain the above copyright
41 * notice, this list of conditions and the following disclaimer.
42 * * Redistributions in binary form must reproduce the above copyright
43 * notice, this list of conditions and the following disclaimer in
44 * the documentation and/or other materials provided with the
46 * * Neither the name Intel Corporation nor the names of its
47 * contributors may be used to endorse or promote products derived
48 * from this software without specific prior written permission.
50 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
51 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
52 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
53 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
54 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
56 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
57 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
58 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
60 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
62 *****************************************************************************/
63 #include <linux/kernel.h>
64 #include <linux/slab.h>
65 #include <linux/skbuff.h>
66 #include <linux/netdevice.h>
67 #include <linux/etherdevice.h>
68 #include <net/mac80211.h>
70 #include "iwl-op-mode.h"
74 #include "time-event.h"
75 #include "iwl-eeprom-parse.h"
76 #include "fw-api-scan.h"
77 #include "iwl-phy-db.h"
79 static const struct ieee80211_iface_limit iwl_mvm_limits
[] = {
82 .types
= BIT(NL80211_IFTYPE_STATION
) |
83 BIT(NL80211_IFTYPE_AP
),
87 .types
= BIT(NL80211_IFTYPE_P2P_CLIENT
) |
88 BIT(NL80211_IFTYPE_P2P_GO
),
92 .types
= BIT(NL80211_IFTYPE_P2P_DEVICE
),
96 static const struct ieee80211_iface_combination iwl_mvm_iface_combinations
[] = {
98 .num_different_channels
= 1,
100 .limits
= iwl_mvm_limits
,
101 .n_limits
= ARRAY_SIZE(iwl_mvm_limits
),
105 int iwl_mvm_mac_setup_register(struct iwl_mvm
*mvm
)
107 struct ieee80211_hw
*hw
= mvm
->hw
;
110 /* Tell mac80211 our characteristics */
111 hw
->flags
= IEEE80211_HW_SIGNAL_DBM
|
112 IEEE80211_HW_SPECTRUM_MGMT
|
113 IEEE80211_HW_REPORTS_TX_ACK_STATUS
|
114 IEEE80211_HW_QUEUE_CONTROL
|
115 IEEE80211_HW_WANT_MONITOR_VIF
|
116 IEEE80211_HW_SCAN_WHILE_IDLE
|
117 IEEE80211_HW_NEED_DTIM_PERIOD
|
118 IEEE80211_HW_SUPPORTS_PS
|
119 IEEE80211_HW_SUPPORTS_DYNAMIC_PS
|
120 IEEE80211_HW_AMPDU_AGGREGATION
;
122 hw
->queues
= IWL_FIRST_AMPDU_QUEUE
;
123 hw
->offchannel_tx_hw_queue
= IWL_OFFCHANNEL_QUEUE
;
124 hw
->rate_control_algorithm
= "iwl-mvm-rs";
127 * Enable 11w if advertised by firmware and software crypto
128 * is not enabled (as the firmware will interpret some mgmt
129 * packets, so enabling it with software crypto isn't safe)
131 if (mvm
->fw
->ucode_capa
.flags
& IWL_UCODE_TLV_FLAGS_MFP
&&
132 !iwlwifi_mod_params
.sw_crypto
)
133 hw
->flags
|= IEEE80211_HW_MFP_CAPABLE
;
135 hw
->sta_data_size
= sizeof(struct iwl_mvm_sta
);
136 hw
->vif_data_size
= sizeof(struct iwl_mvm_vif
);
137 hw
->chanctx_data_size
= sizeof(struct iwl_mvm_phy_ctxt
);
139 hw
->wiphy
->interface_modes
= BIT(NL80211_IFTYPE_STATION
) |
140 BIT(NL80211_IFTYPE_P2P_CLIENT
) |
141 BIT(NL80211_IFTYPE_AP
) |
142 BIT(NL80211_IFTYPE_P2P_GO
) |
143 BIT(NL80211_IFTYPE_P2P_DEVICE
);
145 hw
->wiphy
->flags
|= WIPHY_FLAG_CUSTOM_REGULATORY
|
146 WIPHY_FLAG_DISABLE_BEACON_HINTS
|
149 hw
->wiphy
->iface_combinations
= iwl_mvm_iface_combinations
;
150 hw
->wiphy
->n_iface_combinations
=
151 ARRAY_SIZE(iwl_mvm_iface_combinations
);
153 hw
->wiphy
->max_remain_on_channel_duration
= 500;
154 hw
->max_listen_interval
= IWL_CONN_MAX_LISTEN_INTERVAL
;
156 /* Extract MAC address */
157 memcpy(mvm
->addresses
[0].addr
, mvm
->nvm_data
->hw_addr
, ETH_ALEN
);
158 hw
->wiphy
->addresses
= mvm
->addresses
;
159 hw
->wiphy
->n_addresses
= 1;
160 num_mac
= mvm
->nvm_data
->n_hw_addrs
;
162 memcpy(mvm
->addresses
[1].addr
, mvm
->addresses
[0].addr
,
164 mvm
->addresses
[1].addr
[5]++;
165 hw
->wiphy
->n_addresses
++;
168 /* we create the 802.11 header and a max-length SSID element */
169 hw
->wiphy
->max_scan_ie_len
=
170 mvm
->fw
->ucode_capa
.max_probe_length
- 24 - 34;
171 hw
->wiphy
->max_scan_ssids
= PROBE_OPTION_MAX
;
173 if (mvm
->nvm_data
->bands
[IEEE80211_BAND_2GHZ
].n_channels
)
174 hw
->wiphy
->bands
[IEEE80211_BAND_2GHZ
] =
175 &mvm
->nvm_data
->bands
[IEEE80211_BAND_2GHZ
];
176 if (mvm
->nvm_data
->bands
[IEEE80211_BAND_5GHZ
].n_channels
)
177 hw
->wiphy
->bands
[IEEE80211_BAND_5GHZ
] =
178 &mvm
->nvm_data
->bands
[IEEE80211_BAND_5GHZ
];
180 hw
->wiphy
->hw_version
= mvm
->trans
->hw_id
;
182 if (iwlwifi_mod_params
.power_save
)
183 hw
->wiphy
->flags
|= WIPHY_FLAG_PS_ON_BY_DEFAULT
;
185 hw
->wiphy
->flags
&= ~WIPHY_FLAG_PS_ON_BY_DEFAULT
;
187 hw
->wiphy
->features
|= NL80211_FEATURE_P2P_GO_CTWIN
|
188 NL80211_FEATURE_P2P_GO_OPPPS
;
190 mvm
->rts_threshold
= IEEE80211_MAX_RTS_THRESHOLD
;
192 #ifdef CONFIG_PM_SLEEP
193 if (mvm
->fw
->img
[IWL_UCODE_WOWLAN
].sec
[0].len
&&
194 mvm
->trans
->ops
->d3_suspend
&&
195 mvm
->trans
->ops
->d3_resume
&&
196 device_can_wakeup(mvm
->trans
->dev
)) {
197 hw
->wiphy
->wowlan
.flags
= WIPHY_WOWLAN_MAGIC_PKT
|
198 WIPHY_WOWLAN_DISCONNECT
|
199 WIPHY_WOWLAN_EAP_IDENTITY_REQ
|
200 WIPHY_WOWLAN_RFKILL_RELEASE
;
201 if (!iwlwifi_mod_params
.sw_crypto
)
202 hw
->wiphy
->wowlan
.flags
|=
203 WIPHY_WOWLAN_SUPPORTS_GTK_REKEY
|
204 WIPHY_WOWLAN_GTK_REKEY_FAILURE
|
205 WIPHY_WOWLAN_4WAY_HANDSHAKE
;
207 hw
->wiphy
->wowlan
.n_patterns
= IWL_WOWLAN_MAX_PATTERNS
;
208 hw
->wiphy
->wowlan
.pattern_min_len
= IWL_WOWLAN_MIN_PATTERN_LEN
;
209 hw
->wiphy
->wowlan
.pattern_max_len
= IWL_WOWLAN_MAX_PATTERN_LEN
;
213 ret
= iwl_mvm_leds_init(mvm
);
217 return ieee80211_register_hw(mvm
->hw
);
220 static void iwl_mvm_mac_tx(struct ieee80211_hw
*hw
,
221 struct ieee80211_tx_control
*control
,
224 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
226 if (test_bit(IWL_MVM_STATUS_HW_RFKILL
, &mvm
->status
)) {
227 IWL_DEBUG_DROP(mvm
, "Dropping - RF KILL\n");
231 if (IEEE80211_SKB_CB(skb
)->hw_queue
== IWL_OFFCHANNEL_QUEUE
&&
232 !test_bit(IWL_MVM_STATUS_ROC_RUNNING
, &mvm
->status
))
236 if (iwl_mvm_tx_skb(mvm
, skb
, control
->sta
))
241 if (iwl_mvm_tx_skb_non_sta(mvm
, skb
))
245 ieee80211_free_txskb(hw
, skb
);
248 static int iwl_mvm_mac_ampdu_action(struct ieee80211_hw
*hw
,
249 struct ieee80211_vif
*vif
,
250 enum ieee80211_ampdu_mlme_action action
,
251 struct ieee80211_sta
*sta
, u16 tid
,
252 u16
*ssn
, u8 buf_size
)
254 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
257 IWL_DEBUG_HT(mvm
, "A-MPDU action on addr %pM tid %d: action %d\n",
258 sta
->addr
, tid
, action
);
260 if (!(mvm
->nvm_data
->sku_cap_11n_enable
))
263 mutex_lock(&mvm
->mutex
);
266 case IEEE80211_AMPDU_RX_START
:
267 if (iwlwifi_mod_params
.disable_11n
& IWL_DISABLE_HT_RXAGG
) {
271 ret
= iwl_mvm_sta_rx_agg(mvm
, sta
, tid
, *ssn
, true);
273 case IEEE80211_AMPDU_RX_STOP
:
274 ret
= iwl_mvm_sta_rx_agg(mvm
, sta
, tid
, 0, false);
276 case IEEE80211_AMPDU_TX_START
:
277 ret
= iwl_mvm_sta_tx_agg_start(mvm
, vif
, sta
, tid
, ssn
);
279 case IEEE80211_AMPDU_TX_STOP_CONT
:
280 case IEEE80211_AMPDU_TX_STOP_FLUSH
:
281 case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT
:
282 ret
= iwl_mvm_sta_tx_agg_stop(mvm
, vif
, sta
, tid
);
284 case IEEE80211_AMPDU_TX_OPERATIONAL
:
285 ret
= iwl_mvm_sta_tx_agg_oper(mvm
, vif
, sta
, tid
, buf_size
);
292 mutex_unlock(&mvm
->mutex
);
297 static void iwl_mvm_cleanup_iterator(void *data
, u8
*mac
,
298 struct ieee80211_vif
*vif
)
300 struct iwl_mvm
*mvm
= data
;
301 struct iwl_mvm_vif
*mvmvif
= iwl_mvm_vif_from_mac80211(vif
);
303 mvmvif
->uploaded
= false;
304 mvmvif
->ap_sta_id
= IWL_MVM_STATION_COUNT
;
306 /* does this make sense at all? */
309 spin_lock_bh(&mvm
->time_event_lock
);
310 iwl_mvm_te_clear_data(mvm
, &mvmvif
->time_event_data
);
311 spin_unlock_bh(&mvm
->time_event_lock
);
313 if (vif
->type
!= NL80211_IFTYPE_P2P_DEVICE
)
314 mvmvif
->phy_ctxt
= NULL
;
317 static void iwl_mvm_restart_cleanup(struct iwl_mvm
*mvm
)
319 iwl_trans_stop_device(mvm
->trans
);
320 iwl_trans_stop_hw(mvm
->trans
, false);
322 mvm
->scan_status
= IWL_MVM_SCAN_NONE
;
324 /* just in case one was running */
325 ieee80211_remain_on_channel_expired(mvm
->hw
);
327 ieee80211_iterate_active_interfaces_atomic(
328 mvm
->hw
, IEEE80211_IFACE_ITER_RESUME_ALL
,
329 iwl_mvm_cleanup_iterator
, mvm
);
331 memset(mvm
->fw_key_table
, 0, sizeof(mvm
->fw_key_table
));
332 memset(mvm
->sta_drained
, 0, sizeof(mvm
->sta_drained
));
334 ieee80211_wake_queues(mvm
->hw
);
339 static int iwl_mvm_mac_start(struct ieee80211_hw
*hw
)
341 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
344 mutex_lock(&mvm
->mutex
);
346 /* Clean up some internal and mac80211 state on restart */
347 if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART
, &mvm
->status
))
348 iwl_mvm_restart_cleanup(mvm
);
350 ret
= iwl_mvm_up(mvm
);
351 mutex_unlock(&mvm
->mutex
);
356 static void iwl_mvm_mac_restart_complete(struct ieee80211_hw
*hw
)
358 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
361 mutex_lock(&mvm
->mutex
);
363 clear_bit(IWL_MVM_STATUS_IN_HW_RESTART
, &mvm
->status
);
364 ret
= iwl_mvm_update_quotas(mvm
, NULL
);
366 IWL_ERR(mvm
, "Failed to update quotas after restart (%d)\n",
369 mutex_unlock(&mvm
->mutex
);
372 static void iwl_mvm_mac_stop(struct ieee80211_hw
*hw
)
374 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
376 flush_work(&mvm
->async_handlers_wk
);
378 mutex_lock(&mvm
->mutex
);
379 /* async_handlers_wk is now blocked */
382 * The work item could be running or queued if the
383 * ROC time event stops just as we get here.
385 cancel_work_sync(&mvm
->roc_done_wk
);
387 iwl_trans_stop_device(mvm
->trans
);
388 iwl_trans_stop_hw(mvm
->trans
, false);
390 iwl_mvm_async_handlers_purge(mvm
);
391 /* async_handlers_list is empty and will stay empty: HW is stopped */
393 /* the fw is stopped, the aux sta is dead: clean up driver state */
394 iwl_mvm_dealloc_int_sta(mvm
, &mvm
->aux_sta
);
396 mutex_unlock(&mvm
->mutex
);
399 * The worker might have been waiting for the mutex, let it run and
400 * discover that its list is now empty.
402 cancel_work_sync(&mvm
->async_handlers_wk
);
405 static void iwl_mvm_pm_disable_iterator(void *data
, u8
*mac
,
406 struct ieee80211_vif
*vif
)
408 struct iwl_mvm
*mvm
= data
;
411 ret
= iwl_mvm_power_disable(mvm
, vif
);
413 IWL_ERR(mvm
, "failed to disable power management\n");
416 static void iwl_mvm_power_update_iterator(void *data
, u8
*mac
,
417 struct ieee80211_vif
*vif
)
419 struct iwl_mvm
*mvm
= data
;
421 iwl_mvm_power_update_mode(mvm
, vif
);
424 static int iwl_mvm_mac_add_interface(struct ieee80211_hw
*hw
,
425 struct ieee80211_vif
*vif
)
427 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
428 struct iwl_mvm_vif
*mvmvif
= iwl_mvm_vif_from_mac80211(vif
);
432 * Not much to do here. The stack will not allow interface
433 * types or combinations that we didn't advertise, so we
434 * don't really have to check the types.
437 mutex_lock(&mvm
->mutex
);
439 /* Allocate resources for the MAC context, and add it the the fw */
440 ret
= iwl_mvm_mac_ctxt_init(mvm
, vif
);
445 * The AP binding flow can be done only after the beacon
446 * template is configured (which happens only in the mac80211
447 * start_ap() flow), and adding the broadcast station can happen
448 * only after the binding.
449 * In addition, since modifying the MAC before adding a bcast
450 * station is not allowed by the FW, delay the adding of MAC context to
451 * the point where we can also add the bcast station.
452 * In short: there's not much we can do at this point, other than
453 * allocating resources :)
455 if (vif
->type
== NL80211_IFTYPE_AP
) {
456 u32 qmask
= iwl_mvm_mac_get_queues_mask(mvm
, vif
);
457 ret
= iwl_mvm_allocate_int_sta(mvm
, &mvmvif
->bcast_sta
,
460 IWL_ERR(mvm
, "Failed to allocate bcast sta\n");
468 * TODO: remove this temporary code.
469 * Currently MVM FW supports power management only on single MAC.
470 * Iterate and disable PM on all active interfaces.
471 * Note: the method below does not count the new interface being added
475 if (mvm
->vif_count
> 1) {
476 IWL_DEBUG_MAC80211(mvm
,
477 "Disable power on existing interfaces\n");
478 ieee80211_iterate_active_interfaces(
480 IEEE80211_IFACE_ITER_NORMAL
,
481 iwl_mvm_pm_disable_iterator
, mvm
);
484 ret
= iwl_mvm_mac_ctxt_add(mvm
, vif
);
489 * Update power state on the new interface. Admittedly, based on
490 * mac80211 logics this power update will disable power management
492 iwl_mvm_power_update_mode(mvm
, vif
);
495 * P2P_DEVICE interface does not have a channel context assigned to it,
496 * so a dedicated PHY context is allocated to it and the corresponding
497 * MAC context is bound to it at this stage.
499 if (vif
->type
== NL80211_IFTYPE_P2P_DEVICE
) {
500 struct ieee80211_channel
*chan
;
501 struct cfg80211_chan_def chandef
;
503 mvmvif
->phy_ctxt
= &mvm
->phy_ctxt_roc
;
506 * The channel used here isn't relevant as it's
507 * going to be overwritten as part of the ROC flow.
508 * For now use the first channel we have.
510 chan
= &mvm
->hw
->wiphy
->bands
[IEEE80211_BAND_2GHZ
]->channels
[0];
511 cfg80211_chandef_create(&chandef
, chan
, NL80211_CHAN_NO_HT
);
512 ret
= iwl_mvm_phy_ctxt_add(mvm
, mvmvif
->phy_ctxt
,
517 ret
= iwl_mvm_binding_add_vif(mvm
, vif
);
521 ret
= iwl_mvm_add_bcast_sta(mvm
, vif
, &mvmvif
->bcast_sta
);
525 /* Save a pointer to p2p device vif, so it can later be used to
526 * update the p2p device MAC when a GO is started/stopped */
527 mvm
->p2p_device_vif
= vif
;
533 iwl_mvm_binding_remove_vif(mvm
, vif
);
535 iwl_mvm_phy_ctxt_remove(mvm
, mvmvif
->phy_ctxt
);
537 mvmvif
->phy_ctxt
= NULL
;
538 iwl_mvm_mac_ctxt_remove(mvm
, vif
);
541 * TODO: remove this temporary code.
542 * Currently MVM FW supports power management only on single MAC.
543 * Check if only one additional interface remains after rereasing
544 * current one. Update power mode on the remaining interface.
547 IWL_DEBUG_MAC80211(mvm
, "Currently %d interfaces active\n",
549 if (mvm
->vif_count
== 1) {
550 ieee80211_iterate_active_interfaces(
551 mvm
->hw
, IEEE80211_IFACE_ITER_NORMAL
,
552 iwl_mvm_power_update_iterator
, mvm
);
554 iwl_mvm_mac_ctxt_release(mvm
, vif
);
556 mutex_unlock(&mvm
->mutex
);
561 static void iwl_mvm_mac_remove_interface(struct ieee80211_hw
*hw
,
562 struct ieee80211_vif
*vif
)
564 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
565 struct iwl_mvm_vif
*mvmvif
= iwl_mvm_vif_from_mac80211(vif
);
568 for (ac
= 0; ac
< IEEE80211_NUM_ACS
; ac
++)
569 if (vif
->hw_queue
[ac
] != IEEE80211_INVAL_HW_QUEUE
)
570 tfd_msk
|= BIT(vif
->hw_queue
[ac
]);
572 if (vif
->cab_queue
!= IEEE80211_INVAL_HW_QUEUE
)
573 tfd_msk
|= BIT(vif
->cab_queue
);
576 mutex_lock(&mvm
->mutex
);
577 iwl_mvm_flush_tx_path(mvm
, tfd_msk
, true);
578 mutex_unlock(&mvm
->mutex
);
581 if (vif
->type
== NL80211_IFTYPE_P2P_DEVICE
) {
583 * Flush the ROC worker which will flush the OFFCHANNEL queue.
584 * We assume here that all the packets sent to the OFFCHANNEL
585 * queue are sent in ROC session.
587 flush_work(&mvm
->roc_done_wk
);
590 * By now, all the AC queues are empty. The AGG queues are
591 * empty too. We already got all the Tx responses for all the
592 * packets in the queues. The drain work can have been
593 * triggered. Flush it. This work item takes the mutex, so kill
594 * it before we take it.
596 flush_work(&mvm
->sta_drained_wk
);
599 mutex_lock(&mvm
->mutex
);
602 * For AP/GO interface, the tear down of the resources allocated to the
603 * interface should be handled as part of the bss_info_changed flow.
605 if (vif
->type
== NL80211_IFTYPE_AP
) {
606 iwl_mvm_dealloc_int_sta(mvm
, &mvmvif
->bcast_sta
);
610 if (vif
->type
== NL80211_IFTYPE_P2P_DEVICE
) {
611 mvm
->p2p_device_vif
= NULL
;
612 iwl_mvm_rm_bcast_sta(mvm
, &mvmvif
->bcast_sta
);
613 iwl_mvm_binding_remove_vif(mvm
, vif
);
614 iwl_mvm_phy_ctxt_remove(mvm
, mvmvif
->phy_ctxt
);
615 mvmvif
->phy_ctxt
= NULL
;
619 * TODO: remove this temporary code.
620 * Currently MVM FW supports power management only on single MAC.
621 * Check if only one additional interface remains after removing
622 * current one. Update power mode on the remaining interface.
626 IWL_DEBUG_MAC80211(mvm
, "Currently %d interfaces active\n",
628 if (mvm
->vif_count
== 1) {
629 ieee80211_iterate_active_interfaces(
630 mvm
->hw
, IEEE80211_IFACE_ITER_NORMAL
,
631 iwl_mvm_power_update_iterator
, mvm
);
634 iwl_mvm_mac_ctxt_remove(mvm
, vif
);
637 iwl_mvm_mac_ctxt_release(mvm
, vif
);
638 mutex_unlock(&mvm
->mutex
);
641 static int iwl_mvm_mac_config(struct ieee80211_hw
*hw
, u32 changed
)
646 static void iwl_mvm_configure_filter(struct ieee80211_hw
*hw
,
647 unsigned int changed_flags
,
648 unsigned int *total_flags
,
654 static void iwl_mvm_bss_info_changed_station(struct iwl_mvm
*mvm
,
655 struct ieee80211_vif
*vif
,
656 struct ieee80211_bss_conf
*bss_conf
,
659 struct iwl_mvm_vif
*mvmvif
= iwl_mvm_vif_from_mac80211(vif
);
662 ret
= iwl_mvm_mac_ctxt_changed(mvm
, vif
);
664 IWL_ERR(mvm
, "failed to update MAC %pM\n", vif
->addr
);
666 if (changes
& BSS_CHANGED_ASSOC
) {
667 if (bss_conf
->assoc
) {
668 /* add quota for this interface */
669 ret
= iwl_mvm_update_quotas(mvm
, vif
);
671 IWL_ERR(mvm
, "failed to update quotas\n");
674 iwl_mvm_remove_time_event(mvm
, mvmvif
,
675 &mvmvif
->time_event_data
);
676 } else if (mvmvif
->ap_sta_id
!= IWL_MVM_STATION_COUNT
) {
677 /* remove AP station now that the MAC is unassoc */
678 ret
= iwl_mvm_rm_sta_id(mvm
, vif
, mvmvif
->ap_sta_id
);
680 IWL_ERR(mvm
, "failed to remove AP station\n");
681 mvmvif
->ap_sta_id
= IWL_MVM_STATION_COUNT
;
682 /* remove quota for this interface */
683 ret
= iwl_mvm_update_quotas(mvm
, NULL
);
685 IWL_ERR(mvm
, "failed to update quotas\n");
687 } else if (changes
& BSS_CHANGED_PS
) {
689 * TODO: remove this temporary code.
690 * Currently MVM FW supports power management only on single
691 * MAC. Avoid power mode update if more than one interface
694 IWL_DEBUG_MAC80211(mvm
, "Currently %d interfaces active\n",
696 if (mvm
->vif_count
== 1) {
697 ret
= iwl_mvm_power_update_mode(mvm
, vif
);
699 IWL_ERR(mvm
, "failed to update power mode\n");
704 static int iwl_mvm_start_ap(struct ieee80211_hw
*hw
, struct ieee80211_vif
*vif
)
706 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
707 struct iwl_mvm_vif
*mvmvif
= iwl_mvm_vif_from_mac80211(vif
);
710 mutex_lock(&mvm
->mutex
);
712 /* Send the beacon template */
713 ret
= iwl_mvm_mac_ctxt_beacon_changed(mvm
, vif
);
717 /* Add the mac context */
718 ret
= iwl_mvm_mac_ctxt_add(mvm
, vif
);
722 /* Perform the binding */
723 ret
= iwl_mvm_binding_add_vif(mvm
, vif
);
727 mvmvif
->ap_active
= true;
729 /* Send the bcast station. At this stage the TBTT and DTIM time events
730 * are added and applied to the scheduler */
731 ret
= iwl_mvm_send_bcast_sta(mvm
, vif
, &mvmvif
->bcast_sta
);
735 ret
= iwl_mvm_update_quotas(mvm
, vif
);
739 /* Need to update the P2P Device MAC */
740 if (vif
->p2p
&& mvm
->p2p_device_vif
)
741 iwl_mvm_mac_ctxt_changed(mvm
, mvm
->p2p_device_vif
);
743 mutex_unlock(&mvm
->mutex
);
747 iwl_mvm_send_rm_bcast_sta(mvm
, &mvmvif
->bcast_sta
);
749 iwl_mvm_binding_remove_vif(mvm
, vif
);
751 iwl_mvm_mac_ctxt_remove(mvm
, vif
);
753 mutex_unlock(&mvm
->mutex
);
757 static void iwl_mvm_stop_ap(struct ieee80211_hw
*hw
, struct ieee80211_vif
*vif
)
759 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
760 struct iwl_mvm_vif
*mvmvif
= iwl_mvm_vif_from_mac80211(vif
);
762 mutex_lock(&mvm
->mutex
);
764 mvmvif
->ap_active
= false;
766 /* Need to update the P2P Device MAC */
767 if (vif
->p2p
&& mvm
->p2p_device_vif
)
768 iwl_mvm_mac_ctxt_changed(mvm
, mvm
->p2p_device_vif
);
770 iwl_mvm_update_quotas(mvm
, NULL
);
771 iwl_mvm_send_rm_bcast_sta(mvm
, &mvmvif
->bcast_sta
);
772 iwl_mvm_binding_remove_vif(mvm
, vif
);
773 iwl_mvm_mac_ctxt_remove(mvm
, vif
);
775 mutex_unlock(&mvm
->mutex
);
778 static void iwl_mvm_bss_info_changed_ap(struct iwl_mvm
*mvm
,
779 struct ieee80211_vif
*vif
,
780 struct ieee80211_bss_conf
*bss_conf
,
783 /* Need to send a new beacon template to the FW */
784 if (changes
& BSS_CHANGED_BEACON
) {
785 if (iwl_mvm_mac_ctxt_beacon_changed(mvm
, vif
))
786 IWL_WARN(mvm
, "Failed updating beacon data\n");
790 static void iwl_mvm_bss_info_changed(struct ieee80211_hw
*hw
,
791 struct ieee80211_vif
*vif
,
792 struct ieee80211_bss_conf
*bss_conf
,
795 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
797 mutex_lock(&mvm
->mutex
);
800 case NL80211_IFTYPE_STATION
:
801 iwl_mvm_bss_info_changed_station(mvm
, vif
, bss_conf
, changes
);
803 case NL80211_IFTYPE_AP
:
804 iwl_mvm_bss_info_changed_ap(mvm
, vif
, bss_conf
, changes
);
807 /* shouldn't happen */
811 mutex_unlock(&mvm
->mutex
);
814 static int iwl_mvm_mac_hw_scan(struct ieee80211_hw
*hw
,
815 struct ieee80211_vif
*vif
,
816 struct cfg80211_scan_request
*req
)
818 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
821 if (req
->n_channels
== 0 || req
->n_channels
> MAX_NUM_SCAN_CHANNELS
)
824 mutex_lock(&mvm
->mutex
);
826 if (mvm
->scan_status
== IWL_MVM_SCAN_NONE
)
827 ret
= iwl_mvm_scan_request(mvm
, vif
, req
);
831 mutex_unlock(&mvm
->mutex
);
836 static void iwl_mvm_mac_cancel_hw_scan(struct ieee80211_hw
*hw
,
837 struct ieee80211_vif
*vif
)
839 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
841 mutex_lock(&mvm
->mutex
);
843 iwl_mvm_cancel_scan(mvm
);
845 mutex_unlock(&mvm
->mutex
);
849 iwl_mvm_mac_allow_buffered_frames(struct ieee80211_hw
*hw
,
850 struct ieee80211_sta
*sta
, u16 tid
,
852 enum ieee80211_frame_release_type reason
,
855 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
856 struct iwl_mvm_sta
*mvmsta
= (void *)sta
->drv_priv
;
858 /* TODO: how do we tell the fw to send frames for a specific TID */
861 * The fw will send EOSP notification when the last frame will be
864 iwl_mvm_sta_modify_sleep_tx_count(mvm
, mvmsta
->sta_id
, reason
,
868 static void iwl_mvm_mac_sta_notify(struct ieee80211_hw
*hw
,
869 struct ieee80211_vif
*vif
,
870 enum sta_notify_cmd cmd
,
871 struct ieee80211_sta
*sta
)
873 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
874 struct iwl_mvm_sta
*mvmsta
= (void *)sta
->drv_priv
;
877 case STA_NOTIFY_SLEEP
:
878 if (atomic_read(&mvmsta
->pending_frames
) > 0)
879 ieee80211_sta_block_awake(hw
, sta
, true);
881 * The fw updates the STA to be asleep. Tx packets on the Tx
882 * queues to this station will not be transmitted. The fw will
883 * send a Tx response with TX_STATUS_FAIL_DEST_PS.
886 case STA_NOTIFY_AWAKE
:
887 if (WARN_ON(mvmsta
->sta_id
== IWL_INVALID_STATION
))
889 iwl_mvm_sta_modify_ps_wake(mvm
, mvmsta
->sta_id
);
896 static int iwl_mvm_mac_sta_state(struct ieee80211_hw
*hw
,
897 struct ieee80211_vif
*vif
,
898 struct ieee80211_sta
*sta
,
899 enum ieee80211_sta_state old_state
,
900 enum ieee80211_sta_state new_state
)
902 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
903 struct iwl_mvm_vif
*mvmvif
= iwl_mvm_vif_from_mac80211(vif
);
906 IWL_DEBUG_MAC80211(mvm
, "station %pM state change %d->%d\n",
907 sta
->addr
, old_state
, new_state
);
909 /* this would be a mac80211 bug ... but don't crash */
910 if (WARN_ON_ONCE(!mvmvif
->phy_ctxt
))
913 /* if a STA is being removed, reuse its ID */
914 flush_work(&mvm
->sta_drained_wk
);
916 mutex_lock(&mvm
->mutex
);
917 if (old_state
== IEEE80211_STA_NOTEXIST
&&
918 new_state
== IEEE80211_STA_NONE
) {
919 ret
= iwl_mvm_add_sta(mvm
, vif
, sta
);
920 } else if (old_state
== IEEE80211_STA_NONE
&&
921 new_state
== IEEE80211_STA_AUTH
) {
923 } else if (old_state
== IEEE80211_STA_AUTH
&&
924 new_state
== IEEE80211_STA_ASSOC
) {
925 iwl_mvm_rs_rate_init(mvm
, sta
, mvmvif
->phy_ctxt
->channel
->band
);
927 } else if (old_state
== IEEE80211_STA_ASSOC
&&
928 new_state
== IEEE80211_STA_AUTHORIZED
) {
930 } else if (old_state
== IEEE80211_STA_AUTHORIZED
&&
931 new_state
== IEEE80211_STA_ASSOC
) {
933 } else if (old_state
== IEEE80211_STA_ASSOC
&&
934 new_state
== IEEE80211_STA_AUTH
) {
936 } else if (old_state
== IEEE80211_STA_AUTH
&&
937 new_state
== IEEE80211_STA_NONE
) {
939 } else if (old_state
== IEEE80211_STA_NONE
&&
940 new_state
== IEEE80211_STA_NOTEXIST
) {
941 ret
= iwl_mvm_rm_sta(mvm
, vif
, sta
);
945 mutex_unlock(&mvm
->mutex
);
950 static int iwl_mvm_mac_set_rts_threshold(struct ieee80211_hw
*hw
, u32 value
)
952 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
954 mvm
->rts_threshold
= value
;
959 static int iwl_mvm_mac_conf_tx(struct ieee80211_hw
*hw
,
960 struct ieee80211_vif
*vif
, u16 ac
,
961 const struct ieee80211_tx_queue_params
*params
)
963 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
964 struct iwl_mvm_vif
*mvmvif
= iwl_mvm_vif_from_mac80211(vif
);
966 mvmvif
->queue_params
[ac
] = *params
;
969 * No need to update right away, we'll get BSS_CHANGED_QOS
970 * The exception is P2P_DEVICE interface which needs immediate update.
972 if (vif
->type
== NL80211_IFTYPE_P2P_DEVICE
) {
975 mutex_lock(&mvm
->mutex
);
976 ret
= iwl_mvm_mac_ctxt_changed(mvm
, vif
);
977 mutex_unlock(&mvm
->mutex
);
983 static void iwl_mvm_mac_mgd_prepare_tx(struct ieee80211_hw
*hw
,
984 struct ieee80211_vif
*vif
)
986 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
987 u32 duration
= min(IWL_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS
,
988 200 + vif
->bss_conf
.beacon_int
);
989 u32 min_duration
= min(IWL_MVM_TE_SESSION_PROTECTION_MIN_TIME_MS
,
990 100 + vif
->bss_conf
.beacon_int
);
992 if (WARN_ON_ONCE(vif
->bss_conf
.assoc
))
995 mutex_lock(&mvm
->mutex
);
996 /* Try really hard to protect the session and hear a beacon */
997 iwl_mvm_protect_session(mvm
, vif
, duration
, min_duration
);
998 mutex_unlock(&mvm
->mutex
);
1001 static int iwl_mvm_mac_set_key(struct ieee80211_hw
*hw
,
1002 enum set_key_cmd cmd
,
1003 struct ieee80211_vif
*vif
,
1004 struct ieee80211_sta
*sta
,
1005 struct ieee80211_key_conf
*key
)
1007 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
1010 if (iwlwifi_mod_params
.sw_crypto
) {
1011 IWL_DEBUG_MAC80211(mvm
, "leave - hwcrypto disabled\n");
1015 switch (key
->cipher
) {
1016 case WLAN_CIPHER_SUITE_TKIP
:
1017 key
->flags
|= IEEE80211_KEY_FLAG_GENERATE_MMIC
;
1019 case WLAN_CIPHER_SUITE_CCMP
:
1020 key
->flags
|= IEEE80211_KEY_FLAG_GENERATE_IV
;
1022 case WLAN_CIPHER_SUITE_AES_CMAC
:
1023 WARN_ON_ONCE(!(hw
->flags
& IEEE80211_HW_MFP_CAPABLE
));
1025 case WLAN_CIPHER_SUITE_WEP40
:
1026 case WLAN_CIPHER_SUITE_WEP104
:
1028 * Support for TX only, at least for now, so accept
1029 * the key and do nothing else. Then mac80211 will
1030 * pass it for TX but we don't have to use it for RX.
1037 mutex_lock(&mvm
->mutex
);
1041 IWL_DEBUG_MAC80211(mvm
, "set hwcrypto key\n");
1042 ret
= iwl_mvm_set_sta_key(mvm
, vif
, sta
, key
, false);
1044 IWL_WARN(mvm
, "set key failed\n");
1046 * can't add key for RX, but we don't need it
1047 * in the device for TX so still return 0
1054 IWL_DEBUG_MAC80211(mvm
, "disable hwcrypto key\n");
1055 ret
= iwl_mvm_remove_sta_key(mvm
, vif
, sta
, key
);
1061 mutex_unlock(&mvm
->mutex
);
1065 static void iwl_mvm_mac_update_tkip_key(struct ieee80211_hw
*hw
,
1066 struct ieee80211_vif
*vif
,
1067 struct ieee80211_key_conf
*keyconf
,
1068 struct ieee80211_sta
*sta
,
1069 u32 iv32
, u16
*phase1key
)
1071 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
1073 iwl_mvm_update_tkip_key(mvm
, vif
, keyconf
, sta
, iv32
, phase1key
);
1077 static int iwl_mvm_roc(struct ieee80211_hw
*hw
,
1078 struct ieee80211_vif
*vif
,
1079 struct ieee80211_channel
*channel
,
1082 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
1083 struct cfg80211_chan_def chandef
;
1086 if (vif
->type
!= NL80211_IFTYPE_P2P_DEVICE
) {
1087 IWL_ERR(mvm
, "vif isn't a P2P_DEVICE: %d\n", vif
->type
);
1091 IWL_DEBUG_MAC80211(mvm
, "enter (%d, %d)\n", channel
->hw_value
,
1094 mutex_lock(&mvm
->mutex
);
1096 cfg80211_chandef_create(&chandef
, channel
, NL80211_CHAN_NO_HT
);
1097 ret
= iwl_mvm_phy_ctxt_changed(mvm
, &mvm
->phy_ctxt_roc
,
1100 /* Schedule the time events */
1101 ret
= iwl_mvm_start_p2p_roc(mvm
, vif
, duration
);
1103 mutex_unlock(&mvm
->mutex
);
1104 IWL_DEBUG_MAC80211(mvm
, "leave\n");
1109 static int iwl_mvm_cancel_roc(struct ieee80211_hw
*hw
)
1111 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
1113 IWL_DEBUG_MAC80211(mvm
, "enter\n");
1115 mutex_lock(&mvm
->mutex
);
1116 iwl_mvm_stop_p2p_roc(mvm
);
1117 mutex_unlock(&mvm
->mutex
);
1119 IWL_DEBUG_MAC80211(mvm
, "leave\n");
1123 static int iwl_mvm_add_chanctx(struct ieee80211_hw
*hw
,
1124 struct ieee80211_chanctx_conf
*ctx
)
1126 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
1127 struct iwl_mvm_phy_ctxt
*phy_ctxt
= (void *)ctx
->drv_priv
;
1130 mutex_lock(&mvm
->mutex
);
1132 IWL_DEBUG_MAC80211(mvm
, "Add PHY context\n");
1133 ret
= iwl_mvm_phy_ctxt_add(mvm
, phy_ctxt
, &ctx
->def
,
1134 ctx
->rx_chains_static
,
1135 ctx
->rx_chains_dynamic
);
1136 mutex_unlock(&mvm
->mutex
);
1140 static void iwl_mvm_remove_chanctx(struct ieee80211_hw
*hw
,
1141 struct ieee80211_chanctx_conf
*ctx
)
1143 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
1144 struct iwl_mvm_phy_ctxt
*phy_ctxt
= (void *)ctx
->drv_priv
;
1146 mutex_lock(&mvm
->mutex
);
1147 iwl_mvm_phy_ctxt_remove(mvm
, phy_ctxt
);
1148 mutex_unlock(&mvm
->mutex
);
1151 static void iwl_mvm_change_chanctx(struct ieee80211_hw
*hw
,
1152 struct ieee80211_chanctx_conf
*ctx
,
1155 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
1156 struct iwl_mvm_phy_ctxt
*phy_ctxt
= (void *)ctx
->drv_priv
;
1158 mutex_lock(&mvm
->mutex
);
1159 iwl_mvm_phy_ctxt_changed(mvm
, phy_ctxt
, &ctx
->def
,
1160 ctx
->rx_chains_static
,
1161 ctx
->rx_chains_dynamic
);
1162 mutex_unlock(&mvm
->mutex
);
1165 static int iwl_mvm_assign_vif_chanctx(struct ieee80211_hw
*hw
,
1166 struct ieee80211_vif
*vif
,
1167 struct ieee80211_chanctx_conf
*ctx
)
1169 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
1170 struct iwl_mvm_phy_ctxt
*phyctx
= (void *)ctx
->drv_priv
;
1171 struct iwl_mvm_vif
*mvmvif
= iwl_mvm_vif_from_mac80211(vif
);
1174 mutex_lock(&mvm
->mutex
);
1176 mvmvif
->phy_ctxt
= phyctx
;
1178 switch (vif
->type
) {
1179 case NL80211_IFTYPE_AP
:
1181 * The AP binding flow is handled as part of the start_ap flow
1182 * (in bss_info_changed).
1186 case NL80211_IFTYPE_STATION
:
1187 case NL80211_IFTYPE_ADHOC
:
1188 case NL80211_IFTYPE_MONITOR
:
1195 ret
= iwl_mvm_binding_add_vif(mvm
, vif
);
1200 * Setting the quota at this stage is only required for monitor
1201 * interfaces. For the other types, the bss_info changed flow
1202 * will handle quota settings.
1204 if (vif
->type
== NL80211_IFTYPE_MONITOR
) {
1205 ret
= iwl_mvm_update_quotas(mvm
, vif
);
1207 goto out_remove_binding
;
1213 iwl_mvm_binding_remove_vif(mvm
, vif
);
1215 mutex_unlock(&mvm
->mutex
);
1217 mvmvif
->phy_ctxt
= NULL
;
1221 static void iwl_mvm_unassign_vif_chanctx(struct ieee80211_hw
*hw
,
1222 struct ieee80211_vif
*vif
,
1223 struct ieee80211_chanctx_conf
*ctx
)
1225 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
1226 struct iwl_mvm_vif
*mvmvif
= iwl_mvm_vif_from_mac80211(vif
);
1228 mutex_lock(&mvm
->mutex
);
1230 iwl_mvm_remove_time_event(mvm
, mvmvif
, &mvmvif
->time_event_data
);
1232 if (vif
->type
== NL80211_IFTYPE_AP
)
1235 iwl_mvm_binding_remove_vif(mvm
, vif
);
1236 switch (vif
->type
) {
1237 case NL80211_IFTYPE_MONITOR
:
1238 iwl_mvm_update_quotas(mvm
, vif
);
1245 mvmvif
->phy_ctxt
= NULL
;
1246 mutex_unlock(&mvm
->mutex
);
1249 static int iwl_mvm_set_tim(struct ieee80211_hw
*hw
,
1250 struct ieee80211_sta
*sta
,
1253 struct iwl_mvm
*mvm
= IWL_MAC80211_GET_MVM(hw
);
1254 struct iwl_mvm_sta
*mvm_sta
= (void *)sta
->drv_priv
;
1256 if (!mvm_sta
|| !mvm_sta
->vif
) {
1257 IWL_ERR(mvm
, "Station is not associated to a vif\n");
1261 return iwl_mvm_mac_ctxt_beacon_changed(mvm
, mvm_sta
->vif
);
1264 struct ieee80211_ops iwl_mvm_hw_ops
= {
1265 .tx
= iwl_mvm_mac_tx
,
1266 .ampdu_action
= iwl_mvm_mac_ampdu_action
,
1267 .start
= iwl_mvm_mac_start
,
1268 .restart_complete
= iwl_mvm_mac_restart_complete
,
1269 .stop
= iwl_mvm_mac_stop
,
1270 .add_interface
= iwl_mvm_mac_add_interface
,
1271 .remove_interface
= iwl_mvm_mac_remove_interface
,
1272 .config
= iwl_mvm_mac_config
,
1273 .configure_filter
= iwl_mvm_configure_filter
,
1274 .bss_info_changed
= iwl_mvm_bss_info_changed
,
1275 .hw_scan
= iwl_mvm_mac_hw_scan
,
1276 .cancel_hw_scan
= iwl_mvm_mac_cancel_hw_scan
,
1277 .sta_state
= iwl_mvm_mac_sta_state
,
1278 .sta_notify
= iwl_mvm_mac_sta_notify
,
1279 .allow_buffered_frames
= iwl_mvm_mac_allow_buffered_frames
,
1280 .set_rts_threshold
= iwl_mvm_mac_set_rts_threshold
,
1281 .conf_tx
= iwl_mvm_mac_conf_tx
,
1282 .mgd_prepare_tx
= iwl_mvm_mac_mgd_prepare_tx
,
1283 .set_key
= iwl_mvm_mac_set_key
,
1284 .update_tkip_key
= iwl_mvm_mac_update_tkip_key
,
1285 .remain_on_channel
= iwl_mvm_roc
,
1286 .cancel_remain_on_channel
= iwl_mvm_cancel_roc
,
1288 .add_chanctx
= iwl_mvm_add_chanctx
,
1289 .remove_chanctx
= iwl_mvm_remove_chanctx
,
1290 .change_chanctx
= iwl_mvm_change_chanctx
,
1291 .assign_vif_chanctx
= iwl_mvm_assign_vif_chanctx
,
1292 .unassign_vif_chanctx
= iwl_mvm_unassign_vif_chanctx
,
1294 .start_ap
= iwl_mvm_start_ap
,
1295 .stop_ap
= iwl_mvm_stop_ap
,
1297 .set_tim
= iwl_mvm_set_tim
,
1299 #ifdef CONFIG_PM_SLEEP
1301 .suspend
= iwl_mvm_suspend
,
1302 .resume
= iwl_mvm_resume
,
1303 .set_wakeup
= iwl_mvm_set_wakeup
,
1304 .set_rekey_data
= iwl_mvm_set_rekey_data
,
1305 #if IS_ENABLED(CONFIG_IPV6)
1306 .ipv6_addr_change
= iwl_mvm_ipv6_addr_change
,
1308 .set_default_unicast_key
= iwl_mvm_set_default_unicast_key
,