diff options
author | David S. Miller <davem@davemloft.net> | 2009-05-25 03:38:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-25 03:38:24 -0400 |
commit | 45ea4ea2af358fe316c918381c7868f9418cad09 (patch) | |
tree | 4deb3d87b26e884b06929fe33740d45e78fbdcab /include/net | |
parent | dddc045e2fdd4eb8d7dfac29bff191d639fff8c3 (diff) | |
parent | a2e2322d83df82a57ba456cfa604c8b8f7b04670 (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.h | 78 | ||||
-rw-r--r-- | include/net/mac80211.h | 29 |
2 files changed, 66 insertions, 41 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 9e17a83d3432..f20da7d63b1e 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -56,9 +56,9 @@ enum ieee80211_band { | |||
56 | * on this channel. | 56 | * on this channel. |
57 | * @IEEE80211_CHAN_NO_IBSS: IBSS is not allowed on this channel. | 57 | * @IEEE80211_CHAN_NO_IBSS: IBSS is not allowed on this channel. |
58 | * @IEEE80211_CHAN_RADAR: Radar detection is required on this channel. | 58 | * @IEEE80211_CHAN_RADAR: Radar detection is required on this channel. |
59 | * @IEEE80211_CHAN_NO_FAT_ABOVE: extension channel above this channel | 59 | * @IEEE80211_CHAN_NO_HT40PLUS: extension channel above this channel |
60 | * is not permitted. | 60 | * is not permitted. |
61 | * @IEEE80211_CHAN_NO_FAT_BELOW: extension channel below this channel | 61 | * @IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel |
62 | * is not permitted. | 62 | * is not permitted. |
63 | */ | 63 | */ |
64 | enum ieee80211_channel_flags { | 64 | enum ieee80211_channel_flags { |
@@ -66,10 +66,13 @@ enum ieee80211_channel_flags { | |||
66 | IEEE80211_CHAN_PASSIVE_SCAN = 1<<1, | 66 | IEEE80211_CHAN_PASSIVE_SCAN = 1<<1, |
67 | IEEE80211_CHAN_NO_IBSS = 1<<2, | 67 | IEEE80211_CHAN_NO_IBSS = 1<<2, |
68 | IEEE80211_CHAN_RADAR = 1<<3, | 68 | IEEE80211_CHAN_RADAR = 1<<3, |
69 | IEEE80211_CHAN_NO_FAT_ABOVE = 1<<4, | 69 | IEEE80211_CHAN_NO_HT40PLUS = 1<<4, |
70 | IEEE80211_CHAN_NO_FAT_BELOW = 1<<5, | 70 | IEEE80211_CHAN_NO_HT40MINUS = 1<<5, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | #define IEEE80211_CHAN_NO_HT40 \ | ||
74 | (IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS) | ||
75 | |||
73 | /** | 76 | /** |
74 | * struct ieee80211_channel - channel definition | 77 | * struct ieee80211_channel - channel definition |
75 | * | 78 | * |
@@ -778,10 +781,11 @@ enum wiphy_params_flags { | |||
778 | * @get_key: get information about the key with the given parameters. | 781 | * @get_key: get information about the key with the given parameters. |
779 | * @mac_addr will be %NULL when requesting information for a group | 782 | * @mac_addr will be %NULL when requesting information for a group |
780 | * key. All pointers given to the @callback function need not be valid | 783 | * key. All pointers given to the @callback function need not be valid |
781 | * after it returns. | 784 | * after it returns. This function should return an error if it is |
785 | * not possible to retrieve the key, -ENOENT if it doesn't exist. | ||
782 | * | 786 | * |
783 | * @del_key: remove a key given the @mac_addr (%NULL for a group key) | 787 | * @del_key: remove a key given the @mac_addr (%NULL for a group key) |
784 | * and @key_index | 788 | * and @key_index, return -ENOENT if the key doesn't exist. |
785 | * | 789 | * |
786 | * @set_default_key: set the default key on an interface | 790 | * @set_default_key: set the default key on an interface |
787 | * | 791 | * |
@@ -994,7 +998,7 @@ struct wiphy { | |||
994 | * know whether it points to a wiphy your driver has registered | 998 | * know whether it points to a wiphy your driver has registered |
995 | * or not. Assign this to something global to your driver to | 999 | * or not. Assign this to something global to your driver to |
996 | * help determine whether you own this wiphy or not. */ | 1000 | * help determine whether you own this wiphy or not. */ |
997 | void *privid; | 1001 | const void *privid; |
998 | 1002 | ||
999 | struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS]; | 1003 | struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS]; |
1000 | 1004 | ||
@@ -1070,7 +1074,7 @@ static inline const char *wiphy_name(struct wiphy *wiphy) | |||
1070 | * The returned pointer must be assigned to each netdev's | 1074 | * The returned pointer must be assigned to each netdev's |
1071 | * ieee80211_ptr for proper operation. | 1075 | * ieee80211_ptr for proper operation. |
1072 | */ | 1076 | */ |
1073 | struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv); | 1077 | struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv); |
1074 | 1078 | ||
1075 | /** | 1079 | /** |
1076 | * wiphy_register - register a wiphy with cfg80211 | 1080 | * wiphy_register - register a wiphy with cfg80211 |
@@ -1240,6 +1244,53 @@ extern int ieee80211_radiotap_iterator_init( | |||
1240 | extern int ieee80211_radiotap_iterator_next( | 1244 | extern int ieee80211_radiotap_iterator_next( |
1241 | struct ieee80211_radiotap_iterator *iterator); | 1245 | struct ieee80211_radiotap_iterator *iterator); |
1242 | 1246 | ||
1247 | extern const unsigned char rfc1042_header[6]; | ||
1248 | extern const unsigned char bridge_tunnel_header[6]; | ||
1249 | |||
1250 | /** | ||
1251 | * ieee80211_get_hdrlen_from_skb - get header length from data | ||
1252 | * | ||
1253 | * Given an skb with a raw 802.11 header at the data pointer this function | ||
1254 | * returns the 802.11 header length in bytes (not including encryption | ||
1255 | * headers). If the data in the sk_buff is too short to contain a valid 802.11 | ||
1256 | * header the function returns 0. | ||
1257 | * | ||
1258 | * @skb: the frame | ||
1259 | */ | ||
1260 | unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); | ||
1261 | |||
1262 | /** | ||
1263 | * ieee80211_hdrlen - get header length in bytes from frame control | ||
1264 | * @fc: frame control field in little-endian format | ||
1265 | */ | ||
1266 | unsigned int ieee80211_hdrlen(__le16 fc); | ||
1267 | |||
1268 | /** | ||
1269 | * ieee80211_data_to_8023 - convert an 802.11 data frame to 802.3 | ||
1270 | * @skb: the 802.11 data frame | ||
1271 | * @addr: the device MAC address | ||
1272 | * @iftype: the virtual interface type | ||
1273 | */ | ||
1274 | int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr, | ||
1275 | enum nl80211_iftype iftype); | ||
1276 | |||
1277 | /** | ||
1278 | * ieee80211_data_from_8023 - convert an 802.3 frame to 802.11 | ||
1279 | * @skb: the 802.3 frame | ||
1280 | * @addr: the device MAC address | ||
1281 | * @iftype: the virtual interface type | ||
1282 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) | ||
1283 | * @qos: build 802.11 QoS data frame | ||
1284 | */ | ||
1285 | int ieee80211_data_from_8023(struct sk_buff *skb, u8 *addr, | ||
1286 | enum nl80211_iftype iftype, u8 *bssid, bool qos); | ||
1287 | |||
1288 | /** | ||
1289 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame | ||
1290 | * @skb: the data frame | ||
1291 | */ | ||
1292 | unsigned int cfg80211_classify8021d(struct sk_buff *skb); | ||
1293 | |||
1243 | /* | 1294 | /* |
1244 | * Regulatory helper functions for wiphys | 1295 | * Regulatory helper functions for wiphys |
1245 | */ | 1296 | */ |
@@ -1303,9 +1354,10 @@ extern void wiphy_apply_custom_regulatory( | |||
1303 | * freq_reg_info - get regulatory information for the given frequency | 1354 | * freq_reg_info - get regulatory information for the given frequency |
1304 | * @wiphy: the wiphy for which we want to process this rule for | 1355 | * @wiphy: the wiphy for which we want to process this rule for |
1305 | * @center_freq: Frequency in KHz for which we want regulatory information for | 1356 | * @center_freq: Frequency in KHz for which we want regulatory information for |
1306 | * @bandwidth: the bandwidth requirement you have in KHz, if you do not have one | 1357 | * @desired_bw_khz: the desired max bandwidth you want to use per |
1307 | * you can set this to 0. If this frequency is allowed we then set | 1358 | * channel. Note that this is still 20 MHz if you want to use HT40 |
1308 | * this value to the maximum allowed bandwidth. | 1359 | * as HT40 makes use of two channels for its 40 MHz width bandwidth. |
1360 | * If set to 0 we'll assume you want the standard 20 MHz. | ||
1309 | * @reg_rule: the regulatory rule which we have for this frequency | 1361 | * @reg_rule: the regulatory rule which we have for this frequency |
1310 | * | 1362 | * |
1311 | * Use this function to get the regulatory rule for a specific frequency on | 1363 | * Use this function to get the regulatory rule for a specific frequency on |
@@ -1320,7 +1372,9 @@ extern void wiphy_apply_custom_regulatory( | |||
1320 | * freq_in_rule_band() for our current definition of a band -- this is purely | 1372 | * freq_in_rule_band() for our current definition of a band -- this is purely |
1321 | * subjective and right now its 802.11 specific. | 1373 | * subjective and right now its 802.11 specific. |
1322 | */ | 1374 | */ |
1323 | extern int freq_reg_info(struct wiphy *wiphy, u32 center_freq, u32 *bandwidth, | 1375 | extern int freq_reg_info(struct wiphy *wiphy, |
1376 | u32 center_freq, | ||
1377 | u32 desired_bw_khz, | ||
1324 | const struct ieee80211_reg_rule **reg_rule); | 1378 | const struct ieee80211_reg_rule **reg_rule); |
1325 | 1379 | ||
1326 | /* | 1380 | /* |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index d10ed1776fcd..d72346ff3247 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -173,7 +173,6 @@ enum ieee80211_bss_change { | |||
173 | * @timestamp: beacon timestamp | 173 | * @timestamp: beacon timestamp |
174 | * @beacon_int: beacon interval | 174 | * @beacon_int: beacon interval |
175 | * @assoc_capability: capabilities taken from assoc resp | 175 | * @assoc_capability: capabilities taken from assoc resp |
176 | * @ht: BSS's HT configuration | ||
177 | * @basic_rates: bitmap of basic rates, each bit stands for an | 176 | * @basic_rates: bitmap of basic rates, each bit stands for an |
178 | * index into the rate table configured by the driver in | 177 | * index into the rate table configured by the driver in |
179 | * the current band. | 178 | * the current band. |
@@ -673,16 +672,6 @@ enum ieee80211_key_alg { | |||
673 | }; | 672 | }; |
674 | 673 | ||
675 | /** | 674 | /** |
676 | * enum ieee80211_key_len - key length | ||
677 | * @LEN_WEP40: WEP 5-byte long key | ||
678 | * @LEN_WEP104: WEP 13-byte long key | ||
679 | */ | ||
680 | enum ieee80211_key_len { | ||
681 | LEN_WEP40 = 5, | ||
682 | LEN_WEP104 = 13, | ||
683 | }; | ||
684 | |||
685 | /** | ||
686 | * enum ieee80211_key_flags - key flags | 675 | * enum ieee80211_key_flags - key flags |
687 | * | 676 | * |
688 | * These flags are used for communication about keys between the driver | 677 | * These flags are used for communication about keys between the driver |
@@ -1813,24 +1802,6 @@ struct sk_buff * | |||
1813 | ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | 1802 | ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif); |
1814 | 1803 | ||
1815 | /** | 1804 | /** |
1816 | * ieee80211_get_hdrlen_from_skb - get header length from data | ||
1817 | * | ||
1818 | * Given an skb with a raw 802.11 header at the data pointer this function | ||
1819 | * returns the 802.11 header length in bytes (not including encryption | ||
1820 | * headers). If the data in the sk_buff is too short to contain a valid 802.11 | ||
1821 | * header the function returns 0. | ||
1822 | * | ||
1823 | * @skb: the frame | ||
1824 | */ | ||
1825 | unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); | ||
1826 | |||
1827 | /** | ||
1828 | * ieee80211_hdrlen - get header length in bytes from frame control | ||
1829 | * @fc: frame control field in little-endian format | ||
1830 | */ | ||
1831 | unsigned int ieee80211_hdrlen(__le16 fc); | ||
1832 | |||
1833 | /** | ||
1834 | * ieee80211_get_tkip_key - get a TKIP rc4 for skb | 1805 | * ieee80211_get_tkip_key - get a TKIP rc4 for skb |
1835 | * | 1806 | * |
1836 | * This function computes a TKIP rc4 key for an skb. It computes | 1807 | * This function computes a TKIP rc4 key for an skb. It computes |