aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
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/net
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/net')
-rw-r--r--include/net/cfg80211.h104
-rw-r--r--include/net/mac80211.h4
2 files changed, 58 insertions, 50 deletions
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/**