aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-12-13 15:20:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-13 15:20:45 -0500
commit1d212aa96e1b63459486f729af9a3fa38768b801 (patch)
treee91e74db57a5bb7884b4681cdb788d405ec8f10f /include
parent8c4877a4128e7931077b024a891a4b284d8756a3 (diff)
parentb7613370db5ba66ad81e41cd3a5417fde4d5e03c (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Diffstat (limited to 'include')
-rw-r--r--include/linux/average.h4
-rw-r--r--include/linux/ieee80211.h3
-rw-r--r--include/linux/nl80211.h18
-rw-r--r--include/net/cfg80211.h58
4 files changed, 67 insertions, 16 deletions
diff --git a/include/linux/average.h b/include/linux/average.h
index 7706e40f95fa..c6028fd742c1 100644
--- a/include/linux/average.h
+++ b/include/linux/average.h
@@ -1,8 +1,6 @@
1#ifndef _LINUX_AVERAGE_H 1#ifndef _LINUX_AVERAGE_H
2#define _LINUX_AVERAGE_H 2#define _LINUX_AVERAGE_H
3 3
4#include <linux/kernel.h>
5
6/* Exponentially weighted moving average (EWMA) */ 4/* Exponentially weighted moving average (EWMA) */
7 5
8/* For more documentation see lib/average.c */ 6/* For more documentation see lib/average.c */
@@ -26,7 +24,7 @@ extern struct ewma *ewma_add(struct ewma *avg, unsigned long val);
26 */ 24 */
27static inline unsigned long ewma_read(const struct ewma *avg) 25static inline unsigned long ewma_read(const struct ewma *avg)
28{ 26{
29 return DIV_ROUND_CLOSEST(avg->internal, avg->factor); 27 return avg->internal >> avg->factor;
30} 28}
31 29
32#endif /* _LINUX_AVERAGE_H */ 30#endif /* _LINUX_AVERAGE_H */
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index ed5a03cbe184..351c0ab4e284 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1223,6 +1223,9 @@ enum ieee80211_eid {
1223 WLAN_EID_BSS_AC_ACCESS_DELAY = 68, 1223 WLAN_EID_BSS_AC_ACCESS_DELAY = 68,
1224 WLAN_EID_RRM_ENABLED_CAPABILITIES = 70, 1224 WLAN_EID_RRM_ENABLED_CAPABILITIES = 70,
1225 WLAN_EID_MULTIPLE_BSSID = 71, 1225 WLAN_EID_MULTIPLE_BSSID = 71,
1226 WLAN_EID_BSS_COEX_2040 = 72,
1227 WLAN_EID_OVERLAP_BSS_SCAN_PARAM = 74,
1228 WLAN_EID_EXT_CAPABILITY = 127,
1226 1229
1227 WLAN_EID_MOBILITY_DOMAIN = 54, 1230 WLAN_EID_MOBILITY_DOMAIN = 54,
1228 WLAN_EID_FAST_BSS_TRANSITION = 55, 1231 WLAN_EID_FAST_BSS_TRANSITION = 55,
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 5cfa579df476..380421253d16 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -394,6 +394,11 @@
394 * 394 *
395 * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface. 395 * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface.
396 * 396 *
397 * @NL80211_CMD_JOIN_MESH: Join a mesh. The mesh ID must be given, and initial
398 * mesh config parameters may be given.
399 * @NL80211_CMD_LEAVE_MESH: Leave the mesh network -- no special arguments, the
400 * network is determined by the network interface.
401 *
397 * @NL80211_CMD_MAX: highest used command number 402 * @NL80211_CMD_MAX: highest used command number
398 * @__NL80211_CMD_AFTER_LAST: internal use 403 * @__NL80211_CMD_AFTER_LAST: internal use
399 */ 404 */
@@ -500,6 +505,9 @@ enum nl80211_commands {
500 505
501 NL80211_CMD_FRAME_WAIT_CANCEL, 506 NL80211_CMD_FRAME_WAIT_CANCEL,
502 507
508 NL80211_CMD_JOIN_MESH,
509 NL80211_CMD_LEAVE_MESH,
510
503 /* add new commands above here */ 511 /* add new commands above here */
504 512
505 /* used to define NL80211_CMD_MAX below */ 513 /* used to define NL80211_CMD_MAX below */
@@ -841,6 +849,8 @@ enum nl80211_commands {
841 * flag isn't set, the frame will be rejected. This is also used as an 849 * flag isn't set, the frame will be rejected. This is also used as an
842 * nl80211 capability flag. 850 * nl80211 capability flag.
843 * 851 *
852 * @NL80211_ATTR_BSS_HTOPMODE: HT operation mode (u16)
853 *
844 * @NL80211_ATTR_MAX: highest attribute number currently defined 854 * @NL80211_ATTR_MAX: highest attribute number currently defined
845 * @__NL80211_ATTR_AFTER_LAST: internal use 855 * @__NL80211_ATTR_AFTER_LAST: internal use
846 */ 856 */
@@ -1017,6 +1027,8 @@ enum nl80211_attrs {
1017 1027
1018 NL80211_ATTR_OFFCHANNEL_TX_OK, 1028 NL80211_ATTR_OFFCHANNEL_TX_OK,
1019 1029
1030 NL80211_ATTR_BSS_HT_OPMODE,
1031
1020 /* add attributes here, update the policy in nl80211.c */ 1032 /* add attributes here, update the policy in nl80211.c */
1021 1033
1022 __NL80211_ATTR_AFTER_LAST, 1034 __NL80211_ATTR_AFTER_LAST,
@@ -1183,6 +1195,7 @@ enum nl80211_rate_info {
1183 * station) 1195 * station)
1184 * @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station) 1196 * @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station)
1185 * @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station) 1197 * @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station)
1198 * @NL80211_STA_INFO_SIGNAL_AVG: signal strength average (u8, dBm)
1186 */ 1199 */
1187enum nl80211_sta_info { 1200enum nl80211_sta_info {
1188 __NL80211_STA_INFO_INVALID, 1201 __NL80211_STA_INFO_INVALID,
@@ -1198,6 +1211,7 @@ enum nl80211_sta_info {
1198 NL80211_STA_INFO_TX_PACKETS, 1211 NL80211_STA_INFO_TX_PACKETS,
1199 NL80211_STA_INFO_TX_RETRIES, 1212 NL80211_STA_INFO_TX_RETRIES,
1200 NL80211_STA_INFO_TX_FAILED, 1213 NL80211_STA_INFO_TX_FAILED,
1214 NL80211_STA_INFO_SIGNAL_AVG,
1201 1215
1202 /* keep last */ 1216 /* keep last */
1203 __NL80211_STA_INFO_AFTER_LAST, 1217 __NL80211_STA_INFO_AFTER_LAST,
@@ -1547,6 +1561,9 @@ enum nl80211_mntr_flags {
1547 * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh 1561 * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh
1548 * point. 1562 * point.
1549 * 1563 *
1564 * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a
1565 * source mesh point for path selection elements.
1566 *
1550 * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically 1567 * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically
1551 * open peer links when we detect compatible mesh peers. 1568 * open peer links when we detect compatible mesh peers.
1552 * 1569 *
@@ -1593,6 +1610,7 @@ enum nl80211_meshconf_params {
1593 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, 1610 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
1594 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, 1611 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
1595 NL80211_MESHCONF_HWMP_ROOTMODE, 1612 NL80211_MESHCONF_HWMP_ROOTMODE,
1613 NL80211_MESHCONF_ELEMENT_TTL,
1596 1614
1597 /* keep last */ 1615 /* keep last */
1598 __NL80211_MESHCONF_ATTR_AFTER_LAST, 1616 __NL80211_MESHCONF_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 6b2af7aeddd3..0d5979924be3 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -258,13 +258,9 @@ struct ieee80211_supported_band {
258 258
259/** 259/**
260 * struct vif_params - describes virtual interface parameters 260 * struct vif_params - describes virtual interface parameters
261 * @mesh_id: mesh ID to use
262 * @mesh_id_len: length of the mesh ID
263 * @use_4addr: use 4-address frames 261 * @use_4addr: use 4-address frames
264 */ 262 */
265struct vif_params { 263struct vif_params {
266 u8 *mesh_id;
267 int mesh_id_len;
268 int use_4addr; 264 int use_4addr;
269}; 265};
270 266
@@ -424,6 +420,7 @@ struct station_parameters {
424 * @STATION_INFO_TX_RETRIES: @tx_retries filled 420 * @STATION_INFO_TX_RETRIES: @tx_retries filled
425 * @STATION_INFO_TX_FAILED: @tx_failed filled 421 * @STATION_INFO_TX_FAILED: @tx_failed filled
426 * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled 422 * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled
423 * @STATION_INFO_SIGNAL_AVG: @signal_avg filled
427 */ 424 */
428enum station_info_flags { 425enum station_info_flags {
429 STATION_INFO_INACTIVE_TIME = 1<<0, 426 STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -439,6 +436,7 @@ enum station_info_flags {
439 STATION_INFO_TX_RETRIES = 1<<10, 436 STATION_INFO_TX_RETRIES = 1<<10,
440 STATION_INFO_TX_FAILED = 1<<11, 437 STATION_INFO_TX_FAILED = 1<<11,
441 STATION_INFO_RX_DROP_MISC = 1<<12, 438 STATION_INFO_RX_DROP_MISC = 1<<12,
439 STATION_INFO_SIGNAL_AVG = 1<<13,
442}; 440};
443 441
444/** 442/**
@@ -485,6 +483,7 @@ struct rate_info {
485 * @plid: mesh peer link id 483 * @plid: mesh peer link id
486 * @plink_state: mesh peer link state 484 * @plink_state: mesh peer link state
487 * @signal: signal strength of last received packet in dBm 485 * @signal: signal strength of last received packet in dBm
486 * @signal_avg: signal strength average in dBm
488 * @txrate: current unicast bitrate to this station 487 * @txrate: current unicast bitrate to this station
489 * @rx_packets: packets received from this station 488 * @rx_packets: packets received from this station
490 * @tx_packets: packets transmitted to this station 489 * @tx_packets: packets transmitted to this station
@@ -505,6 +504,7 @@ struct station_info {
505 u16 plid; 504 u16 plid;
506 u8 plink_state; 505 u8 plink_state;
507 s8 signal; 506 s8 signal;
507 s8 signal_avg;
508 struct rate_info txrate; 508 struct rate_info txrate;
509 u32 rx_packets; 509 u32 rx_packets;
510 u32 tx_packets; 510 u32 tx_packets;
@@ -605,6 +605,8 @@ struct mpath_info {
605 * (or NULL for no change) 605 * (or NULL for no change)
606 * @basic_rates_len: number of basic rates 606 * @basic_rates_len: number of basic rates
607 * @ap_isolate: do not forward packets between connected stations 607 * @ap_isolate: do not forward packets between connected stations
608 * @ht_opmode: HT Operation mode
609 * (u16 = opmode, -1 = do not change)
608 */ 610 */
609struct bss_parameters { 611struct bss_parameters {
610 int use_cts_prot; 612 int use_cts_prot;
@@ -613,8 +615,14 @@ struct bss_parameters {
613 u8 *basic_rates; 615 u8 *basic_rates;
614 u8 basic_rates_len; 616 u8 basic_rates_len;
615 int ap_isolate; 617 int ap_isolate;
618 int ht_opmode;
616}; 619};
617 620
621/*
622 * struct mesh_config - 802.11s mesh configuration
623 *
624 * These parameters can be changed while the mesh is active.
625 */
618struct mesh_config { 626struct mesh_config {
619 /* Timeouts in ms */ 627 /* Timeouts in ms */
620 /* Mesh plink management parameters */ 628 /* Mesh plink management parameters */
@@ -624,6 +632,8 @@ struct mesh_config {
624 u16 dot11MeshMaxPeerLinks; 632 u16 dot11MeshMaxPeerLinks;
625 u8 dot11MeshMaxRetries; 633 u8 dot11MeshMaxRetries;
626 u8 dot11MeshTTL; 634 u8 dot11MeshTTL;
635 /* ttl used in path selection information elements */
636 u8 element_ttl;
627 bool auto_open_plinks; 637 bool auto_open_plinks;
628 /* HWMP parameters */ 638 /* HWMP parameters */
629 u8 dot11MeshHWMPmaxPREQretries; 639 u8 dot11MeshHWMPmaxPREQretries;
@@ -636,6 +646,18 @@ struct mesh_config {
636}; 646};
637 647
638/** 648/**
649 * struct mesh_setup - 802.11s mesh setup configuration
650 * @mesh_id: the mesh ID
651 * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes
652 *
653 * These parameters are fixed when the mesh is created.
654 */
655struct mesh_setup {
656 const u8 *mesh_id;
657 u8 mesh_id_len;
658};
659
660/**
639 * struct ieee80211_txq_params - TX queue parameters 661 * struct ieee80211_txq_params - TX queue parameters
640 * @queue: TX queue identifier (NL80211_TXQ_Q_*) 662 * @queue: TX queue identifier (NL80211_TXQ_Q_*)
641 * @txop: Maximum burst time in units of 32 usecs, 0 meaning disabled 663 * @txop: Maximum burst time in units of 32 usecs, 0 meaning disabled
@@ -1031,7 +1053,8 @@ struct cfg80211_pmksa {
1031 * 1053 *
1032 * @add_virtual_intf: create a new virtual interface with the given name, 1054 * @add_virtual_intf: create a new virtual interface with the given name,
1033 * must set the struct wireless_dev's iftype. Beware: You must create 1055 * must set the struct wireless_dev's iftype. Beware: You must create
1034 * the new netdev in the wiphy's network namespace! 1056 * the new netdev in the wiphy's network namespace! Returns the netdev,
1057 * or an ERR_PTR.
1035 * 1058 *
1036 * @del_virtual_intf: remove the virtual interface determined by ifindex. 1059 * @del_virtual_intf: remove the virtual interface determined by ifindex.
1037 * 1060 *
@@ -1075,7 +1098,7 @@ struct cfg80211_pmksa {
1075 * 1098 *
1076 * @get_mesh_params: Put the current mesh parameters into *params 1099 * @get_mesh_params: Put the current mesh parameters into *params
1077 * 1100 *
1078 * @set_mesh_params: Set mesh parameters. 1101 * @update_mesh_params: Update mesh parameters on a running mesh.
1079 * The mask is a bitfield which tells us which parameters to 1102 * The mask is a bitfield which tells us which parameters to
1080 * set, and which to leave alone. 1103 * set, and which to leave alone.
1081 * 1104 *
@@ -1166,9 +1189,11 @@ struct cfg80211_ops {
1166 int (*suspend)(struct wiphy *wiphy); 1189 int (*suspend)(struct wiphy *wiphy);
1167 int (*resume)(struct wiphy *wiphy); 1190 int (*resume)(struct wiphy *wiphy);
1168 1191
1169 int (*add_virtual_intf)(struct wiphy *wiphy, char *name, 1192 struct net_device * (*add_virtual_intf)(struct wiphy *wiphy,
1170 enum nl80211_iftype type, u32 *flags, 1193 char *name,
1171 struct vif_params *params); 1194 enum nl80211_iftype type,
1195 u32 *flags,
1196 struct vif_params *params);
1172 int (*del_virtual_intf)(struct wiphy *wiphy, struct net_device *dev); 1197 int (*del_virtual_intf)(struct wiphy *wiphy, struct net_device *dev);
1173 int (*change_virtual_intf)(struct wiphy *wiphy, 1198 int (*change_virtual_intf)(struct wiphy *wiphy,
1174 struct net_device *dev, 1199 struct net_device *dev,
@@ -1224,9 +1249,14 @@ struct cfg80211_ops {
1224 int (*get_mesh_params)(struct wiphy *wiphy, 1249 int (*get_mesh_params)(struct wiphy *wiphy,
1225 struct net_device *dev, 1250 struct net_device *dev,
1226 struct mesh_config *conf); 1251 struct mesh_config *conf);
1227 int (*set_mesh_params)(struct wiphy *wiphy, 1252 int (*update_mesh_params)(struct wiphy *wiphy,
1228 struct net_device *dev, 1253 struct net_device *dev, u32 mask,
1229 const struct mesh_config *nconf, u32 mask); 1254 const struct mesh_config *nconf);
1255 int (*join_mesh)(struct wiphy *wiphy, struct net_device *dev,
1256 const struct mesh_config *conf,
1257 const struct mesh_setup *setup);
1258 int (*leave_mesh)(struct wiphy *wiphy, struct net_device *dev);
1259
1230 int (*change_bss)(struct wiphy *wiphy, struct net_device *dev, 1260 int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
1231 struct bss_parameters *params); 1261 struct bss_parameters *params);
1232 1262
@@ -1642,6 +1672,8 @@ struct cfg80211_cached_keys;
1642 * @bssid: (private) Used by the internal configuration code 1672 * @bssid: (private) Used by the internal configuration code
1643 * @ssid: (private) Used by the internal configuration code 1673 * @ssid: (private) Used by the internal configuration code
1644 * @ssid_len: (private) Used by the internal configuration code 1674 * @ssid_len: (private) Used by the internal configuration code
1675 * @mesh_id_len: (private) Used by the internal configuration code
1676 * @mesh_id_up_len: (private) Used by the internal configuration code
1645 * @wext: (private) Used by the internal wireless extensions compat code 1677 * @wext: (private) Used by the internal wireless extensions compat code
1646 * @use_4addr: indicates 4addr mode is used on this interface, must be 1678 * @use_4addr: indicates 4addr mode is used on this interface, must be
1647 * set by driver (if supported) on add_interface BEFORE registering the 1679 * set by driver (if supported) on add_interface BEFORE registering the
@@ -1671,7 +1703,7 @@ struct wireless_dev {
1671 1703
1672 /* currently used for IBSS and SME - might be rearranged later */ 1704 /* currently used for IBSS and SME - might be rearranged later */
1673 u8 ssid[IEEE80211_MAX_SSID_LEN]; 1705 u8 ssid[IEEE80211_MAX_SSID_LEN];
1674 u8 ssid_len; 1706 u8 ssid_len, mesh_id_len, mesh_id_up_len;
1675 enum { 1707 enum {
1676 CFG80211_SME_IDLE, 1708 CFG80211_SME_IDLE,
1677 CFG80211_SME_CONNECTING, 1709 CFG80211_SME_CONNECTING,