diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/Kbuild | 1 | ||||
-rw-r--r-- | include/linux/can/dev.h | 16 | ||||
-rw-r--r-- | include/linux/can/netlink.h | 1 | ||||
-rw-r--r-- | include/linux/ieee80211.h | 106 | ||||
-rw-r--r-- | include/linux/if_tun.h | 14 | ||||
-rw-r--r-- | include/linux/in.h | 2 | ||||
-rw-r--r-- | include/linux/inetdevice.h | 1 | ||||
-rw-r--r-- | include/linux/isdn/capilli.h | 3 | ||||
-rw-r--r-- | include/linux/llc.h | 7 | ||||
-rw-r--r-- | include/linux/miscdevice.h | 1 | ||||
-rw-r--r-- | include/linux/netdevice.h | 1 | ||||
-rw-r--r-- | include/linux/netpoll.h | 11 | ||||
-rw-r--r-- | include/linux/nl80211.h | 94 | ||||
-rw-r--r-- | include/linux/rtnetlink.h | 2 | ||||
-rw-r--r-- | include/linux/stmmac.h | 53 | ||||
-rw-r--r-- | include/linux/sysctl.h | 1 | ||||
-rw-r--r-- | include/linux/vhost.h | 130 | ||||
-rw-r--r-- | include/net/cfg80211.h | 112 | ||||
-rw-r--r-- | include/net/dst.h | 2 | ||||
-rw-r--r-- | include/net/inet_sock.h | 4 | ||||
-rw-r--r-- | include/net/llc.h | 39 | ||||
-rw-r--r-- | include/net/llc_conn.h | 2 | ||||
-rw-r--r-- | include/net/mac80211.h | 313 | ||||
-rw-r--r-- | include/net/phonet/pep.h | 3 | ||||
-rw-r--r-- | include/net/request_sock.h | 2 | ||||
-rw-r--r-- | include/net/tcp.h | 21 |
26 files changed, 814 insertions, 128 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 | |||
362 | unifdef-y += unistd.h | 362 | unifdef-y += unistd.h |
363 | unifdef-y += usbdevice_fs.h | 363 | unifdef-y += usbdevice_fs.h |
364 | unifdef-y += utsname.h | 364 | unifdef-y += utsname.h |
365 | unifdef-y += vhost.h | ||
365 | unifdef-y += videodev2.h | 366 | unifdef-y += videodev2.h |
366 | unifdef-y += videodev.h | 367 | unifdef-y += videodev.h |
367 | unifdef-y += virtio_config.h | 368 | unifdef-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. */ | ||
65 | static 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 | |||
63 | struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); | 79 | struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); |
64 | void free_candev(struct net_device *dev); | 80 | void 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 | |||
123 | struct ieee80211_hdr { | 141 | struct 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 | ||
151 | struct 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 | |||
160 | struct 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 | */ |
777 | struct ieee80211_mcs_info { | 821 | struct 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 */ | ||
1226 | enum 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 */ |
1154 | enum ieee80211_key_len { | 1238 | enum 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) | ||
91 | struct socket *tun_get_socket(struct file *); | ||
92 | #else | ||
93 | #include <linux/err.h> | ||
94 | #include <linux/errno.h> | ||
95 | struct file; | ||
96 | struct socket; | ||
97 | static 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 | ||
74 | struct 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 | ||
35 | struct device; | 36 | struct 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); | |||
1527 | extern int netif_rx_ni(struct sk_buff *skb); | 1527 | extern int netif_rx_ni(struct sk_buff *skb); |
1528 | #define HAVE_NETIF_RECEIVE_SKB 1 | 1528 | #define HAVE_NETIF_RECEIVE_SKB 1 |
1529 | extern int netif_receive_skb(struct sk_buff *skb); | 1529 | extern int netif_receive_skb(struct sk_buff *skb); |
1530 | extern void napi_gro_flush(struct napi_struct *napi); | ||
1531 | extern gro_result_t dev_gro_receive(struct napi_struct *napi, | 1530 | extern gro_result_t dev_gro_receive(struct napi_struct *napi, |
1532 | struct sk_buff *skb); | 1531 | struct sk_buff *skb); |
1533 | extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb); | 1532 | extern 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 | ||
26 | struct netpoll_info { | 28 | struct 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 | ||
73 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 78 | static 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 | */ | ||
1518 | enum 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 | */ | ||
1532 | enum 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 */ | ||
32 | struct 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 | |||
44 | struct 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 | |||
19 | struct vhost_vring_state { | ||
20 | unsigned int index; | ||
21 | unsigned int num; | ||
22 | }; | ||
23 | |||
24 | struct vhost_vring_file { | ||
25 | unsigned int index; | ||
26 | int fd; /* Pass -1 to unbind from file. */ | ||
27 | |||
28 | }; | ||
29 | |||
30 | struct 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 | |||
50 | struct 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 | |||
60 | struct 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 | ||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 0884b9a0f778..2af52704e670 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -39,8 +39,8 @@ | |||
39 | * @IEEE80211_BAND_5GHZ: around 5GHz band (4.9-5.7) | 39 | * @IEEE80211_BAND_5GHZ: around 5GHz band (4.9-5.7) |
40 | */ | 40 | */ |
41 | enum ieee80211_band { | 41 | enum ieee80211_band { |
42 | IEEE80211_BAND_2GHZ, | 42 | IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ, |
43 | IEEE80211_BAND_5GHZ, | 43 | IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ, |
44 | 44 | ||
45 | /* keep last */ | 45 | /* keep last */ |
46 | IEEE80211_NUM_BANDS | 46 | IEEE80211_NUM_BANDS |
@@ -626,8 +626,14 @@ enum cfg80211_signal_type { | |||
626 | * @beacon_interval: the beacon interval as from the frame | 626 | * @beacon_interval: the beacon interval as from the frame |
627 | * @capability: the capability field in host byte order | 627 | * @capability: the capability field in host byte order |
628 | * @information_elements: the information elements (Note that there | 628 | * @information_elements: the information elements (Note that there |
629 | * is no guarantee that these are well-formed!) | 629 | * is no guarantee that these are well-formed!); this is a pointer to |
630 | * either the beacon_ies or proberesp_ies depending on whether Probe | ||
631 | * Response frame has been received | ||
630 | * @len_information_elements: total length of the information elements | 632 | * @len_information_elements: total length of the information elements |
633 | * @beacon_ies: the information elements from the last Beacon frame | ||
634 | * @len_beacon_ies: total length of the beacon_ies | ||
635 | * @proberesp_ies: the information elements from the last Probe Response frame | ||
636 | * @len_proberesp_ies: total length of the proberesp_ies | ||
631 | * @signal: signal strength value (type depends on the wiphy's signal_type) | 637 | * @signal: signal strength value (type depends on the wiphy's signal_type) |
632 | * @free_priv: function pointer to free private data | 638 | * @free_priv: function pointer to free private data |
633 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes | 639 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes |
@@ -641,6 +647,10 @@ struct cfg80211_bss { | |||
641 | u16 capability; | 647 | u16 capability; |
642 | u8 *information_elements; | 648 | u8 *information_elements; |
643 | size_t len_information_elements; | 649 | size_t len_information_elements; |
650 | u8 *beacon_ies; | ||
651 | size_t len_beacon_ies; | ||
652 | u8 *proberesp_ies; | ||
653 | size_t len_proberesp_ies; | ||
644 | 654 | ||
645 | s32 signal; | 655 | s32 signal; |
646 | 656 | ||
@@ -837,6 +847,7 @@ enum wiphy_params_flags { | |||
837 | WIPHY_PARAM_RETRY_LONG = 1 << 1, | 847 | WIPHY_PARAM_RETRY_LONG = 1 << 1, |
838 | WIPHY_PARAM_FRAG_THRESHOLD = 1 << 2, | 848 | WIPHY_PARAM_FRAG_THRESHOLD = 1 << 2, |
839 | WIPHY_PARAM_RTS_THRESHOLD = 1 << 3, | 849 | WIPHY_PARAM_RTS_THRESHOLD = 1 << 3, |
850 | WIPHY_PARAM_COVERAGE_CLASS = 1 << 4, | ||
840 | }; | 851 | }; |
841 | 852 | ||
842 | /** | 853 | /** |
@@ -856,20 +867,11 @@ enum tx_power_setting { | |||
856 | * cfg80211_bitrate_mask - masks for bitrate control | 867 | * cfg80211_bitrate_mask - masks for bitrate control |
857 | */ | 868 | */ |
858 | struct cfg80211_bitrate_mask { | 869 | struct cfg80211_bitrate_mask { |
859 | /* | ||
860 | * As discussed in Berlin, this struct really | ||
861 | * should look like this: | ||
862 | |||
863 | struct { | 870 | struct { |
864 | u32 legacy; | 871 | u32 legacy; |
865 | u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; | 872 | /* TODO: add support for masking MCS rates; e.g.: */ |
873 | /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */ | ||
866 | } control[IEEE80211_NUM_BANDS]; | 874 | } control[IEEE80211_NUM_BANDS]; |
867 | |||
868 | * Since we can always fix in-kernel users, let's keep | ||
869 | * it simpler for now: | ||
870 | */ | ||
871 | u32 fixed; /* fixed bitrate, 0 == not fixed */ | ||
872 | u32 maxrate; /* in kbps, 0 == no limit */ | ||
873 | }; | 875 | }; |
874 | /** | 876 | /** |
875 | * struct cfg80211_pmksa - PMK Security Association | 877 | * struct cfg80211_pmksa - PMK Security Association |
@@ -988,6 +990,15 @@ struct cfg80211_pmksa { | |||
988 | * | 990 | * |
989 | * @dump_survey: get site survey information. | 991 | * @dump_survey: get site survey information. |
990 | * | 992 | * |
993 | * @remain_on_channel: Request the driver to remain awake on the specified | ||
994 | * channel for the specified duration to complete an off-channel | ||
995 | * operation (e.g., public action frame exchange). When the driver is | ||
996 | * ready on the requested channel, it must indicate this with an event | ||
997 | * notification by calling cfg80211_ready_on_channel(). | ||
998 | * @cancel_remain_on_channel: Cancel an on-going remain-on-channel operation. | ||
999 | * This allows the operation to be terminated prior to timeout based on | ||
1000 | * the duration value. | ||
1001 | * | ||
991 | * @testmode_cmd: run a test mode command | 1002 | * @testmode_cmd: run a test mode command |
992 | * | 1003 | * |
993 | * @set_pmksa: Cache a PMKID for a BSSID. This is mostly useful for fullmac | 1004 | * @set_pmksa: Cache a PMKID for a BSSID. This is mostly useful for fullmac |
@@ -1123,6 +1134,16 @@ struct cfg80211_ops { | |||
1123 | struct cfg80211_pmksa *pmksa); | 1134 | struct cfg80211_pmksa *pmksa); |
1124 | int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev); | 1135 | int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev); |
1125 | 1136 | ||
1137 | int (*remain_on_channel)(struct wiphy *wiphy, | ||
1138 | struct net_device *dev, | ||
1139 | struct ieee80211_channel *chan, | ||
1140 | enum nl80211_channel_type channel_type, | ||
1141 | unsigned int duration, | ||
1142 | u64 *cookie); | ||
1143 | int (*cancel_remain_on_channel)(struct wiphy *wiphy, | ||
1144 | struct net_device *dev, | ||
1145 | u64 cookie); | ||
1146 | |||
1126 | /* some temporary stuff to finish wext */ | 1147 | /* some temporary stuff to finish wext */ |
1127 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, | 1148 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, |
1128 | bool enabled, int timeout); | 1149 | bool enabled, int timeout); |
@@ -1217,6 +1238,7 @@ struct wiphy { | |||
1217 | u8 retry_long; | 1238 | u8 retry_long; |
1218 | u32 frag_threshold; | 1239 | u32 frag_threshold; |
1219 | u32 rts_threshold; | 1240 | u32 rts_threshold; |
1241 | u8 coverage_class; | ||
1220 | 1242 | ||
1221 | char fw_version[ETHTOOL_BUSINFO_LEN]; | 1243 | char fw_version[ETHTOOL_BUSINFO_LEN]; |
1222 | u32 hw_version; | 1244 | u32 hw_version; |
@@ -1578,7 +1600,7 @@ unsigned int ieee80211_hdrlen(__le16 fc); | |||
1578 | * @addr: the device MAC address | 1600 | * @addr: the device MAC address |
1579 | * @iftype: the virtual interface type | 1601 | * @iftype: the virtual interface type |
1580 | */ | 1602 | */ |
1581 | int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr, | 1603 | int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, |
1582 | enum nl80211_iftype iftype); | 1604 | enum nl80211_iftype iftype); |
1583 | 1605 | ||
1584 | /** | 1606 | /** |
@@ -1589,10 +1611,28 @@ int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr, | |||
1589 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) | 1611 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) |
1590 | * @qos: build 802.11 QoS data frame | 1612 | * @qos: build 802.11 QoS data frame |
1591 | */ | 1613 | */ |
1592 | int ieee80211_data_from_8023(struct sk_buff *skb, u8 *addr, | 1614 | int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr, |
1593 | enum nl80211_iftype iftype, u8 *bssid, bool qos); | 1615 | enum nl80211_iftype iftype, u8 *bssid, bool qos); |
1594 | 1616 | ||
1595 | /** | 1617 | /** |
1618 | * ieee80211_amsdu_to_8023s - decode an IEEE 802.11n A-MSDU frame | ||
1619 | * | ||
1620 | * Decode an IEEE 802.11n A-MSDU frame and convert it to a list of | ||
1621 | * 802.3 frames. The @list will be empty if the decode fails. The | ||
1622 | * @skb is consumed after the function returns. | ||
1623 | * | ||
1624 | * @skb: The input IEEE 802.11n A-MSDU frame. | ||
1625 | * @list: The output list of 802.3 frames. It must be allocated and | ||
1626 | * initialized by by the caller. | ||
1627 | * @addr: The device MAC address. | ||
1628 | * @iftype: The device interface type. | ||
1629 | * @extra_headroom: The hardware extra headroom for SKBs in the @list. | ||
1630 | */ | ||
1631 | void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, | ||
1632 | const u8 *addr, enum nl80211_iftype iftype, | ||
1633 | const unsigned int extra_headroom); | ||
1634 | |||
1635 | /** | ||
1596 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame | 1636 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame |
1597 | * @skb: the data frame | 1637 | * @skb: the data frame |
1598 | */ | 1638 | */ |
@@ -2129,5 +2169,45 @@ void cfg80211_roamed(struct net_device *dev, const u8 *bssid, | |||
2129 | void cfg80211_disconnected(struct net_device *dev, u16 reason, | 2169 | void cfg80211_disconnected(struct net_device *dev, u16 reason, |
2130 | u8 *ie, size_t ie_len, gfp_t gfp); | 2170 | u8 *ie, size_t ie_len, gfp_t gfp); |
2131 | 2171 | ||
2172 | /** | ||
2173 | * cfg80211_ready_on_channel - notification of remain_on_channel start | ||
2174 | * @dev: network device | ||
2175 | * @cookie: the request cookie | ||
2176 | * @chan: The current channel (from remain_on_channel request) | ||
2177 | * @channel_type: Channel type | ||
2178 | * @duration: Duration in milliseconds that the driver intents to remain on the | ||
2179 | * channel | ||
2180 | * @gfp: allocation flags | ||
2181 | */ | ||
2182 | void cfg80211_ready_on_channel(struct net_device *dev, u64 cookie, | ||
2183 | struct ieee80211_channel *chan, | ||
2184 | enum nl80211_channel_type channel_type, | ||
2185 | unsigned int duration, gfp_t gfp); | ||
2186 | |||
2187 | /** | ||
2188 | * cfg80211_remain_on_channel_expired - remain_on_channel duration expired | ||
2189 | * @dev: network device | ||
2190 | * @cookie: the request cookie | ||
2191 | * @chan: The current channel (from remain_on_channel request) | ||
2192 | * @channel_type: Channel type | ||
2193 | * @gfp: allocation flags | ||
2194 | */ | ||
2195 | void cfg80211_remain_on_channel_expired(struct net_device *dev, | ||
2196 | u64 cookie, | ||
2197 | struct ieee80211_channel *chan, | ||
2198 | enum nl80211_channel_type channel_type, | ||
2199 | gfp_t gfp); | ||
2200 | |||
2201 | |||
2202 | /** | ||
2203 | * cfg80211_new_sta - notify userspace about station | ||
2204 | * | ||
2205 | * @dev: the netdev | ||
2206 | * @mac_addr: the station's address | ||
2207 | * @sinfo: the station information | ||
2208 | * @gfp: allocation flags | ||
2209 | */ | ||
2210 | void cfg80211_new_sta(struct net_device *dev, const u8 *mac_addr, | ||
2211 | struct station_info *sinfo, gfp_t gfp); | ||
2132 | 2212 | ||
2133 | #endif /* __NET_CFG80211_H */ | 2213 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/dst.h b/include/net/dst.h index 39c4a5963e12..ce078cda6b74 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -83,8 +83,6 @@ struct dst_entry { | |||
83 | * (L1_CACHE_SIZE would be too much) | 83 | * (L1_CACHE_SIZE would be too much) |
84 | */ | 84 | */ |
85 | #ifdef CONFIG_64BIT | 85 | #ifdef CONFIG_64BIT |
86 | long __pad_to_align_refcnt[2]; | ||
87 | #else | ||
88 | long __pad_to_align_refcnt[1]; | 86 | long __pad_to_align_refcnt[1]; |
89 | #endif | 87 | #endif |
90 | /* | 88 | /* |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index bd4c53f75ac0..83fd34437cf1 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -122,10 +122,12 @@ struct inet_sock { | |||
122 | __be32 inet_saddr; | 122 | __be32 inet_saddr; |
123 | __s16 uc_ttl; | 123 | __s16 uc_ttl; |
124 | __u16 cmsg_flags; | 124 | __u16 cmsg_flags; |
125 | struct ip_options *opt; | ||
126 | __be16 inet_sport; | 125 | __be16 inet_sport; |
127 | __u16 inet_id; | 126 | __u16 inet_id; |
127 | |||
128 | struct ip_options *opt; | ||
128 | __u8 tos; | 129 | __u8 tos; |
130 | __u8 min_ttl; | ||
129 | __u8 mc_ttl; | 131 | __u8 mc_ttl; |
130 | __u8 pmtudisc; | 132 | __u8 pmtudisc; |
131 | __u8 recverr:1, | 133 | __u8 recverr:1, |
diff --git a/include/net/llc.h b/include/net/llc.h index 7940da1606e7..5503b74ab170 100644 --- a/include/net/llc.h +++ b/include/net/llc.h | |||
@@ -16,6 +16,9 @@ | |||
16 | #include <linux/if_ether.h> | 16 | #include <linux/if_ether.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/rculist_nulls.h> | ||
20 | #include <linux/hash.h> | ||
21 | #include <linux/jhash.h> | ||
19 | 22 | ||
20 | #include <asm/atomic.h> | 23 | #include <asm/atomic.h> |
21 | 24 | ||
@@ -31,6 +34,12 @@ struct llc_addr { | |||
31 | #define LLC_SAP_STATE_INACTIVE 1 | 34 | #define LLC_SAP_STATE_INACTIVE 1 |
32 | #define LLC_SAP_STATE_ACTIVE 2 | 35 | #define LLC_SAP_STATE_ACTIVE 2 |
33 | 36 | ||
37 | #define LLC_SK_DEV_HASH_BITS 6 | ||
38 | #define LLC_SK_DEV_HASH_ENTRIES (1<<LLC_SK_DEV_HASH_BITS) | ||
39 | |||
40 | #define LLC_SK_LADDR_HASH_BITS 6 | ||
41 | #define LLC_SK_LADDR_HASH_ENTRIES (1<<LLC_SK_LADDR_HASH_BITS) | ||
42 | |||
34 | /** | 43 | /** |
35 | * struct llc_sap - Defines the SAP component | 44 | * struct llc_sap - Defines the SAP component |
36 | * | 45 | * |
@@ -53,18 +62,38 @@ struct llc_sap { | |||
53 | struct net_device *orig_dev); | 62 | struct net_device *orig_dev); |
54 | struct llc_addr laddr; | 63 | struct llc_addr laddr; |
55 | struct list_head node; | 64 | struct list_head node; |
56 | struct { | 65 | spinlock_t sk_lock; |
57 | rwlock_t lock; | 66 | int sk_count; |
58 | struct hlist_head list; | 67 | struct hlist_nulls_head sk_laddr_hash[LLC_SK_LADDR_HASH_ENTRIES]; |
59 | } sk_list; | 68 | struct hlist_head sk_dev_hash[LLC_SK_DEV_HASH_ENTRIES]; |
60 | }; | 69 | }; |
61 | 70 | ||
71 | static inline | ||
72 | struct hlist_head *llc_sk_dev_hash(struct llc_sap *sap, int ifindex) | ||
73 | { | ||
74 | return &sap->sk_dev_hash[ifindex % LLC_SK_DEV_HASH_ENTRIES]; | ||
75 | } | ||
76 | |||
77 | static inline | ||
78 | u32 llc_sk_laddr_hashfn(struct llc_sap *sap, const struct llc_addr *laddr) | ||
79 | { | ||
80 | return hash_32(jhash(laddr->mac, sizeof(laddr->mac), 0), | ||
81 | LLC_SK_LADDR_HASH_BITS); | ||
82 | } | ||
83 | |||
84 | static inline | ||
85 | struct hlist_nulls_head *llc_sk_laddr_hash(struct llc_sap *sap, | ||
86 | const struct llc_addr *laddr) | ||
87 | { | ||
88 | return &sap->sk_laddr_hash[llc_sk_laddr_hashfn(sap, laddr)]; | ||
89 | } | ||
90 | |||
62 | #define LLC_DEST_INVALID 0 /* Invalid LLC PDU type */ | 91 | #define LLC_DEST_INVALID 0 /* Invalid LLC PDU type */ |
63 | #define LLC_DEST_SAP 1 /* Type 1 goes here */ | 92 | #define LLC_DEST_SAP 1 /* Type 1 goes here */ |
64 | #define LLC_DEST_CONN 2 /* Type 2 goes here */ | 93 | #define LLC_DEST_CONN 2 /* Type 2 goes here */ |
65 | 94 | ||
66 | extern struct list_head llc_sap_list; | 95 | extern struct list_head llc_sap_list; |
67 | extern rwlock_t llc_sap_list_lock; | 96 | extern spinlock_t llc_sap_list_lock; |
68 | 97 | ||
69 | extern int llc_rcv(struct sk_buff *skb, struct net_device *dev, | 98 | extern int llc_rcv(struct sk_buff *skb, struct net_device *dev, |
70 | struct packet_type *pt, struct net_device *orig_dev); | 99 | struct packet_type *pt, struct net_device *orig_dev); |
diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h index e2374e34989f..2f97d8ddce92 100644 --- a/include/net/llc_conn.h +++ b/include/net/llc_conn.h | |||
@@ -76,6 +76,8 @@ struct llc_sock { | |||
76 | u32 rx_pdu_hdr; /* used for saving header of last pdu | 76 | u32 rx_pdu_hdr; /* used for saving header of last pdu |
77 | received and caused sending FRMR. | 77 | received and caused sending FRMR. |
78 | Used for resending FRMR */ | 78 | Used for resending FRMR */ |
79 | u32 cmsg_flags; | ||
80 | struct hlist_node dev_hash_node; | ||
79 | }; | 81 | }; |
80 | 82 | ||
81 | static inline struct llc_sock *llc_sk(const struct sock *sk) | 83 | static inline struct llc_sock *llc_sk(const struct sock *sk) |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 0bf369752274..c90047de4428 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -107,12 +107,14 @@ enum ieee80211_max_queues { | |||
107 | * 2^n-1 in the range 1..32767] | 107 | * 2^n-1 in the range 1..32767] |
108 | * @cw_max: maximum contention window [like @cw_min] | 108 | * @cw_max: maximum contention window [like @cw_min] |
109 | * @txop: maximum burst time in units of 32 usecs, 0 meaning disabled | 109 | * @txop: maximum burst time in units of 32 usecs, 0 meaning disabled |
110 | * @uapsd: is U-APSD mode enabled for the queue | ||
110 | */ | 111 | */ |
111 | struct ieee80211_tx_queue_params { | 112 | struct ieee80211_tx_queue_params { |
112 | u16 txop; | 113 | u16 txop; |
113 | u16 cw_min; | 114 | u16 cw_min; |
114 | u16 cw_max; | 115 | u16 cw_max; |
115 | u8 aifs; | 116 | u8 aifs; |
117 | bool uapsd; | ||
116 | }; | 118 | }; |
117 | 119 | ||
118 | /** | 120 | /** |
@@ -255,9 +257,6 @@ struct ieee80211_bss_conf { | |||
255 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be | 257 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be |
256 | * set by rate control algorithms to indicate probe rate, will | 258 | * set by rate control algorithms to indicate probe rate, will |
257 | * be cleared for fragmented frames (except on the last fragment) | 259 | * be cleared for fragmented frames (except on the last fragment) |
258 | * @IEEE80211_TX_INTFL_RCALGO: mac80211 internal flag, do not test or | ||
259 | * set this flag in the driver; indicates that the rate control | ||
260 | * algorithm was used and should be notified of TX status | ||
261 | * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, | 260 | * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, |
262 | * used to indicate that a pending frame requires TX processing before | 261 | * used to indicate that a pending frame requires TX processing before |
263 | * it can be sent out. | 262 | * it can be sent out. |
@@ -287,7 +286,6 @@ enum mac80211_tx_control_flags { | |||
287 | IEEE80211_TX_STAT_AMPDU = BIT(10), | 286 | IEEE80211_TX_STAT_AMPDU = BIT(10), |
288 | IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), | 287 | IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), |
289 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), | 288 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), |
290 | IEEE80211_TX_INTFL_RCALGO = BIT(13), | ||
291 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), | 289 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), |
292 | IEEE80211_TX_INTFL_RETRIED = BIT(15), | 290 | IEEE80211_TX_INTFL_RETRIED = BIT(15), |
293 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), | 291 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), |
@@ -571,7 +569,13 @@ struct ieee80211_rx_status { | |||
571 | * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this | 569 | * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this |
572 | * to determine for example whether to calculate timestamps for packets | 570 | * to determine for example whether to calculate timestamps for packets |
573 | * or not, do not use instead of filter flags! | 571 | * or not, do not use instead of filter flags! |
574 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only) | 572 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only). |
573 | * This is the power save mode defined by IEEE 802.11-2007 section 11.2, | ||
574 | * meaning that the hardware still wakes up for beacons, is able to | ||
575 | * transmit frames and receive the possible acknowledgment frames. | ||
576 | * Not to be confused with hardware specific wakeup/sleep states, | ||
577 | * driver is responsible for that. See the section "Powersave support" | ||
578 | * for more. | ||
575 | * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set | 579 | * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set |
576 | * the driver should be prepared to handle configuration requests but | 580 | * the driver should be prepared to handle configuration requests but |
577 | * may turn the device off as much as possible. Typically, this flag will | 581 | * may turn the device off as much as possible. Typically, this flag will |
@@ -595,8 +599,10 @@ enum ieee80211_conf_flags { | |||
595 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed | 599 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed |
596 | * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed | 600 | * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed |
597 | * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed | 601 | * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed |
602 | * @IEEE80211_CONF_CHANGE_SMPS: Spatial multiplexing powersave mode changed | ||
598 | */ | 603 | */ |
599 | enum ieee80211_conf_changed { | 604 | enum ieee80211_conf_changed { |
605 | IEEE80211_CONF_CHANGE_SMPS = BIT(1), | ||
600 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), | 606 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), |
601 | IEEE80211_CONF_CHANGE_MONITOR = BIT(3), | 607 | IEEE80211_CONF_CHANGE_MONITOR = BIT(3), |
602 | IEEE80211_CONF_CHANGE_PS = BIT(4), | 608 | IEEE80211_CONF_CHANGE_PS = BIT(4), |
@@ -607,6 +613,25 @@ enum ieee80211_conf_changed { | |||
607 | }; | 613 | }; |
608 | 614 | ||
609 | /** | 615 | /** |
616 | * enum ieee80211_smps_mode - spatial multiplexing power save mode | ||
617 | * | ||
618 | * @IEEE80211_SMPS_AUTOMATIC: automatic | ||
619 | * @IEEE80211_SMPS_OFF: off | ||
620 | * @IEEE80211_SMPS_STATIC: static | ||
621 | * @IEEE80211_SMPS_DYNAMIC: dynamic | ||
622 | * @IEEE80211_SMPS_NUM_MODES: internal, don't use | ||
623 | */ | ||
624 | enum ieee80211_smps_mode { | ||
625 | IEEE80211_SMPS_AUTOMATIC, | ||
626 | IEEE80211_SMPS_OFF, | ||
627 | IEEE80211_SMPS_STATIC, | ||
628 | IEEE80211_SMPS_DYNAMIC, | ||
629 | |||
630 | /* keep last */ | ||
631 | IEEE80211_SMPS_NUM_MODES, | ||
632 | }; | ||
633 | |||
634 | /** | ||
610 | * struct ieee80211_conf - configuration of the device | 635 | * struct ieee80211_conf - configuration of the device |
611 | * | 636 | * |
612 | * This struct indicates how the driver shall configure the hardware. | 637 | * This struct indicates how the driver shall configure the hardware. |
@@ -634,6 +659,10 @@ enum ieee80211_conf_changed { | |||
634 | * @short_frame_max_tx_count: Maximum number of transmissions for a "short" | 659 | * @short_frame_max_tx_count: Maximum number of transmissions for a "short" |
635 | * frame, called "dot11ShortRetryLimit" in 802.11, but actually means the | 660 | * frame, called "dot11ShortRetryLimit" in 802.11, but actually means the |
636 | * number of transmissions not the number of retries | 661 | * number of transmissions not the number of retries |
662 | * | ||
663 | * @smps_mode: spatial multiplexing powersave mode; note that | ||
664 | * %IEEE80211_SMPS_STATIC is used when the device is not | ||
665 | * configured for an HT channel | ||
637 | */ | 666 | */ |
638 | struct ieee80211_conf { | 667 | struct ieee80211_conf { |
639 | u32 flags; | 668 | u32 flags; |
@@ -646,6 +675,7 @@ struct ieee80211_conf { | |||
646 | 675 | ||
647 | struct ieee80211_channel *channel; | 676 | struct ieee80211_channel *channel; |
648 | enum nl80211_channel_type channel_type; | 677 | enum nl80211_channel_type channel_type; |
678 | enum ieee80211_smps_mode smps_mode; | ||
649 | }; | 679 | }; |
650 | 680 | ||
651 | /** | 681 | /** |
@@ -657,12 +687,14 @@ struct ieee80211_conf { | |||
657 | * @type: type of this virtual interface | 687 | * @type: type of this virtual interface |
658 | * @bss_conf: BSS configuration for this interface, either our own | 688 | * @bss_conf: BSS configuration for this interface, either our own |
659 | * or the BSS we're associated to | 689 | * or the BSS we're associated to |
690 | * @addr: address of this interface | ||
660 | * @drv_priv: data area for driver use, will always be aligned to | 691 | * @drv_priv: data area for driver use, will always be aligned to |
661 | * sizeof(void *). | 692 | * sizeof(void *). |
662 | */ | 693 | */ |
663 | struct ieee80211_vif { | 694 | struct ieee80211_vif { |
664 | enum nl80211_iftype type; | 695 | enum nl80211_iftype type; |
665 | struct ieee80211_bss_conf bss_conf; | 696 | struct ieee80211_bss_conf bss_conf; |
697 | u8 addr[ETH_ALEN]; | ||
666 | /* must be last */ | 698 | /* must be last */ |
667 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); | 699 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); |
668 | }; | 700 | }; |
@@ -676,33 +708,6 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif) | |||
676 | } | 708 | } |
677 | 709 | ||
678 | /** | 710 | /** |
679 | * struct ieee80211_if_init_conf - initial configuration of an interface | ||
680 | * | ||
681 | * @vif: pointer to a driver-use per-interface structure. The pointer | ||
682 | * itself is also used for various functions including | ||
683 | * ieee80211_beacon_get() and ieee80211_get_buffered_bc(). | ||
684 | * @type: one of &enum nl80211_iftype constants. Determines the type of | ||
685 | * added/removed interface. | ||
686 | * @mac_addr: pointer to MAC address of the interface. This pointer is valid | ||
687 | * until the interface is removed (i.e. it cannot be used after | ||
688 | * remove_interface() callback was called for this interface). | ||
689 | * | ||
690 | * This structure is used in add_interface() and remove_interface() | ||
691 | * callbacks of &struct ieee80211_hw. | ||
692 | * | ||
693 | * When you allow multiple interfaces to be added to your PHY, take care | ||
694 | * that the hardware can actually handle multiple MAC addresses. However, | ||
695 | * also take care that when there's no interface left with mac_addr != %NULL | ||
696 | * you remove the MAC address from the device to avoid acknowledging packets | ||
697 | * in pure monitor mode. | ||
698 | */ | ||
699 | struct ieee80211_if_init_conf { | ||
700 | enum nl80211_iftype type; | ||
701 | struct ieee80211_vif *vif; | ||
702 | void *mac_addr; | ||
703 | }; | ||
704 | |||
705 | /** | ||
706 | * enum ieee80211_key_alg - key algorithm | 711 | * enum ieee80211_key_alg - key algorithm |
707 | * @ALG_WEP: WEP40 or WEP104 | 712 | * @ALG_WEP: WEP40 or WEP104 |
708 | * @ALG_TKIP: TKIP | 713 | * @ALG_TKIP: TKIP |
@@ -926,6 +931,21 @@ enum ieee80211_tkip_key_type { | |||
926 | * @IEEE80211_HW_BEACON_FILTER: | 931 | * @IEEE80211_HW_BEACON_FILTER: |
927 | * Hardware supports dropping of irrelevant beacon frames to | 932 | * Hardware supports dropping of irrelevant beacon frames to |
928 | * avoid waking up cpu. | 933 | * avoid waking up cpu. |
934 | * | ||
935 | * @IEEE80211_HW_SUPPORTS_STATIC_SMPS: | ||
936 | * Hardware supports static spatial multiplexing powersave, | ||
937 | * ie. can turn off all but one chain even on HT connections | ||
938 | * that should be using more chains. | ||
939 | * | ||
940 | * @IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS: | ||
941 | * Hardware supports dynamic spatial multiplexing powersave, | ||
942 | * ie. can turn off all but one chain and then wake the rest | ||
943 | * up as required after, for example, rts/cts handshake. | ||
944 | * | ||
945 | * @IEEE80211_HW_SUPPORTS_UAPSD: | ||
946 | * Hardware supports Unscheduled Automatic Power Save Delivery | ||
947 | * (U-APSD) in managed mode. The mode is configured with | ||
948 | * conf_tx() operation. | ||
929 | */ | 949 | */ |
930 | enum ieee80211_hw_flags { | 950 | enum ieee80211_hw_flags { |
931 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 951 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -943,6 +963,9 @@ enum ieee80211_hw_flags { | |||
943 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, | 963 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, |
944 | IEEE80211_HW_MFP_CAPABLE = 1<<13, | 964 | IEEE80211_HW_MFP_CAPABLE = 1<<13, |
945 | IEEE80211_HW_BEACON_FILTER = 1<<14, | 965 | IEEE80211_HW_BEACON_FILTER = 1<<14, |
966 | IEEE80211_HW_SUPPORTS_STATIC_SMPS = 1<<15, | ||
967 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16, | ||
968 | IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, | ||
946 | }; | 969 | }; |
947 | 970 | ||
948 | /** | 971 | /** |
@@ -1121,18 +1144,24 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1121 | * | 1144 | * |
1122 | * mac80211 has support for various powersave implementations. | 1145 | * mac80211 has support for various powersave implementations. |
1123 | * | 1146 | * |
1124 | * First, it can support hardware that handles all powersaving by | 1147 | * First, it can support hardware that handles all powersaving by itself, |
1125 | * itself, such hardware should simply set the %IEEE80211_HW_SUPPORTS_PS | 1148 | * such hardware should simply set the %IEEE80211_HW_SUPPORTS_PS hardware |
1126 | * hardware flag. In that case, it will be told about the desired | 1149 | * flag. In that case, it will be told about the desired powersave mode |
1127 | * powersave mode depending on the association status, and the driver | 1150 | * with the %IEEE80211_CONF_PS flag depending on the association status. |
1128 | * must take care of sending nullfunc frames when necessary, i.e. when | 1151 | * The hardware must take care of sending nullfunc frames when necessary, |
1129 | * entering and leaving powersave mode. The driver is required to look at | 1152 | * i.e. when entering and leaving powersave mode. The hardware is required |
1130 | * the AID in beacons and signal to the AP that it woke up when it finds | 1153 | * to look at the AID in beacons and signal to the AP that it woke up when |
1131 | * traffic directed to it. This mode supports dynamic PS by simply | 1154 | * it finds traffic directed to it. |
1132 | * enabling/disabling PS. | 1155 | * |
1133 | * | 1156 | * %IEEE80211_CONF_PS flag enabled means that the powersave mode defined in |
1134 | * Additionally, such hardware may set the %IEEE80211_HW_SUPPORTS_DYNAMIC_PS | 1157 | * IEEE 802.11-2007 section 11.2 is enabled. This is not to be confused |
1135 | * flag to indicate that it can support dynamic PS mode itself (see below). | 1158 | * with hardware wakeup and sleep states. Driver is responsible for waking |
1159 | * up the hardware before issueing commands to the hardware and putting it | ||
1160 | * back to sleep at approriate times. | ||
1161 | * | ||
1162 | * When PS is enabled, hardware needs to wakeup for beacons and receive the | ||
1163 | * buffered multicast/broadcast frames after the beacon. Also it must be | ||
1164 | * possible to send frames and receive the acknowledment frame. | ||
1136 | * | 1165 | * |
1137 | * Other hardware designs cannot send nullfunc frames by themselves and also | 1166 | * Other hardware designs cannot send nullfunc frames by themselves and also |
1138 | * need software support for parsing the TIM bitmap. This is also supported | 1167 | * need software support for parsing the TIM bitmap. This is also supported |
@@ -1140,14 +1169,35 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1140 | * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still | 1169 | * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still |
1141 | * required to pass up beacons. The hardware is still required to handle | 1170 | * required to pass up beacons. The hardware is still required to handle |
1142 | * waking up for multicast traffic; if it cannot the driver must handle that | 1171 | * waking up for multicast traffic; if it cannot the driver must handle that |
1143 | * as best as it can, mac80211 is too slow. | 1172 | * as best as it can, mac80211 is too slow to do that. |
1144 | * | 1173 | * |
1145 | * Dynamic powersave mode is an extension to normal powersave mode in which | 1174 | * Dynamic powersave is an extension to normal powersave in which the |
1146 | * the hardware stays awake for a user-specified period of time after sending | 1175 | * hardware stays awake for a user-specified period of time after sending a |
1147 | * a frame so that reply frames need not be buffered and therefore delayed | 1176 | * frame so that reply frames need not be buffered and therefore delayed to |
1148 | * to the next wakeup. This can either be supported by hardware, in which case | 1177 | * the next wakeup. It's compromise of getting good enough latency when |
1149 | * the driver needs to look at the @dynamic_ps_timeout hardware configuration | 1178 | * there's data traffic and still saving significantly power in idle |
1150 | * value, or by the stack if all nullfunc handling is in the stack. | 1179 | * periods. |
1180 | * | ||
1181 | * Dynamic powersave is supported by simply mac80211 enabling and disabling | ||
1182 | * PS based on traffic. Driver needs to only set %IEEE80211_HW_SUPPORTS_PS | ||
1183 | * flag and mac80211 will handle everything automatically. Additionally, | ||
1184 | * hardware having support for the dynamic PS feature may set the | ||
1185 | * %IEEE80211_HW_SUPPORTS_DYNAMIC_PS flag to indicate that it can support | ||
1186 | * dynamic PS mode itself. The driver needs to look at the | ||
1187 | * @dynamic_ps_timeout hardware configuration value and use it that value | ||
1188 | * whenever %IEEE80211_CONF_PS is set. In this case mac80211 will disable | ||
1189 | * dynamic PS feature in stack and will just keep %IEEE80211_CONF_PS | ||
1190 | * enabled whenever user has enabled powersave. | ||
1191 | * | ||
1192 | * Driver informs U-APSD client support by enabling | ||
1193 | * %IEEE80211_HW_SUPPORTS_UAPSD flag. The mode is configured through the | ||
1194 | * uapsd paramater in conf_tx() operation. Hardware needs to send the QoS | ||
1195 | * Nullfunc frames and stay awake until the service period has ended. To | ||
1196 | * utilize U-APSD, dynamic powersave is disabled for voip AC and all frames | ||
1197 | * from that AC are transmitted with powersave enabled. | ||
1198 | * | ||
1199 | * Note: U-APSD client mode is not yet supported with | ||
1200 | * %IEEE80211_HW_PS_NULLFUNC_STACK. | ||
1151 | */ | 1201 | */ |
1152 | 1202 | ||
1153 | /** | 1203 | /** |
@@ -1211,6 +1261,31 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1211 | */ | 1261 | */ |
1212 | 1262 | ||
1213 | /** | 1263 | /** |
1264 | * DOC: Spatial multiplexing power save | ||
1265 | * | ||
1266 | * SMPS (Spatial multiplexing power save) is a mechanism to conserve | ||
1267 | * power in an 802.11n implementation. For details on the mechanism | ||
1268 | * and rationale, please refer to 802.11 (as amended by 802.11n-2009) | ||
1269 | * "11.2.3 SM power save". | ||
1270 | * | ||
1271 | * The mac80211 implementation is capable of sending action frames | ||
1272 | * to update the AP about the station's SMPS mode, and will instruct | ||
1273 | * the driver to enter the specific mode. It will also announce the | ||
1274 | * requested SMPS mode during the association handshake. Hardware | ||
1275 | * support for this feature is required, and can be indicated by | ||
1276 | * hardware flags. | ||
1277 | * | ||
1278 | * The default mode will be "automatic", which nl80211/cfg80211 | ||
1279 | * defines to be dynamic SMPS in (regular) powersave, and SMPS | ||
1280 | * turned off otherwise. | ||
1281 | * | ||
1282 | * To support this feature, the driver must set the appropriate | ||
1283 | * hardware support flags, and handle the SMPS flag to the config() | ||
1284 | * operation. It will then with this mechanism be instructed to | ||
1285 | * enter the requested SMPS mode while associated to an HT AP. | ||
1286 | */ | ||
1287 | |||
1288 | /** | ||
1214 | * DOC: Frame filtering | 1289 | * DOC: Frame filtering |
1215 | * | 1290 | * |
1216 | * mac80211 requires to see many management frames for proper | 1291 | * mac80211 requires to see many management frames for proper |
@@ -1347,7 +1422,7 @@ enum ieee80211_ampdu_mlme_action { | |||
1347 | * When the device is started it should not have a MAC address | 1422 | * When the device is started it should not have a MAC address |
1348 | * to avoid acknowledging frames before a non-monitor device | 1423 | * to avoid acknowledging frames before a non-monitor device |
1349 | * is added. | 1424 | * is added. |
1350 | * Must be implemented. | 1425 | * Must be implemented and can sleep. |
1351 | * | 1426 | * |
1352 | * @stop: Called after last netdevice attached to the hardware | 1427 | * @stop: Called after last netdevice attached to the hardware |
1353 | * is disabled. This should turn off the hardware (at least | 1428 | * is disabled. This should turn off the hardware (at least |
@@ -1355,7 +1430,7 @@ enum ieee80211_ampdu_mlme_action { | |||
1355 | * May be called right after add_interface if that rejects | 1430 | * May be called right after add_interface if that rejects |
1356 | * an interface. If you added any work onto the mac80211 workqueue | 1431 | * an interface. If you added any work onto the mac80211 workqueue |
1357 | * you should ensure to cancel it on this callback. | 1432 | * you should ensure to cancel it on this callback. |
1358 | * Must be implemented. | 1433 | * Must be implemented and can sleep. |
1359 | * | 1434 | * |
1360 | * @add_interface: Called when a netdevice attached to the hardware is | 1435 | * @add_interface: Called when a netdevice attached to the hardware is |
1361 | * enabled. Because it is not called for monitor mode devices, @start | 1436 | * enabled. Because it is not called for monitor mode devices, @start |
@@ -1365,7 +1440,7 @@ enum ieee80211_ampdu_mlme_action { | |||
1365 | * interface is given in the conf parameter. | 1440 | * interface is given in the conf parameter. |
1366 | * The callback may refuse to add an interface by returning a | 1441 | * The callback may refuse to add an interface by returning a |
1367 | * negative error code (which will be seen in userspace.) | 1442 | * negative error code (which will be seen in userspace.) |
1368 | * Must be implemented. | 1443 | * Must be implemented and can sleep. |
1369 | * | 1444 | * |
1370 | * @remove_interface: Notifies a driver that an interface is going down. | 1445 | * @remove_interface: Notifies a driver that an interface is going down. |
1371 | * The @stop callback is called after this if it is the last interface | 1446 | * The @stop callback is called after this if it is the last interface |
@@ -1374,19 +1449,20 @@ enum ieee80211_ampdu_mlme_action { | |||
1374 | * must be cleared so the device no longer acknowledges packets, | 1449 | * must be cleared so the device no longer acknowledges packets, |
1375 | * the mac_addr member of the conf structure is, however, set to the | 1450 | * the mac_addr member of the conf structure is, however, set to the |
1376 | * MAC address of the device going away. | 1451 | * MAC address of the device going away. |
1377 | * Hence, this callback must be implemented. | 1452 | * Hence, this callback must be implemented. It can sleep. |
1378 | * | 1453 | * |
1379 | * @config: Handler for configuration requests. IEEE 802.11 code calls this | 1454 | * @config: Handler for configuration requests. IEEE 802.11 code calls this |
1380 | * function to change hardware configuration, e.g., channel. | 1455 | * function to change hardware configuration, e.g., channel. |
1381 | * This function should never fail but returns a negative error code | 1456 | * This function should never fail but returns a negative error code |
1382 | * if it does. | 1457 | * if it does. The callback can sleep. |
1383 | * | 1458 | * |
1384 | * @bss_info_changed: Handler for configuration requests related to BSS | 1459 | * @bss_info_changed: Handler for configuration requests related to BSS |
1385 | * parameters that may vary during BSS's lifespan, and may affect low | 1460 | * parameters that may vary during BSS's lifespan, and may affect low |
1386 | * level driver (e.g. assoc/disassoc status, erp parameters). | 1461 | * level driver (e.g. assoc/disassoc status, erp parameters). |
1387 | * This function should not be used if no BSS has been set, unless | 1462 | * This function should not be used if no BSS has been set, unless |
1388 | * for association indication. The @changed parameter indicates which | 1463 | * for association indication. The @changed parameter indicates which |
1389 | * of the bss parameters has changed when a call is made. | 1464 | * of the bss parameters has changed when a call is made. The callback |
1465 | * can sleep. | ||
1390 | * | 1466 | * |
1391 | * @prepare_multicast: Prepare for multicast filter configuration. | 1467 | * @prepare_multicast: Prepare for multicast filter configuration. |
1392 | * This callback is optional, and its return value is passed | 1468 | * This callback is optional, and its return value is passed |
@@ -1394,20 +1470,22 @@ enum ieee80211_ampdu_mlme_action { | |||
1394 | * | 1470 | * |
1395 | * @configure_filter: Configure the device's RX filter. | 1471 | * @configure_filter: Configure the device's RX filter. |
1396 | * See the section "Frame filtering" for more information. | 1472 | * See the section "Frame filtering" for more information. |
1397 | * This callback must be implemented. | 1473 | * This callback must be implemented and can sleep. |
1398 | * | 1474 | * |
1399 | * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit | 1475 | * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit |
1400 | * must be set or cleared for a given STA. Must be atomic. | 1476 | * must be set or cleared for a given STA. Must be atomic. |
1401 | * | 1477 | * |
1402 | * @set_key: See the section "Hardware crypto acceleration" | 1478 | * @set_key: See the section "Hardware crypto acceleration" |
1403 | * This callback can sleep, and is only called between add_interface | 1479 | * This callback is only called between add_interface and |
1404 | * and remove_interface calls, i.e. while the given virtual interface | 1480 | * remove_interface calls, i.e. while the given virtual interface |
1405 | * is enabled. | 1481 | * is enabled. |
1406 | * Returns a negative error code if the key can't be added. | 1482 | * Returns a negative error code if the key can't be added. |
1483 | * The callback can sleep. | ||
1407 | * | 1484 | * |
1408 | * @update_tkip_key: See the section "Hardware crypto acceleration" | 1485 | * @update_tkip_key: See the section "Hardware crypto acceleration" |
1409 | * This callback will be called in the context of Rx. Called for drivers | 1486 | * This callback will be called in the context of Rx. Called for drivers |
1410 | * which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY. | 1487 | * which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY. |
1488 | * The callback can sleep. | ||
1411 | * | 1489 | * |
1412 | * @hw_scan: Ask the hardware to service the scan request, no need to start | 1490 | * @hw_scan: Ask the hardware to service the scan request, no need to start |
1413 | * the scan state machine in stack. The scan must honour the channel | 1491 | * the scan state machine in stack. The scan must honour the channel |
@@ -1421,21 +1499,28 @@ enum ieee80211_ampdu_mlme_action { | |||
1421 | * When the scan finishes, ieee80211_scan_completed() must be called; | 1499 | * When the scan finishes, ieee80211_scan_completed() must be called; |
1422 | * note that it also must be called when the scan cannot finish due to | 1500 | * note that it also must be called when the scan cannot finish due to |
1423 | * any error unless this callback returned a negative error code. | 1501 | * any error unless this callback returned a negative error code. |
1502 | * The callback can sleep. | ||
1424 | * | 1503 | * |
1425 | * @sw_scan_start: Notifier function that is called just before a software scan | 1504 | * @sw_scan_start: Notifier function that is called just before a software scan |
1426 | * is started. Can be NULL, if the driver doesn't need this notification. | 1505 | * is started. Can be NULL, if the driver doesn't need this notification. |
1506 | * The callback can sleep. | ||
1427 | * | 1507 | * |
1428 | * @sw_scan_complete: Notifier function that is called just after a software scan | 1508 | * @sw_scan_complete: Notifier function that is called just after a |
1429 | * finished. Can be NULL, if the driver doesn't need this notification. | 1509 | * software scan finished. Can be NULL, if the driver doesn't need |
1510 | * this notification. | ||
1511 | * The callback can sleep. | ||
1430 | * | 1512 | * |
1431 | * @get_stats: Return low-level statistics. | 1513 | * @get_stats: Return low-level statistics. |
1432 | * Returns zero if statistics are available. | 1514 | * Returns zero if statistics are available. |
1515 | * The callback can sleep. | ||
1433 | * | 1516 | * |
1434 | * @get_tkip_seq: If your device implements TKIP encryption in hardware this | 1517 | * @get_tkip_seq: If your device implements TKIP encryption in hardware this |
1435 | * callback should be provided to read the TKIP transmit IVs (both IV32 | 1518 | * callback should be provided to read the TKIP transmit IVs (both IV32 |
1436 | * and IV16) for the given key from hardware. | 1519 | * and IV16) for the given key from hardware. |
1520 | * The callback must be atomic. | ||
1437 | * | 1521 | * |
1438 | * @set_rts_threshold: Configuration of RTS threshold (if device needs it) | 1522 | * @set_rts_threshold: Configuration of RTS threshold (if device needs it) |
1523 | * The callback can sleep. | ||
1439 | * | 1524 | * |
1440 | * @sta_notify: Notifies low level driver about addition, removal or power | 1525 | * @sta_notify: Notifies low level driver about addition, removal or power |
1441 | * state transition of an associated station, AP, IBSS/WDS/mesh peer etc. | 1526 | * state transition of an associated station, AP, IBSS/WDS/mesh peer etc. |
@@ -1444,30 +1529,36 @@ enum ieee80211_ampdu_mlme_action { | |||
1444 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), | 1529 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), |
1445 | * bursting) for a hardware TX queue. | 1530 | * bursting) for a hardware TX queue. |
1446 | * Returns a negative error code on failure. | 1531 | * Returns a negative error code on failure. |
1532 | * The callback can sleep. | ||
1447 | * | 1533 | * |
1448 | * @get_tx_stats: Get statistics of the current TX queue status. This is used | 1534 | * @get_tx_stats: Get statistics of the current TX queue status. This is used |
1449 | * to get number of currently queued packets (queue length), maximum queue | 1535 | * to get number of currently queued packets (queue length), maximum queue |
1450 | * size (limit), and total number of packets sent using each TX queue | 1536 | * size (limit), and total number of packets sent using each TX queue |
1451 | * (count). The 'stats' pointer points to an array that has hw->queues | 1537 | * (count). The 'stats' pointer points to an array that has hw->queues |
1452 | * items. | 1538 | * items. |
1539 | * The callback must be atomic. | ||
1453 | * | 1540 | * |
1454 | * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, | 1541 | * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, |
1455 | * this is only used for IBSS mode BSSID merging and debugging. Is not a | 1542 | * this is only used for IBSS mode BSSID merging and debugging. Is not a |
1456 | * required function. | 1543 | * required function. |
1544 | * The callback can sleep. | ||
1457 | * | 1545 | * |
1458 | * @set_tsf: Set the TSF timer to the specified value in the firmware/hardware. | 1546 | * @set_tsf: Set the TSF timer to the specified value in the firmware/hardware. |
1459 | * Currently, this is only used for IBSS mode debugging. Is not a | 1547 | * Currently, this is only used for IBSS mode debugging. Is not a |
1460 | * required function. | 1548 | * required function. |
1549 | * The callback can sleep. | ||
1461 | * | 1550 | * |
1462 | * @reset_tsf: Reset the TSF timer and allow firmware/hardware to synchronize | 1551 | * @reset_tsf: Reset the TSF timer and allow firmware/hardware to synchronize |
1463 | * with other STAs in the IBSS. This is only used in IBSS mode. This | 1552 | * with other STAs in the IBSS. This is only used in IBSS mode. This |
1464 | * function is optional if the firmware/hardware takes full care of | 1553 | * function is optional if the firmware/hardware takes full care of |
1465 | * TSF synchronization. | 1554 | * TSF synchronization. |
1555 | * The callback can sleep. | ||
1466 | * | 1556 | * |
1467 | * @tx_last_beacon: Determine whether the last IBSS beacon was sent by us. | 1557 | * @tx_last_beacon: Determine whether the last IBSS beacon was sent by us. |
1468 | * This is needed only for IBSS mode and the result of this function is | 1558 | * This is needed only for IBSS mode and the result of this function is |
1469 | * used to determine whether to reply to Probe Requests. | 1559 | * used to determine whether to reply to Probe Requests. |
1470 | * Returns non-zero if this device sent the last beacon. | 1560 | * Returns non-zero if this device sent the last beacon. |
1561 | * The callback can sleep. | ||
1471 | * | 1562 | * |
1472 | * @ampdu_action: Perform a certain A-MPDU action | 1563 | * @ampdu_action: Perform a certain A-MPDU action |
1473 | * The RA/TID combination determines the destination and TID we want | 1564 | * The RA/TID combination determines the destination and TID we want |
@@ -1476,21 +1567,32 @@ enum ieee80211_ampdu_mlme_action { | |||
1476 | * is the first frame we expect to perform the action on. Notice | 1567 | * is the first frame we expect to perform the action on. Notice |
1477 | * that TX/RX_STOP can pass NULL for this parameter. | 1568 | * that TX/RX_STOP can pass NULL for this parameter. |
1478 | * Returns a negative error code on failure. | 1569 | * Returns a negative error code on failure. |
1570 | * The callback must be atomic. | ||
1479 | * | 1571 | * |
1480 | * @rfkill_poll: Poll rfkill hardware state. If you need this, you also | 1572 | * @rfkill_poll: Poll rfkill hardware state. If you need this, you also |
1481 | * need to set wiphy->rfkill_poll to %true before registration, | 1573 | * need to set wiphy->rfkill_poll to %true before registration, |
1482 | * and need to call wiphy_rfkill_set_hw_state() in the callback. | 1574 | * and need to call wiphy_rfkill_set_hw_state() in the callback. |
1575 | * The callback can sleep. | ||
1576 | * | ||
1577 | * @set_coverage_class: Set slot time for given coverage class as specified | ||
1578 | * in IEEE 802.11-2007 section 17.3.8.6 and modify ACK timeout | ||
1579 | * accordingly. This callback is not required and may sleep. | ||
1483 | * | 1580 | * |
1484 | * @testmode_cmd: Implement a cfg80211 test mode command. | 1581 | * @testmode_cmd: Implement a cfg80211 test mode command. |
1582 | * The callback can sleep. | ||
1583 | * | ||
1584 | * @flush: Flush all pending frames from the hardware queue, making sure | ||
1585 | * that the hardware queues are empty. If the parameter @drop is set | ||
1586 | * to %true, pending frames may be dropped. The callback can sleep. | ||
1485 | */ | 1587 | */ |
1486 | struct ieee80211_ops { | 1588 | struct ieee80211_ops { |
1487 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1589 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
1488 | int (*start)(struct ieee80211_hw *hw); | 1590 | int (*start)(struct ieee80211_hw *hw); |
1489 | void (*stop)(struct ieee80211_hw *hw); | 1591 | void (*stop)(struct ieee80211_hw *hw); |
1490 | int (*add_interface)(struct ieee80211_hw *hw, | 1592 | int (*add_interface)(struct ieee80211_hw *hw, |
1491 | struct ieee80211_if_init_conf *conf); | 1593 | struct ieee80211_vif *vif); |
1492 | void (*remove_interface)(struct ieee80211_hw *hw, | 1594 | void (*remove_interface)(struct ieee80211_hw *hw, |
1493 | struct ieee80211_if_init_conf *conf); | 1595 | struct ieee80211_vif *vif); |
1494 | int (*config)(struct ieee80211_hw *hw, u32 changed); | 1596 | int (*config)(struct ieee80211_hw *hw, u32 changed); |
1495 | void (*bss_info_changed)(struct ieee80211_hw *hw, | 1597 | void (*bss_info_changed)(struct ieee80211_hw *hw, |
1496 | struct ieee80211_vif *vif, | 1598 | struct ieee80211_vif *vif, |
@@ -1535,9 +1637,11 @@ struct ieee80211_ops { | |||
1535 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); | 1637 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); |
1536 | 1638 | ||
1537 | void (*rfkill_poll)(struct ieee80211_hw *hw); | 1639 | void (*rfkill_poll)(struct ieee80211_hw *hw); |
1640 | void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class); | ||
1538 | #ifdef CONFIG_NL80211_TESTMODE | 1641 | #ifdef CONFIG_NL80211_TESTMODE |
1539 | int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len); | 1642 | int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len); |
1540 | #endif | 1643 | #endif |
1644 | void (*flush)(struct ieee80211_hw *hw, bool drop); | ||
1541 | }; | 1645 | }; |
1542 | 1646 | ||
1543 | /** | 1647 | /** |
@@ -1777,7 +1881,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | |||
1777 | /** | 1881 | /** |
1778 | * ieee80211_beacon_get_tim - beacon generation function | 1882 | * ieee80211_beacon_get_tim - beacon generation function |
1779 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1883 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1780 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1884 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1781 | * @tim_offset: pointer to variable that will receive the TIM IE offset. | 1885 | * @tim_offset: pointer to variable that will receive the TIM IE offset. |
1782 | * Set to 0 if invalid (in non-AP modes). | 1886 | * Set to 0 if invalid (in non-AP modes). |
1783 | * @tim_length: pointer to variable that will receive the TIM IE length, | 1887 | * @tim_length: pointer to variable that will receive the TIM IE length, |
@@ -1805,7 +1909,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
1805 | /** | 1909 | /** |
1806 | * ieee80211_beacon_get - beacon generation function | 1910 | * ieee80211_beacon_get - beacon generation function |
1807 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1911 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1808 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1912 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1809 | * | 1913 | * |
1810 | * See ieee80211_beacon_get_tim(). | 1914 | * See ieee80211_beacon_get_tim(). |
1811 | */ | 1915 | */ |
@@ -1816,9 +1920,56 @@ static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
1816 | } | 1920 | } |
1817 | 1921 | ||
1818 | /** | 1922 | /** |
1923 | * ieee80211_pspoll_get - retrieve a PS Poll template | ||
1924 | * @hw: pointer obtained from ieee80211_alloc_hw(). | ||
1925 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
1926 | * | ||
1927 | * Creates a PS Poll a template which can, for example, uploaded to | ||
1928 | * hardware. The template must be updated after association so that correct | ||
1929 | * AID, BSSID and MAC address is used. | ||
1930 | * | ||
1931 | * Note: Caller (or hardware) is responsible for setting the | ||
1932 | * &IEEE80211_FCTL_PM bit. | ||
1933 | */ | ||
1934 | struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw, | ||
1935 | struct ieee80211_vif *vif); | ||
1936 | |||
1937 | /** | ||
1938 | * ieee80211_nullfunc_get - retrieve a nullfunc template | ||
1939 | * @hw: pointer obtained from ieee80211_alloc_hw(). | ||
1940 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
1941 | * | ||
1942 | * Creates a Nullfunc template which can, for example, uploaded to | ||
1943 | * hardware. The template must be updated after association so that correct | ||
1944 | * BSSID and address is used. | ||
1945 | * | ||
1946 | * Note: Caller (or hardware) is responsible for setting the | ||
1947 | * &IEEE80211_FCTL_PM bit as well as Duration and Sequence Control fields. | ||
1948 | */ | ||
1949 | struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw, | ||
1950 | struct ieee80211_vif *vif); | ||
1951 | |||
1952 | /** | ||
1953 | * ieee80211_probereq_get - retrieve a Probe Request template | ||
1954 | * @hw: pointer obtained from ieee80211_alloc_hw(). | ||
1955 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
1956 | * @ssid: SSID buffer | ||
1957 | * @ssid_len: length of SSID | ||
1958 | * @ie: buffer containing all IEs except SSID for the template | ||
1959 | * @ie_len: length of the IE buffer | ||
1960 | * | ||
1961 | * Creates a Probe Request template which can, for example, be uploaded to | ||
1962 | * hardware. | ||
1963 | */ | ||
1964 | struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw, | ||
1965 | struct ieee80211_vif *vif, | ||
1966 | const u8 *ssid, size_t ssid_len, | ||
1967 | const u8 *ie, size_t ie_len); | ||
1968 | |||
1969 | /** | ||
1819 | * ieee80211_rts_get - RTS frame generation function | 1970 | * ieee80211_rts_get - RTS frame generation function |
1820 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1971 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1821 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1972 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1822 | * @frame: pointer to the frame that is going to be protected by the RTS. | 1973 | * @frame: pointer to the frame that is going to be protected by the RTS. |
1823 | * @frame_len: the frame length (in octets). | 1974 | * @frame_len: the frame length (in octets). |
1824 | * @frame_txctl: &struct ieee80211_tx_info of the frame. | 1975 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
@@ -1837,7 +1988,7 @@ void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
1837 | /** | 1988 | /** |
1838 | * ieee80211_rts_duration - Get the duration field for an RTS frame | 1989 | * ieee80211_rts_duration - Get the duration field for an RTS frame |
1839 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1990 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1840 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1991 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1841 | * @frame_len: the length of the frame that is going to be protected by the RTS. | 1992 | * @frame_len: the length of the frame that is going to be protected by the RTS. |
1842 | * @frame_txctl: &struct ieee80211_tx_info of the frame. | 1993 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
1843 | * | 1994 | * |
@@ -1852,7 +2003,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw, | |||
1852 | /** | 2003 | /** |
1853 | * ieee80211_ctstoself_get - CTS-to-self frame generation function | 2004 | * ieee80211_ctstoself_get - CTS-to-self frame generation function |
1854 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 2005 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1855 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 2006 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1856 | * @frame: pointer to the frame that is going to be protected by the CTS-to-self. | 2007 | * @frame: pointer to the frame that is going to be protected by the CTS-to-self. |
1857 | * @frame_len: the frame length (in octets). | 2008 | * @frame_len: the frame length (in octets). |
1858 | * @frame_txctl: &struct ieee80211_tx_info of the frame. | 2009 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
@@ -1872,7 +2023,7 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw, | |||
1872 | /** | 2023 | /** |
1873 | * ieee80211_ctstoself_duration - Get the duration field for a CTS-to-self frame | 2024 | * ieee80211_ctstoself_duration - Get the duration field for a CTS-to-self frame |
1874 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 2025 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1875 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 2026 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1876 | * @frame_len: the length of the frame that is going to be protected by the CTS-to-self. | 2027 | * @frame_len: the length of the frame that is going to be protected by the CTS-to-self. |
1877 | * @frame_txctl: &struct ieee80211_tx_info of the frame. | 2028 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
1878 | * | 2029 | * |
@@ -1888,7 +2039,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, | |||
1888 | /** | 2039 | /** |
1889 | * ieee80211_generic_frame_duration - Calculate the duration field for a frame | 2040 | * ieee80211_generic_frame_duration - Calculate the duration field for a frame |
1890 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 2041 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1891 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 2042 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1892 | * @frame_len: the length of the frame. | 2043 | * @frame_len: the length of the frame. |
1893 | * @rate: the rate at which the frame is going to be transmitted. | 2044 | * @rate: the rate at which the frame is going to be transmitted. |
1894 | * | 2045 | * |
@@ -1903,7 +2054,7 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, | |||
1903 | /** | 2054 | /** |
1904 | * ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames | 2055 | * ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames |
1905 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 2056 | * @hw: pointer as obtained from ieee80211_alloc_hw(). |
1906 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 2057 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1907 | * | 2058 | * |
1908 | * Function for accessing buffered broadcast and multicast frames. If | 2059 | * Function for accessing buffered broadcast and multicast frames. If |
1909 | * hardware/firmware does not implement buffering of broadcast/multicast | 2060 | * hardware/firmware does not implement buffering of broadcast/multicast |
@@ -2071,7 +2222,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid); | |||
2071 | 2222 | ||
2072 | /** | 2223 | /** |
2073 | * ieee80211_start_tx_ba_cb - low level driver ready to aggregate. | 2224 | * ieee80211_start_tx_ba_cb - low level driver ready to aggregate. |
2074 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf | 2225 | * @vif: &struct ieee80211_vif pointer from the add_interface callback |
2075 | * @ra: receiver address of the BA session recipient. | 2226 | * @ra: receiver address of the BA session recipient. |
2076 | * @tid: the TID to BA on. | 2227 | * @tid: the TID to BA on. |
2077 | * | 2228 | * |
@@ -2082,7 +2233,7 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid); | |||
2082 | 2233 | ||
2083 | /** | 2234 | /** |
2084 | * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. | 2235 | * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. |
2085 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf | 2236 | * @vif: &struct ieee80211_vif pointer from the add_interface callback |
2086 | * @ra: receiver address of the BA session recipient. | 2237 | * @ra: receiver address of the BA session recipient. |
2087 | * @tid: the TID to BA on. | 2238 | * @tid: the TID to BA on. |
2088 | * | 2239 | * |
@@ -2110,7 +2261,7 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid, | |||
2110 | 2261 | ||
2111 | /** | 2262 | /** |
2112 | * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. | 2263 | * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. |
2113 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf | 2264 | * @vif: &struct ieee80211_vif pointer from the add_interface callback |
2114 | * @ra: receiver address of the BA session recipient. | 2265 | * @ra: receiver address of the BA session recipient. |
2115 | * @tid: the desired TID to BA on. | 2266 | * @tid: the desired TID to BA on. |
2116 | * | 2267 | * |
@@ -2121,7 +2272,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid); | |||
2121 | 2272 | ||
2122 | /** | 2273 | /** |
2123 | * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate. | 2274 | * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate. |
2124 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf | 2275 | * @vif: &struct ieee80211_vif pointer from the add_interface callback |
2125 | * @ra: receiver address of the BA session recipient. | 2276 | * @ra: receiver address of the BA session recipient. |
2126 | * @tid: the desired TID to BA on. | 2277 | * @tid: the desired TID to BA on. |
2127 | * | 2278 | * |
@@ -2200,7 +2351,7 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw, | |||
2200 | /** | 2351 | /** |
2201 | * ieee80211_beacon_loss - inform hardware does not receive beacons | 2352 | * ieee80211_beacon_loss - inform hardware does not receive beacons |
2202 | * | 2353 | * |
2203 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 2354 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
2204 | * | 2355 | * |
2205 | * When beacon filtering is enabled with IEEE80211_HW_BEACON_FILTERING and | 2356 | * When beacon filtering is enabled with IEEE80211_HW_BEACON_FILTERING and |
2206 | * IEEE80211_CONF_PS is set, the driver needs to inform whenever the | 2357 | * IEEE80211_CONF_PS is set, the driver needs to inform whenever the |
@@ -2234,8 +2385,12 @@ enum rate_control_changed { | |||
2234 | * @short_preamble: whether mac80211 will request short-preamble transmission | 2385 | * @short_preamble: whether mac80211 will request short-preamble transmission |
2235 | * if the selected rate supports it | 2386 | * if the selected rate supports it |
2236 | * @max_rate_idx: user-requested maximum rate (not MCS for now) | 2387 | * @max_rate_idx: user-requested maximum rate (not MCS for now) |
2388 | * (deprecated; this will be removed once drivers get updated to use | ||
2389 | * rate_idx_mask) | ||
2390 | * @rate_idx_mask: user-requested rate mask (not MCS for now) | ||
2237 | * @skb: the skb that will be transmitted, the control information in it needs | 2391 | * @skb: the skb that will be transmitted, the control information in it needs |
2238 | * to be filled in | 2392 | * to be filled in |
2393 | * @ap: whether this frame is sent out in AP mode | ||
2239 | */ | 2394 | */ |
2240 | struct ieee80211_tx_rate_control { | 2395 | struct ieee80211_tx_rate_control { |
2241 | struct ieee80211_hw *hw; | 2396 | struct ieee80211_hw *hw; |
@@ -2245,6 +2400,8 @@ struct ieee80211_tx_rate_control { | |||
2245 | struct ieee80211_tx_rate reported_rate; | 2400 | struct ieee80211_tx_rate reported_rate; |
2246 | bool rts, short_preamble; | 2401 | bool rts, short_preamble; |
2247 | u8 max_rate_idx; | 2402 | u8 max_rate_idx; |
2403 | u32 rate_idx_mask; | ||
2404 | bool ap; | ||
2248 | }; | 2405 | }; |
2249 | 2406 | ||
2250 | struct rate_control_ops { | 2407 | struct rate_control_ops { |
diff --git a/include/net/phonet/pep.h b/include/net/phonet/pep.h index 4c61cdce4e5f..35672b1cf44a 100644 --- a/include/net/phonet/pep.h +++ b/include/net/phonet/pep.h | |||
@@ -44,6 +44,7 @@ struct pep_sock { | |||
44 | u8 rx_fc; /* RX flow control */ | 44 | u8 rx_fc; /* RX flow control */ |
45 | u8 tx_fc; /* TX flow control */ | 45 | u8 tx_fc; /* TX flow control */ |
46 | u8 init_enable; /* auto-enable at creation */ | 46 | u8 init_enable; /* auto-enable at creation */ |
47 | u8 aligned; | ||
47 | }; | 48 | }; |
48 | 49 | ||
49 | static inline struct pep_sock *pep_sk(struct sock *sk) | 50 | static inline struct pep_sock *pep_sk(struct sock *sk) |
@@ -77,6 +78,7 @@ static inline struct pnpipehdr *pnp_hdr(struct sk_buff *skb) | |||
77 | 78 | ||
78 | enum { | 79 | enum { |
79 | PNS_PIPE_DATA = 0x20, | 80 | PNS_PIPE_DATA = 0x20, |
81 | PNS_PIPE_ALIGNED_DATA, | ||
80 | 82 | ||
81 | PNS_PEP_CONNECT_REQ = 0x40, | 83 | PNS_PEP_CONNECT_REQ = 0x40, |
82 | PNS_PEP_CONNECT_RESP, | 84 | PNS_PEP_CONNECT_RESP, |
@@ -138,6 +140,7 @@ enum { | |||
138 | PN_PIPE_SB_NEGOTIATED_FC, | 140 | PN_PIPE_SB_NEGOTIATED_FC, |
139 | PN_PIPE_SB_REQUIRED_FC_TX, | 141 | PN_PIPE_SB_REQUIRED_FC_TX, |
140 | PN_PIPE_SB_PREFERRED_FC_RX, | 142 | PN_PIPE_SB_PREFERRED_FC_RX, |
143 | PN_PIPE_SB_ALIGNED_DATA, | ||
141 | }; | 144 | }; |
142 | 145 | ||
143 | /* Phonet pipe flow control models */ | 146 | /* Phonet pipe flow control models */ |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index c9b50ebd9ce9..99e6e19b57c2 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -45,6 +45,8 @@ struct request_sock_ops { | |||
45 | void (*send_reset)(struct sock *sk, | 45 | void (*send_reset)(struct sock *sk, |
46 | struct sk_buff *skb); | 46 | struct sk_buff *skb); |
47 | void (*destructor)(struct request_sock *req); | 47 | void (*destructor)(struct request_sock *req); |
48 | void (*syn_ack_timeout)(struct sock *sk, | ||
49 | struct request_sock *req); | ||
48 | }; | 50 | }; |
49 | 51 | ||
50 | /* struct request_sock - mini sock to represent a connection request | 52 | /* struct request_sock - mini sock to represent a connection request |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 34f5cc24d903..87d164b9bd8f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -400,6 +400,8 @@ extern int compat_tcp_setsockopt(struct sock *sk, | |||
400 | int level, int optname, | 400 | int level, int optname, |
401 | char __user *optval, unsigned int optlen); | 401 | char __user *optval, unsigned int optlen); |
402 | extern void tcp_set_keepalive(struct sock *sk, int val); | 402 | extern void tcp_set_keepalive(struct sock *sk, int val); |
403 | extern void tcp_syn_ack_timeout(struct sock *sk, | ||
404 | struct request_sock *req); | ||
403 | extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, | 405 | extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, |
404 | struct msghdr *msg, | 406 | struct msghdr *msg, |
405 | size_t len, int nonblock, | 407 | size_t len, int nonblock, |
@@ -856,13 +858,6 @@ static inline void tcp_check_probe_timer(struct sock *sk) | |||
856 | icsk->icsk_rto, TCP_RTO_MAX); | 858 | icsk->icsk_rto, TCP_RTO_MAX); |
857 | } | 859 | } |
858 | 860 | ||
859 | static inline void tcp_push_pending_frames(struct sock *sk) | ||
860 | { | ||
861 | struct tcp_sock *tp = tcp_sk(sk); | ||
862 | |||
863 | __tcp_push_pending_frames(sk, tcp_current_mss(sk), tp->nonagle); | ||
864 | } | ||
865 | |||
866 | static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq) | 861 | static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq) |
867 | { | 862 | { |
868 | tp->snd_wl1 = seq; | 863 | tp->snd_wl1 = seq; |
@@ -972,7 +967,8 @@ static inline void tcp_sack_reset(struct tcp_options_received *rx_opt) | |||
972 | /* Determine a window scaling and initial window to offer. */ | 967 | /* Determine a window scaling and initial window to offer. */ |
973 | extern void tcp_select_initial_window(int __space, __u32 mss, | 968 | extern void tcp_select_initial_window(int __space, __u32 mss, |
974 | __u32 *rcv_wnd, __u32 *window_clamp, | 969 | __u32 *rcv_wnd, __u32 *window_clamp, |
975 | int wscale_ok, __u8 *rcv_wscale); | 970 | int wscale_ok, __u8 *rcv_wscale, |
971 | __u32 init_rcv_wnd); | ||
976 | 972 | ||
977 | static inline int tcp_win_from_space(int space) | 973 | static inline int tcp_win_from_space(int space) |
978 | { | 974 | { |
@@ -1342,6 +1338,15 @@ static inline int tcp_write_queue_empty(struct sock *sk) | |||
1342 | return skb_queue_empty(&sk->sk_write_queue); | 1338 | return skb_queue_empty(&sk->sk_write_queue); |
1343 | } | 1339 | } |
1344 | 1340 | ||
1341 | static inline void tcp_push_pending_frames(struct sock *sk) | ||
1342 | { | ||
1343 | if (tcp_send_head(sk)) { | ||
1344 | struct tcp_sock *tp = tcp_sk(sk); | ||
1345 | |||
1346 | __tcp_push_pending_frames(sk, tcp_current_mss(sk), tp->nonagle); | ||
1347 | } | ||
1348 | } | ||
1349 | |||
1345 | /* Start sequence of the highest skb with SACKed bit, valid only if | 1350 | /* Start sequence of the highest skb with SACKed bit, valid only if |
1346 | * sacked > 0 or when the caller has ensured validity by itself. | 1351 | * sacked > 0 or when the caller has ensured validity by itself. |
1347 | */ | 1352 | */ |