diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2010-02-18 06:25:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-19 15:52:43 -0500 |
commit | c6999d831ab9ae5e368b20f3bc11b0ca9c17a7ec (patch) | |
tree | b32ce8ce76cbe875f264a51bf79ae7e60e656c7f /drivers/net/wireless/wl12xx/wl1271_main.c | |
parent | f2054df5170734eacd1db82138c70746ec8387de (diff) |
wl1271: implement WMM
Now that necessary commands for WMM are implemented, implement queue handling
for WMM. But WMM is not enabled yet, only one queue is used.
Based on a similar patch from wl1251.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index a3742c8052d4..6f7a7d946359 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -1712,6 +1712,36 @@ out: | |||
1712 | mutex_unlock(&wl->mutex); | 1712 | mutex_unlock(&wl->mutex); |
1713 | } | 1713 | } |
1714 | 1714 | ||
1715 | static int wl1271_op_conf_tx(struct ieee80211_hw *hw, u16 queue, | ||
1716 | const struct ieee80211_tx_queue_params *params) | ||
1717 | { | ||
1718 | struct wl1271 *wl = hw->priv; | ||
1719 | int ret; | ||
1720 | |||
1721 | mutex_lock(&wl->mutex); | ||
1722 | |||
1723 | wl1271_debug(DEBUG_MAC80211, "mac80211 conf tx %d", queue); | ||
1724 | |||
1725 | ret = wl1271_acx_ac_cfg(wl, wl1271_tx_get_queue(queue), | ||
1726 | params->cw_min, params->cw_max, | ||
1727 | params->aifs, params->txop); | ||
1728 | if (ret < 0) | ||
1729 | goto out; | ||
1730 | |||
1731 | ret = wl1271_acx_tid_cfg(wl, wl1271_tx_get_queue(queue), | ||
1732 | CONF_CHANNEL_TYPE_EDCF, | ||
1733 | wl1271_tx_get_queue(queue), | ||
1734 | CONF_PS_SCHEME_LEGACY_PSPOLL, | ||
1735 | CONF_ACK_POLICY_LEGACY, 0, 0); | ||
1736 | if (ret < 0) | ||
1737 | goto out; | ||
1738 | |||
1739 | out: | ||
1740 | mutex_unlock(&wl->mutex); | ||
1741 | |||
1742 | return ret; | ||
1743 | } | ||
1744 | |||
1715 | 1745 | ||
1716 | /* can't be const, mac80211 writes to this */ | 1746 | /* can't be const, mac80211 writes to this */ |
1717 | static struct ieee80211_rate wl1271_rates[] = { | 1747 | static struct ieee80211_rate wl1271_rates[] = { |
@@ -1877,6 +1907,7 @@ static const struct ieee80211_ops wl1271_ops = { | |||
1877 | .hw_scan = wl1271_op_hw_scan, | 1907 | .hw_scan = wl1271_op_hw_scan, |
1878 | .bss_info_changed = wl1271_op_bss_info_changed, | 1908 | .bss_info_changed = wl1271_op_bss_info_changed, |
1879 | .set_rts_threshold = wl1271_op_set_rts_threshold, | 1909 | .set_rts_threshold = wl1271_op_set_rts_threshold, |
1910 | .conf_tx = wl1271_op_conf_tx, | ||
1880 | }; | 1911 | }; |
1881 | 1912 | ||
1882 | static int wl1271_register_hw(struct wl1271 *wl) | 1913 | static int wl1271_register_hw(struct wl1271 *wl) |