aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-11-29 14:19:09 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-29 14:19:09 -0500
commit77148625e10d0fda50d05e92d199c0df17b66e9a (patch)
treefdb5bb1e06933dc8891a3c4d3c93c371801d8b37 /include
parenta41778694806ac1ccd4b1dafed1abef8d5ba98ac (diff)
parent51cce8a590c4696d62bfacc63378d1036084cef7 (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'include')
-rw-r--r--include/linux/average.h32
-rw-r--r--include/linux/nl80211.h32
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/net/cfg80211.h17
-rw-r--r--include/net/mac80211.h50
-rw-r--r--include/net/regulatory.h7
6 files changed, 137 insertions, 2 deletions
diff --git a/include/linux/average.h b/include/linux/average.h
new file mode 100644
index 000000000000..7706e40f95fa
--- /dev/null
+++ b/include/linux/average.h
@@ -0,0 +1,32 @@
1#ifndef _LINUX_AVERAGE_H
2#define _LINUX_AVERAGE_H
3
4#include <linux/kernel.h>
5
6/* Exponentially weighted moving average (EWMA) */
7
8/* For more documentation see lib/average.c */
9
10struct ewma {
11 unsigned long internal;
12 unsigned long factor;
13 unsigned long weight;
14};
15
16extern void ewma_init(struct ewma *avg, unsigned long factor,
17 unsigned long weight);
18
19extern struct ewma *ewma_add(struct ewma *avg, unsigned long val);
20
21/**
22 * ewma_read() - Get average value
23 * @avg: Average structure
24 *
25 * Returns the average value held in @avg.
26 */
27static inline unsigned long ewma_read(const struct ewma *avg)
28{
29 return DIV_ROUND_CLOSEST(avg->internal, avg->factor);
30}
31
32#endif /* _LINUX_AVERAGE_H */
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index fb877b5621b7..d706bf3badc8 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -804,6 +804,30 @@ enum nl80211_commands {
804 * @NL80211_ATTR_SUPPORT_IBSS_RSN: The device supports IBSS RSN, which mostly 804 * @NL80211_ATTR_SUPPORT_IBSS_RSN: The device supports IBSS RSN, which mostly
805 * means support for per-station GTKs. 805 * means support for per-station GTKs.
806 * 806 *
807 * @NL80211_ATTR_WIPHY_ANTENNA_TX: Bitmap of allowed antennas for transmitting.
808 * This can be used to mask out antennas which are not attached or should
809 * not be used for transmitting. If an antenna is not selected in this
810 * bitmap the hardware is not allowed to transmit on this antenna.
811 *
812 * Each bit represents one antenna, starting with antenna 1 at the first
813 * bit. Depending on which antennas are selected in the bitmap, 802.11n
814 * drivers can derive which chainmasks to use (if all antennas belonging to
815 * a particular chain are disabled this chain should be disabled) and if
816 * a chain has diversity antennas wether diversity should be used or not.
817 * HT capabilities (STBC, TX Beamforming, Antenna selection) can be
818 * derived from the available chains after applying the antenna mask.
819 * Non-802.11n drivers can derive wether to use diversity or not.
820 * Drivers may reject configurations or RX/TX mask combinations they cannot
821 * support by returning -EINVAL.
822 *
823 * @NL80211_ATTR_WIPHY_ANTENNA_RX: Bitmap of allowed antennas for receiving.
824 * This can be used to mask out antennas which are not attached or should
825 * not be used for receiving. If an antenna is not selected in this bitmap
826 * the hardware should not be configured to receive on this antenna.
827 * For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX.
828 *
829 * @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS
830 *
807 * @NL80211_ATTR_MAX: highest attribute number currently defined 831 * @NL80211_ATTR_MAX: highest attribute number currently defined
808 * @__NL80211_ATTR_AFTER_LAST: internal use 832 * @__NL80211_ATTR_AFTER_LAST: internal use
809 */ 833 */
@@ -973,6 +997,11 @@ enum nl80211_attrs {
973 997
974 NL80211_ATTR_SUPPORT_IBSS_RSN, 998 NL80211_ATTR_SUPPORT_IBSS_RSN,
975 999
1000 NL80211_ATTR_WIPHY_ANTENNA_TX,
1001 NL80211_ATTR_WIPHY_ANTENNA_RX,
1002
1003 NL80211_ATTR_MCAST_RATE,
1004
976 /* add attributes here, update the policy in nl80211.c */ 1005 /* add attributes here, update the policy in nl80211.c */
977 1006
978 __NL80211_ATTR_AFTER_LAST, 1007 __NL80211_ATTR_AFTER_LAST,
@@ -1790,6 +1819,8 @@ enum nl80211_ps_state {
1790 * the minimum amount the RSSI level must change after an event before a 1819 * the minimum amount the RSSI level must change after an event before a
1791 * new event may be issued (to reduce effects of RSSI oscillation). 1820 * new event may be issued (to reduce effects of RSSI oscillation).
1792 * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event 1821 * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event
1822 * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many
1823 * consecutive packets were not acknowledged by the peer
1793 * @__NL80211_ATTR_CQM_AFTER_LAST: internal 1824 * @__NL80211_ATTR_CQM_AFTER_LAST: internal
1794 * @NL80211_ATTR_CQM_MAX: highest key attribute 1825 * @NL80211_ATTR_CQM_MAX: highest key attribute
1795 */ 1826 */
@@ -1798,6 +1829,7 @@ enum nl80211_attr_cqm {
1798 NL80211_ATTR_CQM_RSSI_THOLD, 1829 NL80211_ATTR_CQM_RSSI_THOLD,
1799 NL80211_ATTR_CQM_RSSI_HYST, 1830 NL80211_ATTR_CQM_RSSI_HYST,
1800 NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, 1831 NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT,
1832 NL80211_ATTR_CQM_PKT_LOSS_EVENT,
1801 1833
1802 /* keep last */ 1834 /* keep last */
1803 __NL80211_ATTR_CQM_AFTER_LAST, 1835 __NL80211_ATTR_CQM_AFTER_LAST,
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index c6bcfe93b9ca..32bd56949604 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2047,6 +2047,7 @@
2047#define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 2047#define PCI_DEVICE_ID_AFAVLAB_P030 0x2182
2048#define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150 2048#define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150
2049 2049
2050#define PCI_VENDOR_ID_BCM_GVC 0x14a4
2050#define PCI_VENDOR_ID_BROADCOM 0x14e4 2051#define PCI_VENDOR_ID_BROADCOM 0x14e4
2051#define PCI_DEVICE_ID_TIGON3_5752 0x1600 2052#define PCI_DEVICE_ID_TIGON3_5752 0x1600
2052#define PCI_DEVICE_ID_TIGON3_5752M 0x1601 2053#define PCI_DEVICE_ID_TIGON3_5752M 0x1601
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 772dea243e5d..0663945cfa48 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -923,6 +923,7 @@ struct cfg80211_disassoc_request {
923 * @privacy: this is a protected network, keys will be configured 923 * @privacy: this is a protected network, keys will be configured
924 * after joining 924 * after joining
925 * @basic_rates: bitmap of basic rates to use when creating the IBSS 925 * @basic_rates: bitmap of basic rates to use when creating the IBSS
926 * @mcast_rate: per-band multicast rate index + 1 (0: disabled)
926 */ 927 */
927struct cfg80211_ibss_params { 928struct cfg80211_ibss_params {
928 u8 *ssid; 929 u8 *ssid;
@@ -934,6 +935,7 @@ struct cfg80211_ibss_params {
934 u32 basic_rates; 935 u32 basic_rates;
935 bool channel_fixed; 936 bool channel_fixed;
936 bool privacy; 937 bool privacy;
938 int mcast_rate[IEEE80211_NUM_BANDS];
937}; 939};
938 940
939/** 941/**
@@ -1304,6 +1306,9 @@ struct cfg80211_ops {
1304 void (*mgmt_frame_register)(struct wiphy *wiphy, 1306 void (*mgmt_frame_register)(struct wiphy *wiphy,
1305 struct net_device *dev, 1307 struct net_device *dev,
1306 u16 frame_type, bool reg); 1308 u16 frame_type, bool reg);
1309
1310 int (*set_antenna)(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant);
1311 int (*get_antenna)(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant);
1307}; 1312};
1308 1313
1309/* 1314/*
@@ -2596,6 +2601,18 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev,
2596 enum nl80211_cqm_rssi_threshold_event rssi_event, 2601 enum nl80211_cqm_rssi_threshold_event rssi_event,
2597 gfp_t gfp); 2602 gfp_t gfp);
2598 2603
2604/**
2605 * cfg80211_cqm_pktloss_notify - notify userspace about packetloss to peer
2606 * @dev: network device
2607 * @peer: peer's MAC address
2608 * @num_packets: how many packets were lost -- should be a fixed threshold
2609 * but probably no less than maybe 50, or maybe a throughput dependent
2610 * threshold (to account for temporary interference)
2611 * @gfp: context flags
2612 */
2613void cfg80211_cqm_pktloss_notify(struct net_device *dev,
2614 const u8 *peer, u32 num_packets, gfp_t gfp);
2615
2599/* Logging, debugging and troubleshooting/diagnostic helpers. */ 2616/* Logging, debugging and troubleshooting/diagnostic helpers. */
2600 2617
2601/* wiphy_printk helpers, similar to dev_printk */ 2618/* wiphy_printk helpers, similar to dev_printk */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9fdf982d1286..eaa4affd40cd 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -97,6 +97,20 @@ enum ieee80211_max_queues {
97}; 97};
98 98
99/** 99/**
100 * enum ieee80211_ac_numbers - AC numbers as used in mac80211
101 * @IEEE80211_AC_VO: voice
102 * @IEEE80211_AC_VI: video
103 * @IEEE80211_AC_BE: best effort
104 * @IEEE80211_AC_BK: background
105 */
106enum ieee80211_ac_numbers {
107 IEEE80211_AC_VO = 0,
108 IEEE80211_AC_VI = 1,
109 IEEE80211_AC_BE = 2,
110 IEEE80211_AC_BK = 3,
111};
112
113/**
100 * struct ieee80211_tx_queue_params - transmit queue configuration 114 * struct ieee80211_tx_queue_params - transmit queue configuration
101 * 115 *
102 * The information provided in this structure is required for QoS 116 * The information provided in this structure is required for QoS
@@ -205,6 +219,7 @@ enum ieee80211_bss_change {
205 * @basic_rates: bitmap of basic rates, each bit stands for an 219 * @basic_rates: bitmap of basic rates, each bit stands for an
206 * index into the rate table configured by the driver in 220 * index into the rate table configured by the driver in
207 * the current band. 221 * the current band.
222 * @mcast_rate: per-band multicast rate index + 1 (0: disabled)
208 * @bssid: The BSSID for this BSS 223 * @bssid: The BSSID for this BSS
209 * @enable_beacon: whether beaconing should be enabled or not 224 * @enable_beacon: whether beaconing should be enabled or not
210 * @channel_type: Channel type for this BSS -- the hardware might be 225 * @channel_type: Channel type for this BSS -- the hardware might be
@@ -244,6 +259,7 @@ struct ieee80211_bss_conf {
244 u16 assoc_capability; 259 u16 assoc_capability;
245 u64 timestamp; 260 u64 timestamp;
246 u32 basic_rates; 261 u32 basic_rates;
262 int mcast_rate[IEEE80211_NUM_BANDS];
247 u16 ht_operation_mode; 263 u16 ht_operation_mode;
248 s32 cqm_rssi_thold; 264 s32 cqm_rssi_thold;
249 u32 cqm_rssi_hyst; 265 u32 cqm_rssi_hyst;
@@ -1652,6 +1668,11 @@ enum ieee80211_ampdu_mlme_action {
1652 * and IV16) for the given key from hardware. 1668 * and IV16) for the given key from hardware.
1653 * The callback must be atomic. 1669 * The callback must be atomic.
1654 * 1670 *
1671 * @set_frag_threshold: Configuration of fragmentation threshold. Assign this
1672 * if the device does fragmentation by itself; if this callback is
1673 * implemented then the stack will not do fragmentation.
1674 * The callback can sleep.
1675 *
1655 * @set_rts_threshold: Configuration of RTS threshold (if device needs it) 1676 * @set_rts_threshold: Configuration of RTS threshold (if device needs it)
1656 * The callback can sleep. 1677 * The callback can sleep.
1657 * 1678 *
@@ -1724,6 +1745,13 @@ enum ieee80211_ampdu_mlme_action {
1724 * completion of the channel switch. 1745 * completion of the channel switch.
1725 * 1746 *
1726 * @napi_poll: Poll Rx queue for incoming data frames. 1747 * @napi_poll: Poll Rx queue for incoming data frames.
1748 *
1749 * @set_antenna: Set antenna configuration (tx_ant, rx_ant) on the device.
1750 * Parameters are bitmaps of allowed antennas to use for TX/RX. Drivers may
1751 * reject TX/RX mask combinations they cannot support by returning -EINVAL
1752 * (also see nl80211.h @NL80211_ATTR_WIPHY_ANTENNA_TX).
1753 *
1754 * @get_antenna: Get current antenna configuration from device (tx_ant, rx_ant).
1727 */ 1755 */
1728struct ieee80211_ops { 1756struct ieee80211_ops {
1729 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1757 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -1765,6 +1793,7 @@ struct ieee80211_ops {
1765 struct ieee80211_low_level_stats *stats); 1793 struct ieee80211_low_level_stats *stats);
1766 void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx, 1794 void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx,
1767 u32 *iv32, u16 *iv16); 1795 u32 *iv32, u16 *iv16);
1796 int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value);
1768 int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value); 1797 int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value);
1769 int (*sta_add)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1798 int (*sta_add)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1770 struct ieee80211_sta *sta); 1799 struct ieee80211_sta *sta);
@@ -1793,6 +1822,8 @@ struct ieee80211_ops {
1793 void (*channel_switch)(struct ieee80211_hw *hw, 1822 void (*channel_switch)(struct ieee80211_hw *hw,
1794 struct ieee80211_channel_switch *ch_switch); 1823 struct ieee80211_channel_switch *ch_switch);
1795 int (*napi_poll)(struct ieee80211_hw *hw, int budget); 1824 int (*napi_poll)(struct ieee80211_hw *hw, int budget);
1825 int (*set_antenna)(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant);
1826 int (*get_antenna)(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
1796}; 1827};
1797 1828
1798/** 1829/**
@@ -2501,6 +2532,21 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
2501 struct ieee80211_sta *pubsta, bool block); 2532 struct ieee80211_sta *pubsta, bool block);
2502 2533
2503/** 2534/**
2535 * ieee80211_ap_probereq_get - retrieve a Probe Request template
2536 * @hw: pointer obtained from ieee80211_alloc_hw().
2537 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
2538 *
2539 * Creates a Probe Request template which can, for example, be uploaded to
2540 * hardware. The template is filled with bssid, ssid and supported rate
2541 * information. This function must only be called from within the
2542 * .bss_info_changed callback function and only in managed mode. The function
2543 * is only useful when the interface is associated, otherwise it will return
2544 * NULL.
2545 */
2546struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
2547 struct ieee80211_vif *vif);
2548
2549/**
2504 * ieee80211_beacon_loss - inform hardware does not receive beacons 2550 * ieee80211_beacon_loss - inform hardware does not receive beacons
2505 * 2551 *
2506 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 2552 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
@@ -2640,7 +2686,7 @@ enum rate_control_changed {
2640 * @rate_idx_mask: user-requested rate mask (not MCS for now) 2686 * @rate_idx_mask: user-requested rate mask (not MCS for now)
2641 * @skb: the skb that will be transmitted, the control information in it needs 2687 * @skb: the skb that will be transmitted, the control information in it needs
2642 * to be filled in 2688 * to be filled in
2643 * @ap: whether this frame is sent out in AP mode 2689 * @bss: whether this frame is sent out in AP or IBSS mode
2644 */ 2690 */
2645struct ieee80211_tx_rate_control { 2691struct ieee80211_tx_rate_control {
2646 struct ieee80211_hw *hw; 2692 struct ieee80211_hw *hw;
@@ -2651,7 +2697,7 @@ struct ieee80211_tx_rate_control {
2651 bool rts, short_preamble; 2697 bool rts, short_preamble;
2652 u8 max_rate_idx; 2698 u8 max_rate_idx;
2653 u32 rate_idx_mask; 2699 u32 rate_idx_mask;
2654 bool ap; 2700 bool bss;
2655}; 2701};
2656 2702
2657struct rate_control_ops { 2703struct rate_control_ops {
diff --git a/include/net/regulatory.h b/include/net/regulatory.h
index 9e103a4e91ee..356d6e3dc20a 100644
--- a/include/net/regulatory.h
+++ b/include/net/regulatory.h
@@ -43,6 +43,12 @@ enum environment_cap {
43 * @intersect: indicates whether the wireless core should intersect 43 * @intersect: indicates whether the wireless core should intersect
44 * the requested regulatory domain with the presently set regulatory 44 * the requested regulatory domain with the presently set regulatory
45 * domain. 45 * domain.
46 * @processed: indicates whether or not this requests has already been
47 * processed. When the last request is processed it means that the
48 * currently regulatory domain set on cfg80211 is updated from
49 * CRDA and can be used by other regulatory requests. When a
50 * the last request is not yet processed we must yield until it
51 * is processed before processing any new requests.
46 * @country_ie_checksum: checksum of the last processed and accepted 52 * @country_ie_checksum: checksum of the last processed and accepted
47 * country IE 53 * country IE
48 * @country_ie_env: lets us know if the AP is telling us we are outdoor, 54 * @country_ie_env: lets us know if the AP is telling us we are outdoor,
@@ -54,6 +60,7 @@ struct regulatory_request {
54 enum nl80211_reg_initiator initiator; 60 enum nl80211_reg_initiator initiator;
55 char alpha2[2]; 61 char alpha2[2];
56 bool intersect; 62 bool intersect;
63 bool processed;
57 enum environment_cap country_ie_env; 64 enum environment_cap country_ie_env;
58 struct list_head list; 65 struct list_head list;
59}; 66};