NFC: Reserve tx head and tail room
We can have the NFC core layer allocating the tx head and tail room for the drivers and avoid 1 or more SKBs copy on write on the Tx path. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
4e0d8cc100
commit
e8753043f9
@@ -123,4 +123,6 @@ struct sockaddr_nfc {
|
||||
#define NFC_SOCKPROTO_RAW 0
|
||||
#define NFC_SOCKPROTO_MAX 1
|
||||
|
||||
#define NFC_HEADER_SIZE 1
|
||||
|
||||
#endif /*__LINUX_NFC_H */
|
||||
|
||||
+6
-1
@@ -82,6 +82,9 @@ struct nfc_dev {
|
||||
struct nfc_genl_data genl_data;
|
||||
u32 supported_protocols;
|
||||
|
||||
int tx_headroom;
|
||||
int tx_tailroom;
|
||||
|
||||
struct nfc_ops *ops;
|
||||
};
|
||||
#define to_nfc_dev(_dev) container_of(_dev, struct nfc_dev, dev)
|
||||
@@ -89,7 +92,9 @@ struct nfc_dev {
|
||||
extern struct class nfc_class;
|
||||
|
||||
struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops,
|
||||
u32 supported_protocols);
|
||||
u32 supported_protocols,
|
||||
int tx_headroom,
|
||||
int tx_tailroom);
|
||||
|
||||
/**
|
||||
* nfc_free_device - free nfc device
|
||||
|
||||
Reference in New Issue
Block a user