aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-07-30 22:26:55 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-30 22:26:55 -0400
commit2f6d7c1b34403b97fa57473edcb6749d1db5ace3 (patch)
tree97da33c077b08b72a361ff5a4542b86d190b0164 /include
parentdf597efb5737063497f1a4f7c996cc9aec294230 (diff)
parent1e4247d457c6a42e4a05cb7dfa4e6ea1fa65c112 (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/ieee80211.h25
-rw-r--r--include/linux/nl80211.h9
-rw-r--r--include/net/cfg80211.h104
-rw-r--r--include/net/mac80211.h4
4 files changed, 92 insertions, 50 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 23343ab0bb03..21556a2d9e7e 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -802,6 +802,31 @@ struct ieee80211_ht_cap {
802#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 802#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
803#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C 803#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
804 804
805/*
806 * Maximum length of AMPDU that the STA can receive.
807 * Length = 2 ^ (13 + max_ampdu_length_exp) - 1 (octets)
808 */
809enum ieee80211_max_ampdu_length_exp {
810 IEEE80211_HT_MAX_AMPDU_8K = 0,
811 IEEE80211_HT_MAX_AMPDU_16K = 1,
812 IEEE80211_HT_MAX_AMPDU_32K = 2,
813 IEEE80211_HT_MAX_AMPDU_64K = 3
814};
815
816#define IEEE80211_HT_MAX_AMPDU_FACTOR 13
817
818/* Minimum MPDU start spacing */
819enum ieee80211_min_mpdu_spacing {
820 IEEE80211_HT_MPDU_DENSITY_NONE = 0, /* No restriction */
821 IEEE80211_HT_MPDU_DENSITY_0_25 = 1, /* 1/4 usec */
822 IEEE80211_HT_MPDU_DENSITY_0_5 = 2, /* 1/2 usec */
823 IEEE80211_HT_MPDU_DENSITY_1 = 3, /* 1 usec */
824 IEEE80211_HT_MPDU_DENSITY_2 = 4, /* 2 usec */
825 IEEE80211_HT_MPDU_DENSITY_4 = 5, /* 4 usec */
826 IEEE80211_HT_MPDU_DENSITY_8 = 6, /* 8 usec */
827 IEEE80211_HT_MPDU_DENSITY_16 = 7 /* 16 usec */
828};
829
805/** 830/**
806 * struct ieee80211_ht_info - HT information 831 * struct ieee80211_ht_info - HT information
807 * 832 *
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 962e2232a074..cb3dc6027fd9 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -262,6 +262,9 @@
262 * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and 262 * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and
263 * %NL80211_ATTR_REASON_CODE attributes are used. 263 * %NL80211_ATTR_REASON_CODE attributes are used.
264 * 264 *
265 * @NL80211_CMD_SET_WIPHY_NETNS: Set a wiphy's netns. Note that all devices
266 * associated with this wiphy must be down and will follow.
267 *
265 * @NL80211_CMD_MAX: highest used command number 268 * @NL80211_CMD_MAX: highest used command number
266 * @__NL80211_CMD_AFTER_LAST: internal use 269 * @__NL80211_CMD_AFTER_LAST: internal use
267 */ 270 */
@@ -336,6 +339,8 @@ enum nl80211_commands {
336 NL80211_CMD_ROAM, 339 NL80211_CMD_ROAM,
337 NL80211_CMD_DISCONNECT, 340 NL80211_CMD_DISCONNECT,
338 341
342 NL80211_CMD_SET_WIPHY_NETNS,
343
339 /* add new commands above here */ 344 /* add new commands above here */
340 345
341 /* used to define NL80211_CMD_MAX below */ 346 /* used to define NL80211_CMD_MAX below */
@@ -573,6 +578,8 @@ enum nl80211_commands {
573 * and join_ibss(), key information is in a nested attribute each 578 * and join_ibss(), key information is in a nested attribute each
574 * with %NL80211_KEY_* sub-attributes 579 * with %NL80211_KEY_* sub-attributes
575 * 580 *
581 * @NL80211_ATTR_PID: Process ID of a network namespace.
582 *
576 * @NL80211_ATTR_MAX: highest attribute number currently defined 583 * @NL80211_ATTR_MAX: highest attribute number currently defined
577 * @__NL80211_ATTR_AFTER_LAST: internal use 584 * @__NL80211_ATTR_AFTER_LAST: internal use
578 */ 585 */
@@ -701,6 +708,8 @@ enum nl80211_attrs {
701 NL80211_ATTR_KEY, 708 NL80211_ATTR_KEY,
702 NL80211_ATTR_KEYS, 709 NL80211_ATTR_KEYS,
703 710
711 NL80211_ATTR_PID,
712
704 /* add attributes here, update the policy in nl80211.c */ 713 /* add attributes here, update the policy in nl80211.c */
705 714
706 __NL80211_ATTR_AFTER_LAST, 715 __NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index a981ca8a5701..e1b92358242b 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -542,7 +542,7 @@ struct cfg80211_ssid {
542 * @ie: optional information element(s) to add into Probe Request or %NULL 542 * @ie: optional information element(s) to add into Probe Request or %NULL
543 * @ie_len: length of ie in octets 543 * @ie_len: length of ie in octets
544 * @wiphy: the wiphy this was for 544 * @wiphy: the wiphy this was for
545 * @ifidx: the interface index 545 * @dev: the interface
546 */ 546 */
547struct cfg80211_scan_request { 547struct cfg80211_scan_request {
548 struct cfg80211_ssid *ssids; 548 struct cfg80211_ssid *ssids;
@@ -554,7 +554,7 @@ struct cfg80211_scan_request {
554 554
555 /* internal */ 555 /* internal */
556 struct wiphy *wiphy; 556 struct wiphy *wiphy;
557 int ifidx; 557 struct net_device *dev;
558 bool aborted; 558 bool aborted;
559}; 559};
560 560
@@ -845,7 +845,8 @@ struct cfg80211_bitrate_mask {
845 * @resume: wiphy device needs to be resumed 845 * @resume: wiphy device needs to be resumed
846 * 846 *
847 * @add_virtual_intf: create a new virtual interface with the given name, 847 * @add_virtual_intf: create a new virtual interface with the given name,
848 * must set the struct wireless_dev's iftype. 848 * must set the struct wireless_dev's iftype. Beware: You must create
849 * the new netdev in the wiphy's network namespace!
849 * 850 *
850 * @del_virtual_intf: remove the virtual interface determined by ifindex. 851 * @del_virtual_intf: remove the virtual interface determined by ifindex.
851 * 852 *
@@ -937,7 +938,7 @@ struct cfg80211_ops {
937 int (*add_virtual_intf)(struct wiphy *wiphy, char *name, 938 int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
938 enum nl80211_iftype type, u32 *flags, 939 enum nl80211_iftype type, u32 *flags,
939 struct vif_params *params); 940 struct vif_params *params);
940 int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex); 941 int (*del_virtual_intf)(struct wiphy *wiphy, struct net_device *dev);
941 int (*change_virtual_intf)(struct wiphy *wiphy, 942 int (*change_virtual_intf)(struct wiphy *wiphy,
942 struct net_device *dev, 943 struct net_device *dev,
943 enum nl80211_iftype type, u32 *flags, 944 enum nl80211_iftype type, u32 *flags,
@@ -1088,6 +1089,9 @@ struct cfg80211_ops {
1088 * @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold); 1089 * @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold);
1089 * -1 = fragmentation disabled, only odd values >= 256 used 1090 * -1 = fragmentation disabled, only odd values >= 256 used
1090 * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled 1091 * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled
1092 * @net: the network namespace this wiphy currently lives in
1093 * @netnsok: if set to false, do not allow changing the netns of this
1094 * wiphy at all
1091 */ 1095 */
1092struct wiphy { 1096struct wiphy {
1093 /* assign these fields before you register the wiphy */ 1097 /* assign these fields before you register the wiphy */
@@ -1101,6 +1105,8 @@ struct wiphy {
1101 bool custom_regulatory; 1105 bool custom_regulatory;
1102 bool strict_regulatory; 1106 bool strict_regulatory;
1103 1107
1108 bool netnsok;
1109
1104 enum cfg80211_signal_type signal_type; 1110 enum cfg80211_signal_type signal_type;
1105 1111
1106 int bss_priv_size; 1112 int bss_priv_size;
@@ -1139,9 +1145,35 @@ struct wiphy {
1139 /* dir in debugfs: ieee80211/<wiphyname> */ 1145 /* dir in debugfs: ieee80211/<wiphyname> */
1140 struct dentry *debugfsdir; 1146 struct dentry *debugfsdir;
1141 1147
1148#ifdef CONFIG_NET_NS
1149 /* the network namespace this phy lives in currently */
1150 struct net *_net;
1151#endif
1152
1142 char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); 1153 char priv[0] __attribute__((__aligned__(NETDEV_ALIGN)));
1143}; 1154};
1144 1155
1156#ifdef CONFIG_NET_NS
1157static inline struct net *wiphy_net(struct wiphy *wiphy)
1158{
1159 return wiphy->_net;
1160}
1161
1162static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net)
1163{
1164 wiphy->_net = net;
1165}
1166#else
1167static inline struct net *wiphy_net(struct wiphy *wiphy)
1168{
1169 return &init_net;
1170}
1171
1172static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net)
1173{
1174}
1175#endif
1176
1145/** 1177/**
1146 * wiphy_priv - return priv from wiphy 1178 * wiphy_priv - return priv from wiphy
1147 * 1179 *
@@ -1563,43 +1595,6 @@ int cfg80211_wext_siwmlme(struct net_device *dev,
1563int cfg80211_wext_giwrange(struct net_device *dev, 1595int cfg80211_wext_giwrange(struct net_device *dev,
1564 struct iw_request_info *info, 1596 struct iw_request_info *info,
1565 struct iw_point *data, char *extra); 1597 struct iw_point *data, char *extra);
1566int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
1567 struct iw_request_info *info,
1568 struct iw_freq *freq, char *extra);
1569int cfg80211_ibss_wext_giwfreq(struct net_device *dev,
1570 struct iw_request_info *info,
1571 struct iw_freq *freq, char *extra);
1572int cfg80211_ibss_wext_siwessid(struct net_device *dev,
1573 struct iw_request_info *info,
1574 struct iw_point *data, char *ssid);
1575int cfg80211_ibss_wext_giwessid(struct net_device *dev,
1576 struct iw_request_info *info,
1577 struct iw_point *data, char *ssid);
1578int cfg80211_ibss_wext_siwap(struct net_device *dev,
1579 struct iw_request_info *info,
1580 struct sockaddr *ap_addr, char *extra);
1581int cfg80211_ibss_wext_giwap(struct net_device *dev,
1582 struct iw_request_info *info,
1583 struct sockaddr *ap_addr, char *extra);
1584
1585int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
1586 struct iw_request_info *info,
1587 struct iw_freq *freq, char *extra);
1588int cfg80211_mgd_wext_giwfreq(struct net_device *dev,
1589 struct iw_request_info *info,
1590 struct iw_freq *freq, char *extra);
1591int cfg80211_mgd_wext_siwessid(struct net_device *dev,
1592 struct iw_request_info *info,
1593 struct iw_point *data, char *ssid);
1594int cfg80211_mgd_wext_giwessid(struct net_device *dev,
1595 struct iw_request_info *info,
1596 struct iw_point *data, char *ssid);
1597int cfg80211_mgd_wext_siwap(struct net_device *dev,
1598 struct iw_request_info *info,
1599 struct sockaddr *ap_addr, char *extra);
1600int cfg80211_mgd_wext_giwap(struct net_device *dev,
1601 struct iw_request_info *info,
1602 struct sockaddr *ap_addr, char *extra);
1603int cfg80211_wext_siwgenie(struct net_device *dev, 1598int cfg80211_wext_siwgenie(struct net_device *dev,
1604 struct iw_request_info *info, 1599 struct iw_request_info *info,
1605 struct iw_point *data, char *extra); 1600 struct iw_point *data, char *extra);
@@ -1610,9 +1605,18 @@ int cfg80211_wext_giwauth(struct net_device *dev,
1610 struct iw_request_info *info, 1605 struct iw_request_info *info,
1611 struct iw_param *data, char *extra); 1606 struct iw_param *data, char *extra);
1612 1607
1613struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy, 1608int cfg80211_wext_siwfreq(struct net_device *dev,
1614 struct iw_freq *freq); 1609 struct iw_request_info *info,
1615 1610 struct iw_freq *freq, char *extra);
1611int cfg80211_wext_giwfreq(struct net_device *dev,
1612 struct iw_request_info *info,
1613 struct iw_freq *freq, char *extra);
1614int cfg80211_wext_siwessid(struct net_device *dev,
1615 struct iw_request_info *info,
1616 struct iw_point *data, char *ssid);
1617int cfg80211_wext_giwessid(struct net_device *dev,
1618 struct iw_request_info *info,
1619 struct iw_point *data, char *ssid);
1616int cfg80211_wext_siwrate(struct net_device *dev, 1620int cfg80211_wext_siwrate(struct net_device *dev,
1617 struct iw_request_info *info, 1621 struct iw_request_info *info,
1618 struct iw_param *rate, char *extra); 1622 struct iw_param *rate, char *extra);
@@ -1662,12 +1666,12 @@ int cfg80211_wext_giwpower(struct net_device *dev,
1662 struct iw_request_info *info, 1666 struct iw_request_info *info,
1663 struct iw_param *wrq, char *extra); 1667 struct iw_param *wrq, char *extra);
1664 1668
1665int cfg80211_wds_wext_siwap(struct net_device *dev, 1669int cfg80211_wext_siwap(struct net_device *dev,
1666 struct iw_request_info *info, 1670 struct iw_request_info *info,
1667 struct sockaddr *addr, char *extra); 1671 struct sockaddr *ap_addr, char *extra);
1668int cfg80211_wds_wext_giwap(struct net_device *dev, 1672int cfg80211_wext_giwap(struct net_device *dev,
1669 struct iw_request_info *info, 1673 struct iw_request_info *info,
1670 struct sockaddr *addr, char *extra); 1674 struct sockaddr *ap_addr, char *extra);
1671 1675
1672/* 1676/*
1673 * callbacks for asynchronous cfg80211 methods, notification 1677 * callbacks for asynchronous cfg80211 methods, notification
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 7dd67a1ff4d5..d4e09a06b4a2 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -243,6 +243,9 @@ struct ieee80211_bss_conf {
243 * used to indicate that a frame was already retried due to PS 243 * used to indicate that a frame was already retried due to PS
244 * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211, 244 * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211,
245 * used to indicate frame should not be encrypted 245 * used to indicate frame should not be encrypted
246 * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?)
247 * This frame is a response to a PS-poll frame and should be sent
248 * although the station is in powersave mode.
246 */ 249 */
247enum mac80211_tx_control_flags { 250enum mac80211_tx_control_flags {
248 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), 251 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
@@ -262,6 +265,7 @@ enum mac80211_tx_control_flags {
262 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), 265 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14),
263 IEEE80211_TX_INTFL_RETRIED = BIT(15), 266 IEEE80211_TX_INTFL_RETRIED = BIT(15),
264 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), 267 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16),
268 IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17),
265}; 269};
266 270
267/** 271/**