aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-06-12 14:25:04 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-12 14:25:04 -0400
commit0440507bbc44149e63bbfb9df730ba3820371904 (patch)
tree7275e41aa1aa7e4d19d0503f1c15f07991c1a120 /include
parent8d242488ce4627dd7e6333caab56df11ea25e239 (diff)
parent7f0d9f430dc99303558adc30a75eef10c43f7bec (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/nfc.h12
-rw-r--r--include/linux/nl80211.h8
-rw-r--r--include/linux/ssb/ssb.h1
-rw-r--r--include/net/cfg80211.h45
-rw-r--r--include/net/mac80211.h44
-rw-r--r--include/net/nfc/hci.h3
-rw-r--r--include/net/nfc/nfc.h14
-rw-r--r--include/net/nfc/shdlc.h3
8 files changed, 103 insertions, 27 deletions
diff --git a/include/linux/nfc.h b/include/linux/nfc.h
index 0ae9b5857c83..f4e6dd915b1c 100644
--- a/include/linux/nfc.h
+++ b/include/linux/nfc.h
@@ -56,6 +56,10 @@
56 * %NFC_ATTR_PROTOCOLS) 56 * %NFC_ATTR_PROTOCOLS)
57 * @NFC_EVENT_DEVICE_REMOVED: event emitted when a device is removed 57 * @NFC_EVENT_DEVICE_REMOVED: event emitted when a device is removed
58 * (it sends %NFC_ATTR_DEVICE_INDEX) 58 * (it sends %NFC_ATTR_DEVICE_INDEX)
59 * @NFC_EVENT_TM_ACTIVATED: event emitted when the adapter is activated in
60 * target mode.
61 * @NFC_EVENT_DEVICE_DEACTIVATED: event emitted when the adapter is deactivated
62 * from target mode.
59 */ 63 */
60enum nfc_commands { 64enum nfc_commands {
61 NFC_CMD_UNSPEC, 65 NFC_CMD_UNSPEC,
@@ -71,6 +75,8 @@ enum nfc_commands {
71 NFC_EVENT_DEVICE_ADDED, 75 NFC_EVENT_DEVICE_ADDED,
72 NFC_EVENT_DEVICE_REMOVED, 76 NFC_EVENT_DEVICE_REMOVED,
73 NFC_EVENT_TARGET_LOST, 77 NFC_EVENT_TARGET_LOST,
78 NFC_EVENT_TM_ACTIVATED,
79 NFC_EVENT_TM_DEACTIVATED,
74/* private: internal use only */ 80/* private: internal use only */
75 __NFC_CMD_AFTER_LAST 81 __NFC_CMD_AFTER_LAST
76}; 82};
@@ -94,6 +100,8 @@ enum nfc_commands {
94 * @NFC_ATTR_TARGET_SENSF_RES: NFC-F targets extra information, max 18 bytes 100 * @NFC_ATTR_TARGET_SENSF_RES: NFC-F targets extra information, max 18 bytes
95 * @NFC_ATTR_COMM_MODE: Passive or active mode 101 * @NFC_ATTR_COMM_MODE: Passive or active mode
96 * @NFC_ATTR_RF_MODE: Initiator or target 102 * @NFC_ATTR_RF_MODE: Initiator or target
103 * @NFC_ATTR_IM_PROTOCOLS: Initiator mode protocols to poll for
104 * @NFC_ATTR_TM_PROTOCOLS: Target mode protocols to listen for
97 */ 105 */
98enum nfc_attrs { 106enum nfc_attrs {
99 NFC_ATTR_UNSPEC, 107 NFC_ATTR_UNSPEC,
@@ -109,6 +117,8 @@ enum nfc_attrs {
109 NFC_ATTR_COMM_MODE, 117 NFC_ATTR_COMM_MODE,
110 NFC_ATTR_RF_MODE, 118 NFC_ATTR_RF_MODE,
111 NFC_ATTR_DEVICE_POWERED, 119 NFC_ATTR_DEVICE_POWERED,
120 NFC_ATTR_IM_PROTOCOLS,
121 NFC_ATTR_TM_PROTOCOLS,
112/* private: internal use only */ 122/* private: internal use only */
113 __NFC_ATTR_AFTER_LAST 123 __NFC_ATTR_AFTER_LAST
114}; 124};
@@ -118,6 +128,7 @@ enum nfc_attrs {
118#define NFC_NFCID1_MAXSIZE 10 128#define NFC_NFCID1_MAXSIZE 10
119#define NFC_SENSB_RES_MAXSIZE 12 129#define NFC_SENSB_RES_MAXSIZE 12
120#define NFC_SENSF_RES_MAXSIZE 18 130#define NFC_SENSF_RES_MAXSIZE 18
131#define NFC_GB_MAXSIZE 48
121 132
122/* NFC protocols */ 133/* NFC protocols */
123#define NFC_PROTO_JEWEL 1 134#define NFC_PROTO_JEWEL 1
@@ -135,6 +146,7 @@ enum nfc_attrs {
135/* NFC RF modes */ 146/* NFC RF modes */
136#define NFC_RF_INITIATOR 0 147#define NFC_RF_INITIATOR 0
137#define NFC_RF_TARGET 1 148#define NFC_RF_TARGET 1
149#define NFC_RF_NONE 2
138 150
139/* NFC protocols masks used in bitsets */ 151/* NFC protocols masks used in bitsets */
140#define NFC_PROTO_JEWEL_MASK (1 << NFC_PROTO_JEWEL) 152#define NFC_PROTO_JEWEL_MASK (1 << NFC_PROTO_JEWEL)
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index a6959f72745e..970afdf5a605 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -170,6 +170,8 @@
170 * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, 170 * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS,
171 * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, 171 * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
172 * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT. 172 * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT.
173 * The channel to use can be set on the interface or be given using the
174 * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_WIPHY_CHANNEL_TYPE attrs.
173 * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP 175 * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP
174 * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface 176 * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface
175 * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP 177 * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP
@@ -1520,6 +1522,8 @@ enum nl80211_attrs {
1520#define NL80211_MAX_NR_CIPHER_SUITES 5 1522#define NL80211_MAX_NR_CIPHER_SUITES 5
1521#define NL80211_MAX_NR_AKM_SUITES 2 1523#define NL80211_MAX_NR_AKM_SUITES 2
1522 1524
1525#define NL80211_MIN_REMAIN_ON_CHANNEL_TIME 10
1526
1523/** 1527/**
1524 * enum nl80211_iftype - (virtual) interface types 1528 * enum nl80211_iftype - (virtual) interface types
1525 * 1529 *
@@ -2534,10 +2538,14 @@ enum nl80211_attr_cqm {
2534 * configured threshold 2538 * configured threshold
2535 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the 2539 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the
2536 * configured threshold 2540 * configured threshold
2541 * @NL80211_CQM_RSSI_BEACON_LOSS_EVENT: The device experienced beacon loss.
2542 * (Note that deauth/disassoc will still follow if the AP is not
2543 * available. This event might get used as roaming event, etc.)
2537 */ 2544 */
2538enum nl80211_cqm_rssi_threshold_event { 2545enum nl80211_cqm_rssi_threshold_event {
2539 NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, 2546 NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
2540 NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, 2547 NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
2548 NL80211_CQM_RSSI_BEACON_LOSS_EVENT,
2541}; 2549};
2542 2550
2543 2551
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index bc14bd738ade..bb674c02f306 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -243,6 +243,7 @@ struct ssb_bus_ops {
243#define SSB_DEV_MINI_MACPHY 0x823 243#define SSB_DEV_MINI_MACPHY 0x823
244#define SSB_DEV_ARM_1176 0x824 244#define SSB_DEV_ARM_1176 0x824
245#define SSB_DEV_ARM_7TDMI 0x825 245#define SSB_DEV_ARM_7TDMI 0x825
246#define SSB_DEV_ARM_CM3 0x82A
246 247
247/* Vendor-ID values */ 248/* Vendor-ID values */
248#define SSB_VENDOR_BROADCOM 0x4243 249#define SSB_VENDOR_BROADCOM 0x4243
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 0289d4ce7070..7319f25250b6 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -404,6 +404,8 @@ struct cfg80211_beacon_data {
404 * 404 *
405 * Used to configure an AP interface. 405 * Used to configure an AP interface.
406 * 406 *
407 * @channel: the channel to start the AP on
408 * @channel_type: the channel type to use
407 * @beacon: beacon data 409 * @beacon: beacon data
408 * @beacon_interval: beacon interval 410 * @beacon_interval: beacon interval
409 * @dtim_period: DTIM period 411 * @dtim_period: DTIM period
@@ -417,6 +419,9 @@ struct cfg80211_beacon_data {
417 * @inactivity_timeout: time in seconds to determine station's inactivity. 419 * @inactivity_timeout: time in seconds to determine station's inactivity.
418 */ 420 */
419struct cfg80211_ap_settings { 421struct cfg80211_ap_settings {
422 struct ieee80211_channel *channel;
423 enum nl80211_channel_type channel_type;
424
420 struct cfg80211_beacon_data beacon; 425 struct cfg80211_beacon_data beacon;
421 426
422 int beacon_interval, dtim_period; 427 int beacon_interval, dtim_period;
@@ -826,6 +831,8 @@ struct mesh_config {
826 831
827/** 832/**
828 * struct mesh_setup - 802.11s mesh setup configuration 833 * struct mesh_setup - 802.11s mesh setup configuration
834 * @channel: the channel to start the mesh network on
835 * @channel_type: the channel type to use
829 * @mesh_id: the mesh ID 836 * @mesh_id: the mesh ID
830 * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes 837 * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes
831 * @sync_method: which synchronization method to use 838 * @sync_method: which synchronization method to use
@@ -840,6 +847,8 @@ struct mesh_config {
840 * These parameters are fixed when the mesh is created. 847 * These parameters are fixed when the mesh is created.
841 */ 848 */
842struct mesh_setup { 849struct mesh_setup {
850 struct ieee80211_channel *channel;
851 enum nl80211_channel_type channel_type;
843 const u8 *mesh_id; 852 const u8 *mesh_id;
844 u8 mesh_id_len; 853 u8 mesh_id_len;
845 u8 sync_method; 854 u8 sync_method;
@@ -1411,11 +1420,14 @@ struct cfg80211_gtk_rekey_data {
1411 * 1420 *
1412 * @set_txq_params: Set TX queue parameters 1421 * @set_txq_params: Set TX queue parameters
1413 * 1422 *
1414 * @set_channel: Set channel for a given wireless interface. Some devices 1423 * @libertas_set_mesh_channel: Only for backward compatibility for libertas,
1415 * may support multi-channel operation (by channel hopping) so cfg80211 1424 * as it doesn't implement join_mesh and needs to set the channel to
1416 * doesn't verify much. Note, however, that the passed netdev may be 1425 * join the mesh instead.
1417 * %NULL as well if the user requested changing the channel for the 1426 *
1418 * device itself, or for a monitor interface. 1427 * @set_monitor_channel: Set the monitor mode channel for the device. If other
1428 * interfaces are active this callback should reject the configuration.
1429 * If no interfaces are active or the device is down, the channel should
1430 * be stored for when a monitor interface becomes active.
1419 * @get_channel: Get the current operating channel, should return %NULL if 1431 * @get_channel: Get the current operating channel, should return %NULL if
1420 * there's no single defined operating channel if for example the 1432 * there's no single defined operating channel if for example the
1421 * device implements channel hopping for multi-channel virtual interfaces. 1433 * device implements channel hopping for multi-channel virtual interfaces.
@@ -1605,9 +1617,13 @@ struct cfg80211_ops {
1605 int (*set_txq_params)(struct wiphy *wiphy, struct net_device *dev, 1617 int (*set_txq_params)(struct wiphy *wiphy, struct net_device *dev,
1606 struct ieee80211_txq_params *params); 1618 struct ieee80211_txq_params *params);
1607 1619
1608 int (*set_channel)(struct wiphy *wiphy, struct net_device *dev, 1620 int (*libertas_set_mesh_channel)(struct wiphy *wiphy,
1609 struct ieee80211_channel *chan, 1621 struct net_device *dev,
1610 enum nl80211_channel_type channel_type); 1622 struct ieee80211_channel *chan);
1623
1624 int (*set_monitor_channel)(struct wiphy *wiphy,
1625 struct ieee80211_channel *chan,
1626 enum nl80211_channel_type channel_type);
1611 1627
1612 int (*scan)(struct wiphy *wiphy, struct net_device *dev, 1628 int (*scan)(struct wiphy *wiphy, struct net_device *dev,
1613 struct cfg80211_scan_request *request); 1629 struct cfg80211_scan_request *request);
@@ -2263,7 +2279,10 @@ struct cfg80211_cached_keys;
2263 * @netdev: (private) Used to reference back to the netdev 2279 * @netdev: (private) Used to reference back to the netdev
2264 * @current_bss: (private) Used by the internal configuration code 2280 * @current_bss: (private) Used by the internal configuration code
2265 * @channel: (private) Used by the internal configuration code to track 2281 * @channel: (private) Used by the internal configuration code to track
2266 * user-set AP, monitor and WDS channels for wireless extensions 2282 * the user-set AP, monitor and WDS channel
2283 * @preset_chan: (private) Used by the internal configuration code to
2284 * track the channel to be used for AP later
2285 * @preset_chantype: (private) the corresponding channel type
2267 * @bssid: (private) Used by the internal configuration code 2286 * @bssid: (private) Used by the internal configuration code
2268 * @ssid: (private) Used by the internal configuration code 2287 * @ssid: (private) Used by the internal configuration code
2269 * @ssid_len: (private) Used by the internal configuration code 2288 * @ssid_len: (private) Used by the internal configuration code
@@ -2313,7 +2332,8 @@ struct wireless_dev {
2313 spinlock_t event_lock; 2332 spinlock_t event_lock;
2314 2333
2315 struct cfg80211_internal_bss *current_bss; /* associated / joined */ 2334 struct cfg80211_internal_bss *current_bss; /* associated / joined */
2316 struct ieee80211_channel *channel; 2335 struct ieee80211_channel *preset_chan;
2336 enum nl80211_channel_type preset_chantype;
2317 2337
2318 bool ps; 2338 bool ps;
2319 int ps_timeout; 2339 int ps_timeout;
@@ -3359,11 +3379,14 @@ void cfg80211_report_obss_beacon(struct wiphy *wiphy,
3359 const u8 *frame, size_t len, 3379 const u8 *frame, size_t len,
3360 int freq, int sig_dbm, gfp_t gfp); 3380 int freq, int sig_dbm, gfp_t gfp);
3361 3381
3362/* 3382/**
3363 * cfg80211_can_beacon_sec_chan - test if ht40 on extension channel can be used 3383 * cfg80211_can_beacon_sec_chan - test if ht40 on extension channel can be used
3364 * @wiphy: the wiphy 3384 * @wiphy: the wiphy
3365 * @chan: main channel 3385 * @chan: main channel
3366 * @channel_type: HT mode 3386 * @channel_type: HT mode
3387 *
3388 * This function returns true if there is no secondary channel or the secondary
3389 * channel can be used for beaconing (i.e. is not a radar channel etc.)
3367 */ 3390 */
3368bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy, 3391bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
3369 struct ieee80211_channel *chan, 3392 struct ieee80211_channel *chan,
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 1937c7d98304..d152f54064fd 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1297,6 +1297,10 @@ enum ieee80211_hw_flags {
1297 * reports, by default it is set to _MCS, _GI and _BW but doesn't 1297 * reports, by default it is set to _MCS, _GI and _BW but doesn't
1298 * include _FMT. Use %IEEE80211_RADIOTAP_MCS_HAVE_* values, only 1298 * include _FMT. Use %IEEE80211_RADIOTAP_MCS_HAVE_* values, only
1299 * adding _BW is supported today. 1299 * adding _BW is supported today.
1300 *
1301 * @netdev_features: netdev features to be set in each netdev created
1302 * from this HW. Note only HW checksum features are currently
1303 * compatible with mac80211. Other feature bits will be rejected.
1300 */ 1304 */
1301struct ieee80211_hw { 1305struct ieee80211_hw {
1302 struct ieee80211_conf conf; 1306 struct ieee80211_conf conf;
@@ -1319,6 +1323,7 @@ struct ieee80211_hw {
1319 u8 max_tx_aggregation_subframes; 1323 u8 max_tx_aggregation_subframes;
1320 u8 offchannel_tx_hw_queue; 1324 u8 offchannel_tx_hw_queue;
1321 u8 radiotap_mcs_details; 1325 u8 radiotap_mcs_details;
1326 netdev_features_t netdev_features;
1322}; 1327};
1323 1328
1324/** 1329/**
@@ -2178,7 +2183,10 @@ enum ieee80211_rate_control_changed {
2178 * offload. Frames to transmit on the off-channel channel are transmitted 2183 * offload. Frames to transmit on the off-channel channel are transmitted
2179 * normally except for the %IEEE80211_TX_CTL_TX_OFFCHAN flag. When the 2184 * normally except for the %IEEE80211_TX_CTL_TX_OFFCHAN flag. When the
2180 * duration (which will always be non-zero) expires, the driver must call 2185 * duration (which will always be non-zero) expires, the driver must call
2181 * ieee80211_remain_on_channel_expired(). This callback may sleep. 2186 * ieee80211_remain_on_channel_expired().
2187 * Note that this callback may be called while the device is in IDLE and
2188 * must be accepted in this case.
2189 * This callback may sleep.
2182 * @cancel_remain_on_channel: Requests that an ongoing off-channel period is 2190 * @cancel_remain_on_channel: Requests that an ongoing off-channel period is
2183 * aborted before it expires. This callback may sleep. 2191 * aborted before it expires. This callback may sleep.
2184 * 2192 *
@@ -3551,16 +3559,6 @@ void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
3551 gfp_t gfp); 3559 gfp_t gfp);
3552 3560
3553/** 3561/**
3554 * ieee80211_get_operstate - get the operstate of the vif
3555 *
3556 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3557 *
3558 * The driver might need to know the operstate of the net_device
3559 * (specifically, whether the link is IF_OPER_UP after resume)
3560 */
3561unsigned char ieee80211_get_operstate(struct ieee80211_vif *vif);
3562
3563/**
3564 * ieee80211_chswitch_done - Complete channel switch process 3562 * ieee80211_chswitch_done - Complete channel switch process
3565 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 3563 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3566 * @success: make the channel switch successful or not 3564 * @success: make the channel switch successful or not
@@ -3839,4 +3837,28 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif,
3839 */ 3837 */
3840int ieee80211_ave_rssi(struct ieee80211_vif *vif); 3838int ieee80211_ave_rssi(struct ieee80211_vif *vif);
3841 3839
3840/* Extra debugging macros */
3841
3842#ifdef CONFIG_MAC80211_HT_DEBUG
3843#define ht_vdbg(fmt, ...) \
3844 pr_debug(fmt, ##__VA_ARGS__)
3845#else
3846#define ht_vdbg(fmt, ...) \
3847do { \
3848 if (0) \
3849 pr_debug(fmt, ##__VA_ARGS__); \
3850} while (0)
3851#endif
3852
3853#ifdef CONFIG_MAC80211_IBSS_DEBUG
3854#define ibss_vdbg(fmt, ...) \
3855 pr_debug(fmt, ##__VA_ARGS__)
3856#else
3857#define ibss_vdbg(fmt, ...) \
3858do { \
3859 if (0) \
3860 pr_debug(fmt, ##__VA_ARGS__); \
3861} while (0)
3862#endif
3863
3842#endif /* MAC80211_H */ 3864#endif /* MAC80211_H */
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h
index 4467c9460857..e30e6a869714 100644
--- a/include/net/nfc/hci.h
+++ b/include/net/nfc/hci.h
@@ -31,7 +31,8 @@ struct nfc_hci_ops {
31 void (*close) (struct nfc_hci_dev *hdev); 31 void (*close) (struct nfc_hci_dev *hdev);
32 int (*hci_ready) (struct nfc_hci_dev *hdev); 32 int (*hci_ready) (struct nfc_hci_dev *hdev);
33 int (*xmit) (struct nfc_hci_dev *hdev, struct sk_buff *skb); 33 int (*xmit) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
34 int (*start_poll) (struct nfc_hci_dev *hdev, u32 protocols); 34 int (*start_poll) (struct nfc_hci_dev *hdev,
35 u32 im_protocols, u32 tm_protocols);
35 int (*target_from_gate) (struct nfc_hci_dev *hdev, u8 gate, 36 int (*target_from_gate) (struct nfc_hci_dev *hdev, u8 gate,
36 struct nfc_target *target); 37 struct nfc_target *target);
37 int (*complete_target_discovered) (struct nfc_hci_dev *hdev, u8 gate, 38 int (*complete_target_discovered) (struct nfc_hci_dev *hdev, u8 gate,
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index b7ca4a2a1d72..180964b954ab 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -53,7 +53,8 @@ struct nfc_target;
53struct nfc_ops { 53struct nfc_ops {
54 int (*dev_up)(struct nfc_dev *dev); 54 int (*dev_up)(struct nfc_dev *dev);
55 int (*dev_down)(struct nfc_dev *dev); 55 int (*dev_down)(struct nfc_dev *dev);
56 int (*start_poll)(struct nfc_dev *dev, u32 protocols); 56 int (*start_poll)(struct nfc_dev *dev,
57 u32 im_protocols, u32 tm_protocols);
57 void (*stop_poll)(struct nfc_dev *dev); 58 void (*stop_poll)(struct nfc_dev *dev);
58 int (*dep_link_up)(struct nfc_dev *dev, struct nfc_target *target, 59 int (*dep_link_up)(struct nfc_dev *dev, struct nfc_target *target,
59 u8 comm_mode, u8 *gb, size_t gb_len); 60 u8 comm_mode, u8 *gb, size_t gb_len);
@@ -62,9 +63,10 @@ struct nfc_ops {
62 u32 protocol); 63 u32 protocol);
63 void (*deactivate_target)(struct nfc_dev *dev, 64 void (*deactivate_target)(struct nfc_dev *dev,
64 struct nfc_target *target); 65 struct nfc_target *target);
65 int (*data_exchange)(struct nfc_dev *dev, struct nfc_target *target, 66 int (*im_transceive)(struct nfc_dev *dev, struct nfc_target *target,
66 struct sk_buff *skb, data_exchange_cb_t cb, 67 struct sk_buff *skb, data_exchange_cb_t cb,
67 void *cb_context); 68 void *cb_context);
69 int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb);
68 int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); 70 int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target);
69}; 71};
70 72
@@ -99,10 +101,10 @@ struct nfc_dev {
99 int targets_generation; 101 int targets_generation;
100 struct device dev; 102 struct device dev;
101 bool dev_up; 103 bool dev_up;
104 u8 rf_mode;
102 bool polling; 105 bool polling;
103 struct nfc_target *active_target; 106 struct nfc_target *active_target;
104 bool dep_link_up; 107 bool dep_link_up;
105 u32 dep_rf_mode;
106 struct nfc_genl_data genl_data; 108 struct nfc_genl_data genl_data;
107 u32 supported_protocols; 109 u32 supported_protocols;
108 110
@@ -188,6 +190,7 @@ struct sk_buff *nfc_alloc_recv_skb(unsigned int size, gfp_t gfp);
188 190
189int nfc_set_remote_general_bytes(struct nfc_dev *dev, 191int nfc_set_remote_general_bytes(struct nfc_dev *dev,
190 u8 *gt, u8 gt_len); 192 u8 *gt, u8 gt_len);
193u8 *nfc_get_local_general_bytes(struct nfc_dev *dev, size_t *gb_len);
191 194
192int nfc_targets_found(struct nfc_dev *dev, 195int nfc_targets_found(struct nfc_dev *dev,
193 struct nfc_target *targets, int ntargets); 196 struct nfc_target *targets, int ntargets);
@@ -196,4 +199,9 @@ int nfc_target_lost(struct nfc_dev *dev, u32 target_idx);
196int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx, 199int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx,
197 u8 comm_mode, u8 rf_mode); 200 u8 comm_mode, u8 rf_mode);
198 201
202int nfc_tm_activated(struct nfc_dev *dev, u32 protocol, u8 comm_mode,
203 u8 *gb, size_t gb_len);
204int nfc_tm_deactivated(struct nfc_dev *dev);
205int nfc_tm_data_received(struct nfc_dev *dev, struct sk_buff *skb);
206
199#endif /* __NET_NFC_H */ 207#endif /* __NET_NFC_H */
diff --git a/include/net/nfc/shdlc.h b/include/net/nfc/shdlc.h
index ab06afd462da..35e930d2f638 100644
--- a/include/net/nfc/shdlc.h
+++ b/include/net/nfc/shdlc.h
@@ -27,7 +27,8 @@ struct nfc_shdlc_ops {
27 void (*close) (struct nfc_shdlc *shdlc); 27 void (*close) (struct nfc_shdlc *shdlc);
28 int (*hci_ready) (struct nfc_shdlc *shdlc); 28 int (*hci_ready) (struct nfc_shdlc *shdlc);
29 int (*xmit) (struct nfc_shdlc *shdlc, struct sk_buff *skb); 29 int (*xmit) (struct nfc_shdlc *shdlc, struct sk_buff *skb);
30 int (*start_poll) (struct nfc_shdlc *shdlc, u32 protocols); 30 int (*start_poll) (struct nfc_shdlc *shdlc,
31 u32 im_protocols, u32 tm_protocols);
31 int (*target_from_gate) (struct nfc_shdlc *shdlc, u8 gate, 32 int (*target_from_gate) (struct nfc_shdlc *shdlc, u8 gate,
32 struct nfc_target *target); 33 struct nfc_target *target);
33 int (*complete_target_discovered) (struct nfc_shdlc *shdlc, u8 gate, 34 int (*complete_target_discovered) (struct nfc_shdlc *shdlc, u8 gate,