|
@@ -7,6 +7,7 @@
|
|
|
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
|
|
|
* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
|
|
|
* Copyright 2007-2010, Intel Corporation
|
|
|
+ * Copyright(c) 2015 Intel Deutschland GmbH
|
|
|
*
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
@@ -295,7 +296,14 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
|
|
|
{
|
|
|
struct ieee80211_local *local = sta->local;
|
|
|
struct tid_ampdu_tx *tid_tx;
|
|
|
- enum ieee80211_ampdu_mlme_action action;
|
|
|
+ struct ieee80211_ampdu_params params = {
|
|
|
+ .sta = &sta->sta,
|
|
|
+ .tid = tid,
|
|
|
+ .buf_size = 0,
|
|
|
+ .amsdu = false,
|
|
|
+ .timeout = 0,
|
|
|
+ .ssn = 0,
|
|
|
+ };
|
|
|
int ret;
|
|
|
|
|
|
lockdep_assert_held(&sta->ampdu_mlme.mtx);
|
|
@@ -304,10 +312,10 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
|
|
|
case AGG_STOP_DECLINED:
|
|
|
case AGG_STOP_LOCAL_REQUEST:
|
|
|
case AGG_STOP_PEER_REQUEST:
|
|
|
- action = IEEE80211_AMPDU_TX_STOP_CONT;
|
|
|
+ params.action = IEEE80211_AMPDU_TX_STOP_CONT;
|
|
|
break;
|
|
|
case AGG_STOP_DESTROY_STA:
|
|
|
- action = IEEE80211_AMPDU_TX_STOP_FLUSH;
|
|
|
+ params.action = IEEE80211_AMPDU_TX_STOP_FLUSH;
|
|
|
break;
|
|
|
default:
|
|
|
WARN_ON_ONCE(1);
|
|
@@ -330,9 +338,8 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
|
|
|
spin_unlock_bh(&sta->lock);
|
|
|
if (reason != AGG_STOP_DESTROY_STA)
|
|
|
return -EALREADY;
|
|
|
- ret = drv_ampdu_action(local, sta->sdata,
|
|
|
- IEEE80211_AMPDU_TX_STOP_FLUSH_CONT,
|
|
|
- &sta->sta, tid, NULL, 0, false);
|
|
|
+ params.action = IEEE80211_AMPDU_TX_STOP_FLUSH_CONT;
|
|
|
+ ret = drv_ampdu_action(local, sta->sdata, ¶ms);
|
|
|
WARN_ON_ONCE(ret);
|
|
|
return 0;
|
|
|
}
|
|
@@ -381,8 +388,7 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
|
|
|
WLAN_BACK_INITIATOR;
|
|
|
tid_tx->tx_stop = reason == AGG_STOP_LOCAL_REQUEST;
|
|
|
|
|
|
- ret = drv_ampdu_action(local, sta->sdata, action,
|
|
|
- &sta->sta, tid, NULL, 0, false);
|
|
|
+ ret = drv_ampdu_action(local, sta->sdata, ¶ms);
|
|
|
|
|
|
/* HW shall not deny going back to legacy */
|
|
|
if (WARN_ON(ret)) {
|
|
@@ -445,7 +451,14 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
|
|
|
struct tid_ampdu_tx *tid_tx;
|
|
|
struct ieee80211_local *local = sta->local;
|
|
|
struct ieee80211_sub_if_data *sdata = sta->sdata;
|
|
|
- u16 start_seq_num;
|
|
|
+ struct ieee80211_ampdu_params params = {
|
|
|
+ .sta = &sta->sta,
|
|
|
+ .action = IEEE80211_AMPDU_TX_START,
|
|
|
+ .tid = tid,
|
|
|
+ .buf_size = 0,
|
|
|
+ .amsdu = false,
|
|
|
+ .timeout = 0,
|
|
|
+ };
|
|
|
int ret;
|
|
|
|
|
|
tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
|
|
@@ -467,10 +480,8 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
|
|
|
*/
|
|
|
synchronize_net();
|
|
|
|
|
|
- start_seq_num = sta->tid_seq[tid] >> 4;
|
|
|
-
|
|
|
- ret = drv_ampdu_action(local, sdata, IEEE80211_AMPDU_TX_START,
|
|
|
- &sta->sta, tid, &start_seq_num, 0, false);
|
|
|
+ params.ssn = sta->tid_seq[tid] >> 4;
|
|
|
+ ret = drv_ampdu_action(local, sdata, ¶ms);
|
|
|
if (ret) {
|
|
|
ht_dbg(sdata,
|
|
|
"BA request denied - HW unavailable for %pM tid %d\n",
|
|
@@ -499,7 +510,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
|
|
|
|
|
|
/* send AddBA request */
|
|
|
ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
|
|
|
- tid_tx->dialog_token, start_seq_num,
|
|
|
+ tid_tx->dialog_token, params.ssn,
|
|
|
IEEE80211_MAX_AMPDU_BUF,
|
|
|
tid_tx->timeout);
|
|
|
}
|
|
@@ -684,18 +695,24 @@ static void ieee80211_agg_tx_operational(struct ieee80211_local *local,
|
|
|
struct sta_info *sta, u16 tid)
|
|
|
{
|
|
|
struct tid_ampdu_tx *tid_tx;
|
|
|
+ struct ieee80211_ampdu_params params = {
|
|
|
+ .sta = &sta->sta,
|
|
|
+ .action = IEEE80211_AMPDU_TX_OPERATIONAL,
|
|
|
+ .tid = tid,
|
|
|
+ .timeout = 0,
|
|
|
+ .ssn = 0,
|
|
|
+ };
|
|
|
|
|
|
lockdep_assert_held(&sta->ampdu_mlme.mtx);
|
|
|
|
|
|
tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
|
|
|
+ params.buf_size = tid_tx->buf_size;
|
|
|
+ params.amsdu = tid_tx->amsdu;
|
|
|
|
|
|
ht_dbg(sta->sdata, "Aggregation is on for %pM tid %d\n",
|
|
|
sta->sta.addr, tid);
|
|
|
|
|
|
- drv_ampdu_action(local, sta->sdata,
|
|
|
- IEEE80211_AMPDU_TX_OPERATIONAL,
|
|
|
- &sta->sta, tid, NULL, tid_tx->buf_size,
|
|
|
- tid_tx->amsdu);
|
|
|
+ drv_ampdu_action(local, sta->sdata, ¶ms);
|
|
|
|
|
|
/*
|
|
|
* synchronize with TX path, while splicing the TX path
|