Return-path: Received: from mail-ob0-f194.google.com ([209.85.214.194]:35485 "EHLO mail-ob0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754881AbcGHPiB (ORCPT ); Fri, 8 Jul 2016 11:38:01 -0400 Received: by mail-ob0-f194.google.com with SMTP id wj2so2825016obc.2 for ; Fri, 08 Jul 2016 08:38:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1467972560885.99812@qti.qualcomm.com> <1467982766213.21223@qti.qualcomm.com> From: Krishna Chaitanya Date: Fri, 8 Jul 2016 21:07:40 +0530 Message-ID: (sfid-20160708_173805_648538_983D451A) Subject: Re: ath10k + iw set bitrates is causing FW crash To: "Manoharan, Rajkumar" Cc: linux-wireless , ath10k Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Fri, Jul 8, 2016 at 8:57 PM, Krishna Chaitanya wrote: > On Fri, Jul 8, 2016 at 6:29 PM, Manoharan, Rajkumar > wrote: >> I think security failures are due to peer unmap & map upon reassoc. Can you please try below change? >> >> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c >> index 5e1cc8f4c43c..f7f04bb46fc8 100644 >> --- a/drivers/net/wireless/ath/ath10k/mac.c >> +++ b/drivers/net/wireless/ath/ath10k/mac.c >> @@ -5745,8 +5745,9 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) >> sta->addr, smps, err); >> } >> >> - if (changed & IEEE80211_RC_SUPP_RATES_CHANGED || >> - changed & IEEE80211_RC_NSS_CHANGED) { >> + if ((changed & IEEE80211_RC_SUPP_RATES_CHANGED || >> + changed & IEEE80211_RC_NSS_CHANGED) && >> + (arvif->vif->type == NL80211_IFTYPE_ADHOC)) { >> ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM supp rates/nss\n", >> sta->addr); > > Bottom posting please. I have tried your change i still see the same issue. > Right after connecting i see that packets are encrypted but once it > unset/set "bitrates" plain packets are seen in sniffer. > > BTW, i am not rebooting for each driver update, just re-inserting the module, > do i need to do a reboot for each driver change? After reboot i dont see the "unencrypted" packet issue, i will do some more testing on limiting the rates, currently in my setup its not reaching MCS9 so cannot verify now. Thanks for the fixes and prompt reply. ________________________________________ >> From: Krishna Chaitanya >> Sent: Friday, July 8, 2016 5:26 PM >> To: Manoharan, Rajkumar >> Cc: linux-wireless; ath10k >> Subject: Re: ath10k + iw set bitrates is causing FW crash >> >> On Fri, Jul 8, 2016 at 3:39 PM, Manoharan, Rajkumar >> wrote: >>>>> I am using ath10k driver with qca988x hw2.0 and trying to limit it to use >>>>> VHT MCS0-7 (iw set bitrates vht-mcs-5 2:0-7). >>>>> >>>>> But the command it causing a FW crash, if it disable HW_HAS_RATE_CONTROL >>>>> no crash is observed but it still uses MCS9. >>>>> >>>>> tree: wireless-drivers-next: commit#535633a5ba4ea2504fa6c33176633becf0e59339 >>>>> >>>>> 1) If i disable HW_RATE_CONTROL, will ath10k honor >>>>> the mac80211 rates? >>>>> >>>> >>> Thanks for reporting the issue. Could you please try with below change? >>> >>> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c >>> index 5e1cc8f4c43c..cfa7e01a6103 100644 >>> --- a/drivers/net/wireless/ath/ath10k/mac.c >>> +++ b/drivers/net/wireless/ath/ath10k/mac.c >>> @@ -2812,6 +2812,9 @@ static int ath10k_station_assoc(struct ath10k *ar, >>> return ret; >>> } >>> >>> + if (vif->type != NL80211_IFTYPE_ADHOC) >>> + peer_arg.peer_reassoc = reassoc; >>> + >>> ret = ath10k_wmi_peer_assoc(ar, &peer_arg); >>> if (ret) { >>> ath10k_warn(ar, "failed to run peer assoc for STA %pM vdev %i: %d\n", >> >> Thanks Raj, with this fix the rates are 0-7, if i disable then i am >> seeing 0-9, so its >> working. >> >> But i am seeing a weird issues, the moment i give bitrates command, >> ath10k no longer does encryption, link is a WPA2-PSK: AES. Even after >> interface up/down >> it doesn't work.