diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-12-29 05:59:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-12 13:51:23 -0500 |
commit | 13ae75b103e07304a34ab40c9136e9f53e06475c (patch) | |
tree | 61cfd1471cdefe8cf1a3da12b4b99aafc2770f76 /include/linux/nl80211.h | |
parent | 37eb0b164cf9fa9f70c8500926f5cde7c652f48e (diff) |
nl80211: New command for setting TX rate mask for rate control
Add a new NL80211_CMD_SET_TX_BITRATE_MASK command and related
attributes to provide support for setting TX rate mask for rate
control. This uses the existing cfg80211 set_bitrate_mask operation
that was previously used only with WEXT compat code (SIOCSIWRATE). The
nl80211 command allows more generic configuration of allowed rates as
a mask instead of fixed/max rate.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r-- | include/linux/nl80211.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index d4c556de7170..7a1c8c145b22 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -295,6 +295,10 @@ | |||
295 | * This command is also used as an event to notify when a requested | 295 | * This command is also used as an event to notify when a requested |
296 | * remain-on-channel duration has expired. | 296 | * remain-on-channel duration has expired. |
297 | * | 297 | * |
298 | * @NL80211_CMD_SET_TX_BITRATE_MASK: Set the mask of rates to be used in TX | ||
299 | * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface | ||
300 | * and @NL80211_ATTR_TX_RATES the set of allowed rates. | ||
301 | * | ||
298 | * @NL80211_CMD_MAX: highest used command number | 302 | * @NL80211_CMD_MAX: highest used command number |
299 | * @__NL80211_CMD_AFTER_LAST: internal use | 303 | * @__NL80211_CMD_AFTER_LAST: internal use |
300 | */ | 304 | */ |
@@ -381,6 +385,8 @@ enum nl80211_commands { | |||
381 | NL80211_CMD_REMAIN_ON_CHANNEL, | 385 | NL80211_CMD_REMAIN_ON_CHANNEL, |
382 | NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL, | 386 | NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL, |
383 | 387 | ||
388 | NL80211_CMD_SET_TX_BITRATE_MASK, | ||
389 | |||
384 | /* add new commands above here */ | 390 | /* add new commands above here */ |
385 | 391 | ||
386 | /* used to define NL80211_CMD_MAX below */ | 392 | /* used to define NL80211_CMD_MAX below */ |
@@ -640,6 +646,13 @@ enum nl80211_commands { | |||
640 | * | 646 | * |
641 | * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects. | 647 | * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects. |
642 | * | 648 | * |
649 | * @NL80211_ATTR_TX_RATES: Nested set of attributes | ||
650 | * (enum nl80211_tx_rate_attributes) describing TX rates per band. The | ||
651 | * enum nl80211_band value is used as the index (nla_type() of the nested | ||
652 | * data. If a band is not included, it will be configured to allow all | ||
653 | * rates based on negotiated supported rates information. This attribute | ||
654 | * is used with %NL80211_CMD_SET_TX_BITRATE_MASK. | ||
655 | * | ||
643 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 656 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
644 | * @__NL80211_ATTR_AFTER_LAST: internal use | 657 | * @__NL80211_ATTR_AFTER_LAST: internal use |
645 | */ | 658 | */ |
@@ -783,6 +796,8 @@ enum nl80211_attrs { | |||
783 | 796 | ||
784 | NL80211_ATTR_WIPHY_COVERAGE_CLASS, | 797 | NL80211_ATTR_WIPHY_COVERAGE_CLASS, |
785 | 798 | ||
799 | NL80211_ATTR_TX_RATES, | ||
800 | |||
786 | /* add attributes here, update the policy in nl80211.c */ | 801 | /* add attributes here, update the policy in nl80211.c */ |
787 | 802 | ||
788 | __NL80211_ATTR_AFTER_LAST, | 803 | __NL80211_ATTR_AFTER_LAST, |
@@ -1482,4 +1497,33 @@ enum nl80211_key_attributes { | |||
1482 | NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 | 1497 | NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 |
1483 | }; | 1498 | }; |
1484 | 1499 | ||
1500 | /** | ||
1501 | * enum nl80211_tx_rate_attributes - TX rate set attributes | ||
1502 | * @__NL80211_TXRATE_INVALID: invalid | ||
1503 | * @NL80211_TXRATE_LEGACY: Legacy (non-MCS) rates allowed for TX rate selection | ||
1504 | * in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with | ||
1505 | * 1 = 500 kbps) but without the IE length restriction (at most | ||
1506 | * %NL80211_MAX_SUPP_RATES in a single array). | ||
1507 | * @__NL80211_TXRATE_AFTER_LAST: internal | ||
1508 | * @NL80211_TXRATE_MAX: highest TX rate attribute | ||
1509 | */ | ||
1510 | enum nl80211_tx_rate_attributes { | ||
1511 | __NL80211_TXRATE_INVALID, | ||
1512 | NL80211_TXRATE_LEGACY, | ||
1513 | |||
1514 | /* keep last */ | ||
1515 | __NL80211_TXRATE_AFTER_LAST, | ||
1516 | NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1 | ||
1517 | }; | ||
1518 | |||
1519 | /** | ||
1520 | * enum nl80211_band - Frequency band | ||
1521 | * @NL80211_BAND_2GHZ - 2.4 GHz ISM band | ||
1522 | * @NL80211_BAND_5GHZ - around 5 GHz band (4.9 - 5.7 GHz) | ||
1523 | */ | ||
1524 | enum nl80211_band { | ||
1525 | NL80211_BAND_2GHZ, | ||
1526 | NL80211_BAND_5GHZ, | ||
1527 | }; | ||
1528 | |||
1485 | #endif /* __LINUX_NL80211_H */ | 1529 | #endif /* __LINUX_NL80211_H */ |