On 9 March 2015 at 13:45, Marek Puzyniak <marek.puzyniak@xxxxxxxxx> wrote: > This patch adds functions to enable/disable tdls > and to configure tdls peer station for tlv based firmware. > Tdls peer uapsd and tdls channel switching are not supported. > Transmitting tdls data frames works only for ethernet > type frames, that's why data addressed to tdls sta > is in ethernet format. > > Tdls functionality for ath10k requires changes in mac80211 > provided in patch: > mac80211: initialize rate control earlier for tdls station > > Signed-off-by: Michal Kazior <michal.kazior@xxxxxxxxx> > Signed-off-by: Marek Kwaczynski <marek.kwaczynski@xxxxxxxxx> > Signed-off-by: Marek Puzyniak <marek.puzyniak@xxxxxxxxx> > --- [...] Currently the patch doesn't account for the number of connected TDLS station properly. This can lead to firmware crash when number of allowed station peers is exceeded: > ath10k_pci 0000:04:00.0 mac vdev 0 peer create 68:94:23:c6:1f:33 (new sta) sta 1 / 32 peer 33 / 37 > [...] > ath10k_pci 0000:04:00.0 firmware crashed! (uuid 4f652378-c66d-43ff-989d-00f376ff11dc) Function ath10k_mac_{inc,dec}_num_stations() need to be fixed so that ar->num_stations (the following was *not* tested), e.g.: --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4411,14 +4411,14 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) mutex_unlock(&ar->conf_mutex); } -static int ath10k_mac_inc_num_stations(struct ath10k_vif *arvif) +static int ath10k_mac_inc_num_stations(struct ath10k_vif *arvif, + struct ieee80211_sta *sta) { struct ath10k *ar = arvif->ar; lockdep_assert_held(&ar->conf_mutex); - if (arvif->vdev_type != WMI_VDEV_TYPE_AP && - arvif->vdev_type != WMI_VDEV_TYPE_IBSS) + if (arvif->vdev_type == WMI_VDEV_TYPE_STA && !sta->tdls) return 0; if (ar->num_stations >= ar->max_num_stations) @@ -4435,8 +4435,7 @@ static void ath10k_mac_dec_num_stations(struct ath10k_vif *arvif) lockdep_assert_held(&ar->conf_mutex); - if (arvif->vdev_type != WMI_VDEV_TYPE_AP && - arvif->vdev_type != WMI_VDEV_TYPE_IBSS) + if (arvif->vdev_type == WMI_VDEV_TYPE_STA && !sta->tdls) return; ar->num_stations--; Michał -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html