diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-10 16:24:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-10 16:24:44 -0500 |
commit | 23779897546c1effb546ff89b89803d9d955d517 (patch) | |
tree | d4b5d52b5d716a72755ba018382d4b87eae763a4 /include/net | |
parent | f574179b63e48f5285468b5ee40f3c480221f708 (diff) | |
parent | c4832467a5c8c2ae96d6dad882be4d4ab9eefad7 (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 | 50 | ||||
-rw-r--r-- | include/net/mac80211.h | 13 | ||||
-rw-r--r-- | include/net/wireless.h | 16 |
3 files changed, 58 insertions, 21 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 03e1e88c6a09..1d57835d73f2 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -280,11 +280,16 @@ struct mpath_info { | |||
280 | * (0 = no, 1 = yes, -1 = do not change) | 280 | * (0 = no, 1 = yes, -1 = do not change) |
281 | * @use_short_slot_time: Whether the use of short slot time is allowed | 281 | * @use_short_slot_time: Whether the use of short slot time is allowed |
282 | * (0 = no, 1 = yes, -1 = do not change) | 282 | * (0 = no, 1 = yes, -1 = do not change) |
283 | * @basic_rates: basic rates in IEEE 802.11 format | ||
284 | * (or NULL for no change) | ||
285 | * @basic_rates_len: number of basic rates | ||
283 | */ | 286 | */ |
284 | struct bss_parameters { | 287 | struct bss_parameters { |
285 | int use_cts_prot; | 288 | int use_cts_prot; |
286 | int use_short_preamble; | 289 | int use_short_preamble; |
287 | int use_short_slot_time; | 290 | int use_short_slot_time; |
291 | u8 *basic_rates; | ||
292 | u8 basic_rates_len; | ||
288 | }; | 293 | }; |
289 | 294 | ||
290 | /** | 295 | /** |
@@ -331,19 +336,19 @@ struct ieee80211_regdomain { | |||
331 | struct ieee80211_reg_rule reg_rules[]; | 336 | struct ieee80211_reg_rule reg_rules[]; |
332 | }; | 337 | }; |
333 | 338 | ||
334 | #define MHZ_TO_KHZ(freq) (freq * 1000) | 339 | #define MHZ_TO_KHZ(freq) ((freq) * 1000) |
335 | #define KHZ_TO_MHZ(freq) (freq / 1000) | 340 | #define KHZ_TO_MHZ(freq) ((freq) / 1000) |
336 | #define DBI_TO_MBI(gain) (gain * 100) | 341 | #define DBI_TO_MBI(gain) ((gain) * 100) |
337 | #define MBI_TO_DBI(gain) (gain / 100) | 342 | #define MBI_TO_DBI(gain) ((gain) / 100) |
338 | #define DBM_TO_MBM(gain) (gain * 100) | 343 | #define DBM_TO_MBM(gain) ((gain) * 100) |
339 | #define MBM_TO_DBM(gain) (gain / 100) | 344 | #define MBM_TO_DBM(gain) ((gain) / 100) |
340 | 345 | ||
341 | #define REG_RULE(start, end, bw, gain, eirp, reg_flags) { \ | 346 | #define REG_RULE(start, end, bw, gain, eirp, reg_flags) { \ |
342 | .freq_range.start_freq_khz = (start) * 1000, \ | 347 | .freq_range.start_freq_khz = MHZ_TO_KHZ(start), \ |
343 | .freq_range.end_freq_khz = (end) * 1000, \ | 348 | .freq_range.end_freq_khz = MHZ_TO_KHZ(end), \ |
344 | .freq_range.max_bandwidth_khz = (bw) * 1000, \ | 349 | .freq_range.max_bandwidth_khz = MHZ_TO_KHZ(bw), \ |
345 | .power_rule.max_antenna_gain = (gain) * 100, \ | 350 | .power_rule.max_antenna_gain = DBI_TO_MBI(gain), \ |
346 | .power_rule.max_eirp = (eirp) * 100, \ | 351 | .power_rule.max_eirp = DBM_TO_MBM(eirp), \ |
347 | .flags = reg_flags, \ | 352 | .flags = reg_flags, \ |
348 | } | 353 | } |
349 | 354 | ||
@@ -366,6 +371,24 @@ struct mesh_config { | |||
366 | u16 dot11MeshHWMPnetDiameterTraversalTime; | 371 | u16 dot11MeshHWMPnetDiameterTraversalTime; |
367 | }; | 372 | }; |
368 | 373 | ||
374 | /** | ||
375 | * struct ieee80211_txq_params - TX queue parameters | ||
376 | * @queue: TX queue identifier (NL80211_TXQ_Q_*) | ||
377 | * @txop: Maximum burst time in units of 32 usecs, 0 meaning disabled | ||
378 | * @cwmin: Minimum contention window [a value of the form 2^n-1 in the range | ||
379 | * 1..32767] | ||
380 | * @cwmax: Maximum contention window [a value of the form 2^n-1 in the range | ||
381 | * 1..32767] | ||
382 | * @aifs: Arbitration interframe space [0..255] | ||
383 | */ | ||
384 | struct ieee80211_txq_params { | ||
385 | enum nl80211_txq_q queue; | ||
386 | u16 txop; | ||
387 | u16 cwmin; | ||
388 | u16 cwmax; | ||
389 | u8 aifs; | ||
390 | }; | ||
391 | |||
369 | /* from net/wireless.h */ | 392 | /* from net/wireless.h */ |
370 | struct wiphy; | 393 | struct wiphy; |
371 | 394 | ||
@@ -425,6 +448,8 @@ struct wiphy; | |||
425 | * @set_mesh_cfg: set mesh parameters (by now, just mesh id) | 448 | * @set_mesh_cfg: set mesh parameters (by now, just mesh id) |
426 | * | 449 | * |
427 | * @change_bss: Modify parameters for a given BSS. | 450 | * @change_bss: Modify parameters for a given BSS. |
451 | * | ||
452 | * @set_txq_params: Set TX queue parameters | ||
428 | */ | 453 | */ |
429 | struct cfg80211_ops { | 454 | struct cfg80211_ops { |
430 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, | 455 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, |
@@ -485,6 +510,9 @@ struct cfg80211_ops { | |||
485 | const struct mesh_config *nconf, u32 mask); | 510 | const struct mesh_config *nconf, u32 mask); |
486 | int (*change_bss)(struct wiphy *wiphy, struct net_device *dev, | 511 | int (*change_bss)(struct wiphy *wiphy, struct net_device *dev, |
487 | struct bss_parameters *params); | 512 | struct bss_parameters *params); |
513 | |||
514 | int (*set_txq_params)(struct wiphy *wiphy, | ||
515 | struct ieee80211_txq_params *params); | ||
488 | }; | 516 | }; |
489 | 517 | ||
490 | #endif /* __NET_CFG80211_H */ | 518 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 0b983bed3829..53856003aa18 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -616,14 +616,12 @@ struct ieee80211_if_init_conf { | |||
616 | * enum ieee80211_if_conf_change - interface config change flags | 616 | * enum ieee80211_if_conf_change - interface config change flags |
617 | * | 617 | * |
618 | * @IEEE80211_IFCC_BSSID: The BSSID changed. | 618 | * @IEEE80211_IFCC_BSSID: The BSSID changed. |
619 | * @IEEE80211_IFCC_SSID: The SSID changed. | ||
620 | * @IEEE80211_IFCC_BEACON: The beacon for this interface changed | 619 | * @IEEE80211_IFCC_BEACON: The beacon for this interface changed |
621 | * (currently AP and MESH only), use ieee80211_beacon_get(). | 620 | * (currently AP and MESH only), use ieee80211_beacon_get(). |
622 | */ | 621 | */ |
623 | enum ieee80211_if_conf_change { | 622 | enum ieee80211_if_conf_change { |
624 | IEEE80211_IFCC_BSSID = BIT(0), | 623 | IEEE80211_IFCC_BSSID = BIT(0), |
625 | IEEE80211_IFCC_SSID = BIT(1), | 624 | IEEE80211_IFCC_BEACON = BIT(1), |
626 | IEEE80211_IFCC_BEACON = BIT(2), | ||
627 | }; | 625 | }; |
628 | 626 | ||
629 | /** | 627 | /** |
@@ -631,11 +629,6 @@ enum ieee80211_if_conf_change { | |||
631 | * | 629 | * |
632 | * @changed: parameters that have changed, see &enum ieee80211_if_conf_change. | 630 | * @changed: parameters that have changed, see &enum ieee80211_if_conf_change. |
633 | * @bssid: BSSID of the network we are associated to/creating. | 631 | * @bssid: BSSID of the network we are associated to/creating. |
634 | * @ssid: used (together with @ssid_len) by drivers for hardware that | ||
635 | * generate beacons independently. The pointer is valid only during the | ||
636 | * config_interface() call, so copy the value somewhere if you need | ||
637 | * it. | ||
638 | * @ssid_len: length of the @ssid field. | ||
639 | * | 632 | * |
640 | * This structure is passed to the config_interface() callback of | 633 | * This structure is passed to the config_interface() callback of |
641 | * &struct ieee80211_hw. | 634 | * &struct ieee80211_hw. |
@@ -643,8 +636,6 @@ enum ieee80211_if_conf_change { | |||
643 | struct ieee80211_if_conf { | 636 | struct ieee80211_if_conf { |
644 | u32 changed; | 637 | u32 changed; |
645 | u8 *bssid; | 638 | u8 *bssid; |
646 | u8 *ssid; | ||
647 | size_t ssid_len; | ||
648 | }; | 639 | }; |
649 | 640 | ||
650 | /** | 641 | /** |
@@ -1136,12 +1127,14 @@ enum ieee80211_filter_flags { | |||
1136 | * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation | 1127 | * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation |
1137 | * @IEEE80211_AMPDU_TX_START: start Tx aggregation | 1128 | * @IEEE80211_AMPDU_TX_START: start Tx aggregation |
1138 | * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation | 1129 | * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation |
1130 | * @IEEE80211_AMPDU_TX_RESUME: resume TX aggregation | ||
1139 | */ | 1131 | */ |
1140 | enum ieee80211_ampdu_mlme_action { | 1132 | enum ieee80211_ampdu_mlme_action { |
1141 | IEEE80211_AMPDU_RX_START, | 1133 | IEEE80211_AMPDU_RX_START, |
1142 | IEEE80211_AMPDU_RX_STOP, | 1134 | IEEE80211_AMPDU_RX_STOP, |
1143 | IEEE80211_AMPDU_TX_START, | 1135 | IEEE80211_AMPDU_TX_START, |
1144 | IEEE80211_AMPDU_TX_STOP, | 1136 | IEEE80211_AMPDU_TX_STOP, |
1137 | IEEE80211_AMPDU_TX_RESUME, | ||
1145 | }; | 1138 | }; |
1146 | 1139 | ||
1147 | /** | 1140 | /** |
diff --git a/include/net/wireless.h b/include/net/wireless.h index 41294c5f6f8f..17d4b582cf34 100644 --- a/include/net/wireless.h +++ b/include/net/wireless.h | |||
@@ -341,6 +341,22 @@ ieee80211_get_channel(struct wiphy *wiphy, int freq) | |||
341 | } | 341 | } |
342 | 342 | ||
343 | /** | 343 | /** |
344 | * ieee80211_get_response_rate - get basic rate for a given rate | ||
345 | * | ||
346 | * @sband: the band to look for rates in | ||
347 | * @basic_rates: bitmap of basic rates | ||
348 | * @bitrate: the bitrate for which to find the basic rate | ||
349 | * | ||
350 | * This function returns the basic rate corresponding to a given | ||
351 | * bitrate, that is the next lower bitrate contained in the basic | ||
352 | * rate map, which is, for this function, given as a bitmap of | ||
353 | * indices of rates in the band's bitrate table. | ||
354 | */ | ||
355 | struct ieee80211_rate * | ||
356 | ieee80211_get_response_rate(struct ieee80211_supported_band *sband, | ||
357 | u64 basic_rates, int bitrate); | ||
358 | |||
359 | /** | ||
344 | * regulatory_hint - driver hint to the wireless core a regulatory domain | 360 | * regulatory_hint - driver hint to the wireless core a regulatory domain |
345 | * @wiphy: the wireless device giving the hint (used only for reporting | 361 | * @wiphy: the wireless device giving the hint (used only for reporting |
346 | * conflicts) | 362 | * conflicts) |