diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-04-26 16:21:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-28 14:50:45 -0400 |
commit | 47684808fd89d6809c0886e06f8ac324252499d8 (patch) | |
tree | f5edf3dae33bc46a39d8526484bae71f33a19bab /drivers/net/wireless/wl12xx/acx.c | |
parent | a039a993496d79d09ae9709c82b545b9800954c9 (diff) |
wl12xx: support FW TX inactivity triggers
In AP mode we register for the MAX_TX_RETRY and INACTIVE_STA events.
Both are reported to the upper layers as a TX failure in the offending
stations.
In STA mode we register only for the MAX_TX_RETRY event. A TX failure is
interpreted as a loss of connection.
Support for IEEE80211_HW_REPORTS_TX_ACK_STATUS has been removed to avoid
the inherent race condition of a mac80211 TX failure counter in addition
to the FW counter.
This patch depends on "mac80211: allow low level driver to report packet
loss"
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/acx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/acx.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c index b277947400b5..a5c9c0aff83f 100644 --- a/drivers/net/wireless/wl12xx/acx.c +++ b/drivers/net/wireless/wl12xx/acx.c | |||
@@ -1524,22 +1524,46 @@ out: | |||
1524 | return ret; | 1524 | return ret; |
1525 | } | 1525 | } |
1526 | 1526 | ||
1527 | int wl1271_acx_max_tx_retry(struct wl1271 *wl) | 1527 | int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl) |
1528 | { | 1528 | { |
1529 | struct wl1271_acx_max_tx_retry *acx = NULL; | 1529 | struct wl1271_acx_ap_max_tx_retry *acx = NULL; |
1530 | int ret; | 1530 | int ret; |
1531 | 1531 | ||
1532 | wl1271_debug(DEBUG_ACX, "acx max tx retry"); | 1532 | wl1271_debug(DEBUG_ACX, "acx ap max tx retry"); |
1533 | 1533 | ||
1534 | acx = kzalloc(sizeof(*acx), GFP_KERNEL); | 1534 | acx = kzalloc(sizeof(*acx), GFP_KERNEL); |
1535 | if (!acx) | 1535 | if (!acx) |
1536 | return -ENOMEM; | 1536 | return -ENOMEM; |
1537 | 1537 | ||
1538 | acx->max_tx_retry = cpu_to_le16(wl->conf.tx.ap_max_tx_retries); | 1538 | acx->max_tx_retry = cpu_to_le16(wl->conf.tx.max_tx_retries); |
1539 | 1539 | ||
1540 | ret = wl1271_cmd_configure(wl, ACX_MAX_TX_FAILURE, acx, sizeof(*acx)); | 1540 | ret = wl1271_cmd_configure(wl, ACX_MAX_TX_FAILURE, acx, sizeof(*acx)); |
1541 | if (ret < 0) { | 1541 | if (ret < 0) { |
1542 | wl1271_warning("acx max tx retry failed: %d", ret); | 1542 | wl1271_warning("acx ap max tx retry failed: %d", ret); |
1543 | goto out; | ||
1544 | } | ||
1545 | |||
1546 | out: | ||
1547 | kfree(acx); | ||
1548 | return ret; | ||
1549 | } | ||
1550 | |||
1551 | int wl1271_acx_sta_max_tx_retry(struct wl1271 *wl) | ||
1552 | { | ||
1553 | struct wl1271_acx_sta_max_tx_retry *acx = NULL; | ||
1554 | int ret; | ||
1555 | |||
1556 | wl1271_debug(DEBUG_ACX, "acx sta max tx retry"); | ||
1557 | |||
1558 | acx = kzalloc(sizeof(*acx), GFP_KERNEL); | ||
1559 | if (!acx) | ||
1560 | return -ENOMEM; | ||
1561 | |||
1562 | acx->max_tx_retry = wl->conf.tx.max_tx_retries; | ||
1563 | |||
1564 | ret = wl1271_cmd_configure(wl, ACX_CONS_TX_FAILURE, acx, sizeof(*acx)); | ||
1565 | if (ret < 0) { | ||
1566 | wl1271_warning("acx sta max tx retry failed: %d", ret); | ||
1543 | goto out; | 1567 | goto out; |
1544 | } | 1568 | } |
1545 | 1569 | ||