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 | |
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')
-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 | ||||
-rw-r--r-- | include/net/cfg80211.h | 37 | ||||
-rw-r--r-- | include/net/nfc/nfc.h | 21 |
9 files changed, 162 insertions, 22 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 */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 3de1c39d03e5..9f85fca0b676 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1346,7 +1346,12 @@ struct cfg80211_gtk_rekey_data { | |||
1346 | * | 1346 | * |
1347 | * @add_station: Add a new station. | 1347 | * @add_station: Add a new station. |
1348 | * @del_station: Remove a station; @mac may be NULL to remove all stations. | 1348 | * @del_station: Remove a station; @mac may be NULL to remove all stations. |
1349 | * @change_station: Modify a given station. | 1349 | * @change_station: Modify a given station. Note that flags changes are not much |
1350 | * validated in cfg80211, in particular the auth/assoc/authorized flags | ||
1351 | * might come to the driver in invalid combinations -- make sure to check | ||
1352 | * them, also against the existing state! Also, supported_rates changes are | ||
1353 | * not checked in station mode -- drivers need to reject (or ignore) them | ||
1354 | * for anything but TDLS peers. | ||
1350 | * @get_station: get station information for the station identified by @mac | 1355 | * @get_station: get station information for the station identified by @mac |
1351 | * @dump_station: dump station callback -- resume dump at index @idx | 1356 | * @dump_station: dump station callback -- resume dump at index @idx |
1352 | * | 1357 | * |
@@ -1694,7 +1699,9 @@ struct cfg80211_ops { | |||
1694 | * regulatory domain no user regulatory domain can enable these channels | 1699 | * regulatory domain no user regulatory domain can enable these channels |
1695 | * at a later time. This can be used for devices which do not have | 1700 | * at a later time. This can be used for devices which do not have |
1696 | * calibration information guaranteed for frequencies or settings | 1701 | * calibration information guaranteed for frequencies or settings |
1697 | * outside of its regulatory domain. | 1702 | * outside of its regulatory domain. If used in combination with |
1703 | * WIPHY_FLAG_CUSTOM_REGULATORY the inspected country IE power settings | ||
1704 | * will be followed. | ||
1698 | * @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure | 1705 | * @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure |
1699 | * that passive scan flags and beaconing flags may not be lifted by | 1706 | * that passive scan flags and beaconing flags may not be lifted by |
1700 | * cfg80211 due to regulatory beacon hints. For more information on beacon | 1707 | * cfg80211 due to regulatory beacon hints. For more information on beacon |
@@ -3064,6 +3071,32 @@ void cfg80211_roamed(struct net_device *dev, | |||
3064 | const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp); | 3071 | const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp); |
3065 | 3072 | ||
3066 | /** | 3073 | /** |
3074 | * cfg80211_roamed_bss - notify cfg80211 of roaming | ||
3075 | * | ||
3076 | * @dev: network device | ||
3077 | * @bss: entry of bss to which STA got roamed | ||
3078 | * @req_ie: association request IEs (maybe be %NULL) | ||
3079 | * @req_ie_len: association request IEs length | ||
3080 | * @resp_ie: association response IEs (may be %NULL) | ||
3081 | * @resp_ie_len: assoc response IEs length | ||
3082 | * @gfp: allocation flags | ||
3083 | * | ||
3084 | * This is just a wrapper to notify cfg80211 of roaming event with driver | ||
3085 | * passing bss to avoid a race in timeout of the bss entry. It should be | ||
3086 | * called by the underlying driver whenever it roamed from one AP to another | ||
3087 | * while connected. Drivers which have roaming implemented in firmware | ||
3088 | * may use this function to avoid a race in bss entry timeout where the bss | ||
3089 | * entry of the new AP is seen in the driver, but gets timed out by the time | ||
3090 | * it is accessed in __cfg80211_roamed() due to delay in scheduling | ||
3091 | * rdev->event_work. In case of any failures, the reference is released | ||
3092 | * either in cfg80211_roamed_bss() or in __cfg80211_romed(), Otherwise, | ||
3093 | * it will be released while diconneting from the current bss. | ||
3094 | */ | ||
3095 | void cfg80211_roamed_bss(struct net_device *dev, struct cfg80211_bss *bss, | ||
3096 | const u8 *req_ie, size_t req_ie_len, | ||
3097 | const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp); | ||
3098 | |||
3099 | /** | ||
3067 | * cfg80211_disconnected - notify cfg80211 that connection was dropped | 3100 | * cfg80211_disconnected - notify cfg80211 that connection was dropped |
3068 | * | 3101 | * |
3069 | * @dev: network device | 3102 | * @dev: network device |
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index 6a7f602aa841..ccfe757a94ec 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h | |||
@@ -52,6 +52,9 @@ struct nfc_ops { | |||
52 | int (*dev_down)(struct nfc_dev *dev); | 52 | int (*dev_down)(struct nfc_dev *dev); |
53 | int (*start_poll)(struct nfc_dev *dev, u32 protocols); | 53 | int (*start_poll)(struct nfc_dev *dev, u32 protocols); |
54 | void (*stop_poll)(struct nfc_dev *dev); | 54 | void (*stop_poll)(struct nfc_dev *dev); |
55 | int (*dep_link_up)(struct nfc_dev *dev, int target_idx, | ||
56 | u8 comm_mode, u8 rf_mode); | ||
57 | int (*dep_link_down)(struct nfc_dev *dev); | ||
55 | int (*activate_target)(struct nfc_dev *dev, u32 target_idx, | 58 | int (*activate_target)(struct nfc_dev *dev, u32 target_idx, |
56 | u32 protocol); | 59 | u32 protocol); |
57 | void (*deactivate_target)(struct nfc_dev *dev, u32 target_idx); | 60 | void (*deactivate_target)(struct nfc_dev *dev, u32 target_idx); |
@@ -60,6 +63,9 @@ struct nfc_ops { | |||
60 | void *cb_context); | 63 | void *cb_context); |
61 | }; | 64 | }; |
62 | 65 | ||
66 | #define NFC_TARGET_IDX_ANY -1 | ||
67 | #define NFC_MAX_GT_LEN 48 | ||
68 | |||
63 | struct nfc_target { | 69 | struct nfc_target { |
64 | u32 idx; | 70 | u32 idx; |
65 | u32 supported_protocols; | 71 | u32 supported_protocols; |
@@ -83,6 +89,8 @@ struct nfc_dev { | |||
83 | bool dev_up; | 89 | bool dev_up; |
84 | bool polling; | 90 | bool polling; |
85 | bool remote_activated; | 91 | bool remote_activated; |
92 | bool dep_link_up; | ||
93 | u32 dep_rf_mode; | ||
86 | struct nfc_genl_data genl_data; | 94 | struct nfc_genl_data genl_data; |
87 | u32 supported_protocols; | 95 | u32 supported_protocols; |
88 | 96 | ||
@@ -157,9 +165,20 @@ static inline const char *nfc_device_name(struct nfc_dev *dev) | |||
157 | return dev_name(&dev->dev); | 165 | return dev_name(&dev->dev); |
158 | } | 166 | } |
159 | 167 | ||
160 | struct sk_buff *nfc_alloc_skb(unsigned int size, gfp_t gfp); | 168 | struct sk_buff *nfc_alloc_send_skb(struct nfc_dev *dev, struct sock *sk, |
169 | unsigned int flags, unsigned int size, | ||
170 | unsigned int *err); | ||
171 | struct sk_buff *nfc_alloc_recv_skb(unsigned int size, gfp_t gfp); | ||
172 | |||
173 | int nfc_set_remote_general_bytes(struct nfc_dev *dev, | ||
174 | u8 *gt, u8 gt_len); | ||
175 | |||
176 | u8 *nfc_get_local_general_bytes(struct nfc_dev *dev, u8 *gt_len); | ||
161 | 177 | ||
162 | int nfc_targets_found(struct nfc_dev *dev, struct nfc_target *targets, | 178 | int nfc_targets_found(struct nfc_dev *dev, struct nfc_target *targets, |
163 | int ntargets); | 179 | int ntargets); |
164 | 180 | ||
181 | int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx, | ||
182 | u8 comm_mode, u8 rf_mode); | ||
183 | |||
165 | #endif /* __NET_NFC_H */ | 184 | #endif /* __NET_NFC_H */ |