diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/act_api.h | 2 | ||||
-rw-r--r-- | include/net/cfg80211.h | 135 | ||||
-rw-r--r-- | include/net/dn_dev.h | 8 | ||||
-rw-r--r-- | include/net/dn_nsp.h | 16 | ||||
-rw-r--r-- | include/net/dn_route.h | 4 | ||||
-rw-r--r-- | include/net/dst.h | 6 | ||||
-rw-r--r-- | include/net/genetlink.h | 15 | ||||
-rw-r--r-- | include/net/ip.h | 7 | ||||
-rw-r--r-- | include/net/ip6_fib.h | 10 | ||||
-rw-r--r-- | include/net/ip6_tunnel.h | 2 | ||||
-rw-r--r-- | include/net/ipip.h | 2 | ||||
-rw-r--r-- | include/net/ipv6.h | 4 | ||||
-rw-r--r-- | include/net/ipx.h | 8 | ||||
-rw-r--r-- | include/net/mac80211.h | 35 | ||||
-rw-r--r-- | include/net/mip6.h | 2 | ||||
-rw-r--r-- | include/net/ndisc.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 6 | ||||
-rw-r--r-- | include/net/netfilter/xt_rateest.h | 1 | ||||
-rw-r--r-- | include/net/phonet/pn_dev.h | 1 | ||||
-rw-r--r-- | include/net/pkt_sched.h | 2 | ||||
-rw-r--r-- | include/net/route.h | 6 | ||||
-rw-r--r-- | include/net/sch_generic.h | 27 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 4 | ||||
-rw-r--r-- | include/net/sock.h | 25 | ||||
-rw-r--r-- | include/net/tcp.h | 3 |
25 files changed, 191 insertions, 142 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index c05fd717c588..bab385f13ac3 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -20,6 +20,7 @@ struct tcf_common { | |||
20 | struct gnet_stats_queue tcfc_qstats; | 20 | struct gnet_stats_queue tcfc_qstats; |
21 | struct gnet_stats_rate_est tcfc_rate_est; | 21 | struct gnet_stats_rate_est tcfc_rate_est; |
22 | spinlock_t tcfc_lock; | 22 | spinlock_t tcfc_lock; |
23 | struct rcu_head tcfc_rcu; | ||
23 | }; | 24 | }; |
24 | #define tcf_next common.tcfc_next | 25 | #define tcf_next common.tcfc_next |
25 | #define tcf_index common.tcfc_index | 26 | #define tcf_index common.tcfc_index |
@@ -32,6 +33,7 @@ struct tcf_common { | |||
32 | #define tcf_qstats common.tcfc_qstats | 33 | #define tcf_qstats common.tcfc_qstats |
33 | #define tcf_rate_est common.tcfc_rate_est | 34 | #define tcf_rate_est common.tcfc_rate_est |
34 | #define tcf_lock common.tcfc_lock | 35 | #define tcf_lock common.tcfc_lock |
36 | #define tcf_rcu common.tcfc_rcu | ||
35 | 37 | ||
36 | struct tcf_police { | 38 | struct tcf_police { |
37 | struct tcf_common common; | 39 | struct tcf_common common; |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index b44a2e5321a3..a56bac1e69e0 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -37,6 +37,7 @@ | |||
37 | * | 37 | * |
38 | * @IEEE80211_BAND_2GHZ: 2.4GHz ISM band | 38 | * @IEEE80211_BAND_2GHZ: 2.4GHz ISM band |
39 | * @IEEE80211_BAND_5GHZ: around 5GHz band (4.9-5.7) | 39 | * @IEEE80211_BAND_5GHZ: around 5GHz band (4.9-5.7) |
40 | * @IEEE80211_NUM_BANDS: number of defined bands | ||
40 | */ | 41 | */ |
41 | enum ieee80211_band { | 42 | enum ieee80211_band { |
42 | IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ, | 43 | IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ, |
@@ -89,7 +90,7 @@ enum ieee80211_channel_flags { | |||
89 | * @max_power: maximum transmission power (in dBm) | 90 | * @max_power: maximum transmission power (in dBm) |
90 | * @beacon_found: helper to regulatory code to indicate when a beacon | 91 | * @beacon_found: helper to regulatory code to indicate when a beacon |
91 | * has been found on this channel. Use regulatory_hint_found_beacon() | 92 | * has been found on this channel. Use regulatory_hint_found_beacon() |
92 | * to enable this, this is is useful only on 5 GHz band. | 93 | * to enable this, this is useful only on 5 GHz band. |
93 | * @orig_mag: internal use | 94 | * @orig_mag: internal use |
94 | * @orig_mpwr: internal use | 95 | * @orig_mpwr: internal use |
95 | */ | 96 | */ |
@@ -188,6 +189,7 @@ struct ieee80211_sta_ht_cap { | |||
188 | * in this band. Must be sorted to give a valid "supported | 189 | * in this band. Must be sorted to give a valid "supported |
189 | * rates" IE, i.e. CCK rates first, then OFDM. | 190 | * rates" IE, i.e. CCK rates first, then OFDM. |
190 | * @n_bitrates: Number of bitrates in @bitrates | 191 | * @n_bitrates: Number of bitrates in @bitrates |
192 | * @ht_cap: HT capabilities in this band | ||
191 | */ | 193 | */ |
192 | struct ieee80211_supported_band { | 194 | struct ieee80211_supported_band { |
193 | struct ieee80211_channel *channels; | 195 | struct ieee80211_channel *channels; |
@@ -225,6 +227,7 @@ struct vif_params { | |||
225 | * @seq: sequence counter (IV/PN) for TKIP and CCMP keys, only used | 227 | * @seq: sequence counter (IV/PN) for TKIP and CCMP keys, only used |
226 | * with the get_key() callback, must be in little endian, | 228 | * with the get_key() callback, must be in little endian, |
227 | * length given by @seq_len. | 229 | * length given by @seq_len. |
230 | * @seq_len: length of @seq. | ||
228 | */ | 231 | */ |
229 | struct key_params { | 232 | struct key_params { |
230 | u8 *key; | 233 | u8 *key; |
@@ -237,6 +240,8 @@ struct key_params { | |||
237 | /** | 240 | /** |
238 | * enum survey_info_flags - survey information flags | 241 | * enum survey_info_flags - survey information flags |
239 | * | 242 | * |
243 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in | ||
244 | * | ||
240 | * Used by the driver to indicate which info in &struct survey_info | 245 | * Used by the driver to indicate which info in &struct survey_info |
241 | * it has filled in during the get_survey(). | 246 | * it has filled in during the get_survey(). |
242 | */ | 247 | */ |
@@ -247,13 +252,13 @@ enum survey_info_flags { | |||
247 | /** | 252 | /** |
248 | * struct survey_info - channel survey response | 253 | * struct survey_info - channel survey response |
249 | * | 254 | * |
250 | * Used by dump_survey() to report back per-channel survey information. | ||
251 | * | ||
252 | * @channel: the channel this survey record reports, mandatory | 255 | * @channel: the channel this survey record reports, mandatory |
253 | * @filled: bitflag of flags from &enum survey_info_flags | 256 | * @filled: bitflag of flags from &enum survey_info_flags |
254 | * @noise: channel noise in dBm. This and all following fields are | 257 | * @noise: channel noise in dBm. This and all following fields are |
255 | * optional | 258 | * optional |
256 | * | 259 | * |
260 | * Used by dump_survey() to report back per-channel survey information. | ||
261 | * | ||
257 | * This structure can later be expanded with things like | 262 | * This structure can later be expanded with things like |
258 | * channel duty cycle etc. | 263 | * channel duty cycle etc. |
259 | */ | 264 | */ |
@@ -288,7 +293,7 @@ struct beacon_parameters { | |||
288 | * | 293 | * |
289 | * @PLINK_ACTION_INVALID: action 0 is reserved | 294 | * @PLINK_ACTION_INVALID: action 0 is reserved |
290 | * @PLINK_ACTION_OPEN: start mesh peer link establishment | 295 | * @PLINK_ACTION_OPEN: start mesh peer link establishment |
291 | * @PLINK_ACTION_BLOCL: block traffic from this mesh peer | 296 | * @PLINK_ACTION_BLOCK: block traffic from this mesh peer |
292 | */ | 297 | */ |
293 | enum plink_actions { | 298 | enum plink_actions { |
294 | PLINK_ACTION_INVALID, | 299 | PLINK_ACTION_INVALID, |
@@ -311,6 +316,8 @@ enum plink_actions { | |||
311 | * (bitmask of BIT(NL80211_STA_FLAG_...)) | 316 | * (bitmask of BIT(NL80211_STA_FLAG_...)) |
312 | * @listen_interval: listen interval or -1 for no change | 317 | * @listen_interval: listen interval or -1 for no change |
313 | * @aid: AID or zero for no change | 318 | * @aid: AID or zero for no change |
319 | * @plink_action: plink action to take | ||
320 | * @ht_capa: HT capabilities of station | ||
314 | */ | 321 | */ |
315 | struct station_parameters { | 322 | struct station_parameters { |
316 | u8 *supported_rates; | 323 | u8 *supported_rates; |
@@ -448,13 +455,13 @@ enum monitor_flags { | |||
448 | * Used by the driver to indicate which info in &struct mpath_info it has filled | 455 | * Used by the driver to indicate which info in &struct mpath_info it has filled |
449 | * in during get_station() or dump_station(). | 456 | * in during get_station() or dump_station(). |
450 | * | 457 | * |
451 | * MPATH_INFO_FRAME_QLEN: @frame_qlen filled | 458 | * @MPATH_INFO_FRAME_QLEN: @frame_qlen filled |
452 | * MPATH_INFO_SN: @sn filled | 459 | * @MPATH_INFO_SN: @sn filled |
453 | * MPATH_INFO_METRIC: @metric filled | 460 | * @MPATH_INFO_METRIC: @metric filled |
454 | * MPATH_INFO_EXPTIME: @exptime filled | 461 | * @MPATH_INFO_EXPTIME: @exptime filled |
455 | * MPATH_INFO_DISCOVERY_TIMEOUT: @discovery_timeout filled | 462 | * @MPATH_INFO_DISCOVERY_TIMEOUT: @discovery_timeout filled |
456 | * MPATH_INFO_DISCOVERY_RETRIES: @discovery_retries filled | 463 | * @MPATH_INFO_DISCOVERY_RETRIES: @discovery_retries filled |
457 | * MPATH_INFO_FLAGS: @flags filled | 464 | * @MPATH_INFO_FLAGS: @flags filled |
458 | */ | 465 | */ |
459 | enum mpath_info_flags { | 466 | enum mpath_info_flags { |
460 | MPATH_INFO_FRAME_QLEN = BIT(0), | 467 | MPATH_INFO_FRAME_QLEN = BIT(0), |
@@ -587,6 +594,7 @@ struct cfg80211_ssid { | |||
587 | * @ie_len: length of ie in octets | 594 | * @ie_len: length of ie in octets |
588 | * @wiphy: the wiphy this was for | 595 | * @wiphy: the wiphy this was for |
589 | * @dev: the interface | 596 | * @dev: the interface |
597 | * @aborted: (internal) scan request was notified as aborted | ||
590 | */ | 598 | */ |
591 | struct cfg80211_scan_request { | 599 | struct cfg80211_scan_request { |
592 | struct cfg80211_ssid *ssids; | 600 | struct cfg80211_ssid *ssids; |
@@ -623,6 +631,7 @@ enum cfg80211_signal_type { | |||
623 | * This structure describes a BSS (which may also be a mesh network) | 631 | * This structure describes a BSS (which may also be a mesh network) |
624 | * for use in scan results and similar. | 632 | * for use in scan results and similar. |
625 | * | 633 | * |
634 | * @channel: channel this BSS is on | ||
626 | * @bssid: BSSID of the BSS | 635 | * @bssid: BSSID of the BSS |
627 | * @tsf: timestamp of last received update | 636 | * @tsf: timestamp of last received update |
628 | * @beacon_interval: the beacon interval as from the frame | 637 | * @beacon_interval: the beacon interval as from the frame |
@@ -826,8 +835,8 @@ struct cfg80211_ibss_params { | |||
826 | * @ssid: SSID | 835 | * @ssid: SSID |
827 | * @ssid_len: Length of ssid in octets | 836 | * @ssid_len: Length of ssid in octets |
828 | * @auth_type: Authentication type (algorithm) | 837 | * @auth_type: Authentication type (algorithm) |
829 | * @assoc_ie: IEs for association request | 838 | * @ie: IEs for association request |
830 | * @assoc_ie_len: Length of assoc_ie in octets | 839 | * @ie_len: Length of assoc_ie in octets |
831 | * @privacy: indicates whether privacy-enabled APs should be used | 840 | * @privacy: indicates whether privacy-enabled APs should be used |
832 | * @crypto: crypto settings | 841 | * @crypto: crypto settings |
833 | * @key_len: length of WEP key for shared key authentication | 842 | * @key_len: length of WEP key for shared key authentication |
@@ -850,10 +859,11 @@ struct cfg80211_connect_params { | |||
850 | 859 | ||
851 | /** | 860 | /** |
852 | * enum wiphy_params_flags - set_wiphy_params bitfield values | 861 | * enum wiphy_params_flags - set_wiphy_params bitfield values |
853 | * WIPHY_PARAM_RETRY_SHORT: wiphy->retry_short has changed | 862 | * @WIPHY_PARAM_RETRY_SHORT: wiphy->retry_short has changed |
854 | * WIPHY_PARAM_RETRY_LONG: wiphy->retry_long has changed | 863 | * @WIPHY_PARAM_RETRY_LONG: wiphy->retry_long has changed |
855 | * WIPHY_PARAM_FRAG_THRESHOLD: wiphy->frag_threshold has changed | 864 | * @WIPHY_PARAM_FRAG_THRESHOLD: wiphy->frag_threshold has changed |
856 | * WIPHY_PARAM_RTS_THRESHOLD: wiphy->rts_threshold has changed | 865 | * @WIPHY_PARAM_RTS_THRESHOLD: wiphy->rts_threshold has changed |
866 | * @WIPHY_PARAM_COVERAGE_CLASS: coverage class changed | ||
857 | */ | 867 | */ |
858 | enum wiphy_params_flags { | 868 | enum wiphy_params_flags { |
859 | WIPHY_PARAM_RETRY_SHORT = 1 << 0, | 869 | WIPHY_PARAM_RETRY_SHORT = 1 << 0, |
@@ -949,10 +959,16 @@ struct cfg80211_pmksa { | |||
949 | * @del_beacon: Remove beacon configuration and stop sending the beacon. | 959 | * @del_beacon: Remove beacon configuration and stop sending the beacon. |
950 | * | 960 | * |
951 | * @add_station: Add a new station. | 961 | * @add_station: Add a new station. |
952 | * | ||
953 | * @del_station: Remove a station; @mac may be NULL to remove all stations. | 962 | * @del_station: Remove a station; @mac may be NULL to remove all stations. |
954 | * | ||
955 | * @change_station: Modify a given station. | 963 | * @change_station: Modify a given station. |
964 | * @get_station: get station information for the station identified by @mac | ||
965 | * @dump_station: dump station callback -- resume dump at index @idx | ||
966 | * | ||
967 | * @add_mpath: add a fixed mesh path | ||
968 | * @del_mpath: delete a given mesh path | ||
969 | * @change_mpath: change a given mesh path | ||
970 | * @get_mpath: get a mesh path for the given parameters | ||
971 | * @dump_mpath: dump mesh path callback -- resume dump at index @idx | ||
956 | * | 972 | * |
957 | * @get_mesh_params: Put the current mesh parameters into *params | 973 | * @get_mesh_params: Put the current mesh parameters into *params |
958 | * | 974 | * |
@@ -960,8 +976,6 @@ struct cfg80211_pmksa { | |||
960 | * The mask is a bitfield which tells us which parameters to | 976 | * The mask is a bitfield which tells us which parameters to |
961 | * set, and which to leave alone. | 977 | * set, and which to leave alone. |
962 | * | 978 | * |
963 | * @set_mesh_cfg: set mesh parameters (by now, just mesh id) | ||
964 | * | ||
965 | * @change_bss: Modify parameters for a given BSS. | 979 | * @change_bss: Modify parameters for a given BSS. |
966 | * | 980 | * |
967 | * @set_txq_params: Set TX queue parameters | 981 | * @set_txq_params: Set TX queue parameters |
@@ -1002,6 +1016,8 @@ struct cfg80211_pmksa { | |||
1002 | * @get_tx_power: store the current TX power into the dbm variable; | 1016 | * @get_tx_power: store the current TX power into the dbm variable; |
1003 | * return 0 if successful | 1017 | * return 0 if successful |
1004 | * | 1018 | * |
1019 | * @set_wds_peer: set the WDS peer for a WDS interface | ||
1020 | * | ||
1005 | * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting | 1021 | * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting |
1006 | * functions to adjust rfkill hw state | 1022 | * functions to adjust rfkill hw state |
1007 | * | 1023 | * |
@@ -1019,6 +1035,8 @@ struct cfg80211_pmksa { | |||
1019 | * | 1035 | * |
1020 | * @testmode_cmd: run a test mode command | 1036 | * @testmode_cmd: run a test mode command |
1021 | * | 1037 | * |
1038 | * @set_bitrate_mask: set the bitrate mask configuration | ||
1039 | * | ||
1022 | * @set_pmksa: Cache a PMKID for a BSSID. This is mostly useful for fullmac | 1040 | * @set_pmksa: Cache a PMKID for a BSSID. This is mostly useful for fullmac |
1023 | * devices running firmwares capable of generating the (re) association | 1041 | * devices running firmwares capable of generating the (re) association |
1024 | * RSN IE. It allows for faster roaming between WPA2 BSSIDs. | 1042 | * RSN IE. It allows for faster roaming between WPA2 BSSIDs. |
@@ -1168,6 +1186,7 @@ struct cfg80211_ops { | |||
1168 | int (*action)(struct wiphy *wiphy, struct net_device *dev, | 1186 | int (*action)(struct wiphy *wiphy, struct net_device *dev, |
1169 | struct ieee80211_channel *chan, | 1187 | struct ieee80211_channel *chan, |
1170 | enum nl80211_channel_type channel_type, | 1188 | enum nl80211_channel_type channel_type, |
1189 | bool channel_type_valid, | ||
1171 | const u8 *buf, size_t len, u64 *cookie); | 1190 | const u8 *buf, size_t len, u64 *cookie); |
1172 | 1191 | ||
1173 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, | 1192 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, |
@@ -1230,8 +1249,6 @@ struct mac_address { | |||
1230 | 1249 | ||
1231 | /** | 1250 | /** |
1232 | * struct wiphy - wireless hardware description | 1251 | * struct wiphy - wireless hardware description |
1233 | * @idx: the wiphy index assigned to this item | ||
1234 | * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name> | ||
1235 | * @reg_notifier: the driver's regulatory notification callback | 1252 | * @reg_notifier: the driver's regulatory notification callback |
1236 | * @regd: the driver's regulatory domain, if one was requested via | 1253 | * @regd: the driver's regulatory domain, if one was requested via |
1237 | * the regulatory_hint() API. This can be used by the driver | 1254 | * the regulatory_hint() API. This can be used by the driver |
@@ -1245,7 +1262,7 @@ struct mac_address { | |||
1245 | * @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold); | 1262 | * @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold); |
1246 | * -1 = fragmentation disabled, only odd values >= 256 used | 1263 | * -1 = fragmentation disabled, only odd values >= 256 used |
1247 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled | 1264 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled |
1248 | * @net: the network namespace this wiphy currently lives in | 1265 | * @_net: the network namespace this wiphy currently lives in |
1249 | * @perm_addr: permanent MAC address of this device | 1266 | * @perm_addr: permanent MAC address of this device |
1250 | * @addr_mask: If the device supports multiple MAC addresses by masking, | 1267 | * @addr_mask: If the device supports multiple MAC addresses by masking, |
1251 | * set this to a mask with variable bits set to 1, e.g. if the last | 1268 | * set this to a mask with variable bits set to 1, e.g. if the last |
@@ -1258,6 +1275,28 @@ struct mac_address { | |||
1258 | * by default for perm_addr. In this case, the mask should be set to | 1275 | * by default for perm_addr. In this case, the mask should be set to |
1259 | * all-zeroes. In this case it is assumed that the device can handle | 1276 | * all-zeroes. In this case it is assumed that the device can handle |
1260 | * the same number of arbitrary MAC addresses. | 1277 | * the same number of arbitrary MAC addresses. |
1278 | * @debugfsdir: debugfs directory used for this wiphy, will be renamed | ||
1279 | * automatically on wiphy renames | ||
1280 | * @dev: (virtual) struct device for this wiphy | ||
1281 | * @wext: wireless extension handlers | ||
1282 | * @priv: driver private data (sized according to wiphy_new() parameter) | ||
1283 | * @interface_modes: bitmask of interfaces types valid for this wiphy, | ||
1284 | * must be set by driver | ||
1285 | * @flags: wiphy flags, see &enum wiphy_flags | ||
1286 | * @bss_priv_size: each BSS struct has private data allocated with it, | ||
1287 | * this variable determines its size | ||
1288 | * @max_scan_ssids: maximum number of SSIDs the device can scan for in | ||
1289 | * any given scan | ||
1290 | * @max_scan_ie_len: maximum length of user-controlled IEs device can | ||
1291 | * add to probe request frames transmitted during a scan, must not | ||
1292 | * include fixed IEs like supported rates | ||
1293 | * @coverage_class: current coverage class | ||
1294 | * @fw_version: firmware version for ethtool reporting | ||
1295 | * @hw_version: hardware version for ethtool reporting | ||
1296 | * @max_num_pmkids: maximum number of PMKIDs supported by device | ||
1297 | * @privid: a pointer that drivers can use to identify if an arbitrary | ||
1298 | * wiphy is theirs, e.g. in global notifiers | ||
1299 | * @bands: information about bands/channels supported by this device | ||
1261 | */ | 1300 | */ |
1262 | struct wiphy { | 1301 | struct wiphy { |
1263 | /* assign these fields before you register the wiphy */ | 1302 | /* assign these fields before you register the wiphy */ |
@@ -1330,27 +1369,16 @@ struct wiphy { | |||
1330 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); | 1369 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); |
1331 | }; | 1370 | }; |
1332 | 1371 | ||
1333 | #ifdef CONFIG_NET_NS | ||
1334 | static inline struct net *wiphy_net(struct wiphy *wiphy) | 1372 | static inline struct net *wiphy_net(struct wiphy *wiphy) |
1335 | { | 1373 | { |
1336 | return wiphy->_net; | 1374 | return read_pnet(&wiphy->_net); |
1337 | } | 1375 | } |
1338 | 1376 | ||
1339 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | 1377 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) |
1340 | { | 1378 | { |
1341 | wiphy->_net = net; | 1379 | write_pnet(&wiphy->_net, net); |
1342 | } | ||
1343 | #else | ||
1344 | static inline struct net *wiphy_net(struct wiphy *wiphy) | ||
1345 | { | ||
1346 | return &init_net; | ||
1347 | } | 1380 | } |
1348 | 1381 | ||
1349 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | ||
1350 | { | ||
1351 | } | ||
1352 | #endif | ||
1353 | |||
1354 | /** | 1382 | /** |
1355 | * wiphy_priv - return priv from wiphy | 1383 | * wiphy_priv - return priv from wiphy |
1356 | * | 1384 | * |
@@ -1471,13 +1499,14 @@ struct cfg80211_cached_keys; | |||
1471 | * @ssid: (private) Used by the internal configuration code | 1499 | * @ssid: (private) Used by the internal configuration code |
1472 | * @ssid_len: (private) Used by the internal configuration code | 1500 | * @ssid_len: (private) Used by the internal configuration code |
1473 | * @wext: (private) Used by the internal wireless extensions compat code | 1501 | * @wext: (private) Used by the internal wireless extensions compat code |
1474 | * @wext_bssid: (private) Used by the internal wireless extensions compat code | ||
1475 | * @use_4addr: indicates 4addr mode is used on this interface, must be | 1502 | * @use_4addr: indicates 4addr mode is used on this interface, must be |
1476 | * set by driver (if supported) on add_interface BEFORE registering the | 1503 | * set by driver (if supported) on add_interface BEFORE registering the |
1477 | * netdev and may otherwise be used by driver read-only, will be update | 1504 | * netdev and may otherwise be used by driver read-only, will be update |
1478 | * by cfg80211 on change_interface | 1505 | * by cfg80211 on change_interface |
1479 | * @action_registrations: list of registrations for action frames | 1506 | * @action_registrations: list of registrations for action frames |
1480 | * @action_registrations_lock: lock for the list | 1507 | * @action_registrations_lock: lock for the list |
1508 | * @mtx: mutex used to lock data in this struct | ||
1509 | * @cleanup_work: work struct used for cleanup that can't be done directly | ||
1481 | */ | 1510 | */ |
1482 | struct wireless_dev { | 1511 | struct wireless_dev { |
1483 | struct wiphy *wiphy; | 1512 | struct wiphy *wiphy; |
@@ -1551,11 +1580,13 @@ static inline void *wdev_priv(struct wireless_dev *wdev) | |||
1551 | 1580 | ||
1552 | /** | 1581 | /** |
1553 | * ieee80211_channel_to_frequency - convert channel number to frequency | 1582 | * ieee80211_channel_to_frequency - convert channel number to frequency |
1583 | * @chan: channel number | ||
1554 | */ | 1584 | */ |
1555 | extern int ieee80211_channel_to_frequency(int chan); | 1585 | extern int ieee80211_channel_to_frequency(int chan); |
1556 | 1586 | ||
1557 | /** | 1587 | /** |
1558 | * ieee80211_frequency_to_channel - convert frequency to channel number | 1588 | * ieee80211_frequency_to_channel - convert frequency to channel number |
1589 | * @freq: center frequency | ||
1559 | */ | 1590 | */ |
1560 | extern int ieee80211_frequency_to_channel(int freq); | 1591 | extern int ieee80211_frequency_to_channel(int freq); |
1561 | 1592 | ||
@@ -1570,6 +1601,8 @@ extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, | |||
1570 | int freq); | 1601 | int freq); |
1571 | /** | 1602 | /** |
1572 | * ieee80211_get_channel - get channel struct from wiphy for specified frequency | 1603 | * ieee80211_get_channel - get channel struct from wiphy for specified frequency |
1604 | * @wiphy: the struct wiphy to get the channel for | ||
1605 | * @freq: the center frequency of the channel | ||
1573 | */ | 1606 | */ |
1574 | static inline struct ieee80211_channel * | 1607 | static inline struct ieee80211_channel * |
1575 | ieee80211_get_channel(struct wiphy *wiphy, int freq) | 1608 | ieee80211_get_channel(struct wiphy *wiphy, int freq) |
@@ -1630,9 +1663,6 @@ struct ieee80211_radiotap_vendor_namespaces { | |||
1630 | * @is_radiotap_ns: indicates whether the current namespace is the default | 1663 | * @is_radiotap_ns: indicates whether the current namespace is the default |
1631 | * radiotap namespace or not | 1664 | * radiotap namespace or not |
1632 | * | 1665 | * |
1633 | * @overrides: override standard radiotap fields | ||
1634 | * @n_overrides: number of overrides | ||
1635 | * | ||
1636 | * @_rtheader: pointer to the radiotap header we are walking through | 1666 | * @_rtheader: pointer to the radiotap header we are walking through |
1637 | * @_max_length: length of radiotap header in cpu byte ordering | 1667 | * @_max_length: length of radiotap header in cpu byte ordering |
1638 | * @_arg_index: next argument index | 1668 | * @_arg_index: next argument index |
@@ -1948,10 +1978,12 @@ int cfg80211_wext_giwap(struct net_device *dev, | |||
1948 | void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted); | 1978 | void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted); |
1949 | 1979 | ||
1950 | /** | 1980 | /** |
1951 | * cfg80211_inform_bss - inform cfg80211 of a new BSS | 1981 | * cfg80211_inform_bss_frame - inform cfg80211 of a received BSS frame |
1952 | * | 1982 | * |
1953 | * @wiphy: the wiphy reporting the BSS | 1983 | * @wiphy: the wiphy reporting the BSS |
1954 | * @bss: the found BSS | 1984 | * @channel: The channel the frame was received on |
1985 | * @mgmt: the management frame (probe response or beacon) | ||
1986 | * @len: length of the management frame | ||
1955 | * @signal: the signal strength, type depends on the wiphy's signal_type | 1987 | * @signal: the signal strength, type depends on the wiphy's signal_type |
1956 | * @gfp: context flags | 1988 | * @gfp: context flags |
1957 | * | 1989 | * |
@@ -1964,6 +1996,23 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, | |||
1964 | struct ieee80211_mgmt *mgmt, size_t len, | 1996 | struct ieee80211_mgmt *mgmt, size_t len, |
1965 | s32 signal, gfp_t gfp); | 1997 | s32 signal, gfp_t gfp); |
1966 | 1998 | ||
1999 | /** | ||
2000 | * cfg80211_inform_bss - inform cfg80211 of a new BSS | ||
2001 | * | ||
2002 | * @wiphy: the wiphy reporting the BSS | ||
2003 | * @channel: The channel the frame was received on | ||
2004 | * @bssid: the BSSID of the BSS | ||
2005 | * @timestamp: the TSF timestamp sent by the peer | ||
2006 | * @capability: the capability field sent by the peer | ||
2007 | * @beacon_interval: the beacon interval announced by the peer | ||
2008 | * @ie: additional IEs sent by the peer | ||
2009 | * @ielen: length of the additional IEs | ||
2010 | * @signal: the signal strength, type depends on the wiphy's signal_type | ||
2011 | * @gfp: context flags | ||
2012 | * | ||
2013 | * This informs cfg80211 that BSS information was found and | ||
2014 | * the BSS should be updated/added. | ||
2015 | */ | ||
1967 | struct cfg80211_bss* | 2016 | struct cfg80211_bss* |
1968 | cfg80211_inform_bss(struct wiphy *wiphy, | 2017 | cfg80211_inform_bss(struct wiphy *wiphy, |
1969 | struct ieee80211_channel *channel, | 2018 | struct ieee80211_channel *channel, |
diff --git a/include/net/dn_dev.h b/include/net/dn_dev.h index 511a459ec10f..0916bbf3bdff 100644 --- a/include/net/dn_dev.h +++ b/include/net/dn_dev.h | |||
@@ -101,7 +101,7 @@ struct dn_short_packet { | |||
101 | __le16 dstnode; | 101 | __le16 dstnode; |
102 | __le16 srcnode; | 102 | __le16 srcnode; |
103 | __u8 forward; | 103 | __u8 forward; |
104 | } __attribute__((packed)); | 104 | } __packed; |
105 | 105 | ||
106 | struct dn_long_packet { | 106 | struct dn_long_packet { |
107 | __u8 msgflg; | 107 | __u8 msgflg; |
@@ -115,7 +115,7 @@ struct dn_long_packet { | |||
115 | __u8 visit_ct; | 115 | __u8 visit_ct; |
116 | __u8 s_class; | 116 | __u8 s_class; |
117 | __u8 pt; | 117 | __u8 pt; |
118 | } __attribute__((packed)); | 118 | } __packed; |
119 | 119 | ||
120 | /*------------------------- DRP - Routing messages ---------------------*/ | 120 | /*------------------------- DRP - Routing messages ---------------------*/ |
121 | 121 | ||
@@ -132,7 +132,7 @@ struct endnode_hello_message { | |||
132 | __u8 mpd; | 132 | __u8 mpd; |
133 | __u8 datalen; | 133 | __u8 datalen; |
134 | __u8 data[2]; | 134 | __u8 data[2]; |
135 | } __attribute__((packed)); | 135 | } __packed; |
136 | 136 | ||
137 | struct rtnode_hello_message { | 137 | struct rtnode_hello_message { |
138 | __u8 msgflg; | 138 | __u8 msgflg; |
@@ -144,7 +144,7 @@ struct rtnode_hello_message { | |||
144 | __u8 area; | 144 | __u8 area; |
145 | __le16 timer; | 145 | __le16 timer; |
146 | __u8 mpd; | 146 | __u8 mpd; |
147 | } __attribute__((packed)); | 147 | } __packed; |
148 | 148 | ||
149 | 149 | ||
150 | extern void dn_dev_init(void); | 150 | extern void dn_dev_init(void); |
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h index 17d43d2db5ec..e43a2893f132 100644 --- a/include/net/dn_nsp.h +++ b/include/net/dn_nsp.h | |||
@@ -74,18 +74,18 @@ struct nsp_data_seg_msg { | |||
74 | __u8 msgflg; | 74 | __u8 msgflg; |
75 | __le16 dstaddr; | 75 | __le16 dstaddr; |
76 | __le16 srcaddr; | 76 | __le16 srcaddr; |
77 | } __attribute__((packed)); | 77 | } __packed; |
78 | 78 | ||
79 | struct nsp_data_opt_msg { | 79 | struct nsp_data_opt_msg { |
80 | __le16 acknum; | 80 | __le16 acknum; |
81 | __le16 segnum; | 81 | __le16 segnum; |
82 | __le16 lsflgs; | 82 | __le16 lsflgs; |
83 | } __attribute__((packed)); | 83 | } __packed; |
84 | 84 | ||
85 | struct nsp_data_opt_msg1 { | 85 | struct nsp_data_opt_msg1 { |
86 | __le16 acknum; | 86 | __le16 acknum; |
87 | __le16 segnum; | 87 | __le16 segnum; |
88 | } __attribute__((packed)); | 88 | } __packed; |
89 | 89 | ||
90 | 90 | ||
91 | /* Acknowledgment Message (data/other data) */ | 91 | /* Acknowledgment Message (data/other data) */ |
@@ -94,13 +94,13 @@ struct nsp_data_ack_msg { | |||
94 | __le16 dstaddr; | 94 | __le16 dstaddr; |
95 | __le16 srcaddr; | 95 | __le16 srcaddr; |
96 | __le16 acknum; | 96 | __le16 acknum; |
97 | } __attribute__((packed)); | 97 | } __packed; |
98 | 98 | ||
99 | /* Connect Acknowledgment Message */ | 99 | /* Connect Acknowledgment Message */ |
100 | struct nsp_conn_ack_msg { | 100 | struct nsp_conn_ack_msg { |
101 | __u8 msgflg; | 101 | __u8 msgflg; |
102 | __le16 dstaddr; | 102 | __le16 dstaddr; |
103 | } __attribute__((packed)); | 103 | } __packed; |
104 | 104 | ||
105 | 105 | ||
106 | /* Connect Initiate/Retransmit Initiate/Connect Confirm */ | 106 | /* Connect Initiate/Retransmit Initiate/Connect Confirm */ |
@@ -117,7 +117,7 @@ struct nsp_conn_init_msg { | |||
117 | #define NSP_FC_MASK 0x0c /* FC type mask */ | 117 | #define NSP_FC_MASK 0x0c /* FC type mask */ |
118 | __u8 info; | 118 | __u8 info; |
119 | __le16 segsize; | 119 | __le16 segsize; |
120 | } __attribute__((packed)); | 120 | } __packed; |
121 | 121 | ||
122 | /* Disconnect Initiate/Disconnect Confirm */ | 122 | /* Disconnect Initiate/Disconnect Confirm */ |
123 | struct nsp_disconn_init_msg { | 123 | struct nsp_disconn_init_msg { |
@@ -125,7 +125,7 @@ struct nsp_disconn_init_msg { | |||
125 | __le16 dstaddr; | 125 | __le16 dstaddr; |
126 | __le16 srcaddr; | 126 | __le16 srcaddr; |
127 | __le16 reason; | 127 | __le16 reason; |
128 | } __attribute__((packed)); | 128 | } __packed; |
129 | 129 | ||
130 | 130 | ||
131 | 131 | ||
@@ -135,7 +135,7 @@ struct srcobj_fmt { | |||
135 | __le16 grpcode; | 135 | __le16 grpcode; |
136 | __le16 usrcode; | 136 | __le16 usrcode; |
137 | __u8 dlen; | 137 | __u8 dlen; |
138 | } __attribute__((packed)); | 138 | } __packed; |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * A collection of functions for manipulating the sequence | 141 | * A collection of functions for manipulating the sequence |
diff --git a/include/net/dn_route.h b/include/net/dn_route.h index 60c9f22d8694..ccadab3aa3f6 100644 --- a/include/net/dn_route.h +++ b/include/net/dn_route.h | |||
@@ -65,9 +65,7 @@ extern void dn_rt_cache_flush(int delay); | |||
65 | * packets to the originating host. | 65 | * packets to the originating host. |
66 | */ | 66 | */ |
67 | struct dn_route { | 67 | struct dn_route { |
68 | union { | 68 | struct dst_entry dst; |
69 | struct dst_entry dst; | ||
70 | } u; | ||
71 | 69 | ||
72 | struct flowi fl; | 70 | struct flowi fl; |
73 | 71 | ||
diff --git a/include/net/dst.h b/include/net/dst.h index 612069beda73..81d1413a8701 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -250,11 +250,11 @@ static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev) | |||
250 | * Linux networking. Thus, destinations are stackable. | 250 | * Linux networking. Thus, destinations are stackable. |
251 | */ | 251 | */ |
252 | 252 | ||
253 | static inline struct dst_entry *dst_pop(struct dst_entry *dst) | 253 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) |
254 | { | 254 | { |
255 | struct dst_entry *child = dst_clone(dst->child); | 255 | struct dst_entry *child = skb_dst(skb)->child; |
256 | 256 | ||
257 | dst_release(dst); | 257 | skb_dst_drop(skb); |
258 | return child; | 258 | return child; |
259 | } | 259 | } |
260 | 260 | ||
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index eb551baafc04..f7dcd2c70412 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -68,26 +68,15 @@ struct genl_info { | |||
68 | #endif | 68 | #endif |
69 | }; | 69 | }; |
70 | 70 | ||
71 | #ifdef CONFIG_NET_NS | ||
72 | static inline struct net *genl_info_net(struct genl_info *info) | 71 | static inline struct net *genl_info_net(struct genl_info *info) |
73 | { | 72 | { |
74 | return info->_net; | 73 | return read_pnet(&info->_net); |
75 | } | 74 | } |
76 | 75 | ||
77 | static inline void genl_info_net_set(struct genl_info *info, struct net *net) | 76 | static inline void genl_info_net_set(struct genl_info *info, struct net *net) |
78 | { | 77 | { |
79 | info->_net = net; | 78 | write_pnet(&info->_net, net); |
80 | } | 79 | } |
81 | #else | ||
82 | static inline struct net *genl_info_net(struct genl_info *info) | ||
83 | { | ||
84 | return &init_net; | ||
85 | } | ||
86 | |||
87 | static inline void genl_info_net_set(struct genl_info *info, struct net *net) | ||
88 | { | ||
89 | } | ||
90 | #endif | ||
91 | 80 | ||
92 | /** | 81 | /** |
93 | * struct genl_ops - generic netlink operations | 82 | * struct genl_ops - generic netlink operations |
diff --git a/include/net/ip.h b/include/net/ip.h index 452f229c380a..d52f01180361 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -61,11 +61,14 @@ struct ipcm_cookie { | |||
61 | struct ip_ra_chain { | 61 | struct ip_ra_chain { |
62 | struct ip_ra_chain *next; | 62 | struct ip_ra_chain *next; |
63 | struct sock *sk; | 63 | struct sock *sk; |
64 | void (*destructor)(struct sock *); | 64 | union { |
65 | void (*destructor)(struct sock *); | ||
66 | struct sock *saved_sk; | ||
67 | }; | ||
68 | struct rcu_head rcu; | ||
65 | }; | 69 | }; |
66 | 70 | ||
67 | extern struct ip_ra_chain *ip_ra_chain; | 71 | extern struct ip_ra_chain *ip_ra_chain; |
68 | extern rwlock_t ip_ra_lock; | ||
69 | 72 | ||
70 | /* IP flags. */ | 73 | /* IP flags. */ |
71 | #define IP_CE 0x8000 /* Flag: "Congestion" */ | 74 | #define IP_CE 0x8000 /* Flag: "Congestion" */ |
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 4b1dc1161c37..062a823d311c 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
@@ -84,13 +84,11 @@ struct rt6key { | |||
84 | struct fib6_table; | 84 | struct fib6_table; |
85 | 85 | ||
86 | struct rt6_info { | 86 | struct rt6_info { |
87 | union { | 87 | struct dst_entry dst; |
88 | struct dst_entry dst; | ||
89 | } u; | ||
90 | 88 | ||
91 | #define rt6i_dev u.dst.dev | 89 | #define rt6i_dev dst.dev |
92 | #define rt6i_nexthop u.dst.neighbour | 90 | #define rt6i_nexthop dst.neighbour |
93 | #define rt6i_expires u.dst.expires | 91 | #define rt6i_expires dst.expires |
94 | 92 | ||
95 | /* | 93 | /* |
96 | * Tail elements of dst_entry (__refcnt etc.) | 94 | * Tail elements of dst_entry (__refcnt etc.) |
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h index fbf9d1cda27b..fc94ec568a50 100644 --- a/include/net/ip6_tunnel.h +++ b/include/net/ip6_tunnel.h | |||
@@ -27,6 +27,6 @@ struct ipv6_tlv_tnl_enc_lim { | |||
27 | __u8 type; /* type-code for option */ | 27 | __u8 type; /* type-code for option */ |
28 | __u8 length; /* option length */ | 28 | __u8 length; /* option length */ |
29 | __u8 encap_limit; /* tunnel encapsulation limit */ | 29 | __u8 encap_limit; /* tunnel encapsulation limit */ |
30 | } __attribute__ ((packed)); | 30 | } __packed; |
31 | 31 | ||
32 | #endif | 32 | #endif |
diff --git a/include/net/ipip.h b/include/net/ipip.h index 11e8513d2d07..65caea8b414f 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h | |||
@@ -50,7 +50,7 @@ struct ip_tunnel_prl_entry { | |||
50 | int pkt_len = skb->len - skb_transport_offset(skb); \ | 50 | int pkt_len = skb->len - skb_transport_offset(skb); \ |
51 | \ | 51 | \ |
52 | skb->ip_summed = CHECKSUM_NONE; \ | 52 | skb->ip_summed = CHECKSUM_NONE; \ |
53 | ip_select_ident(iph, &rt->u.dst, NULL); \ | 53 | ip_select_ident(iph, &rt->dst, NULL); \ |
54 | \ | 54 | \ |
55 | err = ip_local_out(skb); \ | 55 | err = ip_local_out(skb); \ |
56 | if (likely(net_xmit_eval(err) == 0)) { \ | 56 | if (likely(net_xmit_eval(err) == 0)) { \ |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 2600b69757b8..f5808d596aab 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -551,6 +551,10 @@ extern int ipv6_ext_hdr(u8 nexthdr); | |||
551 | 551 | ||
552 | extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); | 552 | extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); |
553 | 553 | ||
554 | extern struct in6_addr *fl6_update_dst(struct flowi *fl, | ||
555 | const struct ipv6_txoptions *opt, | ||
556 | struct in6_addr *orig); | ||
557 | |||
554 | /* | 558 | /* |
555 | * socket options (ipv6_sockglue.c) | 559 | * socket options (ipv6_sockglue.c) |
556 | */ | 560 | */ |
diff --git a/include/net/ipx.h b/include/net/ipx.h index ef51a668ba19..05d7e4a88b49 100644 --- a/include/net/ipx.h +++ b/include/net/ipx.h | |||
@@ -27,9 +27,9 @@ struct ipx_address { | |||
27 | #define IPX_MAX_PPROP_HOPS 8 | 27 | #define IPX_MAX_PPROP_HOPS 8 |
28 | 28 | ||
29 | struct ipxhdr { | 29 | struct ipxhdr { |
30 | __be16 ipx_checksum __attribute__ ((packed)); | 30 | __be16 ipx_checksum __packed; |
31 | #define IPX_NO_CHECKSUM cpu_to_be16(0xFFFF) | 31 | #define IPX_NO_CHECKSUM cpu_to_be16(0xFFFF) |
32 | __be16 ipx_pktsize __attribute__ ((packed)); | 32 | __be16 ipx_pktsize __packed; |
33 | __u8 ipx_tctrl; | 33 | __u8 ipx_tctrl; |
34 | __u8 ipx_type; | 34 | __u8 ipx_type; |
35 | #define IPX_TYPE_UNKNOWN 0x00 | 35 | #define IPX_TYPE_UNKNOWN 0x00 |
@@ -38,8 +38,8 @@ struct ipxhdr { | |||
38 | #define IPX_TYPE_SPX 0x05 /* SPX protocol */ | 38 | #define IPX_TYPE_SPX 0x05 /* SPX protocol */ |
39 | #define IPX_TYPE_NCP 0x11 /* $lots for docs on this (SPIT) */ | 39 | #define IPX_TYPE_NCP 0x11 /* $lots for docs on this (SPIT) */ |
40 | #define IPX_TYPE_PPROP 0x14 /* complicated flood fill brdcast */ | 40 | #define IPX_TYPE_PPROP 0x14 /* complicated flood fill brdcast */ |
41 | struct ipx_address ipx_dest __attribute__ ((packed)); | 41 | struct ipx_address ipx_dest __packed; |
42 | struct ipx_address ipx_source __attribute__ ((packed)); | 42 | struct ipx_address ipx_source __packed; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | static __inline__ struct ipxhdr *ipx_hdr(struct sk_buff *skb) | 45 | static __inline__ struct ipxhdr *ipx_hdr(struct sk_buff *skb) |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index de22cbfef232..abb3b1a9ddc9 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/wireless.h> | 19 | #include <linux/wireless.h> |
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/ieee80211.h> | 21 | #include <linux/ieee80211.h> |
22 | #include <linux/inetdevice.h> | ||
22 | #include <net/cfg80211.h> | 23 | #include <net/cfg80211.h> |
23 | 24 | ||
24 | /** | 25 | /** |
@@ -312,9 +313,10 @@ enum mac80211_tx_control_flags { | |||
312 | IEEE80211_TX_INTFL_NL80211_FRAME_TX = BIT(21), | 313 | IEEE80211_TX_INTFL_NL80211_FRAME_TX = BIT(21), |
313 | IEEE80211_TX_CTL_LDPC = BIT(22), | 314 | IEEE80211_TX_CTL_LDPC = BIT(22), |
314 | IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24), | 315 | IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24), |
315 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 | ||
316 | }; | 316 | }; |
317 | 317 | ||
318 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 | ||
319 | |||
318 | /** | 320 | /** |
319 | * enum mac80211_rate_control_flags - per-rate flags set by the | 321 | * enum mac80211_rate_control_flags - per-rate flags set by the |
320 | * Rate Control algorithm. | 322 | * Rate Control algorithm. |
@@ -412,8 +414,6 @@ struct ieee80211_tx_rate { | |||
412 | * @driver_data: array of driver_data pointers | 414 | * @driver_data: array of driver_data pointers |
413 | * @ampdu_ack_len: number of acked aggregated frames. | 415 | * @ampdu_ack_len: number of acked aggregated frames. |
414 | * relevant only if IEEE80211_TX_STAT_AMPDU was set. | 416 | * relevant only if IEEE80211_TX_STAT_AMPDU was set. |
415 | * @ampdu_ack_map: block ack bit map for the aggregation. | ||
416 | * relevant only if IEEE80211_TX_STAT_AMPDU was set. | ||
417 | * @ampdu_len: number of aggregated frames. | 417 | * @ampdu_len: number of aggregated frames. |
418 | * relevant only if IEEE80211_TX_STAT_AMPDU was set. | 418 | * relevant only if IEEE80211_TX_STAT_AMPDU was set. |
419 | * @ack_signal: signal strength of the ACK frame | 419 | * @ack_signal: signal strength of the ACK frame |
@@ -448,10 +448,9 @@ struct ieee80211_tx_info { | |||
448 | struct { | 448 | struct { |
449 | struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; | 449 | struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; |
450 | u8 ampdu_ack_len; | 450 | u8 ampdu_ack_len; |
451 | u64 ampdu_ack_map; | ||
452 | int ack_signal; | 451 | int ack_signal; |
453 | u8 ampdu_len; | 452 | u8 ampdu_len; |
454 | /* 7 bytes free */ | 453 | /* 15 bytes free */ |
455 | } status; | 454 | } status; |
456 | struct { | 455 | struct { |
457 | struct ieee80211_tx_rate driver_rates[ | 456 | struct ieee80211_tx_rate driver_rates[ |
@@ -815,7 +814,6 @@ enum ieee80211_key_flags { | |||
815 | * encrypted in hardware. | 814 | * encrypted in hardware. |
816 | * @alg: The key algorithm. | 815 | * @alg: The key algorithm. |
817 | * @flags: key flags, see &enum ieee80211_key_flags. | 816 | * @flags: key flags, see &enum ieee80211_key_flags. |
818 | * @ap_addr: AP's MAC address | ||
819 | * @keyidx: the key index (0-3) | 817 | * @keyidx: the key index (0-3) |
820 | * @keylen: key material length | 818 | * @keylen: key material length |
821 | * @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte) | 819 | * @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte) |
@@ -881,16 +879,12 @@ struct ieee80211_sta { | |||
881 | * enum sta_notify_cmd - sta notify command | 879 | * enum sta_notify_cmd - sta notify command |
882 | * | 880 | * |
883 | * Used with the sta_notify() callback in &struct ieee80211_ops, this | 881 | * Used with the sta_notify() callback in &struct ieee80211_ops, this |
884 | * indicates addition and removal of a station to station table, | 882 | * indicates if an associated station made a power state transition. |
885 | * or if a associated station made a power state transition. | ||
886 | * | 883 | * |
887 | * @STA_NOTIFY_ADD: (DEPRECATED) a station was added to the station table | ||
888 | * @STA_NOTIFY_REMOVE: (DEPRECATED) a station being removed from the station table | ||
889 | * @STA_NOTIFY_SLEEP: a station is now sleeping | 884 | * @STA_NOTIFY_SLEEP: a station is now sleeping |
890 | * @STA_NOTIFY_AWAKE: a sleeping station woke up | 885 | * @STA_NOTIFY_AWAKE: a sleeping station woke up |
891 | */ | 886 | */ |
892 | enum sta_notify_cmd { | 887 | enum sta_notify_cmd { |
893 | STA_NOTIFY_ADD, STA_NOTIFY_REMOVE, | ||
894 | STA_NOTIFY_SLEEP, STA_NOTIFY_AWAKE, | 888 | STA_NOTIFY_SLEEP, STA_NOTIFY_AWAKE, |
895 | }; | 889 | }; |
896 | 890 | ||
@@ -1535,6 +1529,16 @@ enum ieee80211_ampdu_mlme_action { | |||
1535 | * of the bss parameters has changed when a call is made. The callback | 1529 | * of the bss parameters has changed when a call is made. The callback |
1536 | * can sleep. | 1530 | * can sleep. |
1537 | * | 1531 | * |
1532 | * @configure_arp_filter: Configuration function for hardware ARP query filter. | ||
1533 | * This function is called with all the IP addresses configured to the | ||
1534 | * interface as argument - all ARP queries targeted to any of these | ||
1535 | * addresses must pass through. If the hardware filter does not support | ||
1536 | * enought addresses, hardware filtering must be disabled. The ifa_list | ||
1537 | * argument may be NULL, indicating that filtering must be disabled. | ||
1538 | * This function is called upon association complete with current | ||
1539 | * address(es), and while associated whenever the IP address(es) change. | ||
1540 | * The callback can sleep. | ||
1541 | * | ||
1538 | * @prepare_multicast: Prepare for multicast filter configuration. | 1542 | * @prepare_multicast: Prepare for multicast filter configuration. |
1539 | * This callback is optional, and its return value is passed | 1543 | * This callback is optional, and its return value is passed |
1540 | * to configure_filter(). This callback must be atomic. | 1544 | * to configure_filter(). This callback must be atomic. |
@@ -1674,6 +1678,9 @@ struct ieee80211_ops { | |||
1674 | struct ieee80211_vif *vif, | 1678 | struct ieee80211_vif *vif, |
1675 | struct ieee80211_bss_conf *info, | 1679 | struct ieee80211_bss_conf *info, |
1676 | u32 changed); | 1680 | u32 changed); |
1681 | int (*configure_arp_filter)(struct ieee80211_hw *hw, | ||
1682 | struct ieee80211_vif *vif, | ||
1683 | struct in_ifaddr *ifa_list); | ||
1677 | u64 (*prepare_multicast)(struct ieee80211_hw *hw, | 1684 | u64 (*prepare_multicast)(struct ieee80211_hw *hw, |
1678 | struct netdev_hw_addr_list *mc_list); | 1685 | struct netdev_hw_addr_list *mc_list); |
1679 | void (*configure_filter)(struct ieee80211_hw *hw, | 1686 | void (*configure_filter)(struct ieee80211_hw *hw, |
@@ -2334,16 +2341,14 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra, | |||
2334 | * ieee80211_stop_tx_ba_session - Stop a Block Ack session. | 2341 | * ieee80211_stop_tx_ba_session - Stop a Block Ack session. |
2335 | * @sta: the station whose BA session to stop | 2342 | * @sta: the station whose BA session to stop |
2336 | * @tid: the TID to stop BA. | 2343 | * @tid: the TID to stop BA. |
2337 | * @initiator: if indicates initiator DELBA frame will be sent. | ||
2338 | * | 2344 | * |
2339 | * Return: error if no sta with matching da found, success otherwise | 2345 | * Return: negative error if the TID is invalid, or no aggregation active |
2340 | * | 2346 | * |
2341 | * Although mac80211/low level driver/user space application can estimate | 2347 | * Although mac80211/low level driver/user space application can estimate |
2342 | * the need to stop aggregation on a certain RA/TID, the session level | 2348 | * the need to stop aggregation on a certain RA/TID, the session level |
2343 | * will be managed by the mac80211. | 2349 | * will be managed by the mac80211. |
2344 | */ | 2350 | */ |
2345 | int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid, | 2351 | int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid); |
2346 | enum ieee80211_back_parties initiator); | ||
2347 | 2352 | ||
2348 | /** | 2353 | /** |
2349 | * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. | 2354 | * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. |
diff --git a/include/net/mip6.h b/include/net/mip6.h index a83ad1982a90..26ba99b5a4b1 100644 --- a/include/net/mip6.h +++ b/include/net/mip6.h | |||
@@ -39,7 +39,7 @@ struct ip6_mh { | |||
39 | __u16 ip6mh_cksum; | 39 | __u16 ip6mh_cksum; |
40 | /* Followed by type specific messages */ | 40 | /* Followed by type specific messages */ |
41 | __u8 data[0]; | 41 | __u8 data[0]; |
42 | } __attribute__ ((__packed__)); | 42 | } __packed; |
43 | 43 | ||
44 | #define IP6_MH_TYPE_BRR 0 /* Binding Refresh Request */ | 44 | #define IP6_MH_TYPE_BRR 0 /* Binding Refresh Request */ |
45 | #define IP6_MH_TYPE_HOTI 1 /* HOTI Message */ | 45 | #define IP6_MH_TYPE_HOTI 1 /* HOTI Message */ |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index f76f22d05721..895997bc2ead 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -82,7 +82,7 @@ struct ra_msg { | |||
82 | struct nd_opt_hdr { | 82 | struct nd_opt_hdr { |
83 | __u8 nd_opt_type; | 83 | __u8 nd_opt_type; |
84 | __u8 nd_opt_len; | 84 | __u8 nd_opt_len; |
85 | } __attribute__((__packed__)); | 85 | } __packed; |
86 | 86 | ||
87 | 87 | ||
88 | extern int ndisc_init(void); | 88 | extern int ndisc_init(void); |
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 84a4b6fec99d..e624dae54fa4 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -152,11 +152,7 @@ extern struct net init_net; | |||
152 | 152 | ||
153 | static inline struct net *nf_ct_net(const struct nf_conn *ct) | 153 | static inline struct net *nf_ct_net(const struct nf_conn *ct) |
154 | { | 154 | { |
155 | #ifdef CONFIG_NET_NS | 155 | return read_pnet(&ct->ct_net); |
156 | return ct->ct_net; | ||
157 | #else | ||
158 | return &init_net; | ||
159 | #endif | ||
160 | } | 156 | } |
161 | 157 | ||
162 | /* Alter reply tuple (maybe alter helper). */ | 158 | /* Alter reply tuple (maybe alter helper). */ |
diff --git a/include/net/netfilter/xt_rateest.h b/include/net/netfilter/xt_rateest.h index b1d780e21ce3..5a2978d1cb22 100644 --- a/include/net/netfilter/xt_rateest.h +++ b/include/net/netfilter/xt_rateest.h | |||
@@ -13,6 +13,7 @@ struct xt_rateest { | |||
13 | char name[IFNAMSIZ]; | 13 | char name[IFNAMSIZ]; |
14 | unsigned int refcnt; | 14 | unsigned int refcnt; |
15 | struct gnet_estimator params; | 15 | struct gnet_estimator params; |
16 | struct rcu_head rcu; | ||
16 | }; | 17 | }; |
17 | 18 | ||
18 | extern struct xt_rateest *xt_rateest_lookup(const char *name); | 19 | extern struct xt_rateest *xt_rateest_lookup(const char *name); |
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h index d7b989ca3d63..2d16783d5e20 100644 --- a/include/net/phonet/pn_dev.h +++ b/include/net/phonet/pn_dev.h | |||
@@ -34,6 +34,7 @@ struct phonet_device { | |||
34 | struct list_head list; | 34 | struct list_head list; |
35 | struct net_device *netdev; | 35 | struct net_device *netdev; |
36 | DECLARE_BITMAP(addrs, 64); | 36 | DECLARE_BITMAP(addrs, 64); |
37 | struct rcu_head rcu; | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | int phonet_device_init(void); | 40 | int phonet_device_init(void); |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 9d4d87cc970e..d9549af6929a 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -95,7 +95,7 @@ extern void __qdisc_run(struct Qdisc *q); | |||
95 | 95 | ||
96 | static inline void qdisc_run(struct Qdisc *q) | 96 | static inline void qdisc_run(struct Qdisc *q) |
97 | { | 97 | { |
98 | if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) | 98 | if (qdisc_run_begin(q)) |
99 | __qdisc_run(q); | 99 | __qdisc_run(q); |
100 | } | 100 | } |
101 | 101 | ||
diff --git a/include/net/route.h b/include/net/route.h index af6cf4b4c9dc..bd732d62e1c3 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -50,9 +50,7 @@ | |||
50 | struct fib_nh; | 50 | struct fib_nh; |
51 | struct inet_peer; | 51 | struct inet_peer; |
52 | struct rtable { | 52 | struct rtable { |
53 | union { | 53 | struct dst_entry dst; |
54 | struct dst_entry dst; | ||
55 | } u; | ||
56 | 54 | ||
57 | /* Cache lookup keys */ | 55 | /* Cache lookup keys */ |
58 | struct flowi fl; | 56 | struct flowi fl; |
@@ -144,7 +142,7 @@ extern void fib_add_ifaddr(struct in_ifaddr *); | |||
144 | static inline void ip_rt_put(struct rtable * rt) | 142 | static inline void ip_rt_put(struct rtable * rt) |
145 | { | 143 | { |
146 | if (rt) | 144 | if (rt) |
147 | dst_release(&rt->u.dst); | 145 | dst_release(&rt->dst); |
148 | } | 146 | } |
149 | 147 | ||
150 | #define IPTOS_RT_MASK (IPTOS_TOS_MASK & ~3) | 148 | #define IPTOS_RT_MASK (IPTOS_TOS_MASK & ~3) |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 03ca5d826757..b35301b0c7b6 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -23,11 +23,17 @@ struct qdisc_rate_table { | |||
23 | }; | 23 | }; |
24 | 24 | ||
25 | enum qdisc_state_t { | 25 | enum qdisc_state_t { |
26 | __QDISC_STATE_RUNNING, | ||
27 | __QDISC_STATE_SCHED, | 26 | __QDISC_STATE_SCHED, |
28 | __QDISC_STATE_DEACTIVATED, | 27 | __QDISC_STATE_DEACTIVATED, |
29 | }; | 28 | }; |
30 | 29 | ||
30 | /* | ||
31 | * following bits are only changed while qdisc lock is held | ||
32 | */ | ||
33 | enum qdisc___state_t { | ||
34 | __QDISC___STATE_RUNNING, | ||
35 | }; | ||
36 | |||
31 | struct qdisc_size_table { | 37 | struct qdisc_size_table { |
32 | struct list_head list; | 38 | struct list_head list; |
33 | struct tc_sizespec szopts; | 39 | struct tc_sizespec szopts; |
@@ -72,10 +78,27 @@ struct Qdisc { | |||
72 | unsigned long state; | 78 | unsigned long state; |
73 | struct sk_buff_head q; | 79 | struct sk_buff_head q; |
74 | struct gnet_stats_basic_packed bstats; | 80 | struct gnet_stats_basic_packed bstats; |
81 | unsigned long __state; | ||
75 | struct gnet_stats_queue qstats; | 82 | struct gnet_stats_queue qstats; |
76 | struct rcu_head rcu_head; | 83 | struct rcu_head rcu_head; |
84 | spinlock_t busylock; | ||
77 | }; | 85 | }; |
78 | 86 | ||
87 | static inline bool qdisc_is_running(struct Qdisc *qdisc) | ||
88 | { | ||
89 | return test_bit(__QDISC___STATE_RUNNING, &qdisc->__state); | ||
90 | } | ||
91 | |||
92 | static inline bool qdisc_run_begin(struct Qdisc *qdisc) | ||
93 | { | ||
94 | return !__test_and_set_bit(__QDISC___STATE_RUNNING, &qdisc->__state); | ||
95 | } | ||
96 | |||
97 | static inline void qdisc_run_end(struct Qdisc *qdisc) | ||
98 | { | ||
99 | __clear_bit(__QDISC___STATE_RUNNING, &qdisc->__state); | ||
100 | } | ||
101 | |||
79 | struct Qdisc_class_ops { | 102 | struct Qdisc_class_ops { |
80 | /* Child qdisc manipulation */ | 103 | /* Child qdisc manipulation */ |
81 | struct netdev_queue * (*select_queue)(struct Qdisc *, struct tcmsg *); | 104 | struct netdev_queue * (*select_queue)(struct Qdisc *, struct tcmsg *); |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 4b860116e096..f9e7473613bd 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -443,7 +443,7 @@ struct sctp_signed_cookie { | |||
443 | __u8 signature[SCTP_SECRET_SIZE]; | 443 | __u8 signature[SCTP_SECRET_SIZE]; |
444 | __u32 __pad; /* force sctp_cookie alignment to 64 bits */ | 444 | __u32 __pad; /* force sctp_cookie alignment to 64 bits */ |
445 | struct sctp_cookie c; | 445 | struct sctp_cookie c; |
446 | } __attribute__((packed)); | 446 | } __packed; |
447 | 447 | ||
448 | /* This is another convenience type to allocate memory for address | 448 | /* This is another convenience type to allocate memory for address |
449 | * params for the maximum size and pass such structures around | 449 | * params for the maximum size and pass such structures around |
@@ -488,7 +488,7 @@ typedef struct sctp_sender_hb_info { | |||
488 | union sctp_addr daddr; | 488 | union sctp_addr daddr; |
489 | unsigned long sent_at; | 489 | unsigned long sent_at; |
490 | __u64 hb_nonce; | 490 | __u64 hb_nonce; |
491 | } __attribute__((packed)) sctp_sender_hb_info_t; | 491 | } __packed sctp_sender_hb_info_t; |
492 | 492 | ||
493 | /* | 493 | /* |
494 | * RFC 2960 1.3.2 Sequenced Delivery within Streams | 494 | * RFC 2960 1.3.2 Sequenced Delivery within Streams |
diff --git a/include/net/sock.h b/include/net/sock.h index ca241ea14875..f8acf38f092f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1524,20 +1524,7 @@ extern void sk_stop_timer(struct sock *sk, struct timer_list* timer); | |||
1524 | 1524 | ||
1525 | extern int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); | 1525 | extern int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); |
1526 | 1526 | ||
1527 | static inline int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb) | 1527 | extern int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb); |
1528 | { | ||
1529 | /* Cast skb->rcvbuf to unsigned... It's pointless, but reduces | ||
1530 | number of warnings when compiling with -W --ANK | ||
1531 | */ | ||
1532 | if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= | ||
1533 | (unsigned)sk->sk_rcvbuf) | ||
1534 | return -ENOMEM; | ||
1535 | skb_set_owner_r(skb, sk); | ||
1536 | skb_queue_tail(&sk->sk_error_queue, skb); | ||
1537 | if (!sock_flag(sk, SOCK_DEAD)) | ||
1538 | sk->sk_data_ready(sk, skb->len); | ||
1539 | return 0; | ||
1540 | } | ||
1541 | 1528 | ||
1542 | /* | 1529 | /* |
1543 | * Recover an error report and clear atomically | 1530 | * Recover an error report and clear atomically |
@@ -1724,19 +1711,13 @@ static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_e | |||
1724 | static inline | 1711 | static inline |
1725 | struct net *sock_net(const struct sock *sk) | 1712 | struct net *sock_net(const struct sock *sk) |
1726 | { | 1713 | { |
1727 | #ifdef CONFIG_NET_NS | 1714 | return read_pnet(&sk->sk_net); |
1728 | return sk->sk_net; | ||
1729 | #else | ||
1730 | return &init_net; | ||
1731 | #endif | ||
1732 | } | 1715 | } |
1733 | 1716 | ||
1734 | static inline | 1717 | static inline |
1735 | void sock_net_set(struct sock *sk, struct net *net) | 1718 | void sock_net_set(struct sock *sk, struct net *net) |
1736 | { | 1719 | { |
1737 | #ifdef CONFIG_NET_NS | 1720 | write_pnet(&sk->sk_net, net); |
1738 | sk->sk_net = net; | ||
1739 | #endif | ||
1740 | } | 1721 | } |
1741 | 1722 | ||
1742 | /* | 1723 | /* |
diff --git a/include/net/tcp.h b/include/net/tcp.h index a1449144848a..573166484413 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1413,7 +1413,8 @@ struct tcp_iter_state { | |||
1413 | sa_family_t family; | 1413 | sa_family_t family; |
1414 | enum tcp_seq_states state; | 1414 | enum tcp_seq_states state; |
1415 | struct sock *syn_wait_sk; | 1415 | struct sock *syn_wait_sk; |
1416 | int bucket, sbucket, num, uid; | 1416 | int bucket, offset, sbucket, num, uid; |
1417 | loff_t last_pos; | ||
1417 | }; | 1418 | }; |
1418 | 1419 | ||
1419 | extern int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo); | 1420 | extern int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo); |