|
@@ -866,9 +866,11 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
|
|
int status = -EOPNOTSUPP;
|
|
int status = -EOPNOTSUPP;
|
|
struct rsi_hw *adapter = hw->priv;
|
|
struct rsi_hw *adapter = hw->priv;
|
|
struct rsi_common *common = adapter->priv;
|
|
struct rsi_common *common = adapter->priv;
|
|
- u16 seq_no = 0;
|
|
|
|
|
|
+ struct rsi_sta *rsta = NULL;
|
|
|
|
+ u16 seq_no = 0, seq_start = 0;
|
|
u8 ii = 0;
|
|
u8 ii = 0;
|
|
struct ieee80211_sta *sta = params->sta;
|
|
struct ieee80211_sta *sta = params->sta;
|
|
|
|
+ u8 sta_id = 0;
|
|
enum ieee80211_ampdu_mlme_action action = params->action;
|
|
enum ieee80211_ampdu_mlme_action action = params->action;
|
|
u16 tid = params->tid;
|
|
u16 tid = params->tid;
|
|
u16 *ssn = ¶ms->ssn;
|
|
u16 *ssn = ¶ms->ssn;
|
|
@@ -880,17 +882,31 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
|
|
}
|
|
}
|
|
|
|
|
|
mutex_lock(&common->mutex);
|
|
mutex_lock(&common->mutex);
|
|
- rsi_dbg(INFO_ZONE, "%s: AMPDU action %d called\n", __func__, action);
|
|
|
|
|
|
+
|
|
if (ssn != NULL)
|
|
if (ssn != NULL)
|
|
seq_no = *ssn;
|
|
seq_no = *ssn;
|
|
|
|
|
|
|
|
+ if (vif->type == NL80211_IFTYPE_AP) {
|
|
|
|
+ rsta = rsi_find_sta(common, sta->addr);
|
|
|
|
+ if (!rsta) {
|
|
|
|
+ rsi_dbg(ERR_ZONE, "No station mapped\n");
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+ sta_id = rsta->sta_id;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ rsi_dbg(INFO_ZONE,
|
|
|
|
+ "%s: AMPDU action tid=%d ssn=0x%x, buf_size=%d sta_id=%d\n",
|
|
|
|
+ __func__, tid, seq_no, buf_size, sta_id);
|
|
|
|
+
|
|
switch (action) {
|
|
switch (action) {
|
|
case IEEE80211_AMPDU_RX_START:
|
|
case IEEE80211_AMPDU_RX_START:
|
|
status = rsi_send_aggregation_params_frame(common,
|
|
status = rsi_send_aggregation_params_frame(common,
|
|
tid,
|
|
tid,
|
|
seq_no,
|
|
seq_no,
|
|
buf_size,
|
|
buf_size,
|
|
- STA_RX_ADDBA_DONE);
|
|
|
|
|
|
+ STA_RX_ADDBA_DONE,
|
|
|
|
+ sta_id);
|
|
break;
|
|
break;
|
|
|
|
|
|
case IEEE80211_AMPDU_RX_STOP:
|
|
case IEEE80211_AMPDU_RX_STOP:
|
|
@@ -898,11 +914,15 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
|
|
tid,
|
|
tid,
|
|
0,
|
|
0,
|
|
buf_size,
|
|
buf_size,
|
|
- STA_RX_DELBA);
|
|
|
|
|
|
+ STA_RX_DELBA,
|
|
|
|
+ sta_id);
|
|
break;
|
|
break;
|
|
|
|
|
|
case IEEE80211_AMPDU_TX_START:
|
|
case IEEE80211_AMPDU_TX_START:
|
|
- common->vif_info[ii].seq_start = seq_no;
|
|
|
|
|
|
+ if (vif->type == NL80211_IFTYPE_STATION)
|
|
|
|
+ common->vif_info[ii].seq_start = seq_no;
|
|
|
|
+ else if (vif->type == NL80211_IFTYPE_AP)
|
|
|
|
+ rsta->seq_start[tid] = seq_no;
|
|
ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
|
|
ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
|
|
status = 0;
|
|
status = 0;
|
|
break;
|
|
break;
|
|
@@ -914,18 +934,23 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
|
|
tid,
|
|
tid,
|
|
seq_no,
|
|
seq_no,
|
|
buf_size,
|
|
buf_size,
|
|
- STA_TX_DELBA);
|
|
|
|
|
|
+ STA_TX_DELBA,
|
|
|
|
+ sta_id);
|
|
if (!status)
|
|
if (!status)
|
|
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
|
|
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
|
|
break;
|
|
break;
|
|
|
|
|
|
case IEEE80211_AMPDU_TX_OPERATIONAL:
|
|
case IEEE80211_AMPDU_TX_OPERATIONAL:
|
|
|
|
+ if (vif->type == NL80211_IFTYPE_STATION)
|
|
|
|
+ seq_start = common->vif_info[ii].seq_start;
|
|
|
|
+ else if (vif->type == NL80211_IFTYPE_AP)
|
|
|
|
+ seq_start = rsta->seq_start[tid];
|
|
status = rsi_send_aggregation_params_frame(common,
|
|
status = rsi_send_aggregation_params_frame(common,
|
|
tid,
|
|
tid,
|
|
- common->vif_info[ii]
|
|
|
|
- .seq_start,
|
|
|
|
|
|
+ seq_start,
|
|
buf_size,
|
|
buf_size,
|
|
- STA_TX_ADDBA_DONE);
|
|
|
|
|
|
+ STA_TX_ADDBA_DONE,
|
|
|
|
+ sta_id);
|
|
break;
|
|
break;
|
|
|
|
|
|
default:
|
|
default:
|