aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/can/dev.h16
-rw-r--r--include/linux/can/netlink.h1
-rw-r--r--include/linux/ieee80211.h106
-rw-r--r--include/linux/if_tun.h14
-rw-r--r--include/linux/in.h2
-rw-r--r--include/linux/inetdevice.h1
-rw-r--r--include/linux/isdn/capilli.h3
-rw-r--r--include/linux/llc.h7
-rw-r--r--include/linux/miscdevice.h1
-rw-r--r--include/linux/netdevice.h1
-rw-r--r--include/linux/netpoll.h11
-rw-r--r--include/linux/nl80211.h94
-rw-r--r--include/linux/rtnetlink.h2
-rw-r--r--include/linux/stmmac.h53
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--include/linux/vhost.h130
17 files changed, 426 insertions, 18 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 756f831cbdd5..d93080748a91 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -362,6 +362,7 @@ unifdef-y += uio.h
362unifdef-y += unistd.h 362unifdef-y += unistd.h
363unifdef-y += usbdevice_fs.h 363unifdef-y += usbdevice_fs.h
364unifdef-y += utsname.h 364unifdef-y += utsname.h
365unifdef-y += vhost.h
365unifdef-y += videodev2.h 366unifdef-y += videodev2.h
366unifdef-y += videodev.h 367unifdef-y += videodev.h
367unifdef-y += virtio_config.h 368unifdef-y += virtio_config.h
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
index 3db7767d2a17..c8c660a79f90 100644
--- a/include/linux/can/dev.h
+++ b/include/linux/can/dev.h
@@ -38,6 +38,7 @@ struct can_priv {
38 38
39 enum can_state state; 39 enum can_state state;
40 u32 ctrlmode; 40 u32 ctrlmode;
41 u32 ctrlmode_supported;
41 42
42 int restart_ms; 43 int restart_ms;
43 struct timer_list restart_timer; 44 struct timer_list restart_timer;
@@ -60,6 +61,21 @@ struct can_priv {
60 */ 61 */
61#define get_can_dlc(i) (min_t(__u8, (i), 8)) 62#define get_can_dlc(i) (min_t(__u8, (i), 8))
62 63
64/* Drop a given socketbuffer if it does not contain a valid CAN frame. */
65static inline int can_dropped_invalid_skb(struct net_device *dev,
66 struct sk_buff *skb)
67{
68 const struct can_frame *cf = (struct can_frame *)skb->data;
69
70 if (unlikely(skb->len != sizeof(*cf) || cf->can_dlc > 8)) {
71 kfree_skb(skb);
72 dev->stats.tx_dropped++;
73 return 1;
74 }
75
76 return 0;
77}
78
63struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); 79struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max);
64void free_candev(struct net_device *dev); 80void free_candev(struct net_device *dev);
65 81
diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h
index 9ecbb7871c0e..c818335fbb13 100644
--- a/include/linux/can/netlink.h
+++ b/include/linux/can/netlink.h
@@ -80,6 +80,7 @@ struct can_ctrlmode {
80#define CAN_CTRLMODE_LOOPBACK 0x1 /* Loopback mode */ 80#define CAN_CTRLMODE_LOOPBACK 0x1 /* Loopback mode */
81#define CAN_CTRLMODE_LISTENONLY 0x2 /* Listen-only mode */ 81#define CAN_CTRLMODE_LISTENONLY 0x2 /* Listen-only mode */
82#define CAN_CTRLMODE_3_SAMPLES 0x4 /* Triple sampling mode */ 82#define CAN_CTRLMODE_3_SAMPLES 0x4 /* Triple sampling mode */
83#define CAN_CTRLMODE_ONE_SHOT 0x8 /* One-Shot mode */
83 84
84/* 85/*
85 * CAN device statistics 86 * CAN device statistics
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 163c840437d6..842701906ae9 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -120,6 +120,24 @@
120#define IEEE80211_QOS_CTL_TID_MASK 0x000F 120#define IEEE80211_QOS_CTL_TID_MASK 0x000F
121#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007 121#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007
122 122
123/* U-APSD queue for WMM IEs sent by AP */
124#define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7)
125
126/* U-APSD queues for WMM IEs sent by STA */
127#define IEEE80211_WMM_IE_STA_QOSINFO_AC_VO (1<<0)
128#define IEEE80211_WMM_IE_STA_QOSINFO_AC_VI (1<<1)
129#define IEEE80211_WMM_IE_STA_QOSINFO_AC_BK (1<<2)
130#define IEEE80211_WMM_IE_STA_QOSINFO_AC_BE (1<<3)
131#define IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK 0x0f
132
133/* U-APSD max SP length for WMM IEs sent by STA */
134#define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0x00
135#define IEEE80211_WMM_IE_STA_QOSINFO_SP_2 0x01
136#define IEEE80211_WMM_IE_STA_QOSINFO_SP_4 0x02
137#define IEEE80211_WMM_IE_STA_QOSINFO_SP_6 0x03
138#define IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK 0x03
139#define IEEE80211_WMM_IE_STA_QOSINFO_SP_SHIFT 5
140
123struct ieee80211_hdr { 141struct ieee80211_hdr {
124 __le16 frame_control; 142 __le16 frame_control;
125 __le16 duration_id; 143 __le16 duration_id;
@@ -130,6 +148,25 @@ struct ieee80211_hdr {
130 u8 addr4[6]; 148 u8 addr4[6];
131} __attribute__ ((packed)); 149} __attribute__ ((packed));
132 150
151struct ieee80211_hdr_3addr {
152 __le16 frame_control;
153 __le16 duration_id;
154 u8 addr1[6];
155 u8 addr2[6];
156 u8 addr3[6];
157 __le16 seq_ctrl;
158} __attribute__ ((packed));
159
160struct ieee80211_qos_hdr {
161 __le16 frame_control;
162 __le16 duration_id;
163 u8 addr1[6];
164 u8 addr2[6];
165 u8 addr3[6];
166 __le16 seq_ctrl;
167 __le16 qos_ctrl;
168} __attribute__ ((packed));
169
133/** 170/**
134 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set 171 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set
135 * @fc: frame control bytes in little-endian byteorder 172 * @fc: frame control bytes in little-endian byteorder
@@ -707,6 +744,10 @@ struct ieee80211_mgmt {
707 u8 action; 744 u8 action;
708 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; 745 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
709 } __attribute__ ((packed)) sa_query; 746 } __attribute__ ((packed)) sa_query;
747 struct {
748 u8 action;
749 u8 smps_control;
750 } __attribute__ ((packed)) ht_smps;
710 } u; 751 } u;
711 } __attribute__ ((packed)) action; 752 } __attribute__ ((packed)) action;
712 } u; 753 } u;
@@ -771,7 +812,10 @@ struct ieee80211_bar {
771/** 812/**
772 * struct ieee80211_mcs_info - MCS information 813 * struct ieee80211_mcs_info - MCS information
773 * @rx_mask: RX mask 814 * @rx_mask: RX mask
774 * @rx_highest: highest supported RX rate 815 * @rx_highest: highest supported RX rate. If set represents
816 * the highest supported RX data rate in units of 1 Mbps.
817 * If this field is 0 this value should not be used to
818 * consider the highest RX data rate supported.
775 * @tx_params: TX parameters 819 * @tx_params: TX parameters
776 */ 820 */
777struct ieee80211_mcs_info { 821struct ieee80211_mcs_info {
@@ -824,6 +868,7 @@ struct ieee80211_ht_cap {
824#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 868#define IEEE80211_HT_CAP_LDPC_CODING 0x0001
825#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 869#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002
826#define IEEE80211_HT_CAP_SM_PS 0x000C 870#define IEEE80211_HT_CAP_SM_PS 0x000C
871#define IEEE80211_HT_CAP_SM_PS_SHIFT 2
827#define IEEE80211_HT_CAP_GRN_FLD 0x0010 872#define IEEE80211_HT_CAP_GRN_FLD 0x0010
828#define IEEE80211_HT_CAP_SGI_20 0x0020 873#define IEEE80211_HT_CAP_SGI_20 0x0020
829#define IEEE80211_HT_CAP_SGI_40 0x0040 874#define IEEE80211_HT_CAP_SGI_40 0x0040
@@ -839,6 +884,7 @@ struct ieee80211_ht_cap {
839/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ 884/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */
840#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 885#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
841#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C 886#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
887#define IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT 2
842 888
843/* 889/*
844 * Maximum length of AMPDU that the STA can receive. 890 * Maximum length of AMPDU that the STA can receive.
@@ -922,12 +968,17 @@ struct ieee80211_ht_info {
922#define IEEE80211_MAX_AMPDU_BUF 0x40 968#define IEEE80211_MAX_AMPDU_BUF 0x40
923 969
924 970
925/* Spatial Multiplexing Power Save Modes */ 971/* Spatial Multiplexing Power Save Modes (for capability) */
926#define WLAN_HT_CAP_SM_PS_STATIC 0 972#define WLAN_HT_CAP_SM_PS_STATIC 0
927#define WLAN_HT_CAP_SM_PS_DYNAMIC 1 973#define WLAN_HT_CAP_SM_PS_DYNAMIC 1
928#define WLAN_HT_CAP_SM_PS_INVALID 2 974#define WLAN_HT_CAP_SM_PS_INVALID 2
929#define WLAN_HT_CAP_SM_PS_DISABLED 3 975#define WLAN_HT_CAP_SM_PS_DISABLED 3
930 976
977/* for SM power control field lower two bits */
978#define WLAN_HT_SMPS_CONTROL_DISABLED 0
979#define WLAN_HT_SMPS_CONTROL_STATIC 1
980#define WLAN_HT_SMPS_CONTROL_DYNAMIC 3
981
931/* Authentication algorithms */ 982/* Authentication algorithms */
932#define WLAN_AUTH_OPEN 0 983#define WLAN_AUTH_OPEN 0
933#define WLAN_AUTH_SHARED_KEY 1 984#define WLAN_AUTH_SHARED_KEY 1
@@ -1071,12 +1122,12 @@ enum ieee80211_eid {
1071 WLAN_EID_TIM = 5, 1122 WLAN_EID_TIM = 5,
1072 WLAN_EID_IBSS_PARAMS = 6, 1123 WLAN_EID_IBSS_PARAMS = 6,
1073 WLAN_EID_CHALLENGE = 16, 1124 WLAN_EID_CHALLENGE = 16,
1074 /* 802.11d */ 1125
1075 WLAN_EID_COUNTRY = 7, 1126 WLAN_EID_COUNTRY = 7,
1076 WLAN_EID_HP_PARAMS = 8, 1127 WLAN_EID_HP_PARAMS = 8,
1077 WLAN_EID_HP_TABLE = 9, 1128 WLAN_EID_HP_TABLE = 9,
1078 WLAN_EID_REQUEST = 10, 1129 WLAN_EID_REQUEST = 10,
1079 /* 802.11e */ 1130
1080 WLAN_EID_QBSS_LOAD = 11, 1131 WLAN_EID_QBSS_LOAD = 11,
1081 WLAN_EID_EDCA_PARAM_SET = 12, 1132 WLAN_EID_EDCA_PARAM_SET = 12,
1082 WLAN_EID_TSPEC = 13, 1133 WLAN_EID_TSPEC = 13,
@@ -1099,7 +1150,7 @@ enum ieee80211_eid {
1099 WLAN_EID_PREP = 69, 1150 WLAN_EID_PREP = 69,
1100 WLAN_EID_PERR = 70, 1151 WLAN_EID_PERR = 70,
1101 WLAN_EID_RANN = 49, /* compatible with FreeBSD */ 1152 WLAN_EID_RANN = 49, /* compatible with FreeBSD */
1102 /* 802.11h */ 1153
1103 WLAN_EID_PWR_CONSTRAINT = 32, 1154 WLAN_EID_PWR_CONSTRAINT = 32,
1104 WLAN_EID_PWR_CAPABILITY = 33, 1155 WLAN_EID_PWR_CAPABILITY = 33,
1105 WLAN_EID_TPC_REQUEST = 34, 1156 WLAN_EID_TPC_REQUEST = 34,
@@ -1110,20 +1161,41 @@ enum ieee80211_eid {
1110 WLAN_EID_MEASURE_REPORT = 39, 1161 WLAN_EID_MEASURE_REPORT = 39,
1111 WLAN_EID_QUIET = 40, 1162 WLAN_EID_QUIET = 40,
1112 WLAN_EID_IBSS_DFS = 41, 1163 WLAN_EID_IBSS_DFS = 41,
1113 /* 802.11g */ 1164
1114 WLAN_EID_ERP_INFO = 42, 1165 WLAN_EID_ERP_INFO = 42,
1115 WLAN_EID_EXT_SUPP_RATES = 50, 1166 WLAN_EID_EXT_SUPP_RATES = 50,
1116 /* 802.11n */ 1167
1117 WLAN_EID_HT_CAPABILITY = 45, 1168 WLAN_EID_HT_CAPABILITY = 45,
1118 WLAN_EID_HT_INFORMATION = 61, 1169 WLAN_EID_HT_INFORMATION = 61,
1119 /* 802.11i */ 1170
1120 WLAN_EID_RSN = 48, 1171 WLAN_EID_RSN = 48,
1121 WLAN_EID_TIMEOUT_INTERVAL = 56, 1172 WLAN_EID_MMIE = 76,
1122 WLAN_EID_MMIE = 76 /* 802.11w */,
1123 WLAN_EID_WPA = 221, 1173 WLAN_EID_WPA = 221,
1124 WLAN_EID_GENERIC = 221, 1174 WLAN_EID_GENERIC = 221,
1125 WLAN_EID_VENDOR_SPECIFIC = 221, 1175 WLAN_EID_VENDOR_SPECIFIC = 221,
1126 WLAN_EID_QOS_PARAMETER = 222 1176 WLAN_EID_QOS_PARAMETER = 222,
1177
1178 WLAN_EID_AP_CHAN_REPORT = 51,
1179 WLAN_EID_NEIGHBOR_REPORT = 52,
1180 WLAN_EID_RCPI = 53,
1181 WLAN_EID_BSS_AVG_ACCESS_DELAY = 63,
1182 WLAN_EID_ANTENNA_INFO = 64,
1183 WLAN_EID_RSNI = 65,
1184 WLAN_EID_MEASUREMENT_PILOT_TX_INFO = 66,
1185 WLAN_EID_BSS_AVAILABLE_CAPACITY = 67,
1186 WLAN_EID_BSS_AC_ACCESS_DELAY = 68,
1187 WLAN_EID_RRM_ENABLED_CAPABILITIES = 70,
1188 WLAN_EID_MULTIPLE_BSSID = 71,
1189
1190 WLAN_EID_MOBILITY_DOMAIN = 54,
1191 WLAN_EID_FAST_BSS_TRANSITION = 55,
1192 WLAN_EID_TIMEOUT_INTERVAL = 56,
1193 WLAN_EID_RIC_DATA = 57,
1194 WLAN_EID_RIC_DESCRIPTOR = 75,
1195
1196 WLAN_EID_DSE_REGISTERED_LOCATION = 58,
1197 WLAN_EID_SUPPORTED_REGULATORY_CLASSES = 59,
1198 WLAN_EID_EXT_CHANSWITCH_ANN = 60,
1127}; 1199};
1128 1200
1129/* Action category code */ 1201/* Action category code */
@@ -1150,6 +1222,18 @@ enum ieee80211_spectrum_mgmt_actioncode {
1150 WLAN_ACTION_SPCT_CHL_SWITCH = 4, 1222 WLAN_ACTION_SPCT_CHL_SWITCH = 4,
1151}; 1223};
1152 1224
1225/* HT action codes */
1226enum ieee80211_ht_actioncode {
1227 WLAN_HT_ACTION_NOTIFY_CHANWIDTH = 0,
1228 WLAN_HT_ACTION_SMPS = 1,
1229 WLAN_HT_ACTION_PSMP = 2,
1230 WLAN_HT_ACTION_PCO_PHASE = 3,
1231 WLAN_HT_ACTION_CSI = 4,
1232 WLAN_HT_ACTION_NONCOMPRESSED_BF = 5,
1233 WLAN_HT_ACTION_COMPRESSED_BF = 6,
1234 WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7,
1235};
1236
1153/* Security key length */ 1237/* Security key length */
1154enum ieee80211_key_len { 1238enum ieee80211_key_len {
1155 WLAN_KEY_LEN_WEP40 = 5, 1239 WLAN_KEY_LEN_WEP40 = 5,
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h
index 3f5fd523b49d..404abe00162c 100644
--- a/include/linux/if_tun.h
+++ b/include/linux/if_tun.h
@@ -86,4 +86,18 @@ struct tun_filter {
86 __u8 addr[0][ETH_ALEN]; 86 __u8 addr[0][ETH_ALEN];
87}; 87};
88 88
89#ifdef __KERNEL__
90#if defined(CONFIG_TUN) || defined(CONFIG_TUN_MODULE)
91struct socket *tun_get_socket(struct file *);
92#else
93#include <linux/err.h>
94#include <linux/errno.h>
95struct file;
96struct socket;
97static inline struct socket *tun_get_socket(struct file *f)
98{
99 return ERR_PTR(-EINVAL);
100}
101#endif /* CONFIG_TUN */
102#endif /* __KERNEL__ */
89#endif /* __IF_TUN_H */ 103#endif /* __IF_TUN_H */
diff --git a/include/linux/in.h b/include/linux/in.h
index b615649db129..583c76f9c30f 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -84,6 +84,8 @@ struct in_addr {
84#define IP_ORIGDSTADDR 20 84#define IP_ORIGDSTADDR 20
85#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR 85#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
86 86
87#define IP_MINTTL 21
88
87/* IP_MTU_DISCOVER values */ 89/* IP_MTU_DISCOVER values */
88#define IP_PMTUDISC_DONT 0 /* Never send DF frames */ 90#define IP_PMTUDISC_DONT 0 /* Never send DF frames */
89#define IP_PMTUDISC_WANT 1 /* Use per route hints */ 91#define IP_PMTUDISC_WANT 1 /* Use per route hints */
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index b2304929434e..cf257809771b 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -89,6 +89,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)
89 89
90#define IN_DEV_LOG_MARTIANS(in_dev) IN_DEV_ORCONF((in_dev), LOG_MARTIANS) 90#define IN_DEV_LOG_MARTIANS(in_dev) IN_DEV_ORCONF((in_dev), LOG_MARTIANS)
91#define IN_DEV_PROXY_ARP(in_dev) IN_DEV_ORCONF((in_dev), PROXY_ARP) 91#define IN_DEV_PROXY_ARP(in_dev) IN_DEV_ORCONF((in_dev), PROXY_ARP)
92#define IN_DEV_PROXY_ARP_PVLAN(in_dev) IN_DEV_CONF_GET(in_dev, PROXY_ARP_PVLAN)
92#define IN_DEV_SHARED_MEDIA(in_dev) IN_DEV_ORCONF((in_dev), SHARED_MEDIA) 93#define IN_DEV_SHARED_MEDIA(in_dev) IN_DEV_ORCONF((in_dev), SHARED_MEDIA)
93#define IN_DEV_TX_REDIRECTS(in_dev) IN_DEV_ORCONF((in_dev), SEND_REDIRECTS) 94#define IN_DEV_TX_REDIRECTS(in_dev) IN_DEV_ORCONF((in_dev), SEND_REDIRECTS)
94#define IN_DEV_SEC_REDIRECTS(in_dev) IN_DEV_ORCONF((in_dev), \ 95#define IN_DEV_SEC_REDIRECTS(in_dev) IN_DEV_ORCONF((in_dev), \
diff --git a/include/linux/isdn/capilli.h b/include/linux/isdn/capilli.h
index 7acb87a44872..d3e5e9da0c82 100644
--- a/include/linux/isdn/capilli.h
+++ b/include/linux/isdn/capilli.h
@@ -50,8 +50,7 @@ struct capi_ctr {
50 u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb); 50 u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb);
51 51
52 char *(*procinfo)(struct capi_ctr *); 52 char *(*procinfo)(struct capi_ctr *);
53 int (*ctr_read_proc)(char *page, char **start, off_t off, 53 const struct file_operations *proc_fops;
54 int count, int *eof, struct capi_ctr *card);
55 54
56 /* filled in before calling ready callback */ 55 /* filled in before calling ready callback */
57 u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */ 56 u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */
diff --git a/include/linux/llc.h b/include/linux/llc.h
index 7733585603f1..ad7074ba81af 100644
--- a/include/linux/llc.h
+++ b/include/linux/llc.h
@@ -36,6 +36,7 @@ enum llc_sockopts {
36 LLC_OPT_BUSY_TMR_EXP, /* busy state expire time (secs). */ 36 LLC_OPT_BUSY_TMR_EXP, /* busy state expire time (secs). */
37 LLC_OPT_TX_WIN, /* tx window size. */ 37 LLC_OPT_TX_WIN, /* tx window size. */
38 LLC_OPT_RX_WIN, /* rx window size. */ 38 LLC_OPT_RX_WIN, /* rx window size. */
39 LLC_OPT_PKTINFO, /* ancillary packet information. */
39 LLC_OPT_MAX 40 LLC_OPT_MAX
40}; 41};
41 42
@@ -70,6 +71,12 @@ enum llc_sockopts {
70#define LLC_SAP_RM 0xD4 /* Resource Management */ 71#define LLC_SAP_RM 0xD4 /* Resource Management */
71#define LLC_SAP_GLOBAL 0xFF /* Global SAP. */ 72#define LLC_SAP_GLOBAL 0xFF /* Global SAP. */
72 73
74struct llc_pktinfo {
75 int lpi_ifindex;
76 unsigned char lpi_sap;
77 unsigned char lpi_mac[IFHWADDRLEN];
78};
79
73#ifdef __KERNEL__ 80#ifdef __KERNEL__
74#define LLC_SAP_DYN_START 0xC0 81#define LLC_SAP_DYN_START 0xC0
75#define LLC_SAP_DYN_STOP 0xDE 82#define LLC_SAP_DYN_STOP 0xDE
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index adaf3c15e449..8b5f7cc0fba6 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -30,6 +30,7 @@
30#define HPET_MINOR 228 30#define HPET_MINOR 228
31#define FUSE_MINOR 229 31#define FUSE_MINOR 229
32#define KVM_MINOR 232 32#define KVM_MINOR 232
33#define VHOST_NET_MINOR 233
33#define MISC_DYNAMIC_MINOR 255 34#define MISC_DYNAMIC_MINOR 255
34 35
35struct device; 36struct device;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a3fccc85b1a0..468a11dea58c 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1527,7 +1527,6 @@ extern int netif_rx(struct sk_buff *skb);
1527extern int netif_rx_ni(struct sk_buff *skb); 1527extern int netif_rx_ni(struct sk_buff *skb);
1528#define HAVE_NETIF_RECEIVE_SKB 1 1528#define HAVE_NETIF_RECEIVE_SKB 1
1529extern int netif_receive_skb(struct sk_buff *skb); 1529extern int netif_receive_skb(struct sk_buff *skb);
1530extern void napi_gro_flush(struct napi_struct *napi);
1531extern gro_result_t dev_gro_receive(struct napi_struct *napi, 1530extern gro_result_t dev_gro_receive(struct napi_struct *napi,
1532 struct sk_buff *skb); 1531 struct sk_buff *skb);
1533extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb); 1532extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb);
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 2524267210d3..a765ea898549 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -21,15 +21,20 @@ struct netpoll {
21 __be32 local_ip, remote_ip; 21 __be32 local_ip, remote_ip;
22 u16 local_port, remote_port; 22 u16 local_port, remote_port;
23 u8 remote_mac[ETH_ALEN]; 23 u8 remote_mac[ETH_ALEN];
24
25 struct list_head rx; /* rx_np list element */
24}; 26};
25 27
26struct netpoll_info { 28struct netpoll_info {
27 atomic_t refcnt; 29 atomic_t refcnt;
30
28 int rx_flags; 31 int rx_flags;
29 spinlock_t rx_lock; 32 spinlock_t rx_lock;
30 struct netpoll *rx_np; /* netpoll that registered an rx_hook */ 33 struct list_head rx_np; /* netpolls that registered an rx_hook */
34
31 struct sk_buff_head arp_tx; /* list of arp requests to reply to */ 35 struct sk_buff_head arp_tx; /* list of arp requests to reply to */
32 struct sk_buff_head txq; 36 struct sk_buff_head txq;
37
33 struct delayed_work tx_work; 38 struct delayed_work tx_work;
34}; 39};
35 40
@@ -51,7 +56,7 @@ static inline int netpoll_rx(struct sk_buff *skb)
51 unsigned long flags; 56 unsigned long flags;
52 int ret = 0; 57 int ret = 0;
53 58
54 if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags)) 59 if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags))
55 return 0; 60 return 0;
56 61
57 spin_lock_irqsave(&npinfo->rx_lock, flags); 62 spin_lock_irqsave(&npinfo->rx_lock, flags);
@@ -67,7 +72,7 @@ static inline int netpoll_rx_on(struct sk_buff *skb)
67{ 72{
68 struct netpoll_info *npinfo = skb->dev->npinfo; 73 struct netpoll_info *npinfo = skb->dev->npinfo;
69 74
70 return npinfo && (npinfo->rx_np || npinfo->rx_flags); 75 return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags);
71} 76}
72 77
73static inline int netpoll_receive_skb(struct sk_buff *skb) 78static inline int netpoll_receive_skb(struct sk_buff *skb)
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index da8ea2e19273..127a73015760 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -270,6 +270,35 @@
270 * @NL80211_CMD_SET_WIPHY_NETNS: Set a wiphy's netns. Note that all devices 270 * @NL80211_CMD_SET_WIPHY_NETNS: Set a wiphy's netns. Note that all devices
271 * associated with this wiphy must be down and will follow. 271 * associated with this wiphy must be down and will follow.
272 * 272 *
273 * @NL80211_CMD_REMAIN_ON_CHANNEL: Request to remain awake on the specified
274 * channel for the specified amount of time. This can be used to do
275 * off-channel operations like transmit a Public Action frame and wait for
276 * a response while being associated to an AP on another channel.
277 * %NL80211_ATTR_WIPHY or %NL80211_ATTR_IFINDEX is used to specify which
278 * radio is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the
279 * frequency for the operation and %NL80211_ATTR_WIPHY_CHANNEL_TYPE may be
280 * optionally used to specify additional channel parameters.
281 * %NL80211_ATTR_DURATION is used to specify the duration in milliseconds
282 * to remain on the channel. This command is also used as an event to
283 * notify when the requested duration starts (it may take a while for the
284 * driver to schedule this time due to other concurrent needs for the
285 * radio).
286 * When called, this operation returns a cookie (%NL80211_ATTR_COOKIE)
287 * that will be included with any events pertaining to this request;
288 * the cookie is also used to cancel the request.
289 * @NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL: This command can be used to cancel a
290 * pending remain-on-channel duration if the desired operation has been
291 * completed prior to expiration of the originally requested duration.
292 * %NL80211_ATTR_WIPHY or %NL80211_ATTR_IFINDEX is used to specify the
293 * radio. The %NL80211_ATTR_COOKIE attribute must be given as well to
294 * uniquely identify the request.
295 * This command is also used as an event to notify when a requested
296 * remain-on-channel duration has expired.
297 *
298 * @NL80211_CMD_SET_TX_BITRATE_MASK: Set the mask of rates to be used in TX
299 * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface
300 * and @NL80211_ATTR_TX_RATES the set of allowed rates.
301 *
273 * @NL80211_CMD_MAX: highest used command number 302 * @NL80211_CMD_MAX: highest used command number
274 * @__NL80211_CMD_AFTER_LAST: internal use 303 * @__NL80211_CMD_AFTER_LAST: internal use
275 */ 304 */
@@ -353,6 +382,11 @@ enum nl80211_commands {
353 NL80211_CMD_DEL_PMKSA, 382 NL80211_CMD_DEL_PMKSA,
354 NL80211_CMD_FLUSH_PMKSA, 383 NL80211_CMD_FLUSH_PMKSA,
355 384
385 NL80211_CMD_REMAIN_ON_CHANNEL,
386 NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL,
387
388 NL80211_CMD_SET_TX_BITRATE_MASK,
389
356 /* add new commands above here */ 390 /* add new commands above here */
357 391
358 /* used to define NL80211_CMD_MAX below */ 392 /* used to define NL80211_CMD_MAX below */
@@ -402,6 +436,8 @@ enum nl80211_commands {
402 * @NL80211_ATTR_WIPHY_RTS_THRESHOLD: RTS threshold (TX frames with length 436 * @NL80211_ATTR_WIPHY_RTS_THRESHOLD: RTS threshold (TX frames with length
403 * larger than or equal to this use RTS/CTS handshake); allowed range: 437 * larger than or equal to this use RTS/CTS handshake); allowed range:
404 * 0..65536, disable with (u32)-1; dot11RTSThreshold; u32 438 * 0..65536, disable with (u32)-1; dot11RTSThreshold; u32
439 * @NL80211_ATTR_WIPHY_COVERAGE_CLASS: Coverage Class as defined by IEEE 802.11
440 * section 7.3.2.9; dot11CoverageClass; u8
405 * 441 *
406 * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on 442 * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
407 * @NL80211_ATTR_IFNAME: network interface name 443 * @NL80211_ATTR_IFNAME: network interface name
@@ -606,6 +642,17 @@ enum nl80211_commands {
606 * @NL80211_ATTR_MAX_NUM_PMKIDS: maximum number of PMKIDs a firmware can 642 * @NL80211_ATTR_MAX_NUM_PMKIDS: maximum number of PMKIDs a firmware can
607 * cache, a wiphy attribute. 643 * cache, a wiphy attribute.
608 * 644 *
645 * @NL80211_ATTR_DURATION: Duration of an operation in milliseconds, u32.
646 *
647 * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects.
648 *
649 * @NL80211_ATTR_TX_RATES: Nested set of attributes
650 * (enum nl80211_tx_rate_attributes) describing TX rates per band. The
651 * enum nl80211_band value is used as the index (nla_type() of the nested
652 * data. If a band is not included, it will be configured to allow all
653 * rates based on negotiated supported rates information. This attribute
654 * is used with %NL80211_CMD_SET_TX_BITRATE_MASK.
655 *
609 * @NL80211_ATTR_MAX: highest attribute number currently defined 656 * @NL80211_ATTR_MAX: highest attribute number currently defined
610 * @__NL80211_ATTR_AFTER_LAST: internal use 657 * @__NL80211_ATTR_AFTER_LAST: internal use
611 */ 658 */
@@ -743,6 +790,14 @@ enum nl80211_attrs {
743 NL80211_ATTR_PMKID, 790 NL80211_ATTR_PMKID,
744 NL80211_ATTR_MAX_NUM_PMKIDS, 791 NL80211_ATTR_MAX_NUM_PMKIDS,
745 792
793 NL80211_ATTR_DURATION,
794
795 NL80211_ATTR_COOKIE,
796
797 NL80211_ATTR_WIPHY_COVERAGE_CLASS,
798
799 NL80211_ATTR_TX_RATES,
800
746 /* add attributes here, update the policy in nl80211.c */ 801 /* add attributes here, update the policy in nl80211.c */
747 802
748 __NL80211_ATTR_AFTER_LAST, 803 __NL80211_ATTR_AFTER_LAST,
@@ -1323,13 +1378,20 @@ enum nl80211_channel_type {
1323 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) 1378 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16)
1324 * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16) 1379 * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16)
1325 * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the 1380 * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the
1326 * raw information elements from the probe response/beacon (bin) 1381 * raw information elements from the probe response/beacon (bin);
1382 * if the %NL80211_BSS_BEACON_IES attribute is present, the IEs here are
1383 * from a Probe Response frame; otherwise they are from a Beacon frame.
1384 * However, if the driver does not indicate the source of the IEs, these
1385 * IEs may be from either frame subtype.
1327 * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon 1386 * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon
1328 * in mBm (100 * dBm) (s32) 1387 * in mBm (100 * dBm) (s32)
1329 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon 1388 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon
1330 * in unspecified units, scaled to 0..100 (u8) 1389 * in unspecified units, scaled to 0..100 (u8)
1331 * @NL80211_BSS_STATUS: status, if this BSS is "used" 1390 * @NL80211_BSS_STATUS: status, if this BSS is "used"
1332 * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms 1391 * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms
1392 * @NL80211_BSS_BEACON_IES: binary attribute containing the raw information
1393 * elements from a Beacon frame (bin); not present if no Beacon frame has
1394 * yet been received
1333 * @__NL80211_BSS_AFTER_LAST: internal 1395 * @__NL80211_BSS_AFTER_LAST: internal
1334 * @NL80211_BSS_MAX: highest BSS attribute 1396 * @NL80211_BSS_MAX: highest BSS attribute
1335 */ 1397 */
@@ -1345,6 +1407,7 @@ enum nl80211_bss {
1345 NL80211_BSS_SIGNAL_UNSPEC, 1407 NL80211_BSS_SIGNAL_UNSPEC,
1346 NL80211_BSS_STATUS, 1408 NL80211_BSS_STATUS,
1347 NL80211_BSS_SEEN_MS_AGO, 1409 NL80211_BSS_SEEN_MS_AGO,
1410 NL80211_BSS_BEACON_IES,
1348 1411
1349 /* keep last */ 1412 /* keep last */
1350 __NL80211_BSS_AFTER_LAST, 1413 __NL80211_BSS_AFTER_LAST,
@@ -1442,4 +1505,33 @@ enum nl80211_key_attributes {
1442 NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 1505 NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1
1443}; 1506};
1444 1507
1508/**
1509 * enum nl80211_tx_rate_attributes - TX rate set attributes
1510 * @__NL80211_TXRATE_INVALID: invalid
1511 * @NL80211_TXRATE_LEGACY: Legacy (non-MCS) rates allowed for TX rate selection
1512 * in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with
1513 * 1 = 500 kbps) but without the IE length restriction (at most
1514 * %NL80211_MAX_SUPP_RATES in a single array).
1515 * @__NL80211_TXRATE_AFTER_LAST: internal
1516 * @NL80211_TXRATE_MAX: highest TX rate attribute
1517 */
1518enum nl80211_tx_rate_attributes {
1519 __NL80211_TXRATE_INVALID,
1520 NL80211_TXRATE_LEGACY,
1521
1522 /* keep last */
1523 __NL80211_TXRATE_AFTER_LAST,
1524 NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1
1525};
1526
1527/**
1528 * enum nl80211_band - Frequency band
1529 * @NL80211_BAND_2GHZ - 2.4 GHz ISM band
1530 * @NL80211_BAND_5GHZ - around 5 GHz band (4.9 - 5.7 GHz)
1531 */
1532enum nl80211_band {
1533 NL80211_BAND_2GHZ,
1534 NL80211_BAND_5GHZ,
1535};
1536
1445#endif /* __LINUX_NL80211_H */ 1537#endif /* __LINUX_NL80211_H */
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 05330fc5b436..9590364fe8b5 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -362,6 +362,8 @@ enum {
362#define RTAX_FEATURES RTAX_FEATURES 362#define RTAX_FEATURES RTAX_FEATURES
363 RTAX_RTO_MIN, 363 RTAX_RTO_MIN,
364#define RTAX_RTO_MIN RTAX_RTO_MIN 364#define RTAX_RTO_MIN RTAX_RTO_MIN
365 RTAX_INITRWND,
366#define RTAX_INITRWND RTAX_INITRWND
365 __RTAX_MAX 367 __RTAX_MAX
366}; 368};
367 369
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
new file mode 100644
index 000000000000..32bfd1a8a48d
--- /dev/null
+++ b/include/linux/stmmac.h
@@ -0,0 +1,53 @@
1/*******************************************************************************
2
3 Header file for stmmac platform data
4
5 Copyright (C) 2009 STMicroelectronics Ltd
6
7 This program is free software; you can redistribute it and/or modify it
8 under the terms and conditions of the GNU General Public License,
9 version 2, as published by the Free Software Foundation.
10
11 This program is distributed in the hope it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 more details.
15
16 You should have received a copy of the GNU General Public License along with
17 this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
19
20 The full GNU General Public License is included in this distribution in
21 the file called "COPYING".
22
23 Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
24*******************************************************************************/
25
26#ifndef __STMMAC_PLATFORM_DATA
27#define __STMMAC_PLATFORM_DATA
28
29/* platfrom data for platfrom device structure's platfrom_data field */
30
31/* Private data for the STM on-board ethernet driver */
32struct plat_stmmacenet_data {
33 int bus_id;
34 int pbl;
35 int has_gmac;
36 void (*fix_mac_speed)(void *priv, unsigned int speed);
37 void (*bus_setup)(unsigned long ioaddr);
38#ifdef CONFIG_STM_DRIVERS
39 struct stm_pad_config *pad_config;
40#endif
41 void *bsp_priv;
42};
43
44struct plat_stmmacphy_data {
45 int bus_id;
46 int phy_addr;
47 unsigned int phy_mask;
48 int interface;
49 int (*phy_reset)(void *priv);
50 void *priv;
51};
52#endif
53
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index bd27fbc9db62..9f236cdcf3fe 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -483,6 +483,7 @@ enum
483 NET_IPV4_CONF_ARP_NOTIFY=22, 483 NET_IPV4_CONF_ARP_NOTIFY=22,
484 NET_IPV4_CONF_ACCEPT_LOCAL=23, 484 NET_IPV4_CONF_ACCEPT_LOCAL=23,
485 NET_IPV4_CONF_SRC_VMARK=24, 485 NET_IPV4_CONF_SRC_VMARK=24,
486 NET_IPV4_CONF_PROXY_ARP_PVLAN=25,
486 __NET_IPV4_CONF_MAX 487 __NET_IPV4_CONF_MAX
487}; 488};
488 489
diff --git a/include/linux/vhost.h b/include/linux/vhost.h
new file mode 100644
index 000000000000..e847f1e30756
--- /dev/null
+++ b/include/linux/vhost.h
@@ -0,0 +1,130 @@
1#ifndef _LINUX_VHOST_H
2#define _LINUX_VHOST_H
3/* Userspace interface for in-kernel virtio accelerators. */
4
5/* vhost is used to reduce the number of system calls involved in virtio.
6 *
7 * Existing virtio net code is used in the guest without modification.
8 *
9 * This header includes interface used by userspace hypervisor for
10 * device configuration.
11 */
12
13#include <linux/types.h>
14#include <linux/compiler.h>
15#include <linux/ioctl.h>
16#include <linux/virtio_config.h>
17#include <linux/virtio_ring.h>
18
19struct vhost_vring_state {
20 unsigned int index;
21 unsigned int num;
22};
23
24struct vhost_vring_file {
25 unsigned int index;
26 int fd; /* Pass -1 to unbind from file. */
27
28};
29
30struct vhost_vring_addr {
31 unsigned int index;
32 /* Option flags. */
33 unsigned int flags;
34 /* Flag values: */
35 /* Whether log address is valid. If set enables logging. */
36#define VHOST_VRING_F_LOG 0
37
38 /* Start of array of descriptors (virtually contiguous) */
39 __u64 desc_user_addr;
40 /* Used structure address. Must be 32 bit aligned */
41 __u64 used_user_addr;
42 /* Available structure address. Must be 16 bit aligned */
43 __u64 avail_user_addr;
44 /* Logging support. */
45 /* Log writes to used structure, at offset calculated from specified
46 * address. Address must be 32 bit aligned. */
47 __u64 log_guest_addr;
48};
49
50struct vhost_memory_region {
51 __u64 guest_phys_addr;
52 __u64 memory_size; /* bytes */
53 __u64 userspace_addr;
54 __u64 flags_padding; /* No flags are currently specified. */
55};
56
57/* All region addresses and sizes must be 4K aligned. */
58#define VHOST_PAGE_SIZE 0x1000
59
60struct vhost_memory {
61 __u32 nregions;
62 __u32 padding;
63 struct vhost_memory_region regions[0];
64};
65
66/* ioctls */
67
68#define VHOST_VIRTIO 0xAF
69
70/* Features bitmask for forward compatibility. Transport bits are used for
71 * vhost specific features. */
72#define VHOST_GET_FEATURES _IOR(VHOST_VIRTIO, 0x00, __u64)
73#define VHOST_SET_FEATURES _IOW(VHOST_VIRTIO, 0x00, __u64)
74
75/* Set current process as the (exclusive) owner of this file descriptor. This
76 * must be called before any other vhost command. Further calls to
77 * VHOST_OWNER_SET fail until VHOST_OWNER_RESET is called. */
78#define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01)
79/* Give up ownership, and reset the device to default values.
80 * Allows subsequent call to VHOST_OWNER_SET to succeed. */
81#define VHOST_RESET_OWNER _IO(VHOST_VIRTIO, 0x02)
82
83/* Set up/modify memory layout */
84#define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory)
85
86/* Write logging setup. */
87/* Memory writes can optionally be logged by setting bit at an offset
88 * (calculated from the physical address) from specified log base.
89 * The bit is set using an atomic 32 bit operation. */
90/* Set base address for logging. */
91#define VHOST_SET_LOG_BASE _IOW(VHOST_VIRTIO, 0x04, __u64)
92/* Specify an eventfd file descriptor to signal on log write. */
93#define VHOST_SET_LOG_FD _IOW(VHOST_VIRTIO, 0x07, int)
94
95/* Ring setup. */
96/* Set number of descriptors in ring. This parameter can not
97 * be modified while ring is running (bound to a device). */
98#define VHOST_SET_VRING_NUM _IOW(VHOST_VIRTIO, 0x10, struct vhost_vring_state)
99/* Set addresses for the ring. */
100#define VHOST_SET_VRING_ADDR _IOW(VHOST_VIRTIO, 0x11, struct vhost_vring_addr)
101/* Base value where queue looks for available descriptors */
102#define VHOST_SET_VRING_BASE _IOW(VHOST_VIRTIO, 0x12, struct vhost_vring_state)
103/* Get accessor: reads index, writes value in num */
104#define VHOST_GET_VRING_BASE _IOWR(VHOST_VIRTIO, 0x12, struct vhost_vring_state)
105
106/* The following ioctls use eventfd file descriptors to signal and poll
107 * for events. */
108
109/* Set eventfd to poll for added buffers */
110#define VHOST_SET_VRING_KICK _IOW(VHOST_VIRTIO, 0x20, struct vhost_vring_file)
111/* Set eventfd to signal when buffers have beed used */
112#define VHOST_SET_VRING_CALL _IOW(VHOST_VIRTIO, 0x21, struct vhost_vring_file)
113/* Set eventfd to signal an error */
114#define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file)
115
116/* VHOST_NET specific defines */
117
118/* Attach virtio net ring to a raw socket, or tap device.
119 * The socket must be already bound to an ethernet device, this device will be
120 * used for transmit. Pass fd -1 to unbind from the socket and the transmit
121 * device. This can be used to stop the ring (e.g. for migration). */
122#define VHOST_NET_SET_BACKEND _IOW(VHOST_VIRTIO, 0x30, struct vhost_vring_file)
123
124/* Feature bits */
125/* Log all write descriptors. Can be changed while device is active. */
126#define VHOST_F_LOG_ALL 26
127/* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */
128#define VHOST_NET_F_VIRTIO_NET_HDR 27
129
130#endif