brcmfmac: switch to new platform data
[deliverable/linux.git] / drivers / net / wireless / broadcom / brcm80211 / brcmfmac / common.h
CommitLineData
6b89dcb3
HM
1/* Copyright (c) 2014 Broadcom Corporation
2 *
3 * Permission to use, copy, modify, and/or distribute this software for any
4 * purpose with or without fee is hereby granted, provided that the above
5 * copyright notice and this permission notice appear in all copies.
6 *
7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
10 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
12 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
13 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 */
15#ifndef BRCMFMAC_COMMON_H
16#define BRCMFMAC_COMMON_H
17
8ea56be0 18#include <linux/platform_device.h>
4d792895 19#include <linux/platform_data/brcmfmac.h>
73345fd2
HM
20#include "fwil_types.h"
21
6b89dcb3
HM
22extern const u8 ALLFFMAC[ETH_ALEN];
23
7d34b056
HM
24#define BRCMF_FW_ALTPATH_LEN 256
25
26/* Definitions for the module global and device specific settings are defined
27 * here. Two structs are used for them. brcmf_mp_global_t and brcmf_mp_device.
28 * The mp_global is instantiated once in a global struct and gets initialized
29 * by the common_attach function which should be called before any other
30 * (module) initiliazation takes place. The device specific settings is part
31 * of the drvr struct and should be initialized on every brcmf_attach.
32 */
33
34/**
35 * struct brcmf_mp_global_t - Global module paramaters.
36 *
37 * @firmware_path: Alternative firmware path.
38 */
39struct brcmf_mp_global_t {
40 char firmware_path[BRCMF_FW_ALTPATH_LEN];
41};
42
43extern struct brcmf_mp_global_t brcmf_mp_global;
44
45/**
46 * struct brcmf_mp_device - Device module paramaters.
47 *
48 * @sdiod_txglomsz: SDIO txglom size.
49 * @joinboost_5g_rssi: 5g rssi booost for preferred join selection.
50 * @p2p_enable: Legacy P2P0 enable (old wpa_supplicant).
51 * @feature_disable: Feature_disable bitmask.
52 * @fcmode: FWS flow control.
53 * @roamoff: Firmware roaming off?
73345fd2 54 * @country_codes: If available, pointer to struct for translating country codes
7d34b056
HM
55 */
56struct brcmf_mp_device {
57 int sdiod_txglomsz;
58 int joinboost_5g_rssi;
59 bool p2p_enable;
60 int feature_disable;
61 int fcmode;
62 bool roamoff;
8ba83d4d 63 bool ignore_probe_fail;
4d792895 64 struct brcmfmac_pd_cc *country_codes;
7d34b056
HM
65};
66
4d792895
HM
67struct brcmfmac_sdio_pd *brcmf_get_module_param(struct device *dev,
68 enum brcmf_bus_type bus_type,
69 u32 chip, u32 chiprev);
7d34b056
HM
70int brcmf_mp_device_attach(struct brcmf_pub *drvr);
71void brcmf_mp_device_detach(struct brcmf_pub *drvr);
8ba83d4d
AS
72#ifdef DEBUG
73static inline bool brcmf_ignoring_probe_fail(struct brcmf_pub *drvr)
74{
75 return drvr->settings->ignore_probe_fail;
76}
77#else
78static inline bool brcmf_ignoring_probe_fail(struct brcmf_pub *drvr)
79{
80 return false;
81}
82#endif
83
c443e169
HM
84/* Sets dongle media info (drv_version, mac address). */
85int brcmf_c_preinit_dcmds(struct brcmf_if *ifp);
86
6b89dcb3 87#endif /* BRCMFMAC_COMMON_H */
This page took 0.11586 seconds and 5 git commands to generate.