WIP FPC-III support
[linux/fpc-iii.git] / drivers / net / wireless / broadcom / brcm80211 / brcmfmac / pno.h
blob25d406019ac34072a75119aa7b3b20b64dea2826
1 // SPDX-License-Identifier: ISC
2 /*
3 * Copyright (c) 2016 Broadcom
4 */
5 #ifndef _BRCMF_PNO_H
6 #define _BRCMF_PNO_H
8 #define BRCMF_PNO_SCAN_COMPLETE 1
9 #define BRCMF_PNO_MAX_PFN_COUNT 16
10 #define BRCMF_PNO_SCHED_SCAN_MIN_PERIOD 10
11 #define BRCMF_PNO_SCHED_SCAN_MAX_PERIOD 508
13 /* forward declaration */
14 struct brcmf_pno_info;
16 /**
17 * brcmf_pno_start_sched_scan - initiate scheduled scan on device.
19 * @ifp: interface object used.
20 * @req: configuration parameters for scheduled scan.
22 int brcmf_pno_start_sched_scan(struct brcmf_if *ifp,
23 struct cfg80211_sched_scan_request *req);
25 /**
26 * brcmf_pno_stop_sched_scan - terminate scheduled scan on device.
28 * @ifp: interface object used.
29 * @reqid: unique identifier of scan to be stopped.
31 int brcmf_pno_stop_sched_scan(struct brcmf_if *ifp, u64 reqid);
33 /**
34 * brcmf_pno_wiphy_params - fill scheduled scan parameters in wiphy instance.
36 * @wiphy: wiphy instance to be used.
37 * @gscan: indicates whether the device has support for g-scan feature.
39 void brcmf_pno_wiphy_params(struct wiphy *wiphy, bool gscan);
41 /**
42 * brcmf_pno_attach - allocate and attach module information.
44 * @cfg: cfg80211 context used.
46 int brcmf_pno_attach(struct brcmf_cfg80211_info *cfg);
48 /**
49 * brcmf_pno_detach - detach and free module information.
51 * @cfg: cfg80211 context used.
53 void brcmf_pno_detach(struct brcmf_cfg80211_info *cfg);
55 /**
56 * brcmf_pno_find_reqid_by_bucket - find request id for given bucket index.
58 * @pi: pno instance used.
59 * @bucket: index of firmware bucket.
61 u64 brcmf_pno_find_reqid_by_bucket(struct brcmf_pno_info *pi, u32 bucket);
63 /**
64 * brcmf_pno_get_bucket_map - determine bucket map for given netinfo.
66 * @pi: pno instance used.
67 * @netinfo: netinfo to compare with bucket configuration.
69 u32 brcmf_pno_get_bucket_map(struct brcmf_pno_info *pi,
70 struct brcmf_pno_net_info_le *netinfo);
72 #endif /* _BRCMF_PNO_H */