提交 44d6fa90 编写于 作者: C Chun-Yeow Yeoh 提交者: Kalle Valo

ath10k: allow the supported rate change by reassociate peer

IBSS mode requires the changing of supported rate. Do this
by reassociate the peer. The investigation shows that if move
from legacy to HT, the rate control won't work after changing
the supported rate. But once changing the supported rate to HT,
user can assign the TxRate in HT mode.
Signed-off-by: NChun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 70dd77b4
...@@ -1524,7 +1524,7 @@ static void ath10k_bss_disassoc(struct ieee80211_hw *hw, ...@@ -1524,7 +1524,7 @@ static void ath10k_bss_disassoc(struct ieee80211_hw *hw,
} }
static int ath10k_station_assoc(struct ath10k *ar, struct ath10k_vif *arvif, static int ath10k_station_assoc(struct ath10k *ar, struct ath10k_vif *arvif,
struct ieee80211_sta *sta) struct ieee80211_sta *sta, bool reassoc)
{ {
struct wmi_peer_assoc_complete_arg peer_arg; struct wmi_peer_assoc_complete_arg peer_arg;
int ret = 0; int ret = 0;
...@@ -1538,6 +1538,7 @@ static int ath10k_station_assoc(struct ath10k *ar, struct ath10k_vif *arvif, ...@@ -1538,6 +1538,7 @@ static int ath10k_station_assoc(struct ath10k *ar, struct ath10k_vif *arvif,
return ret; return ret;
} }
peer_arg.peer_reassoc = reassoc;
ret = ath10k_wmi_peer_assoc(ar, &peer_arg); ret = ath10k_wmi_peer_assoc(ar, &peer_arg);
if (ret) { if (ret) {
ath10k_warn("Peer assoc failed for STA %pM vdev %i: %d\n", ath10k_warn("Peer assoc failed for STA %pM vdev %i: %d\n",
...@@ -3195,6 +3196,16 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) ...@@ -3195,6 +3196,16 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk)
sta->addr, smps, err); sta->addr, smps, err);
} }
if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
ath10k_dbg(ATH10K_DBG_MAC, "mac update sta %pM supp rates\n",
sta->addr);
err = ath10k_station_assoc(ar, arvif, sta, true);
if (err)
ath10k_warn("Failed to reassociate station: %pM\n",
sta->addr);
}
mutex_unlock(&ar->conf_mutex); mutex_unlock(&ar->conf_mutex);
} }
...@@ -3275,7 +3286,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, ...@@ -3275,7 +3286,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
ath10k_dbg(ATH10K_DBG_MAC, "mac sta %pM associated\n", ath10k_dbg(ATH10K_DBG_MAC, "mac sta %pM associated\n",
sta->addr); sta->addr);
ret = ath10k_station_assoc(ar, arvif, sta); ret = ath10k_station_assoc(ar, arvif, sta, false);
if (ret) if (ret)
ath10k_warn("Failed to associate station %pM for vdev %i: %i\n", ath10k_warn("Failed to associate station %pM for vdev %i: %i\n",
sta->addr, arvif->vdev_id, ret); sta->addr, arvif->vdev_id, ret);
...@@ -4108,15 +4119,6 @@ static void ath10k_sta_rc_update(struct ieee80211_hw *hw, ...@@ -4108,15 +4119,6 @@ static void ath10k_sta_rc_update(struct ieee80211_hw *hw,
arsta->smps = smps; arsta->smps = smps;
} }
if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
/* FIXME: Not implemented. Probably the only way to do it would
* be to re-assoc the peer. */
changed &= ~IEEE80211_RC_SUPP_RATES_CHANGED;
ath10k_dbg(ATH10K_DBG_MAC,
"mac sta rc update for %pM: changing supported rates not implemented\n",
sta->addr);
}
arsta->changed |= changed; arsta->changed |= changed;
spin_unlock_bh(&ar->data_lock); spin_unlock_bh(&ar->data_lock);
......
...@@ -3456,8 +3456,9 @@ int ath10k_wmi_peer_assoc(struct ath10k *ar, ...@@ -3456,8 +3456,9 @@ int ath10k_wmi_peer_assoc(struct ath10k *ar,
__cpu_to_le32(arg->peer_vht_rates.tx_mcs_set); __cpu_to_le32(arg->peer_vht_rates.tx_mcs_set);
ath10k_dbg(ATH10K_DBG_WMI, ath10k_dbg(ATH10K_DBG_WMI,
"wmi peer assoc vdev %d addr %pM\n", "wmi peer assoc vdev %d addr %pM (%s)\n",
arg->vdev_id, arg->addr); arg->vdev_id, arg->addr,
arg->peer_reassoc ? "reassociate" : "new");
return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->peer_assoc_cmdid); return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->peer_assoc_cmdid);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册