diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-25 16:16:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-25 16:16:16 -0400 |
commit | db4148da2cc84c31419b5e3ae3115ac6e11817a1 (patch) | |
tree | 72d7d99cd7a4903e017169e0ae8e2b37027129c6 /include | |
parent | ef40a685311bef053dedd833a72dffaf25669dda (diff) | |
parent | 8d09a5e1c36d0dec5728e6c8b0bb5412de09b27b (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.h | 5 | ||||
-rw-r--r-- | include/net/cfg80211.h | 6 | ||||
-rw-r--r-- | include/net/mac80211.h | 68 | ||||
-rw-r--r-- | include/net/wireless.h | 20 |
4 files changed, 88 insertions, 11 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index abc1abc63bf0..14126bc36641 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -471,6 +471,11 @@ struct ieee80211s_hdr { | |||
471 | u8 eaddr3[6]; | 471 | u8 eaddr3[6]; |
472 | } __attribute__ ((packed)); | 472 | } __attribute__ ((packed)); |
473 | 473 | ||
474 | /* Mesh flags */ | ||
475 | #define MESH_FLAGS_AE_A4 0x1 | ||
476 | #define MESH_FLAGS_AE_A5_A6 0x2 | ||
477 | #define MESH_FLAGS_PS_DEEP 0x4 | ||
478 | |||
474 | /** | 479 | /** |
475 | * struct ieee80211_quiet_ie | 480 | * struct ieee80211_quiet_ie |
476 | * | 481 | * |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 9f40c4d417d7..0e85ec39b638 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -363,11 +363,13 @@ struct wiphy; | |||
363 | * wireless extensions but this is subject to reevaluation as soon as this | 363 | * wireless extensions but this is subject to reevaluation as soon as this |
364 | * code is used more widely and we have a first user without wext. | 364 | * code is used more widely and we have a first user without wext. |
365 | * | 365 | * |
366 | * @add_virtual_intf: create a new virtual interface with the given name | 366 | * @add_virtual_intf: create a new virtual interface with the given name, |
367 | * must set the struct wireless_dev's iftype. | ||
367 | * | 368 | * |
368 | * @del_virtual_intf: remove the virtual interface determined by ifindex. | 369 | * @del_virtual_intf: remove the virtual interface determined by ifindex. |
369 | * | 370 | * |
370 | * @change_virtual_intf: change type of virtual interface | 371 | * @change_virtual_intf: change type/configuration of virtual interface, |
372 | * keep the struct wireless_dev's iftype updated. | ||
371 | * | 373 | * |
372 | * @add_key: add a key with the given parameters. @mac_addr will be %NULL | 374 | * @add_key: add a key with the given parameters. @mac_addr will be %NULL |
373 | * when adding a group key. | 375 | * when adding a group key. |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 003e4a03874e..f5f5b1ff1584 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1800,4 +1800,72 @@ void ieee80211_notify_mac(struct ieee80211_hw *hw, | |||
1800 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, | 1800 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, |
1801 | const u8 *addr); | 1801 | const u8 *addr); |
1802 | 1802 | ||
1803 | |||
1804 | /* Rate control API */ | ||
1805 | /** | ||
1806 | * struct rate_selection - rate information for/from rate control algorithms | ||
1807 | * | ||
1808 | * @rate_idx: selected transmission rate index | ||
1809 | * @nonerp_idx: Non-ERP rate to use instead if ERP cannot be used | ||
1810 | * @probe_idx: rate for probing (or -1) | ||
1811 | * @max_rate_idx: maximum rate index that can be used, this is | ||
1812 | * input to the algorithm and will be enforced | ||
1813 | */ | ||
1814 | struct rate_selection { | ||
1815 | s8 rate_idx, nonerp_idx, probe_idx, max_rate_idx; | ||
1816 | }; | ||
1817 | |||
1818 | struct rate_control_ops { | ||
1819 | struct module *module; | ||
1820 | const char *name; | ||
1821 | void *(*alloc)(struct ieee80211_hw *hw, struct dentry *debugfsdir); | ||
1822 | void (*clear)(void *priv); | ||
1823 | void (*free)(void *priv); | ||
1824 | |||
1825 | void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp); | ||
1826 | void (*rate_init)(void *priv, struct ieee80211_supported_band *sband, | ||
1827 | struct ieee80211_sta *sta, void *priv_sta); | ||
1828 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, | ||
1829 | void *priv_sta); | ||
1830 | |||
1831 | void (*tx_status)(void *priv, struct ieee80211_supported_band *sband, | ||
1832 | struct ieee80211_sta *sta, void *priv_sta, | ||
1833 | struct sk_buff *skb); | ||
1834 | void (*get_rate)(void *priv, struct ieee80211_supported_band *sband, | ||
1835 | struct ieee80211_sta *sta, void *priv_sta, | ||
1836 | struct sk_buff *skb, | ||
1837 | struct rate_selection *sel); | ||
1838 | |||
1839 | void (*add_sta_debugfs)(void *priv, void *priv_sta, | ||
1840 | struct dentry *dir); | ||
1841 | void (*remove_sta_debugfs)(void *priv, void *priv_sta); | ||
1842 | }; | ||
1843 | |||
1844 | static inline int rate_supported(struct ieee80211_sta *sta, | ||
1845 | enum ieee80211_band band, | ||
1846 | int index) | ||
1847 | { | ||
1848 | return (sta == NULL || sta->supp_rates[band] & BIT(index)); | ||
1849 | } | ||
1850 | |||
1851 | static inline s8 | ||
1852 | rate_lowest_index(struct ieee80211_supported_band *sband, | ||
1853 | struct ieee80211_sta *sta) | ||
1854 | { | ||
1855 | int i; | ||
1856 | |||
1857 | for (i = 0; i < sband->n_bitrates; i++) | ||
1858 | if (rate_supported(sta, sband->band, i)) | ||
1859 | return i; | ||
1860 | |||
1861 | /* warn when we cannot find a rate. */ | ||
1862 | WARN_ON(1); | ||
1863 | |||
1864 | return 0; | ||
1865 | } | ||
1866 | |||
1867 | |||
1868 | int ieee80211_rate_control_register(struct rate_control_ops *ops); | ||
1869 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); | ||
1870 | |||
1803 | #endif /* MAC80211_H */ | 1871 | #endif /* MAC80211_H */ |
diff --git a/include/net/wireless.h b/include/net/wireless.h index e4378cc6bf8e..721efb363db7 100644 --- a/include/net/wireless.h +++ b/include/net/wireless.h | |||
@@ -223,9 +223,11 @@ struct wiphy { | |||
223 | * the netdev.) | 223 | * the netdev.) |
224 | * | 224 | * |
225 | * @wiphy: pointer to hardware description | 225 | * @wiphy: pointer to hardware description |
226 | * @iftype: interface type | ||
226 | */ | 227 | */ |
227 | struct wireless_dev { | 228 | struct wireless_dev { |
228 | struct wiphy *wiphy; | 229 | struct wiphy *wiphy; |
230 | enum nl80211_iftype iftype; | ||
229 | 231 | ||
230 | /* private to the generic wireless code */ | 232 | /* private to the generic wireless code */ |
231 | struct list_head list; | 233 | struct list_head list; |
@@ -329,6 +331,15 @@ extern int ieee80211_frequency_to_channel(int freq); | |||
329 | extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, | 331 | extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, |
330 | int freq); | 332 | int freq); |
331 | /** | 333 | /** |
334 | * ieee80211_get_channel - get channel struct from wiphy for specified frequency | ||
335 | */ | ||
336 | static inline struct ieee80211_channel * | ||
337 | ieee80211_get_channel(struct wiphy *wiphy, int freq) | ||
338 | { | ||
339 | return __ieee80211_get_channel(wiphy, freq); | ||
340 | } | ||
341 | |||
342 | /** | ||
332 | * __regulatory_hint - hint to the wireless core a regulatory domain | 343 | * __regulatory_hint - hint to the wireless core a regulatory domain |
333 | * @wiphy: if a driver is providing the hint this is the driver's very | 344 | * @wiphy: if a driver is providing the hint this is the driver's very |
334 | * own &struct wiphy | 345 | * own &struct wiphy |
@@ -380,13 +391,4 @@ extern int __regulatory_hint(struct wiphy *wiphy, enum reg_set_by set_by, | |||
380 | */ | 391 | */ |
381 | extern int regulatory_hint(struct wiphy *wiphy, | 392 | extern int regulatory_hint(struct wiphy *wiphy, |
382 | const char *alpha2, struct ieee80211_regdomain *rd); | 393 | const char *alpha2, struct ieee80211_regdomain *rd); |
383 | |||
384 | /** | ||
385 | * ieee80211_get_channel - get channel struct from wiphy for specified frequency | ||
386 | */ | ||
387 | static inline struct ieee80211_channel * | ||
388 | ieee80211_get_channel(struct wiphy *wiphy, int freq) | ||
389 | { | ||
390 | return __ieee80211_get_channel(wiphy, freq); | ||
391 | } | ||
392 | #endif /* __NET_WIRELESS_H */ | 394 | #endif /* __NET_WIRELESS_H */ |