]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - drivers/net/wireless/quantenna/qtnfmac/cfg80211.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
[mirror_ubuntu-focal-kernel.git] / drivers / net / wireless / quantenna / qtnfmac / cfg80211.h
1 /*
2 * Copyright (c) 2015-2016 Quantenna Communications, Inc.
3 * All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17 #ifndef _QTN_FMAC_CFG80211_H_
18 #define _QTN_FMAC_CFG80211_H_
19
20 #include <net/cfg80211.h>
21
22 #include "core.h"
23
24 int qtnf_wiphy_register(struct qtnf_hw_info *hw_info, struct qtnf_wmac *mac);
25 int qtnf_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev);
26 void qtnf_cfg80211_vif_reset(struct qtnf_vif *vif);
27 void qtnf_band_init_rates(struct ieee80211_supported_band *band);
28 void qtnf_band_setup_htvht_caps(struct qtnf_mac_info *macinfo,
29 struct ieee80211_supported_band *band);
30
31 static inline void qtnf_scan_done(struct qtnf_wmac *mac, bool aborted)
32 {
33 struct cfg80211_scan_info info = {
34 .aborted = aborted,
35 };
36
37 if (timer_pending(&mac->scan_timeout))
38 del_timer_sync(&mac->scan_timeout);
39
40 mutex_lock(&mac->mac_lock);
41
42 if (mac->scan_req) {
43 cfg80211_scan_done(mac->scan_req, &info);
44 mac->scan_req = NULL;
45 }
46
47 mutex_unlock(&mac->mac_lock);
48 }
49
50 #endif /* _QTN_FMAC_CFG80211_H_ */