提交 e360c4cb 编写于 作者: I Ivo van Doorn 提交者: John W. Linville

rt2x00: Add support for CTS protection in rt2x00lib

Inform drivers about the changed CTS protection settings.
Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 9d139c81
...@@ -434,6 +434,7 @@ struct rt2x00lib_conf { ...@@ -434,6 +434,7 @@ struct rt2x00lib_conf {
*/ */
struct rt2x00lib_erp { struct rt2x00lib_erp {
int short_preamble; int short_preamble;
int cts_protection;
int ack_timeout; int ack_timeout;
int ack_consume_time; int ack_consume_time;
......
...@@ -84,6 +84,8 @@ void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev, ...@@ -84,6 +84,8 @@ void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev,
memset(&erp, 0, sizeof(erp)); memset(&erp, 0, sizeof(erp));
erp.short_preamble = bss_conf->use_short_preamble; erp.short_preamble = bss_conf->use_short_preamble;
erp.cts_protection = bss_conf->use_cts_prot;
erp.ack_timeout = PLCP + get_duration(ACK_SIZE, 10); erp.ack_timeout = PLCP + get_duration(ACK_SIZE, 10);
erp.ack_consume_time = SIFS + PLCP + get_duration(ACK_SIZE, 10); erp.ack_consume_time = SIFS + PLCP + get_duration(ACK_SIZE, 10);
......
...@@ -511,7 +511,7 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, ...@@ -511,7 +511,7 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
* When the erp information has changed, we should perform * When the erp information has changed, we should perform
* additional configuration steps. For all other changes we are done. * additional configuration steps. For all other changes we are done.
*/ */
if (changes & BSS_CHANGED_ERP_PREAMBLE) { if (changes & (BSS_CHANGED_ERP_PREAMBLE | BSS_CHANGED_ERP_CTS_PROT)) {
if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags)) if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags))
rt2x00lib_config_erp(rt2x00dev, intf, bss_conf); rt2x00lib_config_erp(rt2x00dev, intf, bss_conf);
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册