diff options
| author | John W. Linville <linville@tuxdriver.com> | 2011-12-19 13:54:26 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2011-12-19 13:54:26 -0500 |
| commit | 9f6e20cee6253c4ca5faacba8dbd09ebe70132ed (patch) | |
| tree | 0dbcdabca91864daaf174bb014a5f46316880403 /include/linux | |
| parent | d1d182e00d72300e05b18e28372fab003d8d4a58 (diff) | |
| parent | 5bd5e9a6ae5137a61d0b5c277eac61892d89fc4f (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bcma/bcma.h | 55 | ||||
| -rw-r--r-- | include/linux/bcma/bcma_driver_chipcommon.h | 1 | ||||
| -rw-r--r-- | include/linux/ieee80211.h | 9 | ||||
| -rw-r--r-- | include/linux/nfc.h | 29 | ||||
| -rw-r--r-- | include/linux/nl80211.h | 6 | ||||
| -rw-r--r-- | include/linux/ssb/ssb.h | 9 | ||||
| -rw-r--r-- | include/linux/ssb/ssb_regs.h | 17 |
7 files changed, 107 insertions, 19 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index 4d4b59de9467..f4b8346b1a33 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
| @@ -205,61 +205,82 @@ struct bcma_bus { | |||
| 205 | struct ssb_sprom sprom; | 205 | struct ssb_sprom sprom; |
| 206 | }; | 206 | }; |
| 207 | 207 | ||
| 208 | extern inline u32 bcma_read8(struct bcma_device *core, u16 offset) | 208 | static inline u32 bcma_read8(struct bcma_device *core, u16 offset) |
| 209 | { | 209 | { |
| 210 | return core->bus->ops->read8(core, offset); | 210 | return core->bus->ops->read8(core, offset); |
| 211 | } | 211 | } |
| 212 | extern inline u32 bcma_read16(struct bcma_device *core, u16 offset) | 212 | static inline u32 bcma_read16(struct bcma_device *core, u16 offset) |
| 213 | { | 213 | { |
| 214 | return core->bus->ops->read16(core, offset); | 214 | return core->bus->ops->read16(core, offset); |
| 215 | } | 215 | } |
| 216 | extern inline u32 bcma_read32(struct bcma_device *core, u16 offset) | 216 | static inline u32 bcma_read32(struct bcma_device *core, u16 offset) |
| 217 | { | 217 | { |
| 218 | return core->bus->ops->read32(core, offset); | 218 | return core->bus->ops->read32(core, offset); |
| 219 | } | 219 | } |
| 220 | extern inline | 220 | static inline |
| 221 | void bcma_write8(struct bcma_device *core, u16 offset, u32 value) | 221 | void bcma_write8(struct bcma_device *core, u16 offset, u32 value) |
| 222 | { | 222 | { |
| 223 | core->bus->ops->write8(core, offset, value); | 223 | core->bus->ops->write8(core, offset, value); |
| 224 | } | 224 | } |
| 225 | extern inline | 225 | static inline |
| 226 | void bcma_write16(struct bcma_device *core, u16 offset, u32 value) | 226 | void bcma_write16(struct bcma_device *core, u16 offset, u32 value) |
| 227 | { | 227 | { |
| 228 | core->bus->ops->write16(core, offset, value); | 228 | core->bus->ops->write16(core, offset, value); |
| 229 | } | 229 | } |
| 230 | extern inline | 230 | static inline |
| 231 | void bcma_write32(struct bcma_device *core, u16 offset, u32 value) | 231 | void bcma_write32(struct bcma_device *core, u16 offset, u32 value) |
| 232 | { | 232 | { |
| 233 | core->bus->ops->write32(core, offset, value); | 233 | core->bus->ops->write32(core, offset, value); |
| 234 | } | 234 | } |
| 235 | #ifdef CONFIG_BCMA_BLOCKIO | 235 | #ifdef CONFIG_BCMA_BLOCKIO |
| 236 | extern inline void bcma_block_read(struct bcma_device *core, void *buffer, | 236 | static inline void bcma_block_read(struct bcma_device *core, void *buffer, |
| 237 | size_t count, u16 offset, u8 reg_width) | 237 | size_t count, u16 offset, u8 reg_width) |
| 238 | { | 238 | { |
| 239 | core->bus->ops->block_read(core, buffer, count, offset, reg_width); | 239 | core->bus->ops->block_read(core, buffer, count, offset, reg_width); |
| 240 | } | 240 | } |
| 241 | extern inline void bcma_block_write(struct bcma_device *core, const void *buffer, | 241 | static inline void bcma_block_write(struct bcma_device *core, |
| 242 | size_t count, u16 offset, u8 reg_width) | 242 | const void *buffer, size_t count, |
| 243 | u16 offset, u8 reg_width) | ||
| 243 | { | 244 | { |
| 244 | core->bus->ops->block_write(core, buffer, count, offset, reg_width); | 245 | core->bus->ops->block_write(core, buffer, count, offset, reg_width); |
| 245 | } | 246 | } |
| 246 | #endif | 247 | #endif |
| 247 | extern inline u32 bcma_aread32(struct bcma_device *core, u16 offset) | 248 | static inline u32 bcma_aread32(struct bcma_device *core, u16 offset) |
| 248 | { | 249 | { |
| 249 | return core->bus->ops->aread32(core, offset); | 250 | return core->bus->ops->aread32(core, offset); |
| 250 | } | 251 | } |
| 251 | extern inline | 252 | static inline |
| 252 | void bcma_awrite32(struct bcma_device *core, u16 offset, u32 value) | 253 | void bcma_awrite32(struct bcma_device *core, u16 offset, u32 value) |
| 253 | { | 254 | { |
| 254 | core->bus->ops->awrite32(core, offset, value); | 255 | core->bus->ops->awrite32(core, offset, value); |
| 255 | } | 256 | } |
| 256 | 257 | ||
| 257 | #define bcma_mask32(cc, offset, mask) \ | 258 | static inline void bcma_mask32(struct bcma_device *cc, u16 offset, u32 mask) |
| 258 | bcma_write32(cc, offset, bcma_read32(cc, offset) & (mask)) | 259 | { |
| 259 | #define bcma_set32(cc, offset, set) \ | 260 | bcma_write32(cc, offset, bcma_read32(cc, offset) & mask); |
| 260 | bcma_write32(cc, offset, bcma_read32(cc, offset) | (set)) | 261 | } |
| 261 | #define bcma_maskset32(cc, offset, mask, set) \ | 262 | static inline void bcma_set32(struct bcma_device *cc, u16 offset, u32 set) |
| 262 | bcma_write32(cc, offset, (bcma_read32(cc, offset) & (mask)) | (set)) | 263 | { |
| 264 | bcma_write32(cc, offset, bcma_read32(cc, offset) | set); | ||
| 265 | } | ||
| 266 | static inline void bcma_maskset32(struct bcma_device *cc, | ||
| 267 | u16 offset, u32 mask, u32 set) | ||
| 268 | { | ||
| 269 | bcma_write32(cc, offset, (bcma_read32(cc, offset) & mask) | set); | ||
| 270 | } | ||
| 271 | static inline void bcma_mask16(struct bcma_device *cc, u16 offset, u16 mask) | ||
| 272 | { | ||
| 273 | bcma_write16(cc, offset, bcma_read16(cc, offset) & mask); | ||
| 274 | } | ||
| 275 | static inline void bcma_set16(struct bcma_device *cc, u16 offset, u16 set) | ||
| 276 | { | ||
| 277 | bcma_write16(cc, offset, bcma_read16(cc, offset) | set); | ||
| 278 | } | ||
| 279 | static inline void bcma_maskset16(struct bcma_device *cc, | ||
| 280 | u16 offset, u16 mask, u16 set) | ||
| 281 | { | ||
| 282 | bcma_write16(cc, offset, (bcma_read16(cc, offset) & mask) | set); | ||
| 283 | } | ||
| 263 | 284 | ||
| 264 | extern bool bcma_core_is_enabled(struct bcma_device *core); | 285 | extern bool bcma_core_is_enabled(struct bcma_device *core); |
| 265 | extern void bcma_core_disable(struct bcma_device *core, u32 flags); | 286 | extern void bcma_core_disable(struct bcma_device *core, u32 flags); |
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index 1526d965ed06..a33086a7530b 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
| @@ -203,6 +203,7 @@ | |||
| 203 | #define BCMA_CC_PMU_CTL 0x0600 /* PMU control */ | 203 | #define BCMA_CC_PMU_CTL 0x0600 /* PMU control */ |
| 204 | #define BCMA_CC_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ | 204 | #define BCMA_CC_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ |
| 205 | #define BCMA_CC_PMU_CTL_ILP_DIV_SHIFT 16 | 205 | #define BCMA_CC_PMU_CTL_ILP_DIV_SHIFT 16 |
| 206 | #define BCMA_CC_PMU_CTL_PLL_UPD 0x00000400 | ||
| 206 | #define BCMA_CC_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ | 207 | #define BCMA_CC_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ |
| 207 | #define BCMA_CC_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ | 208 | #define BCMA_CC_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ |
| 208 | #define BCMA_CC_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */ | 209 | #define BCMA_CC_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */ |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 17f2a768e2ad..210e2c325534 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
| @@ -544,6 +544,15 @@ static inline int ieee80211_is_qos_nullfunc(__le16 fc) | |||
| 544 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC); | 544 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC); |
| 545 | } | 545 | } |
| 546 | 546 | ||
| 547 | /** | ||
| 548 | * ieee80211_is_first_frag - check if IEEE80211_SCTL_FRAG is not set | ||
| 549 | * @seq_ctrl: frame sequence control bytes in little-endian byteorder | ||
| 550 | */ | ||
| 551 | static inline int ieee80211_is_first_frag(__le16 seq_ctrl) | ||
| 552 | { | ||
| 553 | return (seq_ctrl & cpu_to_le16(IEEE80211_SCTL_FRAG)) == 0; | ||
| 554 | } | ||
| 555 | |||
| 547 | struct ieee80211s_hdr { | 556 | struct ieee80211s_hdr { |
| 548 | u8 flags; | 557 | u8 flags; |
| 549 | u8 ttl; | 558 | u8 ttl; |
diff --git a/include/linux/nfc.h b/include/linux/nfc.h index 36cb955b05cc..89fee4ab1904 100644 --- a/include/linux/nfc.h +++ b/include/linux/nfc.h | |||
| @@ -62,6 +62,8 @@ enum nfc_commands { | |||
| 62 | NFC_CMD_GET_DEVICE, | 62 | NFC_CMD_GET_DEVICE, |
| 63 | NFC_CMD_DEV_UP, | 63 | NFC_CMD_DEV_UP, |
| 64 | NFC_CMD_DEV_DOWN, | 64 | NFC_CMD_DEV_DOWN, |
| 65 | NFC_CMD_DEP_LINK_UP, | ||
| 66 | NFC_CMD_DEP_LINK_DOWN, | ||
| 65 | NFC_CMD_START_POLL, | 67 | NFC_CMD_START_POLL, |
| 66 | NFC_CMD_STOP_POLL, | 68 | NFC_CMD_STOP_POLL, |
| 67 | NFC_CMD_GET_TARGET, | 69 | NFC_CMD_GET_TARGET, |
| @@ -86,6 +88,8 @@ enum nfc_commands { | |||
| 86 | * @NFC_ATTR_TARGET_SENS_RES: NFC-A targets extra information such as NFCID | 88 | * @NFC_ATTR_TARGET_SENS_RES: NFC-A targets extra information such as NFCID |
| 87 | * @NFC_ATTR_TARGET_SEL_RES: NFC-A targets extra information (useful if the | 89 | * @NFC_ATTR_TARGET_SEL_RES: NFC-A targets extra information (useful if the |
| 88 | * target is not NFC-Forum compliant) | 90 | * target is not NFC-Forum compliant) |
| 91 | * @NFC_ATTR_COMM_MODE: Passive or active mode | ||
| 92 | * @NFC_ATTR_RF_MODE: Initiator or target | ||
| 89 | */ | 93 | */ |
| 90 | enum nfc_attrs { | 94 | enum nfc_attrs { |
| 91 | NFC_ATTR_UNSPEC, | 95 | NFC_ATTR_UNSPEC, |
| @@ -95,6 +99,8 @@ enum nfc_attrs { | |||
| 95 | NFC_ATTR_TARGET_INDEX, | 99 | NFC_ATTR_TARGET_INDEX, |
| 96 | NFC_ATTR_TARGET_SENS_RES, | 100 | NFC_ATTR_TARGET_SENS_RES, |
| 97 | NFC_ATTR_TARGET_SEL_RES, | 101 | NFC_ATTR_TARGET_SEL_RES, |
| 102 | NFC_ATTR_COMM_MODE, | ||
| 103 | NFC_ATTR_RF_MODE, | ||
| 98 | /* private: internal use only */ | 104 | /* private: internal use only */ |
| 99 | __NFC_ATTR_AFTER_LAST | 105 | __NFC_ATTR_AFTER_LAST |
| 100 | }; | 106 | }; |
| @@ -111,6 +117,14 @@ enum nfc_attrs { | |||
| 111 | 117 | ||
| 112 | #define NFC_PROTO_MAX 6 | 118 | #define NFC_PROTO_MAX 6 |
| 113 | 119 | ||
| 120 | /* NFC communication modes */ | ||
| 121 | #define NFC_COMM_ACTIVE 0 | ||
| 122 | #define NFC_COMM_PASSIVE 1 | ||
| 123 | |||
| 124 | /* NFC RF modes */ | ||
| 125 | #define NFC_RF_INITIATOR 0 | ||
| 126 | #define NFC_RF_TARGET 1 | ||
| 127 | |||
| 114 | /* NFC protocols masks used in bitsets */ | 128 | /* NFC protocols masks used in bitsets */ |
| 115 | #define NFC_PROTO_JEWEL_MASK (1 << NFC_PROTO_JEWEL) | 129 | #define NFC_PROTO_JEWEL_MASK (1 << NFC_PROTO_JEWEL) |
| 116 | #define NFC_PROTO_MIFARE_MASK (1 << NFC_PROTO_MIFARE) | 130 | #define NFC_PROTO_MIFARE_MASK (1 << NFC_PROTO_MIFARE) |
| @@ -125,9 +139,22 @@ struct sockaddr_nfc { | |||
| 125 | __u32 nfc_protocol; | 139 | __u32 nfc_protocol; |
| 126 | }; | 140 | }; |
| 127 | 141 | ||
| 142 | #define NFC_LLCP_MAX_SERVICE_NAME 63 | ||
| 143 | struct sockaddr_nfc_llcp { | ||
| 144 | sa_family_t sa_family; | ||
| 145 | __u32 dev_idx; | ||
| 146 | __u32 target_idx; | ||
| 147 | __u32 nfc_protocol; | ||
| 148 | __u8 dsap; /* Destination SAP, if known */ | ||
| 149 | __u8 ssap; /* Source SAP to be bound to */ | ||
| 150 | char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */; | ||
| 151 | size_t service_name_len; | ||
| 152 | }; | ||
| 153 | |||
| 128 | /* NFC socket protocols */ | 154 | /* NFC socket protocols */ |
| 129 | #define NFC_SOCKPROTO_RAW 0 | 155 | #define NFC_SOCKPROTO_RAW 0 |
| 130 | #define NFC_SOCKPROTO_MAX 1 | 156 | #define NFC_SOCKPROTO_LLCP 1 |
| 157 | #define NFC_SOCKPROTO_MAX 2 | ||
| 131 | 158 | ||
| 132 | #define NFC_HEADER_SIZE 1 | 159 | #define NFC_HEADER_SIZE 1 |
| 133 | 160 | ||
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index a18760684fc9..f795cb7dccdd 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
| @@ -1536,7 +1536,11 @@ enum nl80211_iftype { | |||
| 1536 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 1536 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
| 1537 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | 1537 | * @NL80211_STA_FLAG_MFP: station uses management frame protection |
| 1538 | * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated | 1538 | * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated |
| 1539 | * @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer | 1539 | * @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer -- this flag should |
| 1540 | * only be used in managed mode (even in the flags mask). Note that the | ||
| 1541 | * flag can't be changed, it is only valid while adding a station, and | ||
| 1542 | * attempts to change it will silently be ignored (rather than rejected | ||
| 1543 | * as errors.) | ||
| 1540 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined | 1544 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined |
| 1541 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use | 1545 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use |
| 1542 | */ | 1546 | */ |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 061e560251b4..dcf35b0f303a 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
| @@ -94,6 +94,15 @@ struct ssb_sprom { | |||
| 94 | } ghz5; /* 5GHz band */ | 94 | } ghz5; /* 5GHz band */ |
| 95 | } antenna_gain; | 95 | } antenna_gain; |
| 96 | 96 | ||
| 97 | struct { | ||
| 98 | struct { | ||
| 99 | u8 tssipos, extpa_gain, pdet_range, tr_iso, antswlut; | ||
| 100 | } ghz2; | ||
| 101 | struct { | ||
| 102 | u8 tssipos, extpa_gain, pdet_range, tr_iso, antswlut; | ||
| 103 | } ghz5; | ||
| 104 | } fem; | ||
| 105 | |||
| 97 | /* TODO - add any parameters needed from rev 2, 3, 4, 5 or 8 SPROMs */ | 106 | /* TODO - add any parameters needed from rev 2, 3, 4, 5 or 8 SPROMs */ |
| 98 | }; | 107 | }; |
| 99 | 108 | ||
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index 98941203a27f..c814ae6eeb22 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
| @@ -432,6 +432,23 @@ | |||
| 432 | #define SSB_SPROM8_RXPO2G 0x00FF /* 2GHz RX power offset */ | 432 | #define SSB_SPROM8_RXPO2G 0x00FF /* 2GHz RX power offset */ |
| 433 | #define SSB_SPROM8_RXPO5G 0xFF00 /* 5GHz RX power offset */ | 433 | #define SSB_SPROM8_RXPO5G 0xFF00 /* 5GHz RX power offset */ |
| 434 | #define SSB_SPROM8_RXPO5G_SHIFT 8 | 434 | #define SSB_SPROM8_RXPO5G_SHIFT 8 |
| 435 | #define SSB_SPROM8_FEM2G 0x00AE | ||
| 436 | #define SSB_SPROM8_FEM5G 0x00B0 | ||
| 437 | #define SSB_SROM8_FEM_TSSIPOS 0x0001 | ||
| 438 | #define SSB_SROM8_FEM_TSSIPOS_SHIFT 0 | ||
| 439 | #define SSB_SROM8_FEM_EXTPA_GAIN 0x0006 | ||
| 440 | #define SSB_SROM8_FEM_EXTPA_GAIN_SHIFT 1 | ||
| 441 | #define SSB_SROM8_FEM_PDET_RANGE 0x00F8 | ||
| 442 | #define SSB_SROM8_FEM_PDET_RANGE_SHIFT 3 | ||
| 443 | #define SSB_SROM8_FEM_TR_ISO 0x0700 | ||
| 444 | #define SSB_SROM8_FEM_TR_ISO_SHIFT 8 | ||
| 445 | #define SSB_SROM8_FEM_ANTSWLUT 0xF800 | ||
| 446 | #define SSB_SROM8_FEM_ANTSWLUT_SHIFT 11 | ||
| 447 | #define SSB_SPROM8_THERMAL 0x00B2 | ||
| 448 | #define SSB_SPROM8_MPWR_RAWTS 0x00B4 | ||
| 449 | #define SSB_SPROM8_TS_SLP_OPT_CORRX 0x00B6 | ||
| 450 | #define SSB_SPROM8_FOC_HWIQ_IQSWP 0x00B8 | ||
| 451 | #define SSB_SPROM8_PHYCAL_TEMPDELTA 0x00BA | ||
| 435 | #define SSB_SPROM8_MAXP_BG 0x00C0 /* Max Power 2GHz in path 1 */ | 452 | #define SSB_SPROM8_MAXP_BG 0x00C0 /* Max Power 2GHz in path 1 */ |
| 436 | #define SSB_SPROM8_MAXP_BG_MASK 0x00FF /* Mask for Max Power 2GHz */ | 453 | #define SSB_SPROM8_MAXP_BG_MASK 0x00FF /* Mask for Max Power 2GHz */ |
| 437 | #define SSB_SPROM8_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ | 454 | #define SSB_SPROM8_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ |
