aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bcma/bcma.h21
-rw-r--r--include/linux/bcma/bcma_driver_chipcommon.h13
-rw-r--r--include/linux/bcma/bcma_regs.h27
-rw-r--r--include/linux/ieee80211.h37
-rw-r--r--include/linux/nl80211.h33
-rw-r--r--include/linux/ssb/ssb.h2
6 files changed, 120 insertions, 13 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index 3895aeb494a3..8c96654bef16 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -25,6 +25,11 @@ struct bcma_chipinfo {
25 u8 pkg; 25 u8 pkg;
26}; 26};
27 27
28enum bcma_clkmode {
29 BCMA_CLKMODE_FAST,
30 BCMA_CLKMODE_DYNAMIC,
31};
32
28struct bcma_host_ops { 33struct bcma_host_ops {
29 u8 (*read8)(struct bcma_device *core, u16 offset); 34 u8 (*read8)(struct bcma_device *core, u16 offset);
30 u16 (*read16)(struct bcma_device *core, u16 offset); 35 u16 (*read16)(struct bcma_device *core, u16 offset);
@@ -243,8 +248,24 @@ void bcma_awrite32(struct bcma_device *core, u16 offset, u32 value)
243 core->bus->ops->awrite32(core, offset, value); 248 core->bus->ops->awrite32(core, offset, value);
244} 249}
245 250
251#define bcma_mask32(cc, offset, mask) \
252 bcma_write32(cc, offset, bcma_read32(cc, offset) & (mask))
253#define bcma_set32(cc, offset, set) \
254 bcma_write32(cc, offset, bcma_read32(cc, offset) | (set))
255#define bcma_maskset32(cc, offset, mask, set) \
256 bcma_write32(cc, offset, (bcma_read32(cc, offset) & (mask)) | (set))
257
246extern bool bcma_core_is_enabled(struct bcma_device *core); 258extern bool bcma_core_is_enabled(struct bcma_device *core);
247extern void bcma_core_disable(struct bcma_device *core, u32 flags); 259extern void bcma_core_disable(struct bcma_device *core, u32 flags);
248extern int bcma_core_enable(struct bcma_device *core, u32 flags); 260extern int bcma_core_enable(struct bcma_device *core, u32 flags);
261extern void bcma_core_set_clockmode(struct bcma_device *core,
262 enum bcma_clkmode clkmode);
263extern void bcma_core_pll_ctl(struct bcma_device *core, u32 req, u32 status,
264 bool on);
265#define BCMA_DMA_TRANSLATION_MASK 0xC0000000
266#define BCMA_DMA_TRANSLATION_NONE 0x00000000
267#define BCMA_DMA_TRANSLATION_DMA32_CMT 0x40000000 /* Client Mode Translation for 32-bit DMA */
268#define BCMA_DMA_TRANSLATION_DMA64_CMT 0x80000000 /* Client Mode Translation for 64-bit DMA */
269extern u32 bcma_core_dma_translation(struct bcma_device *core);
249 270
250#endif /* LINUX_BCMA_H_ */ 271#endif /* LINUX_BCMA_H_ */
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index 9c5b69fc985a..a0f684615ae5 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -179,15 +179,7 @@
179#define BCMA_CC_PROG_WAITCNT 0x0124 179#define BCMA_CC_PROG_WAITCNT 0x0124
180#define BCMA_CC_FLASH_CFG 0x0128 180#define BCMA_CC_FLASH_CFG 0x0128
181#define BCMA_CC_FLASH_WAITCNT 0x012C 181#define BCMA_CC_FLASH_WAITCNT 0x012C
182#define BCMA_CC_CLKCTLST 0x01E0 /* Clock control and status (rev >= 20) */ 182/* 0x1E0 is defined as shared BCMA_CLKCTLST */
183#define BCMA_CC_CLKCTLST_FORCEALP 0x00000001 /* Force ALP request */
184#define BCMA_CC_CLKCTLST_FORCEHT 0x00000002 /* Force HT request */
185#define BCMA_CC_CLKCTLST_FORCEILP 0x00000004 /* Force ILP request */
186#define BCMA_CC_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */
187#define BCMA_CC_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */
188#define BCMA_CC_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */
189#define BCMA_CC_CLKCTLST_HAVEHT 0x00010000 /* HT available */
190#define BCMA_CC_CLKCTLST_HAVEALP 0x00020000 /* APL available */
191#define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ 183#define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */
192#define BCMA_CC_UART0_DATA 0x0300 184#define BCMA_CC_UART0_DATA 0x0300
193#define BCMA_CC_UART0_IMR 0x0304 185#define BCMA_CC_UART0_IMR 0x0304
@@ -244,7 +236,8 @@
244#define BCMA_CC_REGCTL_DATA 0x065C 236#define BCMA_CC_REGCTL_DATA 0x065C
245#define BCMA_CC_PLLCTL_ADDR 0x0660 237#define BCMA_CC_PLLCTL_ADDR 0x0660
246#define BCMA_CC_PLLCTL_DATA 0x0664 238#define BCMA_CC_PLLCTL_DATA 0x0664
247#define BCMA_CC_SPROM 0x0830 /* SPROM beginning */ 239#define BCMA_CC_SPROM 0x0800 /* SPROM beginning */
240#define BCMA_CC_SPROM_PCIE6 0x0830 /* SPROM beginning on PCIe rev >= 6 */
248 241
249/* Data for the PMU, if available. 242/* Data for the PMU, if available.
250 * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) 243 * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU)
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h
index f82d88a960ce..9faae2ae02e8 100644
--- a/include/linux/bcma/bcma_regs.h
+++ b/include/linux/bcma/bcma_regs.h
@@ -1,13 +1,38 @@
1#ifndef LINUX_BCMA_REGS_H_ 1#ifndef LINUX_BCMA_REGS_H_
2#define LINUX_BCMA_REGS_H_ 2#define LINUX_BCMA_REGS_H_
3 3
4/* Some single registers are shared between many cores */
5/* BCMA_CLKCTLST: ChipCommon (rev >= 20), PCIe, 80211 */
6#define BCMA_CLKCTLST 0x01E0 /* Clock control and status */
7#define BCMA_CLKCTLST_FORCEALP 0x00000001 /* Force ALP request */
8#define BCMA_CLKCTLST_FORCEHT 0x00000002 /* Force HT request */
9#define BCMA_CLKCTLST_FORCEILP 0x00000004 /* Force ILP request */
10#define BCMA_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */
11#define BCMA_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */
12#define BCMA_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */
13#define BCMA_CLKCTLST_EXTRESREQ 0x00000700 /* Mask of external resource requests */
14#define BCMA_CLKCTLST_HAVEALP 0x00010000 /* ALP available */
15#define BCMA_CLKCTLST_HAVEHT 0x00020000 /* HT available */
16#define BCMA_CLKCTLST_BP_ON_ALP 0x00040000 /* RO: running on ALP clock */
17#define BCMA_CLKCTLST_BP_ON_HT 0x00080000 /* RO: running on HT clock */
18#define BCMA_CLKCTLST_EXTRESST 0x07000000 /* Mask of external resource status */
19/* Is there any BCM4328 on BCMA bus? */
20#define BCMA_CLKCTLST_4328A0_HAVEHT 0x00010000 /* 4328a0 has reversed bits */
21#define BCMA_CLKCTLST_4328A0_HAVEALP 0x00020000 /* 4328a0 has reversed bits */
22
4/* Agent registers (common for every core) */ 23/* Agent registers (common for every core) */
5#define BCMA_IOCTL 0x0408 24#define BCMA_IOCTL 0x0408 /* IO control */
6#define BCMA_IOCTL_CLK 0x0001 25#define BCMA_IOCTL_CLK 0x0001
7#define BCMA_IOCTL_FGC 0x0002 26#define BCMA_IOCTL_FGC 0x0002
8#define BCMA_IOCTL_CORE_BITS 0x3FFC 27#define BCMA_IOCTL_CORE_BITS 0x3FFC
9#define BCMA_IOCTL_PME_EN 0x4000 28#define BCMA_IOCTL_PME_EN 0x4000
10#define BCMA_IOCTL_BIST_EN 0x8000 29#define BCMA_IOCTL_BIST_EN 0x8000
30#define BCMA_IOST 0x0500 /* IO status */
31#define BCMA_IOST_CORE_BITS 0x0FFF
32#define BCMA_IOST_DMA64 0x1000
33#define BCMA_IOST_GATED_CLK 0x2000
34#define BCMA_IOST_BIST_ERROR 0x4000
35#define BCMA_IOST_BIST_DONE 0x8000
11#define BCMA_RESET_CTL 0x0800 36#define BCMA_RESET_CTL 0x0800
12#define BCMA_RESET_CTL_RESET 0x0001 37#define BCMA_RESET_CTL_RESET 0x0001
13 38
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index a26108e4d924..54c878960872 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1453,6 +1453,43 @@ enum ieee80211_sa_query_action {
1453 1453
1454#define WLAN_PMKID_LEN 16 1454#define WLAN_PMKID_LEN 16
1455 1455
1456/*
1457 * WMM/802.11e Tspec Element
1458 */
1459#define IEEE80211_WMM_IE_TSPEC_TID_MASK 0x0F
1460#define IEEE80211_WMM_IE_TSPEC_TID_SHIFT 1
1461
1462enum ieee80211_tspec_status_code {
1463 IEEE80211_TSPEC_STATUS_ADMISS_ACCEPTED = 0,
1464 IEEE80211_TSPEC_STATUS_ADDTS_INVAL_PARAMS = 0x1,
1465};
1466
1467struct ieee80211_tspec_ie {
1468 u8 element_id;
1469 u8 len;
1470 u8 oui[3];
1471 u8 oui_type;
1472 u8 oui_subtype;
1473 u8 version;
1474 __le16 tsinfo;
1475 u8 tsinfo_resvd;
1476 __le16 nominal_msdu;
1477 __le16 max_msdu;
1478 __le32 min_service_int;
1479 __le32 max_service_int;
1480 __le32 inactivity_int;
1481 __le32 suspension_int;
1482 __le32 service_start_time;
1483 __le32 min_data_rate;
1484 __le32 mean_data_rate;
1485 __le32 peak_data_rate;
1486 __le32 max_burst_size;
1487 __le32 delay_bound;
1488 __le32 min_phy_rate;
1489 __le16 sba;
1490 __le16 medium_time;
1491} __packed;
1492
1456/** 1493/**
1457 * ieee80211_get_qos_ctl - get pointer to qos control bytes 1494 * ieee80211_get_qos_ctl - get pointer to qos control bytes
1458 * @hdr: the frame 1495 * @hdr: the frame
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 8cb025a00094..e4da76c9e4d9 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -756,8 +756,12 @@ enum nl80211_commands {
756 * 756 *
757 * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with 757 * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with
758 * a single scan request, a wiphy attribute. 758 * a single scan request, a wiphy attribute.
759 * @NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS: number of SSIDs you can
760 * scan with a single scheduled scan request, a wiphy attribute.
759 * @NL80211_ATTR_MAX_SCAN_IE_LEN: maximum length of information elements 761 * @NL80211_ATTR_MAX_SCAN_IE_LEN: maximum length of information elements
760 * that can be added to a scan request 762 * that can be added to a scan request
763 * @NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN: maximum length of information
764 * elements that can be added to a scheduled scan request
761 * 765 *
762 * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) 766 * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz)
763 * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive 767 * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive
@@ -989,8 +993,8 @@ enum nl80211_commands {
989 * driving the peer link management state machine. 993 * driving the peer link management state machine.
990 * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled. 994 * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled.
991 * 995 *
992 * @NL80211_ATTR_WOWLAN_SUPPORTED: indicates, as part of the wiphy capabilities, 996 * @NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED: indicates, as part of the wiphy
993 * the supported WoWLAN triggers 997 * capabilities, the supported WoWLAN triggers
994 * @NL80211_ATTR_WOWLAN_TRIGGERS: used by %NL80211_CMD_SET_WOWLAN to 998 * @NL80211_ATTR_WOWLAN_TRIGGERS: used by %NL80211_CMD_SET_WOWLAN to
995 * indicate which WoW triggers should be enabled. This is also 999 * indicate which WoW triggers should be enabled. This is also
996 * used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN 1000 * used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN
@@ -1010,6 +1014,11 @@ enum nl80211_commands {
1010 * @%NL80211_ATTR_REKEY_DATA: nested attribute containing the information 1014 * @%NL80211_ATTR_REKEY_DATA: nested attribute containing the information
1011 * necessary for GTK rekeying in the device, see &enum nl80211_rekey_data. 1015 * necessary for GTK rekeying in the device, see &enum nl80211_rekey_data.
1012 * 1016 *
1017 * @NL80211_ATTR_SCAN_SUPP_RATES: rates per to be advertised as supported in scan,
1018 * nested array attribute containing an entry for each band, with the entry
1019 * being a list of supported rates as defined by IEEE 802.11 7.3.2.2 but
1020 * without the length restriction (at most %NL80211_MAX_SUPP_RATES).
1021 *
1013 * @NL80211_ATTR_MAX: highest attribute number currently defined 1022 * @NL80211_ATTR_MAX: highest attribute number currently defined
1014 * @__NL80211_ATTR_AFTER_LAST: internal use 1023 * @__NL80211_ATTR_AFTER_LAST: internal use
1015 */ 1024 */
@@ -1210,6 +1219,11 @@ enum nl80211_attrs {
1210 1219
1211 NL80211_ATTR_REKEY_DATA, 1220 NL80211_ATTR_REKEY_DATA,
1212 1221
1222 NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS,
1223 NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN,
1224
1225 NL80211_ATTR_SCAN_SUPP_RATES,
1226
1213 /* add attributes here, update the policy in nl80211.c */ 1227 /* add attributes here, update the policy in nl80211.c */
1214 1228
1215 __NL80211_ATTR_AFTER_LAST, 1229 __NL80211_ATTR_AFTER_LAST,
@@ -2255,6 +2269,16 @@ struct nl80211_wowlan_pattern_support {
2255 * 2269 *
2256 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute 2270 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
2257 * carrying a &struct nl80211_wowlan_pattern_support. 2271 * carrying a &struct nl80211_wowlan_pattern_support.
2272 * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be
2273 * used when setting, used only to indicate that GTK rekeying is supported
2274 * by the device (flag)
2275 * @NL80211_WOWLAN_TRIG_GTK_REKEY_FAILURE: wake up on GTK rekey failure (if
2276 * done by the device) (flag)
2277 * @NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST: wake up on EAP Identity Request
2278 * packet (flag)
2279 * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag)
2280 * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released
2281 * (on devices that have rfkill in the device) (flag)
2258 * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers 2282 * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers
2259 * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number 2283 * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number
2260 */ 2284 */
@@ -2264,6 +2288,11 @@ enum nl80211_wowlan_triggers {
2264 NL80211_WOWLAN_TRIG_DISCONNECT, 2288 NL80211_WOWLAN_TRIG_DISCONNECT,
2265 NL80211_WOWLAN_TRIG_MAGIC_PKT, 2289 NL80211_WOWLAN_TRIG_MAGIC_PKT,
2266 NL80211_WOWLAN_TRIG_PKT_PATTERN, 2290 NL80211_WOWLAN_TRIG_PKT_PATTERN,
2291 NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED,
2292 NL80211_WOWLAN_TRIG_GTK_REKEY_FAILURE,
2293 NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST,
2294 NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE,
2295 NL80211_WOWLAN_TRIG_RFKILL_RELEASE,
2267 2296
2268 /* keep last */ 2297 /* keep last */
2269 NUM_NL80211_WOWLAN_TRIG, 2298 NUM_NL80211_WOWLAN_TRIG,
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index b0928c10111b..8623217f84d0 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -27,6 +27,8 @@ struct ssb_sprom {
27 u8 et1mdcport; /* MDIO for enet1 */ 27 u8 et1mdcport; /* MDIO for enet1 */
28 u8 board_rev; /* Board revision number from SPROM. */ 28 u8 board_rev; /* Board revision number from SPROM. */
29 u8 country_code; /* Country Code */ 29 u8 country_code; /* Country Code */
30 u16 leddc_on_time; /* LED Powersave Duty Cycle On Count */
31 u16 leddc_off_time; /* LED Powersave Duty Cycle Off Count */
30 u8 ant_available_a; /* 2GHz antenna available bits (up to 4) */ 32 u8 ant_available_a; /* 2GHz antenna available bits (up to 4) */
31 u8 ant_available_bg; /* 5GHz antenna available bits (up to 4) */ 33 u8 ant_available_bg; /* 5GHz antenna available bits (up to 4) */
32 u16 pa0b0; 34 u16 pa0b0;