diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 10:43:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 10:43:36 -0500 |
commit | a2e4e108c511738fb3bc2bb2fedd593da9913764 (patch) | |
tree | 49e4084a383ed43e2d86a36176e197f6b7412a45 /include | |
parent | a6cc48eeea438b9d9e05943beebc31c52e76d32f (diff) | |
parent | a80f509f4a4f41ea8693733124470ad63a12664a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (77 commits)
[IPV6]: Reorg struct ifmcaddr6 to save some bytes
[INET_TIMEWAIT_SOCK]: Reorganize struct inet_timewait_sock to save some bytes
[DCCP]: Reorganize struct dccp_sock to save 8 bytes
[INET6]: Reorganize struct inet6_dev to save 8 bytes
[SOCK] proto: Add hashinfo member to struct proto
EMAC driver: Fix bug: The clock divisor is set to all ones at reset.
EMAC driver: fix bug - invalidate data cache of new_skb->data range when cache is WB
EMAC driver: add power down mode
EMAC driver: ADSP-BF52x arch/mach support
EMAC driver: use simpler comment headers and strip out information that is maintained in the scm's log
EMAC driver: bf537 MAC multicast hash filtering patch
EMAC driver: define MDC_CLK=2.5MHz and caculate mdc_div according to SCLK.
EMAC driver: shorten the mdelay value to solve netperf performance issue
[netdrvr] sis190: build fix
sky2: fix Wake On Lan interaction with BIOS
sky2: restore multicast addresses after recovery
pci-skeleton: Misc fixes to build neatly
phylib: Add Realtek 821x eth PHY support
natsemi: Update locking documentation
PHYLIB: Locking fixes for PHY I/O potentially sleeping
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dccp.h | 2 | ||||
-rw-r--r-- | include/linux/ieee80211.h | 6 | ||||
-rw-r--r-- | include/linux/phy.h | 5 | ||||
-rw-r--r-- | include/net/if_inet6.h | 6 | ||||
-rw-r--r-- | include/net/inet6_hashtables.h | 2 | ||||
-rw-r--r-- | include/net/inet_connection_sock.h | 8 | ||||
-rw-r--r-- | include/net/inet_hashtables.h | 51 | ||||
-rw-r--r-- | include/net/inet_timewait_sock.h | 2 | ||||
-rw-r--r-- | include/net/sock.h | 3 |
9 files changed, 30 insertions, 55 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 484e45c7c89a..aa0737019e37 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -525,6 +525,7 @@ struct dccp_sock { | |||
525 | __u64 dccps_gsr; | 525 | __u64 dccps_gsr; |
526 | __u64 dccps_gar; | 526 | __u64 dccps_gar; |
527 | __be32 dccps_service; | 527 | __be32 dccps_service; |
528 | __u32 dccps_mss_cache; | ||
528 | struct dccp_service_list *dccps_service_list; | 529 | struct dccp_service_list *dccps_service_list; |
529 | __u32 dccps_timestamp_echo; | 530 | __u32 dccps_timestamp_echo; |
530 | __u32 dccps_timestamp_time; | 531 | __u32 dccps_timestamp_time; |
@@ -533,7 +534,6 @@ struct dccp_sock { | |||
533 | __u16 dccps_pcslen; | 534 | __u16 dccps_pcslen; |
534 | __u16 dccps_pcrlen; | 535 | __u16 dccps_pcrlen; |
535 | unsigned long dccps_ndp_count; | 536 | unsigned long dccps_ndp_count; |
536 | __u32 dccps_mss_cache; | ||
537 | unsigned long dccps_rate_last; | 537 | unsigned long dccps_rate_last; |
538 | struct dccp_minisock dccps_minisock; | 538 | struct dccp_minisock dccps_minisock; |
539 | struct dccp_ackvec *dccps_hc_rx_ackvec; | 539 | struct dccp_ackvec *dccps_hc_rx_ackvec; |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 5de6d911cdf7..f577c8f1c66d 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -287,6 +287,12 @@ struct ieee80211_ht_addt_info { | |||
287 | #define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 | 287 | #define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 |
288 | #define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 | 288 | #define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 |
289 | 289 | ||
290 | /* MIMO Power Save Modes */ | ||
291 | #define WLAN_HT_CAP_MIMO_PS_STATIC 0 | ||
292 | #define WLAN_HT_CAP_MIMO_PS_DYNAMIC 1 | ||
293 | #define WLAN_HT_CAP_MIMO_PS_INVALID 2 | ||
294 | #define WLAN_HT_CAP_MIMO_PS_DISABLED 3 | ||
295 | |||
290 | /* Authentication algorithms */ | 296 | /* Authentication algorithms */ |
291 | #define WLAN_AUTH_OPEN 0 | 297 | #define WLAN_AUTH_OPEN 0 |
292 | #define WLAN_AUTH_SHARED_KEY 1 | 298 | #define WLAN_AUTH_SHARED_KEY 1 |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 554836edd915..5e43ae751412 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -88,7 +88,7 @@ struct mii_bus { | |||
88 | 88 | ||
89 | /* A lock to ensure that only one thing can read/write | 89 | /* A lock to ensure that only one thing can read/write |
90 | * the MDIO bus at a time */ | 90 | * the MDIO bus at a time */ |
91 | spinlock_t mdio_lock; | 91 | struct mutex mdio_lock; |
92 | 92 | ||
93 | struct device *dev; | 93 | struct device *dev; |
94 | 94 | ||
@@ -284,10 +284,11 @@ struct phy_device { | |||
284 | 284 | ||
285 | /* Interrupt and Polling infrastructure */ | 285 | /* Interrupt and Polling infrastructure */ |
286 | struct work_struct phy_queue; | 286 | struct work_struct phy_queue; |
287 | struct work_struct state_queue; | ||
287 | struct timer_list phy_timer; | 288 | struct timer_list phy_timer; |
288 | atomic_t irq_disable; | 289 | atomic_t irq_disable; |
289 | 290 | ||
290 | spinlock_t lock; | 291 | struct mutex lock; |
291 | 292 | ||
292 | struct net_device *attached_dev; | 293 | struct net_device *attached_dev; |
293 | 294 | ||
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index b24508abb850..b2cfc4927257 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
@@ -112,13 +112,13 @@ struct ifmcaddr6 | |||
112 | struct ip6_sf_list *mca_sources; | 112 | struct ip6_sf_list *mca_sources; |
113 | struct ip6_sf_list *mca_tomb; | 113 | struct ip6_sf_list *mca_tomb; |
114 | unsigned int mca_sfmode; | 114 | unsigned int mca_sfmode; |
115 | unsigned char mca_crcount; | ||
115 | unsigned long mca_sfcount[2]; | 116 | unsigned long mca_sfcount[2]; |
116 | struct timer_list mca_timer; | 117 | struct timer_list mca_timer; |
117 | unsigned mca_flags; | 118 | unsigned mca_flags; |
118 | int mca_users; | 119 | int mca_users; |
119 | atomic_t mca_refcnt; | 120 | atomic_t mca_refcnt; |
120 | spinlock_t mca_lock; | 121 | spinlock_t mca_lock; |
121 | unsigned char mca_crcount; | ||
122 | unsigned long mca_cstamp; | 122 | unsigned long mca_cstamp; |
123 | unsigned long mca_tstamp; | 123 | unsigned long mca_tstamp; |
124 | }; | 124 | }; |
@@ -166,11 +166,11 @@ struct inet6_dev | |||
166 | struct ifmcaddr6 *mc_list; | 166 | struct ifmcaddr6 *mc_list; |
167 | struct ifmcaddr6 *mc_tomb; | 167 | struct ifmcaddr6 *mc_tomb; |
168 | rwlock_t mc_lock; | 168 | rwlock_t mc_lock; |
169 | unsigned long mc_v1_seen; | ||
170 | unsigned long mc_maxdelay; | ||
171 | unsigned char mc_qrv; | 169 | unsigned char mc_qrv; |
172 | unsigned char mc_gq_running; | 170 | unsigned char mc_gq_running; |
173 | unsigned char mc_ifc_count; | 171 | unsigned char mc_ifc_count; |
172 | unsigned long mc_v1_seen; | ||
173 | unsigned long mc_maxdelay; | ||
174 | struct timer_list mc_gq_timer; /* general query timer */ | 174 | struct timer_list mc_gq_timer; /* general query timer */ |
175 | struct timer_list mc_ifc_timer; /* interface change timer */ | 175 | struct timer_list mc_ifc_timer; /* interface change timer */ |
176 | 176 | ||
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index fdff630708ce..62a5b691858e 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h | |||
@@ -49,7 +49,7 @@ static inline int inet6_sk_ehashfn(const struct sock *sk) | |||
49 | return inet6_ehashfn(laddr, lport, faddr, fport); | 49 | return inet6_ehashfn(laddr, lport, faddr, fport); |
50 | } | 50 | } |
51 | 51 | ||
52 | extern void __inet6_hash(struct inet_hashinfo *hashinfo, struct sock *sk); | 52 | extern void __inet6_hash(struct sock *sk); |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so | 55 | * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 133cf30d2d79..f00f0573627b 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -29,7 +29,6 @@ | |||
29 | #undef INET_CSK_CLEAR_TIMERS | 29 | #undef INET_CSK_CLEAR_TIMERS |
30 | 30 | ||
31 | struct inet_bind_bucket; | 31 | struct inet_bind_bucket; |
32 | struct inet_hashinfo; | ||
33 | struct tcp_congestion_ops; | 32 | struct tcp_congestion_ops; |
34 | 33 | ||
35 | /* | 34 | /* |
@@ -59,6 +58,8 @@ struct inet_connection_sock_af_ops { | |||
59 | int level, int optname, | 58 | int level, int optname, |
60 | char __user *optval, int __user *optlen); | 59 | char __user *optval, int __user *optlen); |
61 | void (*addr2sockaddr)(struct sock *sk, struct sockaddr *); | 60 | void (*addr2sockaddr)(struct sock *sk, struct sockaddr *); |
61 | int (*bind_conflict)(const struct sock *sk, | ||
62 | const struct inet_bind_bucket *tb); | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | /** inet_connection_sock - INET connection oriented sock | 65 | /** inet_connection_sock - INET connection oriented sock |
@@ -244,10 +245,7 @@ extern struct request_sock *inet_csk_search_req(const struct sock *sk, | |||
244 | const __be32 laddr); | 245 | const __be32 laddr); |
245 | extern int inet_csk_bind_conflict(const struct sock *sk, | 246 | extern int inet_csk_bind_conflict(const struct sock *sk, |
246 | const struct inet_bind_bucket *tb); | 247 | const struct inet_bind_bucket *tb); |
247 | extern int inet_csk_get_port(struct inet_hashinfo *hashinfo, | 248 | extern int inet_csk_get_port(struct sock *sk, unsigned short snum); |
248 | struct sock *sk, unsigned short snum, | ||
249 | int (*bind_conflict)(const struct sock *sk, | ||
250 | const struct inet_bind_bucket *tb)); | ||
251 | 249 | ||
252 | extern struct dst_entry* inet_csk_route_req(struct sock *sk, | 250 | extern struct dst_entry* inet_csk_route_req(struct sock *sk, |
253 | const struct request_sock *req); | 251 | const struct request_sock *req); |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index c23c4ed30724..48ac620cb846 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -221,9 +221,9 @@ static inline int inet_sk_listen_hashfn(const struct sock *sk) | |||
221 | } | 221 | } |
222 | 222 | ||
223 | /* Caller must disable local BH processing. */ | 223 | /* Caller must disable local BH processing. */ |
224 | static inline void __inet_inherit_port(struct inet_hashinfo *table, | 224 | static inline void __inet_inherit_port(struct sock *sk, struct sock *child) |
225 | struct sock *sk, struct sock *child) | ||
226 | { | 225 | { |
226 | struct inet_hashinfo *table = sk->sk_prot->hashinfo; | ||
227 | const int bhash = inet_bhashfn(inet_sk(child)->num, table->bhash_size); | 227 | const int bhash = inet_bhashfn(inet_sk(child)->num, table->bhash_size); |
228 | struct inet_bind_hashbucket *head = &table->bhash[bhash]; | 228 | struct inet_bind_hashbucket *head = &table->bhash[bhash]; |
229 | struct inet_bind_bucket *tb; | 229 | struct inet_bind_bucket *tb; |
@@ -235,15 +235,14 @@ static inline void __inet_inherit_port(struct inet_hashinfo *table, | |||
235 | spin_unlock(&head->lock); | 235 | spin_unlock(&head->lock); |
236 | } | 236 | } |
237 | 237 | ||
238 | static inline void inet_inherit_port(struct inet_hashinfo *table, | 238 | static inline void inet_inherit_port(struct sock *sk, struct sock *child) |
239 | struct sock *sk, struct sock *child) | ||
240 | { | 239 | { |
241 | local_bh_disable(); | 240 | local_bh_disable(); |
242 | __inet_inherit_port(table, sk, child); | 241 | __inet_inherit_port(sk, child); |
243 | local_bh_enable(); | 242 | local_bh_enable(); |
244 | } | 243 | } |
245 | 244 | ||
246 | extern void inet_put_port(struct inet_hashinfo *table, struct sock *sk); | 245 | extern void inet_put_port(struct sock *sk); |
247 | 246 | ||
248 | extern void inet_listen_wlock(struct inet_hashinfo *hashinfo); | 247 | extern void inet_listen_wlock(struct inet_hashinfo *hashinfo); |
249 | 248 | ||
@@ -266,41 +265,9 @@ static inline void inet_listen_unlock(struct inet_hashinfo *hashinfo) | |||
266 | wake_up(&hashinfo->lhash_wait); | 265 | wake_up(&hashinfo->lhash_wait); |
267 | } | 266 | } |
268 | 267 | ||
269 | extern void __inet_hash(struct inet_hashinfo *hashinfo, struct sock *sk); | 268 | extern void __inet_hash_nolisten(struct sock *sk); |
270 | extern void __inet_hash_nolisten(struct inet_hashinfo *hinfo, struct sock *sk); | 269 | extern void inet_hash(struct sock *sk); |
271 | 270 | extern void inet_unhash(struct sock *sk); | |
272 | static inline void inet_hash(struct inet_hashinfo *hashinfo, struct sock *sk) | ||
273 | { | ||
274 | if (sk->sk_state != TCP_CLOSE) { | ||
275 | local_bh_disable(); | ||
276 | __inet_hash(hashinfo, sk); | ||
277 | local_bh_enable(); | ||
278 | } | ||
279 | } | ||
280 | |||
281 | static inline void inet_unhash(struct inet_hashinfo *hashinfo, struct sock *sk) | ||
282 | { | ||
283 | rwlock_t *lock; | ||
284 | |||
285 | if (sk_unhashed(sk)) | ||
286 | goto out; | ||
287 | |||
288 | if (sk->sk_state == TCP_LISTEN) { | ||
289 | local_bh_disable(); | ||
290 | inet_listen_wlock(hashinfo); | ||
291 | lock = &hashinfo->lhash_lock; | ||
292 | } else { | ||
293 | lock = inet_ehash_lockp(hashinfo, sk->sk_hash); | ||
294 | write_lock_bh(lock); | ||
295 | } | ||
296 | |||
297 | if (__sk_del_node_init(sk)) | ||
298 | sock_prot_inuse_add(sk->sk_prot, -1); | ||
299 | write_unlock_bh(lock); | ||
300 | out: | ||
301 | if (sk->sk_state == TCP_LISTEN) | ||
302 | wake_up(&hashinfo->lhash_wait); | ||
303 | } | ||
304 | 271 | ||
305 | extern struct sock *__inet_lookup_listener(struct net *net, | 272 | extern struct sock *__inet_lookup_listener(struct net *net, |
306 | struct inet_hashinfo *hashinfo, | 273 | struct inet_hashinfo *hashinfo, |
@@ -425,7 +392,7 @@ extern int __inet_hash_connect(struct inet_timewait_death_row *death_row, | |||
425 | struct sock *sk, | 392 | struct sock *sk, |
426 | int (*check_established)(struct inet_timewait_death_row *, | 393 | int (*check_established)(struct inet_timewait_death_row *, |
427 | struct sock *, __u16, struct inet_timewait_sock **), | 394 | struct sock *, __u16, struct inet_timewait_sock **), |
428 | void (*hash)(struct inet_hashinfo *, struct sock *)); | 395 | void (*hash)(struct sock *sk)); |
429 | extern int inet_hash_connect(struct inet_timewait_death_row *death_row, | 396 | extern int inet_hash_connect(struct inet_timewait_death_row *death_row, |
430 | struct sock *sk); | 397 | struct sock *sk); |
431 | #endif /* _INET_HASHTABLES_H */ | 398 | #endif /* _INET_HASHTABLES_H */ |
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 67e925065aae..296547bfb0b7 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -116,6 +116,7 @@ struct inet_timewait_sock { | |||
116 | #define tw_hash __tw_common.skc_hash | 116 | #define tw_hash __tw_common.skc_hash |
117 | #define tw_prot __tw_common.skc_prot | 117 | #define tw_prot __tw_common.skc_prot |
118 | #define tw_net __tw_common.skc_net | 118 | #define tw_net __tw_common.skc_net |
119 | int tw_timeout; | ||
119 | volatile unsigned char tw_substate; | 120 | volatile unsigned char tw_substate; |
120 | /* 3 bits hole, try to pack */ | 121 | /* 3 bits hole, try to pack */ |
121 | unsigned char tw_rcv_wscale; | 122 | unsigned char tw_rcv_wscale; |
@@ -130,7 +131,6 @@ struct inet_timewait_sock { | |||
130 | __u8 tw_ipv6only:1; | 131 | __u8 tw_ipv6only:1; |
131 | /* 15 bits hole, try to pack */ | 132 | /* 15 bits hole, try to pack */ |
132 | __u16 tw_ipv6_offset; | 133 | __u16 tw_ipv6_offset; |
133 | int tw_timeout; | ||
134 | unsigned long tw_ttd; | 134 | unsigned long tw_ttd; |
135 | struct inet_bind_bucket *tw_tb; | 135 | struct inet_bind_bucket *tw_tb; |
136 | struct hlist_node tw_death_node; | 136 | struct hlist_node tw_death_node; |
diff --git a/include/net/sock.h b/include/net/sock.h index e3fb4c047f4c..8a7889b35810 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -496,6 +496,7 @@ extern int sk_wait_data(struct sock *sk, long *timeo); | |||
496 | 496 | ||
497 | struct request_sock_ops; | 497 | struct request_sock_ops; |
498 | struct timewait_sock_ops; | 498 | struct timewait_sock_ops; |
499 | struct inet_hashinfo; | ||
499 | 500 | ||
500 | /* Networking protocol blocks we attach to sockets. | 501 | /* Networking protocol blocks we attach to sockets. |
501 | * socket layer -> transport layer interface | 502 | * socket layer -> transport layer interface |
@@ -578,6 +579,8 @@ struct proto { | |||
578 | struct request_sock_ops *rsk_prot; | 579 | struct request_sock_ops *rsk_prot; |
579 | struct timewait_sock_ops *twsk_prot; | 580 | struct timewait_sock_ops *twsk_prot; |
580 | 581 | ||
582 | struct inet_hashinfo *hashinfo; | ||
583 | |||
581 | struct module *owner; | 584 | struct module *owner; |
582 | 585 | ||
583 | char name[32]; | 586 | char name[32]; |