aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-05 22:37:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-05 22:37:42 -0400
commite63e03273b89f7248baa56cf242474f661e776e1 (patch)
tree7e0a000ed3b252849b9002306ba479074c165330 /include
parent37193fb4639fa94f91cbbab1e8aca596300e1d94 (diff)
parentffb208479bd62ab26c29a242faeb1de1c6d5fcdc (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: (78 commits) AX.25: Fix sysctl registration if !CONFIG_AX25_DAMA_SLAVE pktgen: mac count pktgen: random flow bridge: Eliminate unnecessary forward delay bridge: fix compile warning in net/bridge/br_netfilter.c ipv4: remove unused field in struct flowi (include/net/flow.h). tg3: Fix 'scheduling while atomic' errors net: Kill plain NET_XMIT_BYPASS. net_sched: Add qdisc __NET_XMIT_BYPASS flag net_sched: Add qdisc __NET_XMIT_STOLEN flag iwl3945: fix merge mistake for packet injection iwlwifi: grap nic access before accessing periphery registers iwlwifi: decrement rx skb counter in scan abort handler iwlwifi: fix unhandled interrupt when HW rfkill is on iwlwifi: implement iwl5000_calc_rssi iwlwifi: memory allocation optimization iwlwifi: HW bug fixes p54: Fix potential concurrent access to private data rt2x00: Disable link tuning in rt2500usb iwlwifi: Don't use buffer allocated on the stack for led names ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/ieee80211.h13
-rw-r--r--include/linux/netdevice.h4
-rw-r--r--include/net/dst.h12
-rw-r--r--include/net/flow.h1
-rw-r--r--include/net/mac80211.h13
-rw-r--r--include/net/sch_generic.h26
-rw-r--r--include/net/sctp/structs.h3
7 files changed, 52 insertions, 20 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index a1630ba0b87c..7f4df7c7659d 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -506,6 +506,19 @@ struct ieee80211_channel_sw_ie {
506 u8 count; 506 u8 count;
507} __attribute__ ((packed)); 507} __attribute__ ((packed));
508 508
509/**
510 * struct ieee80211_tim
511 *
512 * This structure refers to "Traffic Indication Map information element"
513 */
514struct ieee80211_tim_ie {
515 u8 dtim_count;
516 u8 dtim_period;
517 u8 bitmap_ctrl;
518 /* variable size: 1 - 251 bytes */
519 u8 virtual_map[0];
520} __attribute__ ((packed));
521
509struct ieee80211_mgmt { 522struct ieee80211_mgmt {
510 __le16 frame_control; 523 __le16 frame_control;
511 __le16 duration; 524 __le16 duration;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ee583f642a9f..488c56e649b5 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -61,9 +61,7 @@ struct wireless_dev;
61#define NET_XMIT_DROP 1 /* skb dropped */ 61#define NET_XMIT_DROP 1 /* skb dropped */
62#define NET_XMIT_CN 2 /* congestion notification */ 62#define NET_XMIT_CN 2 /* congestion notification */
63#define NET_XMIT_POLICED 3 /* skb is shot by police */ 63#define NET_XMIT_POLICED 3 /* skb is shot by police */
64#define NET_XMIT_BYPASS 4 /* packet does not leave via dequeue; 64#define NET_XMIT_MASK 0xFFFF /* qdisc flags in net/sch_generic.h */
65 (TC use only - dev_queue_xmit
66 returns this as NET_XMIT_SUCCESS) */
67 65
68/* Backlog congestion levels */ 66/* Backlog congestion levels */
69#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ 67#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */
diff --git a/include/net/dst.h b/include/net/dst.h
index c5c318a628f8..8a8b71e5f3f1 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -252,17 +252,7 @@ static inline int dst_output(struct sk_buff *skb)
252/* Input packet from network to transport. */ 252/* Input packet from network to transport. */
253static inline int dst_input(struct sk_buff *skb) 253static inline int dst_input(struct sk_buff *skb)
254{ 254{
255 int err; 255 return skb->dst->input(skb);
256
257 for (;;) {
258 err = skb->dst->input(skb);
259
260 if (likely(err == 0))
261 return err;
262 /* Oh, Jamal... Seems, I will not forgive you this mess. :-) */
263 if (unlikely(err != NET_XMIT_BYPASS))
264 return err;
265 }
266} 256}
267 257
268static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie) 258static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie)
diff --git a/include/net/flow.h b/include/net/flow.h
index ad16e0076c89..228b2477ceec 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -47,7 +47,6 @@ struct flowi {
47#define fl4_scope nl_u.ip4_u.scope 47#define fl4_scope nl_u.ip4_u.scope
48 48
49 __u8 proto; 49 __u8 proto;
50 __u8 flags;
51 union { 50 union {
52 struct { 51 struct {
53 __be16 sport; 52 __be16 sport;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index b52721008be8..b397e4d984c7 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -177,9 +177,10 @@ enum ieee80211_bss_change {
177 * @aid: association ID number, valid only when @assoc is true 177 * @aid: association ID number, valid only when @assoc is true
178 * @use_cts_prot: use CTS protection 178 * @use_cts_prot: use CTS protection
179 * @use_short_preamble: use 802.11b short preamble 179 * @use_short_preamble: use 802.11b short preamble
180 * @dtim_period: num of beacons before the next DTIM, for PSM
180 * @timestamp: beacon timestamp 181 * @timestamp: beacon timestamp
181 * @beacon_int: beacon interval 182 * @beacon_int: beacon interval
182 * @assoc_capability: capabbilities taken from assoc resp 183 * @assoc_capability: capabilities taken from assoc resp
183 * @assoc_ht: association in HT mode 184 * @assoc_ht: association in HT mode
184 * @ht_conf: ht capabilities 185 * @ht_conf: ht capabilities
185 * @ht_bss_conf: ht extended capabilities 186 * @ht_bss_conf: ht extended capabilities
@@ -191,6 +192,7 @@ struct ieee80211_bss_conf {
191 /* erp related data */ 192 /* erp related data */
192 bool use_cts_prot; 193 bool use_cts_prot;
193 bool use_short_preamble; 194 bool use_short_preamble;
195 u8 dtim_period;
194 u16 beacon_int; 196 u16 beacon_int;
195 u16 assoc_capability; 197 u16 assoc_capability;
196 u64 timestamp; 198 u64 timestamp;
@@ -430,6 +432,7 @@ enum ieee80211_conf_flags {
430 * @radio_enabled: when zero, driver is required to switch off the radio. 432 * @radio_enabled: when zero, driver is required to switch off the radio.
431 * TODO make a flag 433 * TODO make a flag
432 * @beacon_int: beacon interval (TODO make interface config) 434 * @beacon_int: beacon interval (TODO make interface config)
435 * @listen_interval: listen interval in units of beacon interval
433 * @flags: configuration flags defined above 436 * @flags: configuration flags defined above
434 * @power_level: requested transmit power (in dBm) 437 * @power_level: requested transmit power (in dBm)
435 * @max_antenna_gain: maximum antenna gain (in dBi) 438 * @max_antenna_gain: maximum antenna gain (in dBi)
@@ -444,6 +447,7 @@ struct ieee80211_conf {
444 int radio_enabled; 447 int radio_enabled;
445 448
446 int beacon_int; 449 int beacon_int;
450 u16 listen_interval;
447 u32 flags; 451 u32 flags;
448 int power_level; 452 int power_level;
449 int max_antenna_gain; 453 int max_antenna_gain;
@@ -785,6 +789,9 @@ enum ieee80211_hw_flags {
785 * @max_signal: Maximum value for signal (rssi) in RX information, used 789 * @max_signal: Maximum value for signal (rssi) in RX information, used
786 * only when @IEEE80211_HW_SIGNAL_UNSPEC or @IEEE80211_HW_SIGNAL_DB 790 * only when @IEEE80211_HW_SIGNAL_UNSPEC or @IEEE80211_HW_SIGNAL_DB
787 * 791 *
792 * @max_listen_interval: max listen interval in units of beacon interval
793 * that HW supports
794 *
788 * @queues: number of available hardware transmit queues for 795 * @queues: number of available hardware transmit queues for
789 * data packets. WMM/QoS requires at least four, these 796 * data packets. WMM/QoS requires at least four, these
790 * queues need to have configurable access parameters. 797 * queues need to have configurable access parameters.
@@ -812,7 +819,9 @@ struct ieee80211_hw {
812 unsigned int extra_tx_headroom; 819 unsigned int extra_tx_headroom;
813 int channel_change_time; 820 int channel_change_time;
814 int vif_data_size; 821 int vif_data_size;
815 u16 queues, ampdu_queues; 822 u16 queues;
823 u16 ampdu_queues;
824 u16 max_listen_interval;
816 s8 max_signal; 825 s8 max_signal;
817}; 826};
818 827
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index b5f40d7ef724..a7abfda3e447 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -193,10 +193,22 @@ static inline struct Qdisc *qdisc_root(struct Qdisc *qdisc)
193 return qdisc->dev_queue->qdisc; 193 return qdisc->dev_queue->qdisc;
194} 194}
195 195
196/* The qdisc root lock is a mechanism by which to top level
197 * of a qdisc tree can be locked from any qdisc node in the
198 * forest. This allows changing the configuration of some
199 * aspect of the qdisc tree while blocking out asynchronous
200 * qdisc access in the packet processing paths.
201 *
202 * It is only legal to do this when the root will not change
203 * on us. Otherwise we'll potentially lock the wrong qdisc
204 * root. This is enforced by holding the RTNL semaphore, which
205 * all users of this lock accessor must do.
206 */
196static inline spinlock_t *qdisc_root_lock(struct Qdisc *qdisc) 207static inline spinlock_t *qdisc_root_lock(struct Qdisc *qdisc)
197{ 208{
198 struct Qdisc *root = qdisc_root(qdisc); 209 struct Qdisc *root = qdisc_root(qdisc);
199 210
211 ASSERT_RTNL();
200 return qdisc_lock(root); 212 return qdisc_lock(root);
201} 213}
202 214
@@ -331,6 +343,18 @@ static inline unsigned int qdisc_pkt_len(struct sk_buff *skb)
331 return qdisc_skb_cb(skb)->pkt_len; 343 return qdisc_skb_cb(skb)->pkt_len;
332} 344}
333 345
346/* additional qdisc xmit flags (NET_XMIT_MASK in linux/netdevice.h) */
347enum net_xmit_qdisc_t {
348 __NET_XMIT_STOLEN = 0x00010000,
349 __NET_XMIT_BYPASS = 0x00020000,
350};
351
352#ifdef CONFIG_NET_CLS_ACT
353#define net_xmit_drop_count(e) ((e) & __NET_XMIT_STOLEN ? 0 : 1)
354#else
355#define net_xmit_drop_count(e) (1)
356#endif
357
334static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch) 358static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
335{ 359{
336#ifdef CONFIG_NET_SCHED 360#ifdef CONFIG_NET_SCHED
@@ -343,7 +367,7 @@ static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
343static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch) 367static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch)
344{ 368{
345 qdisc_skb_cb(skb)->pkt_len = skb->len; 369 qdisc_skb_cb(skb)->pkt_len = skb->len;
346 return qdisc_enqueue(skb, sch); 370 return qdisc_enqueue(skb, sch) & NET_XMIT_MASK;
347} 371}
348 372
349static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, 373static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch,
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 535a18f57a13..ab1c472ea753 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -524,8 +524,7 @@ static inline void sctp_ssn_skip(struct sctp_stream *stream, __u16 id,
524 */ 524 */
525struct sctp_af { 525struct sctp_af {
526 int (*sctp_xmit) (struct sk_buff *skb, 526 int (*sctp_xmit) (struct sk_buff *skb,
527 struct sctp_transport *, 527 struct sctp_transport *);
528 int ipfragok);
529 int (*setsockopt) (struct sock *sk, 528 int (*setsockopt) (struct sock *sk,
530 int level, 529 int level,
531 int optname, 530 int optname,