提交 3d49da74 编写于 作者: D David Gnedt 提交者: John W. Linville

wl1251: disable retry and ACK policy for injected packets

Set the retry limit to 0 and disable the ACK policy for injected packets.
Signed-off-by: NDavid Gnedt <david.gnedt@davizone.at>
Signed-off-by: NPali Rohár <pali.rohar@gmail.com>
Signed-off-by: NPavel Machek <pavel@ucw.cz>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 c8909e5a
......@@ -847,12 +847,18 @@ int wl1251_acx_rate_policies(struct wl1251 *wl)
return -ENOMEM;
/* configure one default (one-size-fits-all) rate class */
acx->rate_class_cnt = 1;
acx->rate_class_cnt = 2;
acx->rate_class[0].enabled_rates = ACX_RATE_MASK_UNSPECIFIED;
acx->rate_class[0].short_retry_limit = ACX_RATE_RETRY_LIMIT;
acx->rate_class[0].long_retry_limit = ACX_RATE_RETRY_LIMIT;
acx->rate_class[0].aflags = 0;
/* no-retry rate class */
acx->rate_class[1].enabled_rates = ACX_RATE_MASK_UNSPECIFIED;
acx->rate_class[1].short_retry_limit = 0;
acx->rate_class[1].long_retry_limit = 0;
acx->rate_class[1].aflags = 0;
ret = wl1251_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx));
if (ret < 0) {
wl1251_warning("Setting of rate policies failed: %d", ret);
......
......@@ -90,8 +90,12 @@ static void wl1251_tx_control(struct tx_double_buffer_desc *tx_hdr,
/* 802.11 packets */
tx_hdr->control.packet_type = 0;
if (control->flags & IEEE80211_TX_CTL_NO_ACK)
/* Also disable retry and ACK policy for injected packets */
if ((control->flags & IEEE80211_TX_CTL_NO_ACK) ||
(control->flags & IEEE80211_TX_CTL_INJECTED)) {
tx_hdr->control.rate_policy = 1;
tx_hdr->control.ack_policy = 1;
}
tx_hdr->control.tx_complete = 1;
......@@ -422,6 +426,7 @@ static void wl1251_tx_packet_cb(struct wl1251 *wl,
info = IEEE80211_SKB_CB(skb);
if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) &&
!(info->flags & IEEE80211_TX_CTL_INJECTED) &&
(result->status == TX_SUCCESS))
info->flags |= IEEE80211_TX_STAT_ACK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册