aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-08-14 15:29:17 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-14 15:29:17 -0400
commita8519de4a030d130e0d18147a2af3112b7951e0b (patch)
tree59f89418cf7f311d896c38ff774398e052b709d8 /include
parent5c16807d3d196203d2d3c9fae51ac7e422091904 (diff)
parent560ad81b6c90e0fddc4d6c280f16ddf18d47eeb1 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h17
-rw-r--r--include/linux/ssb/ssb.h44
-rw-r--r--include/linux/ssb/ssb_regs.h66
-rw-r--r--include/linux/usb/usbnet.h6
-rw-r--r--include/net/cfg80211.h26
-rw-r--r--include/net/mac80211.h29
6 files changed, 163 insertions, 25 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index cb3dc6027fd9..a8d71ed43a0e 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -480,10 +480,6 @@ enum nl80211_commands {
480 * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) 480 * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz)
481 * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive 481 * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive
482 * scanning and include a zero-length SSID (wildcard) for wildcard scan 482 * scanning and include a zero-length SSID (wildcard) for wildcard scan
483 * @NL80211_ATTR_SCAN_GENERATION: the scan generation increases whenever the
484 * scan result list changes (BSS expired or added) so that applications
485 * can verify that they got a single, consistent snapshot (when all dump
486 * messages carried the same generation number)
487 * @NL80211_ATTR_BSS: scan result BSS 483 * @NL80211_ATTR_BSS: scan result BSS
488 * 484 *
489 * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain 485 * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain
@@ -580,6 +576,14 @@ enum nl80211_commands {
580 * 576 *
581 * @NL80211_ATTR_PID: Process ID of a network namespace. 577 * @NL80211_ATTR_PID: Process ID of a network namespace.
582 * 578 *
579 * @NL80211_ATTR_GENERATION: Used to indicate consistent snapshots for
580 * dumps. This number increases whenever the object list being
581 * dumped changes, and as such userspace can verify that it has
582 * obtained a complete and consistent snapshot by verifying that
583 * all dump messages contain the same generation number. If it
584 * changed then the list changed and the dump should be repeated
585 * completely from scratch.
586 *
583 * @NL80211_ATTR_MAX: highest attribute number currently defined 587 * @NL80211_ATTR_MAX: highest attribute number currently defined
584 * @__NL80211_ATTR_AFTER_LAST: internal use 588 * @__NL80211_ATTR_AFTER_LAST: internal use
585 */ 589 */
@@ -651,7 +655,7 @@ enum nl80211_attrs {
651 655
652 NL80211_ATTR_SCAN_FREQUENCIES, 656 NL80211_ATTR_SCAN_FREQUENCIES,
653 NL80211_ATTR_SCAN_SSIDS, 657 NL80211_ATTR_SCAN_SSIDS,
654 NL80211_ATTR_SCAN_GENERATION, 658 NL80211_ATTR_GENERATION, /* replaces old SCAN_GENERATION */
655 NL80211_ATTR_BSS, 659 NL80211_ATTR_BSS,
656 660
657 NL80211_ATTR_REG_INITIATOR, 661 NL80211_ATTR_REG_INITIATOR,
@@ -716,6 +720,9 @@ enum nl80211_attrs {
716 NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 720 NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1
717}; 721};
718 722
723/* source-level API compatibility */
724#define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION
725
719/* 726/*
720 * Allow user space programs to use #ifdef on new attributes by defining them 727 * Allow user space programs to use #ifdef on new attributes by defining them
721 * here 728 * here
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index 5ae8fa22d331..17ffc1f84d76 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -27,24 +27,54 @@ struct ssb_sprom {
27 u8 et1mdcport; /* MDIO for enet1 */ 27 u8 et1mdcport; /* MDIO for enet1 */
28 u8 board_rev; /* Board revision number from SPROM. */ 28 u8 board_rev; /* Board revision number from SPROM. */
29 u8 country_code; /* Country Code */ 29 u8 country_code; /* Country Code */
30 u8 ant_available_a; /* A-PHY antenna available bits (up to 4) */ 30 u8 ant_available_a; /* 2GHz antenna available bits (up to 4) */
31 u8 ant_available_bg; /* B/G-PHY antenna available bits (up to 4) */ 31 u8 ant_available_bg; /* 5GHz antenna available bits (up to 4) */
32 u16 pa0b0; 32 u16 pa0b0;
33 u16 pa0b1; 33 u16 pa0b1;
34 u16 pa0b2; 34 u16 pa0b2;
35 u16 pa1b0; 35 u16 pa1b0;
36 u16 pa1b1; 36 u16 pa1b1;
37 u16 pa1b2; 37 u16 pa1b2;
38 u16 pa1lob0;
39 u16 pa1lob1;
40 u16 pa1lob2;
41 u16 pa1hib0;
42 u16 pa1hib1;
43 u16 pa1hib2;
38 u8 gpio0; /* GPIO pin 0 */ 44 u8 gpio0; /* GPIO pin 0 */
39 u8 gpio1; /* GPIO pin 1 */ 45 u8 gpio1; /* GPIO pin 1 */
40 u8 gpio2; /* GPIO pin 2 */ 46 u8 gpio2; /* GPIO pin 2 */
41 u8 gpio3; /* GPIO pin 3 */ 47 u8 gpio3; /* GPIO pin 3 */
42 u16 maxpwr_a; /* A-PHY Amplifier Max Power (in dBm Q5.2) */ 48 u16 maxpwr_bg; /* 2.4GHz Amplifier Max Power (in dBm Q5.2) */
43 u16 maxpwr_bg; /* B/G-PHY Amplifier Max Power (in dBm Q5.2) */ 49 u16 maxpwr_al; /* 5.2GHz Amplifier Max Power (in dBm Q5.2) */
50 u16 maxpwr_a; /* 5.3GHz Amplifier Max Power (in dBm Q5.2) */
51 u16 maxpwr_ah; /* 5.8GHz Amplifier Max Power (in dBm Q5.2) */
44 u8 itssi_a; /* Idle TSSI Target for A-PHY */ 52 u8 itssi_a; /* Idle TSSI Target for A-PHY */
45 u8 itssi_bg; /* Idle TSSI Target for B/G-PHY */ 53 u8 itssi_bg; /* Idle TSSI Target for B/G-PHY */
46 u16 boardflags_lo; /* Boardflags (low 16 bits) */ 54 u8 tri2g; /* 2.4GHz TX isolation */
47 u16 boardflags_hi; /* Boardflags (high 16 bits) */ 55 u8 tri5gl; /* 5.2GHz TX isolation */
56 u8 tri5g; /* 5.3GHz TX isolation */
57 u8 tri5gh; /* 5.8GHz TX isolation */
58 u8 rxpo2g; /* 2GHz RX power offset */
59 u8 rxpo5g; /* 5GHz RX power offset */
60 u8 rssisav2g; /* 2GHz RSSI params */
61 u8 rssismc2g;
62 u8 rssismf2g;
63 u8 bxa2g; /* 2GHz BX arch */
64 u8 rssisav5g; /* 5GHz RSSI params */
65 u8 rssismc5g;
66 u8 rssismf5g;
67 u8 bxa5g; /* 5GHz BX arch */
68 u16 cck2gpo; /* CCK power offset */
69 u32 ofdm2gpo; /* 2.4GHz OFDM power offset */
70 u32 ofdm5glpo; /* 5.2GHz OFDM power offset */
71 u32 ofdm5gpo; /* 5.3GHz OFDM power offset */
72 u32 ofdm5ghpo; /* 5.8GHz OFDM power offset */
73 u16 boardflags_lo; /* Board flags (bits 0-15) */
74 u16 boardflags_hi; /* Board flags (bits 16-31) */
75 u16 boardflags2_lo; /* Board flags (bits 32-47) */
76 u16 boardflags2_hi; /* Board flags (bits 48-63) */
77 /* TODO store board flags in a single u64 */
48 78
49 /* Antenna gain values for up to 4 antennas 79 /* Antenna gain values for up to 4 antennas
50 * on each band. Values in dBm/4 (Q5.2). Negative gain means the 80 * on each band. Values in dBm/4 (Q5.2). Negative gain means the
@@ -58,7 +88,7 @@ struct ssb_sprom {
58 } ghz5; /* 5GHz band */ 88 } ghz5; /* 5GHz band */
59 } antenna_gain; 89 } antenna_gain;
60 90
61 /* TODO - add any parameters needed from rev 2, 3, or 4 SPROMs */ 91 /* TODO - add any parameters needed from rev 2, 3, 4, 5 or 8 SPROMs */
62}; 92};
63 93
64/* Information about the PCB the circuitry is soldered on. */ 94/* Information about the PCB the circuitry is soldered on. */
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h
index a01b982b5783..9ae9082eaeb4 100644
--- a/include/linux/ssb/ssb_regs.h
+++ b/include/linux/ssb/ssb_regs.h
@@ -162,7 +162,7 @@
162 162
163/* SPROM shadow area. If not otherwise noted, fields are 163/* SPROM shadow area. If not otherwise noted, fields are
164 * two bytes wide. Note that the SPROM can _only_ be read 164 * two bytes wide. Note that the SPROM can _only_ be read
165 * in two-byte quantinies. 165 * in two-byte quantities.
166 */ 166 */
167#define SSB_SPROMSIZE_WORDS 64 167#define SSB_SPROMSIZE_WORDS 64
168#define SSB_SPROMSIZE_BYTES (SSB_SPROMSIZE_WORDS * sizeof(u16)) 168#define SSB_SPROMSIZE_BYTES (SSB_SPROMSIZE_WORDS * sizeof(u16))
@@ -327,8 +327,11 @@
327#define SSB_SPROM5_GPIOB_P3_SHIFT 8 327#define SSB_SPROM5_GPIOB_P3_SHIFT 8
328 328
329/* SPROM Revision 8 */ 329/* SPROM Revision 8 */
330#define SSB_SPROM8_BFLLO 0x1084 /* Boardflags (low 16 bits) */ 330#define SSB_SPROM8_BOARDREV 0x1082 /* Board revision */
331#define SSB_SPROM8_BFLHI 0x1086 /* Boardflags Hi */ 331#define SSB_SPROM8_BFLLO 0x1084 /* Board flags (bits 0-15) */
332#define SSB_SPROM8_BFLHI 0x1086 /* Board flags (bits 16-31) */
333#define SSB_SPROM8_BFL2LO 0x1088 /* Board flags (bits 32-47) */
334#define SSB_SPROM8_BFL2HI 0x108A /* Board flags (bits 48-63) */
332#define SSB_SPROM8_IL0MAC 0x108C /* 6 byte MAC address */ 335#define SSB_SPROM8_IL0MAC 0x108C /* 6 byte MAC address */
333#define SSB_SPROM8_CCODE 0x1092 /* 2 byte country code */ 336#define SSB_SPROM8_CCODE 0x1092 /* 2 byte country code */
334#define SSB_SPROM8_ANTAVAIL 0x109C /* Antenna available bitfields*/ 337#define SSB_SPROM8_ANTAVAIL 0x109C /* Antenna available bitfields*/
@@ -354,14 +357,63 @@
354#define SSB_SPROM8_GPIOB_P2 0x00FF /* Pin 2 */ 357#define SSB_SPROM8_GPIOB_P2 0x00FF /* Pin 2 */
355#define SSB_SPROM8_GPIOB_P3 0xFF00 /* Pin 3 */ 358#define SSB_SPROM8_GPIOB_P3 0xFF00 /* Pin 3 */
356#define SSB_SPROM8_GPIOB_P3_SHIFT 8 359#define SSB_SPROM8_GPIOB_P3_SHIFT 8
357#define SSB_SPROM8_MAXP_BG 0x10C0 /* Max Power BG in path 1 */ 360#define SSB_SPROM8_RSSIPARM2G 0x10A4 /* RSSI params for 2GHz */
358#define SSB_SPROM8_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */ 361#define SSB_SPROM8_RSSISMF2G 0x000F
362#define SSB_SPROM8_RSSISMC2G 0x00F0
363#define SSB_SPROM8_RSSISMC2G_SHIFT 4
364#define SSB_SPROM8_RSSISAV2G 0x0700
365#define SSB_SPROM8_RSSISAV2G_SHIFT 8
366#define SSB_SPROM8_BXA2G 0x1800
367#define SSB_SPROM8_BXA2G_SHIFT 11
368#define SSB_SPROM8_RSSIPARM5G 0x10A6 /* RSSI params for 5GHz */
369#define SSB_SPROM8_RSSISMF5G 0x000F
370#define SSB_SPROM8_RSSISMC5G 0x00F0
371#define SSB_SPROM8_RSSISMC5G_SHIFT 4
372#define SSB_SPROM8_RSSISAV5G 0x0700
373#define SSB_SPROM8_RSSISAV5G_SHIFT 8
374#define SSB_SPROM8_BXA5G 0x1800
375#define SSB_SPROM8_BXA5G_SHIFT 11
376#define SSB_SPROM8_TRI25G 0x10A8 /* TX isolation 2.4&5.3GHz */
377#define SSB_SPROM8_TRI2G 0x00FF /* TX isolation 2.4GHz */
378#define SSB_SPROM8_TRI5G 0xFF00 /* TX isolation 5.3GHz */
379#define SSB_SPROM8_TRI5G_SHIFT 8
380#define SSB_SPROM8_TRI5GHL 0x10AA /* TX isolation 5.2/5.8GHz */
381#define SSB_SPROM8_TRI5GL 0x00FF /* TX isolation 5.2GHz */
382#define SSB_SPROM8_TRI5GH 0xFF00 /* TX isolation 5.8GHz */
383#define SSB_SPROM8_TRI5GH_SHIFT 8
384#define SSB_SPROM8_RXPO 0x10AC /* RX power offsets */
385#define SSB_SPROM8_RXPO2G 0x00FF /* 2GHz RX power offset */
386#define SSB_SPROM8_RXPO5G 0xFF00 /* 5GHz RX power offset */
387#define SSB_SPROM8_RXPO5G_SHIFT 8
388#define SSB_SPROM8_MAXP_BG 0x10C0 /* Max Power 2GHz in path 1 */
389#define SSB_SPROM8_MAXP_BG_MASK 0x00FF /* Mask for Max Power 2GHz */
359#define SSB_SPROM8_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ 390#define SSB_SPROM8_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */
360#define SSB_SPROM8_ITSSI_BG_SHIFT 8 391#define SSB_SPROM8_ITSSI_BG_SHIFT 8
361#define SSB_SPROM8_MAXP_A 0x10C8 /* Max Power A in path 1 */ 392#define SSB_SPROM8_PA0B0 0x10C2 /* 2GHz power amp settings */
362#define SSB_SPROM8_MAXP_A_MASK 0x00FF /* Mask for Max Power A */ 393#define SSB_SPROM8_PA0B1 0x10C4
394#define SSB_SPROM8_PA0B2 0x10C6
395#define SSB_SPROM8_MAXP_A 0x10C8 /* Max Power 5.3GHz */
396#define SSB_SPROM8_MAXP_A_MASK 0x00FF /* Mask for Max Power 5.3GHz */
363#define SSB_SPROM8_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */ 397#define SSB_SPROM8_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */
364#define SSB_SPROM8_ITSSI_A_SHIFT 8 398#define SSB_SPROM8_ITSSI_A_SHIFT 8
399#define SSB_SPROM8_MAXP_AHL 0x10CA /* Max Power 5.2/5.8GHz */
400#define SSB_SPROM8_MAXP_AH_MASK 0x00FF /* Mask for Max Power 5.8GHz */
401#define SSB_SPROM8_MAXP_AL_MASK 0xFF00 /* Mask for Max Power 5.2GHz */
402#define SSB_SPROM8_MAXP_AL_SHIFT 8
403#define SSB_SPROM8_PA1B0 0x10CC /* 5.3GHz power amp settings */
404#define SSB_SPROM8_PA1B1 0x10CE
405#define SSB_SPROM8_PA1B2 0x10D0
406#define SSB_SPROM8_PA1LOB0 0x10D2 /* 5.2GHz power amp settings */
407#define SSB_SPROM8_PA1LOB1 0x10D4
408#define SSB_SPROM8_PA1LOB2 0x10D6
409#define SSB_SPROM8_PA1HIB0 0x10D8 /* 5.8GHz power amp settings */
410#define SSB_SPROM8_PA1HIB1 0x10DA
411#define SSB_SPROM8_PA1HIB2 0x10DC
412#define SSB_SPROM8_CCK2GPO 0x1140 /* CCK power offset */
413#define SSB_SPROM8_OFDM2GPO 0x1142 /* 2.4GHz OFDM power offset */
414#define SSB_SPROM8_OFDM5GPO 0x1146 /* 5.3GHz OFDM power offset */
415#define SSB_SPROM8_OFDM5GLPO 0x114A /* 5.2GHz OFDM power offset */
416#define SSB_SPROM8_OFDM5GHPO 0x114E /* 5.8GHz OFDM power offset */
365 417
366/* Values for SSB_SPROM1_BINF_CCODE */ 418/* Values for SSB_SPROM1_BINF_CCODE */
367enum { 419enum {
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index de8b4b18961b..09514252d84e 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -53,6 +53,7 @@ struct usbnet {
53 struct sk_buff_head rxq; 53 struct sk_buff_head rxq;
54 struct sk_buff_head txq; 54 struct sk_buff_head txq;
55 struct sk_buff_head done; 55 struct sk_buff_head done;
56 struct sk_buff_head rxq_pause;
56 struct urb *interrupt; 57 struct urb *interrupt;
57 struct tasklet_struct bh; 58 struct tasklet_struct bh;
58 59
@@ -63,6 +64,7 @@ struct usbnet {
63# define EVENT_RX_MEMORY 2 64# define EVENT_RX_MEMORY 2
64# define EVENT_STS_SPLIT 3 65# define EVENT_STS_SPLIT 3
65# define EVENT_LINK_RESET 4 66# define EVENT_LINK_RESET 4
67# define EVENT_RX_PAUSED 5
66}; 68};
67 69
68static inline struct usb_driver *driver_of(struct usb_interface *intf) 70static inline struct usb_driver *driver_of(struct usb_interface *intf)
@@ -190,6 +192,10 @@ extern void usbnet_defer_kevent (struct usbnet *, int);
190extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); 192extern void usbnet_skb_return (struct usbnet *, struct sk_buff *);
191extern void usbnet_unlink_rx_urbs(struct usbnet *); 193extern void usbnet_unlink_rx_urbs(struct usbnet *);
192 194
195extern void usbnet_pause_rx(struct usbnet *);
196extern void usbnet_resume_rx(struct usbnet *);
197extern void usbnet_purge_paused_rxq(struct usbnet *);
198
193extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd); 199extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd);
194extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd); 200extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd);
195extern u32 usbnet_get_link (struct net_device *net); 201extern u32 usbnet_get_link (struct net_device *net);
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 64df51d9a89f..0b146bb2dd14 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -80,7 +80,6 @@ enum ieee80211_channel_flags {
80 * with cfg80211. 80 * with cfg80211.
81 * 81 *
82 * @center_freq: center frequency in MHz 82 * @center_freq: center frequency in MHz
83 * @max_bandwidth: maximum allowed bandwidth for this channel, in MHz
84 * @hw_value: hardware-specific value for the channel 83 * @hw_value: hardware-specific value for the channel
85 * @flags: channel flags from &enum ieee80211_channel_flags. 84 * @flags: channel flags from &enum ieee80211_channel_flags.
86 * @orig_flags: channel flags at registration time, used by regulatory 85 * @orig_flags: channel flags at registration time, used by regulatory
@@ -97,7 +96,6 @@ enum ieee80211_channel_flags {
97struct ieee80211_channel { 96struct ieee80211_channel {
98 enum ieee80211_band band; 97 enum ieee80211_band band;
99 u16 center_freq; 98 u16 center_freq;
100 u8 max_bandwidth;
101 u16 hw_value; 99 u16 hw_value;
102 u32 flags; 100 u32 flags;
103 int max_antenna_gain; 101 int max_antenna_gain;
@@ -372,6 +370,10 @@ struct rate_info {
372 * @txrate: current unicast bitrate to this station 370 * @txrate: current unicast bitrate to this station
373 * @rx_packets: packets received from this station 371 * @rx_packets: packets received from this station
374 * @tx_packets: packets transmitted to this station 372 * @tx_packets: packets transmitted to this station
373 * @generation: generation number for nl80211 dumps.
374 * This number should increase every time the list of stations
375 * changes, i.e. when a station is added or removed, so that
376 * userspace can tell whether it got a consistent snapshot.
375 */ 377 */
376struct station_info { 378struct station_info {
377 u32 filled; 379 u32 filled;
@@ -385,6 +387,8 @@ struct station_info {
385 struct rate_info txrate; 387 struct rate_info txrate;
386 u32 rx_packets; 388 u32 rx_packets;
387 u32 tx_packets; 389 u32 tx_packets;
390
391 int generation;
388}; 392};
389 393
390/** 394/**
@@ -444,6 +448,10 @@ enum mpath_info_flags {
444 * @flags: mesh path flags 448 * @flags: mesh path flags
445 * @discovery_timeout: total mesh path discovery timeout, in msecs 449 * @discovery_timeout: total mesh path discovery timeout, in msecs
446 * @discovery_retries: mesh path discovery retries 450 * @discovery_retries: mesh path discovery retries
451 * @generation: generation number for nl80211 dumps.
452 * This number should increase every time the list of mesh paths
453 * changes, i.e. when a station is added or removed, so that
454 * userspace can tell whether it got a consistent snapshot.
447 */ 455 */
448struct mpath_info { 456struct mpath_info {
449 u32 filled; 457 u32 filled;
@@ -454,6 +462,8 @@ struct mpath_info {
454 u32 discovery_timeout; 462 u32 discovery_timeout;
455 u8 discovery_retries; 463 u8 discovery_retries;
456 u8 flags; 464 u8 flags;
465
466 int generation;
457}; 467};
458 468
459/** 469/**
@@ -547,7 +557,6 @@ struct cfg80211_ssid {
547struct cfg80211_scan_request { 557struct cfg80211_scan_request {
548 struct cfg80211_ssid *ssids; 558 struct cfg80211_ssid *ssids;
549 int n_ssids; 559 int n_ssids;
550 struct ieee80211_channel **channels;
551 u32 n_channels; 560 u32 n_channels;
552 const u8 *ie; 561 const u8 *ie;
553 size_t ie_len; 562 size_t ie_len;
@@ -556,6 +565,9 @@ struct cfg80211_scan_request {
556 struct wiphy *wiphy; 565 struct wiphy *wiphy;
557 struct net_device *dev; 566 struct net_device *dev;
558 bool aborted; 567 bool aborted;
568
569 /* keep last */
570 struct ieee80211_channel *channels[0];
559}; 571};
560 572
561/** 573/**
@@ -1096,6 +1108,9 @@ struct cfg80211_ops {
1096 * @net: the network namespace this wiphy currently lives in 1108 * @net: the network namespace this wiphy currently lives in
1097 * @netnsok: if set to false, do not allow changing the netns of this 1109 * @netnsok: if set to false, do not allow changing the netns of this
1098 * wiphy at all 1110 * wiphy at all
1111 * @ps_default: default for powersave, will be set depending on the
1112 * kernel's default on wiphy_new(), but can be changed by the
1113 * driver if it has a good reason to override the default
1099 */ 1114 */
1100struct wiphy { 1115struct wiphy {
1101 /* assign these fields before you register the wiphy */ 1116 /* assign these fields before you register the wiphy */
@@ -1111,6 +1126,7 @@ struct wiphy {
1111 bool disable_beacon_hints; 1126 bool disable_beacon_hints;
1112 1127
1113 bool netnsok; 1128 bool netnsok;
1129 bool ps_default;
1114 1130
1115 enum cfg80211_signal_type signal_type; 1131 enum cfg80211_signal_type signal_type;
1116 1132
@@ -1335,10 +1351,10 @@ struct wireless_dev {
1335 struct cfg80211_cached_keys *keys; 1351 struct cfg80211_cached_keys *keys;
1336 u8 *ie; 1352 u8 *ie;
1337 size_t ie_len; 1353 size_t ie_len;
1338 u8 bssid[ETH_ALEN]; 1354 u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
1339 u8 ssid[IEEE80211_MAX_SSID_LEN]; 1355 u8 ssid[IEEE80211_MAX_SSID_LEN];
1340 s8 default_key, default_mgmt_key; 1356 s8 default_key, default_mgmt_key;
1341 bool ps; 1357 bool ps, prev_bssid_valid;
1342 int ps_timeout; 1358 int ps_timeout;
1343 } wext; 1359 } wext;
1344#endif 1360#endif
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index e2fb5767e1fa..76d43e12cc29 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -239,7 +239,14 @@ struct ieee80211_bss_conf {
239 * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU 239 * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU
240 * @IEEE80211_TX_CTL_INJECTED: Frame was injected, internal to mac80211. 240 * @IEEE80211_TX_CTL_INJECTED: Frame was injected, internal to mac80211.
241 * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted 241 * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted
242 * because the destination STA was in powersave mode. 242 * because the destination STA was in powersave mode. Note that to
243 * avoid race conditions, the filter must be set by the hardware or
244 * firmware upon receiving a frame that indicates that the station
245 * went to sleep (must be done on device to filter frames already on
246 * the queue) and may only be unset after mac80211 gives the OK for
247 * that by setting the IEEE80211_TX_CTL_CLEAR_PS_FILT (see above),
248 * since only then is it guaranteed that no more frames are in the
249 * hardware queue.
243 * @IEEE80211_TX_STAT_ACK: Frame was acknowledged 250 * @IEEE80211_TX_STAT_ACK: Frame was acknowledged
244 * @IEEE80211_TX_STAT_AMPDU: The frame was aggregated, so status 251 * @IEEE80211_TX_STAT_AMPDU: The frame was aggregated, so status
245 * is for the whole aggregation. 252 * is for the whole aggregation.
@@ -261,6 +268,10 @@ struct ieee80211_bss_conf {
261 * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?) 268 * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?)
262 * This frame is a response to a PS-poll frame and should be sent 269 * This frame is a response to a PS-poll frame and should be sent
263 * although the station is in powersave mode. 270 * although the station is in powersave mode.
271 * @IEEE80211_TX_CTL_MORE_FRAMES: More frames will be passed to the
272 * transmit function after the current frame, this can be used
273 * by drivers to kick the DMA queue only if unset or when the
274 * queue gets full.
264 */ 275 */
265enum mac80211_tx_control_flags { 276enum mac80211_tx_control_flags {
266 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), 277 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
@@ -281,6 +292,7 @@ enum mac80211_tx_control_flags {
281 IEEE80211_TX_INTFL_RETRIED = BIT(15), 292 IEEE80211_TX_INTFL_RETRIED = BIT(15),
282 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), 293 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16),
283 IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), 294 IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17),
295 IEEE80211_TX_CTL_MORE_FRAMES = BIT(18),
284}; 296};
285 297
286/** 298/**
@@ -338,6 +350,21 @@ enum mac80211_rate_control_flags {
338 * 350 *
339 * When used for transmit status reporting, the driver should 351 * When used for transmit status reporting, the driver should
340 * always report the rate along with the flags it used. 352 * always report the rate along with the flags it used.
353 *
354 * &struct ieee80211_tx_info contains an array of these structs
355 * in the control information, and it will be filled by the rate
356 * control algorithm according to what should be sent. For example,
357 * if this array contains, in the format { <idx>, <count> } the
358 * information
359 * { 3, 2 }, { 2, 2 }, { 1, 4 }, { -1, 0 }, { -1, 0 }
360 * then this means that the frame should be transmitted
361 * up to twice at rate 3, up to twice at rate 2, and up to four
362 * times at rate 1 if it doesn't get acknowledged. Say it gets
363 * acknowledged by the peer after the fifth attempt, the status
364 * information should then contain
365 * { 3, 2 }, { 2, 2 }, { 1, 1 }, { -1, 0 } ...
366 * since it was transmitted twice at rate 3, twice at rate 2
367 * and once at rate 1 after which we received an acknowledgement.
341 */ 368 */
342struct ieee80211_tx_rate { 369struct ieee80211_tx_rate {
343 s8 idx; 370 s8 idx;