Re: [ath9k-devel] [RFT] ath10k: retry target reset
Michal Kazior michal.kaz...@tieto.com writes: Sometimes the device just won't reset cleanly without retrying. This seems to depend on the host hardware. Signed-off-by: Michal Kazior michal.kaz...@tieto.com --- I can't reproduce the issue on my hw. Can someone confirm if this fixes the problem? If you are referencing to the crash I reported to you privately, I have seen that problem only once and haven't been able to reproduce since. So I can't really test this patch. @@ -1931,7 +1935,12 @@ static int ath10k_pci_start_intr_legacy(struct ath10k *ar) ar_pci-mem + PCIE_LOCAL_BASE_ADDRESS + PCIE_SOC_WAKE_ADDRESS); - ath10k_pci_wait(ar); + ret = ath10k_pci_wait(ar); + if (ret) { + ath10k_err(target did not wake up\n); + free_irq(ar_pci-pdev-irq, ar); + return ret; + } /* * A potential race occurs here: The CORE_BASE write @@ -2019,13 +2028,18 @@ static int ath10k_pci_reset_target(struct ath10k *ar) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); int wait_limit = 300; /* 3 sec */ + int ret = 0; /* Wait for Target to finish initialization before we proceed. */ iowrite32(PCIE_SOC_WAKE_V_MASK, ar_pci-mem + PCIE_LOCAL_BASE_ADDRESS + PCIE_SOC_WAKE_ADDRESS); - ath10k_pci_wait(ar); + ret = ath10k_pci_wait(ar); + if (ret) { + ath10k_warn(target did not wake up\n); + goto exit; You have same warnings messages in different places now. I recommend adding ..for start and ...for reset, or something like that, to exactly identify the warning location. Example: ath10k_warn(target did not wake up for reset\n); -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [RFC/RFT v2 1/2] ath10k: WMI add AP PS
Janusz Dziedzic janusz.dzied...@tieto.com writes: Add AP power save (UAPSD) structures, enums. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com I see that you resent this as PATCH so I will skip these patches. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [RFC/RFT 1/3] ath10k: report mgmt tx retry status as no_ack
Michal Kazior michal.kaz...@tieto.com writes: Signed-off-by: Michal Kazior michal.kaz...@tieto.com Why? -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [RFC/RFT 0/3] ath10k: fix beacon loss handling
Bartosz Markowski bartosz.markow...@tieto.com writes: Kalle, could you please submit/review these? I will not commit any patches which have either RFC or RFT tag. And I also review them in lower priority. So if you want me to commit something I recommend to use only PATCH. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH v2 1/3] ath10k: FW API update for version .629
From: Sujith Manoharan c_man...@qca.qualcomm.com Signed-off-by: Sujith Manoharan c_man...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/hw.h | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 18 - drivers/net/wireless/ath/ath10k/wmi.h | 49 ++- 3 files changed, 44 insertions(+), 25 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index c922726..44ed5af 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -24,7 +24,7 @@ #define SUPPORTED_FW_MAJOR 1 #define SUPPORTED_FW_MINOR 0 #define SUPPORTED_FW_RELEASE 0 -#define SUPPORTED_FW_BUILD 614 +#define SUPPORTED_FW_BUILD 629 /* QCA988X 1.0 definitions */ #define QCA988X_HW_1_0_VERSION 0x402c diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 15e8123..9410c00 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -415,18 +415,6 @@ static void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, complete(ar-vdev_setup_done); } -static void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, - struct sk_buff *skb) -{ - ath10k_dbg(ATH10K_DBG_WMI, WMI_VDEV_STANDBY_REQ_EVENTID\n); -} - -static void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, -struct sk_buff *skb) -{ - ath10k_dbg(ATH10K_DBG_WMI, WMI_VDEV_RESUME_REQ_EVENTID\n); -} - static void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb) { @@ -971,12 +959,6 @@ static void ath10k_wmi_event_process(struct ath10k *ar, struct sk_buff *skb) case WMI_VDEV_START_RESP_EVENTID: ath10k_wmi_event_vdev_start_resp(ar, skb); break; - case WMI_VDEV_STANDBY_REQ_EVENTID: - ath10k_wmi_event_vdev_standby_req(ar, skb); - break; - case WMI_VDEV_RESUME_REQ_EVENTID: - ath10k_wmi_event_vdev_resume_req(ar, skb); - break; case WMI_VDEV_STOPPED_EVENTID: ath10k_wmi_event_vdev_stopped(ar, skb); break; diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 2ad0431..82267e8 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -99,6 +99,11 @@ enum wmi_service_id { WMI_SERVICE_CHATTER, /* Chatter service */ WMI_SERVICE_COEX_FREQAVOID, /* FW report freq range to avoid */ WMI_SERVICE_PACKET_POWER_SAVE,/* packet power save service */ + WMI_SERVICE_FORCE_FW_HANG,/* To test firmware recovery mechanism */ + WMI_SERVICE_GPIO, /* GPIO service */ + WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, /* Modulated DTIM support */ + WMI_STA_UAPSD_BASIC_AUTO_TRIG,/* UAPSD AC Trigger Generation Method */ + WMI_STA_UAPSD_VAR_AUTO_TRIG, /* -do- */ WMI_SERVICE_LAST, WMI_MAX_SERVICE = 64 /* max service */ @@ -153,6 +158,10 @@ static inline char *wmi_service_name(int service_id) return COEX_FREQAVOID; case WMI_SERVICE_PACKET_POWER_SAVE: return PACKET_POWER_SAVE; + case WMI_SERVICE_FORCE_FW_HANG: + return FORCE FW HANG; + case WMI_SERVICE_GPIO: + return GPIO; default: return UNKNOWN SERVICE\n; } @@ -216,6 +225,7 @@ enum wmi_cmd_group { WMI_GRP_CHATTER, WMI_GRP_TID_ADDBA, WMI_GRP_MISC, + WMI_GRP_GPIO, }; #define WMI_CMD_GRP(grp_id) (((grp_id) 12) | 0x1) @@ -244,6 +254,7 @@ enum wmi_cmd_id { WMI_PDEV_SET_QUIET_MODE_CMDID, WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID, WMI_PDEV_GET_TPC_CONFIG_CMDID, + WMI_PDEV_SET_BASE_MACADDR_CMDID, /* VDEV (virtual device) specific commands */ WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV), @@ -253,8 +264,6 @@ enum wmi_cmd_id { WMI_VDEV_UP_CMDID, WMI_VDEV_STOP_CMDID, WMI_VDEV_DOWN_CMDID, - WMI_VDEV_STANDBY_RESPONSE_CMDID, - WMI_VDEV_RESUME_RESPONSE_CMDID, WMI_VDEV_SET_PARAM_CMDID, WMI_VDEV_INSTALL_KEY_CMDID, @@ -374,14 +383,23 @@ enum wmi_cmd_id { WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA), WMI_PEER_TID_DELBA_CMDID, + /* set station mimo powersave method */ + WMI_STA_DTIM_PS_METHOD_CMDID, + /* Configure the Station UAPSD AC Auto Trigger Parameters */ + WMI_STA_UAPSD_AUTO_TRIG_CMDID, + /* misc command group */ WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC), + WMI_PDEV_UTF_CMDID, WMI_DBGLOG_CFG_CMDID, WMI_PDEV_QVIT_CMDID, WMI_PDEV_FTM_INTG_CMDID, WMI_VDEV_SET_KEEPALIVE_CMDID,
[ath9k-devel] [PATCH v2 3/3] ath10k: Set the default TX encapsulation type
From: Sujith Manoharan c_man...@qca.qualcomm.com The firmware needs to know which frame type is to be used for TX encapsulation. Specifiy this explicitly as NWIFI mode and allow the HW to perform encapsulation. Signed-off-by: Sujith Manoharan c_man...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/mac.c | 6 ++ drivers/net/wireless/ath/ath10k/wmi.h | 8 2 files changed, 14 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 59e9874..182bf67 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1674,6 +1674,12 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, if (ret) ath10k_warn(Failed to set default keyid: %d\n, ret); + ret = ath10k_wmi_vdev_set_param(ar, arvif-vdev_id, + WMI_VDEV_PARAM_TX_ENCAP_TYPE, + ATH10K_HW_TXRX_NATIVE_WIFI); + if (ret) + ath10k_warn(Failed to set TX encap: %d\n, ret); + if (arvif-vdev_type == WMI_VDEV_TYPE_AP) { ret = ath10k_peer_create(ar, arvif-vdev_id, vif-addr); if (ret) { diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 82267e8..d2c5d32 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -104,6 +104,7 @@ enum wmi_service_id { WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, /* Modulated DTIM support */ WMI_STA_UAPSD_BASIC_AUTO_TRIG,/* UAPSD AC Trigger Generation Method */ WMI_STA_UAPSD_VAR_AUTO_TRIG, /* -do- */ + WMI_SERVICE_TX_ENCAP, /* Packet type for TX encapsulation */ WMI_SERVICE_LAST, WMI_MAX_SERVICE = 64 /* max service */ @@ -162,6 +163,8 @@ static inline char *wmi_service_name(int service_id) return FORCE FW HANG; case WMI_SERVICE_GPIO: return GPIO; + case WMI_SERVICE_TX_ENCAP: + return TX ENCAP; default: return UNKNOWN SERVICE\n; } @@ -2185,6 +2188,11 @@ enum wmi_vdev_param { * otherwise forwards to host. */ WMI_VDEV_PARAM_DROP_UNENCRY, + + /* +* Set the encapsulation type for frames. +*/ + WMI_VDEV_PARAM_TX_ENCAP_TYPE, }; /* slot time long */ -- 1.8.2.2 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [RFC/RFT 0/3] ath10k: fix beacon loss handling
Michal, could you please address Kalle's comments. From me ACK for the series (tested OK) Bartosz On 9 May 2013 12:33, Kalle Valo kv...@qca.qualcomm.com wrote: Bartosz Markowski bartosz.markow...@tieto.com writes: Kalle, could you please submit/review these? I will not commit any patches which have either RFC or RFT tag. And I also review them in lower priority. So if you want me to commit something I recommend to use only PATCH. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 2/3] ath10k: add AP UAPSD support
Janusz Dziedzic janusz.dzied...@tieto.com writes: Add support for AP (P2P_GO) UAPSD. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com You should briefly mention in the commit log how you have tested this. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 0/3] ath10k: fix beacon loss handling
FW is lying about tx status. First two patches do a little cleanup. The last one fixes beacon loss handling. This can be considered a workaround depending on what original FW design called for. Michal Kazior (3): ath10k: report mgmt tx retry status as no_ack ath10k: cleanup tx completion ath10k: pass NullFunc frames through mgmt tx path drivers/net/wireless/ath/ath10k/htt_rx.c |5 ++--- drivers/net/wireless/ath/ath10k/mac.c|6 ++ 2 files changed, 8 insertions(+), 3 deletions(-) -- 1.7.9.5 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 1/3] ath10k: report mgmt tx retry status as no_ack
Retry status may mean FW either didn't send the frame or there was no ACK for it. Since we don't really support retrying (why should we?) lets report these frames as not acked. This way if NullFunc frame is sent through mgmt tx path we can report it's status correctly to mac80211. Signed-off-by: Michal Kazior michal.kaz...@tieto.com --- drivers/net/wireless/ath/ath10k/htt_rx.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index dac6439..a32dcad 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -1084,6 +1084,8 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb) tx_done.discard = false; break; case HTT_MGMT_TX_STATUS_RETRY: + tx_done.no_ack = true; + break; case HTT_MGMT_TX_STATUS_DROP: tx_done.discard = true; break; -- 1.7.9.5 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 3/3] ath10k: pass NullFunc frames through mgmt tx path
FW was reporting incorrect tx status for NullFunc frames sent through data tx path. mac80211 uses tx status when dealing with link/beacon loss. Using mgmt tx path allows us to get reliable tx status. This patch fixes connection loss handling. Signed-off-by: Michal Kazior michal.kaz...@tieto.com --- drivers/net/wireless/ath/ath10k/mac.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 930a092..b6f519e 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1299,6 +1299,12 @@ static void ath10k_tx_htt(struct ath10k *ar, struct sk_buff *skb) if (ieee80211_is_mgmt(hdr-frame_control)) ret = ath10k_htt_mgmt_tx(ar-htt, skb); + else if (ieee80211_is_nullfunc(hdr-frame_control)) + /* FW does not report tx status properly for NullFunc frames +* unless they are sent through mgmt tx path. mac80211 sends +* those frames when it detects link/beacon loss and depends on +* the tx status to be correct. */ + ret = ath10k_htt_mgmt_tx(ar-htt, skb); else ret = ath10k_htt_tx(ar-htt, skb); -- 1.7.9.5 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 3/3] ath10k: enable STA UAPSD support
Janusz Dziedzic janusz.dzied...@tieto.com writes: Enable UAPSD support for STA mode. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Same here, please explain briefly what you have tested. --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2296,6 +2296,68 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, return ret; } +#define SET_UAPSD(enable, out, flags) do { \ + if ((enable)) \ + (out) |= (flags); \ + else\ + (out) = ~(flags); \ +} while (0) Why the macro? To workaround a long line warning from checkpatch? If that's a problem we could increate line length limit, for example to 85 or 90. In some cases the 80 char limit is a bit too excessive. Would that help? [...] + if (ret) { + ath10k_warn(could not set uapsd params (%d)\n, ret); could not set uapsd params: %d\n + goto exit; + } + + if (arvif-u.sta.uapsd) + value = WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD; + else + value = WMI_STA_PS_RX_WAKE_POLICY_WAKE; + + ret = ath10k_wmi_set_sta_ps_param(ar, arvif-vdev_id, + WMI_STA_PS_PARAM_RX_WAKE_POLICY, + value); + if (ret) + ath10k_warn(could not set rx wake param (%d)\n, ret); +exit: + return ret; +} Empty line before the exit label. @@ -2335,13 +2399,20 @@ static int ath10k_conf_tx(struct ieee80211_hw *hw, */ p-txop = params-txop * 32; - /* FIXME: can we pass the params-uapsd to the FW? */ + This now has two empty lines, one is enough. - if (ret) + if (ret) { ath10k_warn(could not set wmm params (%d)\n, ret); + goto exit; + } The same comment as with the other warning message above. + ret = ath10k_conf_tx_uapsd(ar, vif, ac, params-uapsd); + if (ret) + ath10k_warn(could not set sta uapsd (%d)\n, ret); Ditto. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: remove stale peers upon vif removal
Michal Kazior michal.kaz...@tieto.com writes: Fixes leak of ath10k_peer structures if FW stops responding suddenly and we unload the driver (e.g. eject the device while we're associated and unload the driver). Signed-off-by: Michal Kazior michal.kaz...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/3] ath10k: WMI add AP PS
-Original Message- From: Kalle Valo [mailto:kv...@qca.qualcomm.com] Sent: 9 maja 2013 09:10 To: Dziedzic Janusz Cc: ath9k-devel@lists.ath9k.org Subject: Re: [ath9k-devel] [PATCH 1/3] ath10k: WMI add AP PS Janusz Dziedzic janusz.dzied...@tieto.com writes: Add AP power save (UAPSD) structures, enums. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com [...] +cmd-vdev_id = __cpu_to_le32(vdev_id); +cmd-param_id= __cpu_to_le32(param_id); +cmd-param_value = __cpu_to_le32(value); Remove the extra whitespace before '='. I did same style we have in wmi.c In other functions, Eg. (ath10k_wmi_set_psmode) cmd-vdev_id = __cpu_to_le32(vdev_id); cmd-sta_ps_mode = __cpu_to_le32(psmode); So, should I change this? BR Janusz ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 3/3] ath10k: enable STA UAPSD support
-Original Message- From: Kalle Valo [mailto:kv...@qca.qualcomm.com] Sent: 9 maja 2013 09:17 To: Dziedzic Janusz Cc: ath9k-devel@lists.ath9k.org Subject: Re: [ath9k-devel] [PATCH 3/3] ath10k: enable STA UAPSD support Janusz Dziedzic janusz.dzied...@tieto.com writes: Enable UAPSD support for STA mode. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Same here, please explain briefly what you have tested. --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2296,6 +2296,68 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, return ret; } +#define SET_UAPSD(enable, out, flags) do { \ +if ((enable)) \ +(out) |= (flags); \ +else\ +(out) = ~(flags); \ +} while (0) Why the macro? To workaround a long line warning from checkpatch? If that's a problem we could increate line length limit, for example to 85 or 90. In some cases the 80 char limit is a bit too excessive. Would that help? Not really. This is because we have to set/clean this flags for every ACs. So, this is just to prevent code duplication. case IEEE80211_AC_VO: if (enable) ... else break; case IEEE80211_AC_VI: if (enable) else break; . I can remove this macro and create inline function instead. BR Janusz ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 3/3] ath10k: enable STA UAPSD support
On 09/05/13 09:47, janusz.dzied...@tieto.com wrote: -Original Message- From: Kalle Valo [mailto:kv...@qca.qualcomm.com] Sent: 9 maja 2013 09:17 To: Dziedzic Janusz Cc: ath9k-devel@lists.ath9k.org Subject: Re: [ath9k-devel] [PATCH 3/3] ath10k: enable STA UAPSD support Janusz Dziedzic janusz.dzied...@tieto.com writes: Enable UAPSD support for STA mode. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Same here, please explain briefly what you have tested. --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2296,6 +2296,68 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, return ret; } +#define SET_UAPSD(enable, out, flags) do { \ + if ((enable)) \ + (out) |= (flags); \ + else\ + (out) = ~(flags); \ +} while (0) Why the macro? To workaround a long line warning from checkpatch? If that's a problem we could increate line length limit, for example to 85 or 90. In some cases the 80 char limit is a bit too excessive. Would that help? Not really. This is because we have to set/clean this flags for every ACs. So, this is just to prevent code duplication. case IEEE80211_AC_VO: if (enable) ... else break; case IEEE80211_AC_VI: if (enable) else break; . I can remove this macro and create inline function instead. Hmm, but since this is per-ac can't we do the following? switch (ac) { case IEEE80211_AC_VO: val = WMI_STA_PS_UAPSD_AC3_DELIVERY_EN | WMI_STA_PS_UAPSD_AC3_TRIGGER_EN; break; // .. } if (enable) arvif-u.sta.uapsd |= val; else arvif-u.sta.uapsd = ~val; No macros and no code duplication. -- Pozdrawiam / Best regards, Michal Kazior. ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH] ath10k: Add new service IDs
From: Sujith Manoharan c_man...@qca.qualcomm.com With the new firmware, various new services have been added. Add them to the service list and display them in the wmi_services file. Signed-off-by: Sujith Manoharan c_man...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/debug.c | 7 +-- drivers/net/wireless/ath/ath10k/wmi.h | 12 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index f418370..499034b 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -126,11 +126,6 @@ static ssize_t ath10k_read_wmi_services(struct file *file, if (len buf_len) len = buf_len; - len += scnprintf(buf + len, buf_len - len, \n); - len += scnprintf(buf + len, buf_len - len, %30s\n, -ath10k WMI supported services); - len += scnprintf(buf + len, buf_len - len, %30s\n\n, -=); for (i = 0; i WMI_SERVICE_LAST; i++) { if (WMI_SERVICE_IS_ENABLED(ar-debug.wmi_service_bitmap, i)) status = enabled; @@ -138,7 +133,7 @@ static ssize_t ath10k_read_wmi_services(struct file *file, status = disabled; len += scnprintf(buf + len, buf_len - len, - - 0x%02x - %20s - %s\n, +0x%02x - %20s - %s\n, i, wmi_service_name(i), status); } diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index d2c5d32..68a8484 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -91,6 +91,8 @@ enum wmi_service_id { WMI_SERVICE_RTT, /* RTT (round trip time) support */ WMI_SERVICE_RATECTRL, /* Rate-control */ WMI_SERVICE_WOW, /* WOW Support */ + WMI_SERVICE_RATECTRL_CACHE, /* Rate-control caching */ + WMI_SERVICE_IRAM_TIDS,/* TIDs in IRAM */ WMI_SERVICE_ARPNS_OFFLOAD,/* ARP NS Offload support */ WMI_SERVICE_NLO, /* Network list offload service */ WMI_SERVICE_GTK_OFFLOAD, /* GTK offload */ @@ -143,6 +145,10 @@ static inline char *wmi_service_name(int service_id) return RATECTRL; case WMI_SERVICE_WOW: return WOW; + case WMI_SERVICE_RATECTRL_CACHE: + return RATECTRL CACHE; + case WMI_SERVICE_IRAM_TIDS: + return IRAM TIDS; case WMI_SERVICE_ARPNS_OFFLOAD: return ARPNS_OFFLOAD; case WMI_SERVICE_NLO: @@ -163,6 +169,12 @@ static inline char *wmi_service_name(int service_id) return FORCE FW HANG; case WMI_SERVICE_GPIO: return GPIO; + case WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM: + return MODULATED DTIM; + case WMI_STA_UAPSD_BASIC_AUTO_TRIG: + return BASIC UAPSD; + case WMI_STA_UAPSD_VAR_AUTO_TRIG: + return VAR UAPSD; case WMI_SERVICE_TX_ENCAP: return TX ENCAP; default: -- 1.8.2.2 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [RFT] ath10k: retry target reset
Michal Kazior michal.kaz...@tieto.com writes: On 09/05/13 08:57, Kalle Valo wrote: Michal Kazior michal.kaz...@tieto.com writes: Sometimes the device just won't reset cleanly without retrying. This seems to depend on the host hardware. Signed-off-by: Michal Kazior michal.kaz...@tieto.com --- I can't reproduce the issue on my hw. Can someone confirm if this fixes the problem? If you are referencing to the crash I reported to you privately, I have seen that problem only once and haven't been able to reproduce since. So I can't really test this patch. Yes. This is both fortunate, and unfortunate :) The patch is actually my best guess what that issue might've been related to. At least your patch should help with the symptoms after the problem appears. I will let you know if I see the problem again. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/3] ath10k: WMI add AP PS
janusz.dzied...@tieto.com writes: -Original Message- From: Kalle Valo [mailto:kv...@qca.qualcomm.com] Sent: 9 maja 2013 09:10 To: Dziedzic Janusz Cc: ath9k-devel@lists.ath9k.org Subject: Re: [ath9k-devel] [PATCH 1/3] ath10k: WMI add AP PS Janusz Dziedzic janusz.dzied...@tieto.com writes: Add AP power save (UAPSD) structures, enums. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com [...] + cmd-vdev_id = __cpu_to_le32(vdev_id); + cmd-param_id= __cpu_to_le32(param_id); + cmd-param_value = __cpu_to_le32(value); Remove the extra whitespace before '='. I did same style we have in wmi.c In other functions, Yeah, I know. But I would prefer not to use that style in ath10k. I have been trying to remove that style from ath10k, but I haven't converted all cases yet. Eg. (ath10k_wmi_set_psmode) cmd-vdev_id = __cpu_to_le32(vdev_id); cmd-sta_ps_mode = __cpu_to_le32(psmode); So, should I change this? I'm happy to take patches :) -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 3/3] ath10k: enable STA UAPSD support
Michal Kazior michal.kaz...@tieto.com writes: Not really. This is because we have to set/clean this flags for every ACs. So, this is just to prevent code duplication. case IEEE80211_AC_VO: if (enable) ... else break; case IEEE80211_AC_VI: if (enable) else break; . I can remove this macro and create inline function instead. Hmm, but since this is per-ac can't we do the following? switch (ac) { case IEEE80211_AC_VO: val = WMI_STA_PS_UAPSD_AC3_DELIVERY_EN | WMI_STA_PS_UAPSD_AC3_TRIGGER_EN; break; // .. } if (enable) arvif-u.sta.uapsd |= val; else arvif-u.sta.uapsd = ~val; No macros and no code duplication. Yes, much better. I hate macros :) -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH v2 1/3] ath10k: WMI add AP PS
Add AP power save (UAPSD) structures, enums. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com --- drivers/net/wireless/ath/ath10k/wmi.c | 26 + drivers/net/wireless/ath/ath10k/wmi.h | 68 + 2 files changed, 94 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index d2d712d..bd1f076 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -1903,6 +1903,32 @@ int ath10k_wmi_set_sta_ps_param(struct ath10k *ar, u32 vdev_id, return ath10k_wmi_cmd_send(ar, skb, WMI_STA_POWERSAVE_PARAM_CMDID); } +int ath10k_wmi_set_ap_ps_param(struct ath10k *ar, u32 vdev_id, const u8 *mac, + enum wmi_ap_ps_peer_param param_id, u32 value) +{ + struct wmi_ap_ps_peer_cmd *cmd; + struct sk_buff *skb; + + if (!mac) + return -EINVAL; + + skb = ath10k_wmi_alloc_skb(sizeof(*cmd)); + if (!skb) + return -ENOMEM; + + cmd = (struct wmi_ap_ps_peer_cmd *)skb-data; + cmd-vdev_id = __cpu_to_le32(vdev_id); + cmd-param_id = __cpu_to_le32(param_id); + cmd-param_value = __cpu_to_le32(value); + memcpy(cmd-peer_macaddr, mac, ETH_ALEN); + + ath10k_dbg(ATH10K_DBG_WMI, + wmi ap ps param vdev_id 0x%X param %d value %d mac_addr %pM\n, + vdev_id, param_id, value, mac); + + return ath10k_wmi_cmd_send(ar, skb, WMI_AP_PS_PEER_PARAM_CMDID); +} + int ath10k_wmi_scan_chan_list(struct ath10k *ar, const struct wmi_scan_chan_list_arg *arg) { diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 2ad0431..8d482ab 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -2461,6 +2461,72 @@ struct wmi_sta_mimo_ps_mode_cmd { __le32 mimo_pwrsave_mode; } __packed; +/* U-APSD configuration of peer station from (re)assoc request and TSPECs */ +enum wmi_ap_ps_param_uapsd { + WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 0), + WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 1), + WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 2), + WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 3), + WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 4), + WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 5), + WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 6), + WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 7), +}; + +/* U-APSD maximum service period of peer station */ +enum wmi_ap_ps_peer_param_max_sp { + WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0, + WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1, + WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2, + WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3, + MAX_WMI_AP_PS_PEER_PARAM_MAX_SP, +}; + +/* + * AP power save parameter + * Set a power save specific parameter for a peer station + */ +enum wmi_ap_ps_peer_param { + /* Set uapsd configuration for a given peer. +* +* Include the delivery and trigger enabled state for every AC. +* The host MLME needs to set this based on AP capability and stations +* request Set in the association request received from the station. +* +* Lower 8 bits of the value specify the UAPSD configuration. +* +* (see enum wmi_ap_ps_param_uapsd) +* The default value is 0. +*/ + WMI_AP_PS_PEER_PARAM_UAPSD = 0, + + /* +* Set the service period for a UAPSD capable station +* +* The service period from wme ie in the (re)assoc request frame. +* +* (see enum wmi_ap_ps_peer_param_max_sp) +*/ + WMI_AP_PS_PEER_PARAM_MAX_SP = 1, + + /* Time in seconds for aging out buffered frames for STA in PS */ + WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2, +}; + +struct wmi_ap_ps_peer_cmd { + /* unique id identifying the VDEV, generated by the caller */ + __le32 vdev_id; + + /* peer MAC address */ + struct wmi_mac_addr peer_macaddr; + + /* AP powersave param (see enum wmi_ap_ps_peer_param) */ + __le32 param_id; + + /* AP powersave param value */ + __le32 param_value; +} __packed; + /* 128 clients = 4 words */ #define WMI_TIM_BITMAP_ARRAY_SIZE 4 @@ -2876,6 +2942,8 @@ int ath10k_wmi_set_psmode(struct ath10k *ar, u32 vdev_id, int ath10k_wmi_set_sta_ps_param(struct ath10k *ar, u32 vdev_id, enum wmi_sta_powersave_param param_id, u32 value); +int ath10k_wmi_set_ap_ps_param(struct ath10k *ar, u32 vdev_id, const u8 *mac, + enum wmi_ap_ps_peer_param param_id, u32 value); int ath10k_wmi_scan_chan_list(struct ath10k *ar, const struct wmi_scan_chan_list_arg *arg); int ath10k_wmi_beacon_send(struct ath10k *ar, const struct wmi_bcn_tx_arg *arg); -- 1.7.9.5 ___ ath9k-devel
[ath9k-devel] [PATCH v2 2/3] ath10k: add AP UAPSD support
Add support for AP (P2P_GO) UAPSD. To test this functionality you can use wpa_supplicant, and enable AP UAPSD: - p2p_set go_apsd 1 - p2p_group_add (or configure SoftAP) After that our P2P_GO/AP will indicate support for UAPSD in beacon/probe_resp WME IE. Now you can connect UAPSD capable station with configured UAPSD AC trigger/delivery bits. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com --- drivers/net/wireless/ath/ath10k/mac.c | 85 ++--- 1 file changed, 78 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 818b8e6..110ad3d 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -906,21 +906,91 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar, arg-peer_num_spatial_streams); } +static void ath10k_peer_assoc_h_qos_ap(struct ath10k *ar, + struct ath10k_vif *arvif, + struct ieee80211_sta *sta, + struct ieee80211_bss_conf *bss_conf, + struct wmi_peer_assoc_complete_arg *arg) +{ + u32 uapsd = 0; + u32 max_sp = 0; + + if (sta-wme) + arg-peer_flags |= WMI_PEER_QOS; + + if (sta-wme sta-uapsd_queues) { + ath10k_dbg(ATH10K_DBG_MAC, uapsd_queues: 0x%X, max_sp: %d\n, + sta-uapsd_queues, sta-max_sp); + + arg-peer_flags |= WMI_PEER_APSD; + arg-peer_flags |= WMI_RC_UAPSD_FLAG; + + if (sta-uapsd_queues IEEE80211_WMM_IE_STA_QOSINFO_AC_VO) + uapsd |= WMI_AP_PS_UAPSD_AC3_DELIVERY_EN | +WMI_AP_PS_UAPSD_AC3_TRIGGER_EN; + if (sta-uapsd_queues IEEE80211_WMM_IE_STA_QOSINFO_AC_VI) + uapsd |= WMI_AP_PS_UAPSD_AC2_DELIVERY_EN | +WMI_AP_PS_UAPSD_AC2_TRIGGER_EN; + if (sta-uapsd_queues IEEE80211_WMM_IE_STA_QOSINFO_AC_BK) + uapsd |= WMI_AP_PS_UAPSD_AC1_DELIVERY_EN | +WMI_AP_PS_UAPSD_AC1_TRIGGER_EN; + if (sta-uapsd_queues IEEE80211_WMM_IE_STA_QOSINFO_AC_BE) + uapsd |= WMI_AP_PS_UAPSD_AC0_DELIVERY_EN | +WMI_AP_PS_UAPSD_AC0_TRIGGER_EN; + + + if (sta-max_sp MAX_WMI_AP_PS_PEER_PARAM_MAX_SP) + max_sp = sta-max_sp; + + ath10k_wmi_set_ap_ps_param(ar, arvif-vdev_id, + sta-addr, + WMI_AP_PS_PEER_PARAM_UAPSD, + uapsd); + + ath10k_wmi_set_ap_ps_param(ar, arvif-vdev_id, + sta-addr, + WMI_AP_PS_PEER_PARAM_MAX_SP, + max_sp); + + /* TODO setup this based on STA listen interval and + beacon interval. Currently we don't know + sta-listen_interval - mac80211 patch required. + Currently use 10 seconds */ + ath10k_wmi_set_ap_ps_param(ar, arvif-vdev_id, + sta-addr, + WMI_AP_PS_PEER_PARAM_AGEOUT_TIME, + 10); + } +} + /* - * FIXME: Handle UAPSD later. + * FIXME: Handle STA UAPSD later. */ +static void ath10k_peer_assoc_h_qos_sta(struct ath10k *ar, + struct ath10k_vif *arvif, + struct ieee80211_sta *sta, + struct ieee80211_bss_conf *bss_conf, + struct wmi_peer_assoc_complete_arg *arg) +{ + if (bss_conf-qos) + arg-peer_flags |= WMI_PEER_QOS; +} + static void ath10k_peer_assoc_h_qos(struct ath10k *ar, struct ath10k_vif *arvif, struct ieee80211_sta *sta, struct ieee80211_bss_conf *bss_conf, struct wmi_peer_assoc_complete_arg *arg) { - if (arvif-vdev_type == WMI_VDEV_TYPE_AP) { - if (sta-wme) - arg-peer_flags |= WMI_PEER_QOS; - } else if (arvif-vdev_type == WMI_VDEV_TYPE_STA) { - if (bss_conf-qos) - arg-peer_flags |= WMI_PEER_QOS; + switch (arvif-vdev_type) { + case WMI_VDEV_TYPE_AP: + ath10k_peer_assoc_h_qos_ap(ar, arvif, sta, bss_conf, arg); + break; + case WMI_VDEV_TYPE_STA: + ath10k_peer_assoc_h_qos_sta(ar, arvif, sta, bss_conf, arg); + break; + default: +
[ath9k-devel] [PATCH v2 3/3] ath10k: enable STA UAPSD support
Enable UAPSD support for STA mode. By default mac80211 enable UAPSD for Voice AC. So, to test this functionality we need AP with enable UAPSD and run traffic using VO AC (eg. ping -Q 0xFF). After sending such ping from AP-STA, HW/FW should not get this data after AP indicate this in beacon-pvb. Instead should wait host will send trigger frame (could be ping STA-AP). For non-UAPSD ACs standard PS should be used (NULL frames, PSPOLL). Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com --- drivers/net/wireless/ath/ath10k/core.h |1 + drivers/net/wireless/ath/ath10k/mac.c | 78 2 files changed, 71 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 6c681cf..bef85fb 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -217,6 +217,7 @@ struct ath10k_vif { union { struct { u8 bssid[ETH_ALEN]; + u32 uapsd; } sta; struct { /* 127 stations; wmi limit */ diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 110ad3d..c7ee70a 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -963,9 +963,6 @@ static void ath10k_peer_assoc_h_qos_ap(struct ath10k *ar, } } -/* - * FIXME: Handle STA UAPSD later. - */ static void ath10k_peer_assoc_h_qos_sta(struct ath10k *ar, struct ath10k_vif *arvif, struct ieee80211_sta *sta, @@ -2318,6 +2315,63 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, return ret; } +static int ath10k_conf_tx_uapsd(struct ath10k *ar, struct ieee80211_vif *vif, +u16 ac, bool enable) +{ + struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); + u32 value = 0; + int ret = 0; + + if (arvif-vdev_type != WMI_VDEV_TYPE_STA) + return 0; + + switch (ac) { + case IEEE80211_AC_VO: + value = WMI_STA_PS_UAPSD_AC3_DELIVERY_EN | + WMI_STA_PS_UAPSD_AC3_TRIGGER_EN; + break; + case IEEE80211_AC_VI: + value = WMI_STA_PS_UAPSD_AC2_DELIVERY_EN | + WMI_STA_PS_UAPSD_AC2_TRIGGER_EN; + break; + case IEEE80211_AC_BE: + value = WMI_STA_PS_UAPSD_AC1_DELIVERY_EN | + WMI_STA_PS_UAPSD_AC1_TRIGGER_EN; + break; + case IEEE80211_AC_BK: + value = WMI_STA_PS_UAPSD_AC0_DELIVERY_EN | + WMI_STA_PS_UAPSD_AC0_TRIGGER_EN; + break; + } + + if (enable) + arvif-u.sta.uapsd |= value; + else + arvif-u.sta.uapsd = ~value; + + ret = ath10k_wmi_set_sta_ps_param(ar, arvif-vdev_id, + WMI_STA_PS_PARAM_UAPSD, + arvif-u.sta.uapsd); + if (ret) { + ath10k_warn(could not set uapsd params %d\n, ret); + goto exit; + } + + if (arvif-u.sta.uapsd) + value = WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD; + else + value = WMI_STA_PS_RX_WAKE_POLICY_WAKE; + + ret = ath10k_wmi_set_sta_ps_param(ar, arvif-vdev_id, + WMI_STA_PS_PARAM_RX_WAKE_POLICY, + value); + if (ret) + ath10k_warn(could not set rx wake param %d\n, ret); + +exit: + return ret; +} + static int ath10k_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 ac, const struct ieee80211_tx_queue_params *params) @@ -2343,8 +2397,10 @@ static int ath10k_conf_tx(struct ieee80211_hw *hw, break; } - if (WARN_ON(!p)) - return -EINVAL; + if (WARN_ON(!p)) { + ret = -EINVAL; + goto exit; + } p-cwmin = params-cw_min; p-cwmax = params-cw_max; @@ -2357,13 +2413,18 @@ static int ath10k_conf_tx(struct ieee80211_hw *hw, */ p-txop = params-txop * 32; - /* FIXME: can we pass the params-uapsd to the FW? */ /* FIXME: FW accepts wmm params per hw, not per vif */ - ret = ath10k_wmi_pdev_set_wmm_params(ar, ar-wmm_params); + if (ret) { + ath10k_warn(could not set wmm params %d\n, ret); + goto exit; + } + + ret = ath10k_conf_tx_uapsd(ar, vif, ac, params-uapsd); if (ret) - ath10k_warn(could not set wmm params (%d)\n, ret); + ath10k_warn(could not set sta uapsd %d\n, ret); +exit: mutex_unlock(ar-conf_mutex); return ret; } @@ -2864,6 +2925,7 @@ int
Re: [ath9k-devel] [PATCH 0/3] UAPSD support for STA/AP mode
-Original Message- From: Dziedzic Janusz Sent: 8 maja 2013 09:49 To: ath9k-devel@lists.ath9k.org Cc: Dziedzic Janusz Subject: [PATCH 0/3] UAPSD support for STA/AP mode First two paches add PS/UAPSD support for AP/P2P_GO mode. Last one enable UAPSD for STA mode. In case of FW issues we can easy disable this features by cleaning: IEEE80211_HW_SUPPORTS_UAPSD/WIPHY_FLAG_AP_UAPSD still have code included. Janusz Dziedzic (3): ath10k: WMI add AP PS ath10k: add AP UAPSD support ath10k: enable STA UAPSD support drivers/net/wireless/ath/ath10k/core.h |1 + drivers/net/wireless/ath/ath10k/mac.c | 165 +--- drivers/net/wireless/ath/ath10k/wmi.c | 26 + drivers/net/wireless/ath/ath10k/wmi.h | 68 + 4 files changed, 249 insertions(+), 11 deletions(-) Send V2. BR Janusz ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] Standardisation - adding 2 bit STBC and Ness to MCS (repost 3)
Hallo all, this is probably third repost of this standardisation request. History: - 11 May 2012. initial request made by Simon Barber. http://www.radiotap.org/suggested-fields/MCS%20extension%20for%20STBC%20and%20Ness - 1 Okt 2012, Wireshark support this fields. Patches provided by Wojciech Dubowik. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6720 - 1 Nov 2012. patches for intel adapters, ieee80211 and wireshark was uploaded by Simon. http://www.radiotap.org/suggested-fields/MCS%20extension%20for%20STBC%20and%20Ness?action=AttachFile - 17 Nov 2012. Simon posted new thread as suggested Johannes Berg. - 1 May 2013. I restarted this discussion. link to initial discussion: http://comments.gmane.org/gmane.network.wireless.radiotap/302 As you can see it is already long standing issue... Now to proposal mad by Simon. Please add comments like: agreed or not agreed and why. Proposal === This proposal is to extend the current MCS radiotap header to carry STBC and Ness information. This information is carried in the 802.11 HT-SIG field that carries all the other fields currently in this radiotap MCS header. Both STBC and Ness fields are needed alongside the others to calculate the length (duration in time) of a frame. This proposal adds 3 bits to the known field and the flags field. See below for proposed text. = MCS = Bit Number:: 19 Structure:: u8 known, u8 flags, u8 mcs Required Alignment:: 1 The `mcs` field indicates the MCS rate index as in [[http://en.wikipedia.org/wiki/IEEE_802.11n-2009#Data_rates|IEEE_802.11n-2009]] The `known` field indicates which information is known: ||'''flag'''||'''definition'''|| || `0x01` || bandwidth || || `0x02` || MCS index known (in `mcs` part of the field) || || `0x04` || guard interval || || `0x08` || HT format || || `0x10` || FEC type || || `0x20` || STBC known || || `0x40` || Ness known (Number of extension spatial streams) || || `0x80` || Ness data - bit 1 (MSB) of Number of extension spatial streams || The `flags` field is any combination of the following: || '''flag''' || '''definition''' || || `0x03` || bandwidth - 0: 20, 1: 40, 2: 20L, 3: 20U || || `0x04` || guard interval - 0: long GI, 1: short GI || || `0x08` || HT format - 0: mixed, 1: greenfield || || `0x10` || FEC type - 0: BCC, 1: LDPC || || `0x60` || Number of STBC streams || || `0x80` || Ness - bit 0 (LSB) of Number of extension spatial streams | -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] ath9k (AR9485) failing with PCI errors after hours of uptime with current ath9k.ko from linux-wireless
On Wed, 2013-05-08 at 22:10 -0700, Adrian Chadd wrote: No, I mean - there's an iw command to disable entering power save on your linux station. Find that and disable it. Ok, it's now off. Now I'll just wait and see. Joel Adrian On 8 May 2013 17:21, Joel Diaz joeld...@earthlink.net wrote: On Wed, 2013-05-08 at 15:35 -0700, Adrian Chadd wrote: Step 0 - disable station mode power save; see if that has any impact. The base station is an Apple Airport Extreme (version 7.6.3 in case that matters). I don't see anything in the settings for power saving. And a google search didn't help much. Joel adrian On 8 May 2013 14:41, Joel Diaz joeld...@earthlink.net wrote: First some background: starting with Debian Wheezy I noticed my wireless connection would fail after hours (sometime as quick as 15 minutes) of uptime. Moving from Debian's 3.2 kernel to upstream's 3.9-RCs also showed the problem. Yesterday I pulled the linux-wireless git repo and built myself a kernel (starting with Debian Wheezy's kernel config) with HEAD pointing to: commit e514a9747148e3786879cc5430775a854441ba38 Author: Stanislaw Gruszka sgrus...@redhat.com Date: Thu May 2 09:43:57 2013 +0200 ath5k: do not reschedule tx_complete_work on stop After about 10 hours of uptime with the system basically idle (since I was at work) I see the failure: [38951.779076] ath: phy0: received PCI FATAL interrupt [38951.779081] ath: phy0: received PCI PERR interrupt [38951.789851] ath: phy0: Failed to wakeup in 500us [38951.789853] [ cut here ] [38951.789866] WARNING: at drivers/net/wireless/ath/ath9k/hw.c:2231 ath9k_hw_setpower+0x446/0x499 [ath9k_hw]() [38951.789868] Hardware name: Inspiron One 2020 [38951.789870] Modules linked in: isofs udf crc_itu_t bnep rfcomm binfmt_misc loop hid_generic usbhid hid ath3k btusb bluetooth snd_hda_codec_realtek coretemp ehci_pci kvm_intel snd_hda_intel kvm snd_hda_codec ehci_hcd arc4 snd_hwdep ath9k ath9k_common ath9k_hw ath mac80211 usbcore i915 cfg80211 snd_pcm drm_kms_helper drm iTCO_wdt iTCO_vendor_support snd_page_alloc i2c_algo_bit i2c_i801 i2c_core snd_timer acpi_cpufreq mperf crc32c_intel ghash_clmulni_intel lpc_ich mfd_core sparse_keymap rfkill evdev snd video dcdbas usb_common psmouse cryptd wmi processor button soundcore pcspkr serio_raw microcode ext4 crc16 jbd2 mbcache sg sr_mod sd_mod cdrom crc_t10dif ata_generic thermal fan thermal_sys ata_piix libata scsi_mod r8169 mii [38951.789929] Pid: 0, comm: swapper/0 Not tainted 3.9.0ath9-wl+ #3 [38951.789931] Call Trace: [38951.789933] IRQ [8103d500] ? warn_slowpath_common +0x76/0x8c [38951.789946] [a044e166] ? ath9k_hw_setpower+0x446/0x499 [ath9k_hw] [38951.789954] [a0395b11] ? ath9k_ps_wakeup+0x4c/0xa9 [ath9k] [38951.789960] [a0397374] ? ath9k_tasklet+0x24/0x131 [ath9k] [38951.789964] [81044000] ? tasklet_action+0x73/0xc2 [38951.789968] [81043c61] ? __do_softirq+0xe2/0x1f7 [38951.789971] [81043e41] ? irq_exit+0x3f/0x82 [38951.789975] [8102c301] ? __x2apic_send_IPI_mask+0xb9/0x140 [38951.789979] [8100f701] ? do_IRQ+0x81/0x97 [38951.789984] [813856ed] ? common_interrupt+0x6d/0x6d [38951.789985] EOI [8129f3d8] ? arch_local_irq_enable +0x4/0x8 [38951.789994] [8129fa5c] ? cpuidle_wrap_enter+0x3c/0x71 [38951.78] [8129f78e] ? cpuidle_enter_state+0xa/0x2f [38951.790002] [8129f85c] ? cpuidle_idle_call+0xa9/0xfb [38951.790007] [81014c6f] ? cpu_idle+0x9c/0xe6 [38951.790011] [816aed23] ? start_kernel+0x3b8/0x3c3 [38951.790014] [816ae781] ? repair_env_string+0x57/0x57 [38951.790018] [816ae59c] ? x86_64_start_kernel+0xf2/0xfd [38951.790021] ---[ end trace bff1151979a9309c ]--- [38951.800533] ath: phy0: Failed to wakeup in 500us [38951.865086] ath: phy0: Failed to stop TX DMA, queues=0x10f! [38951.876459] ath: phy0: DMA failed to stop in 10 ms AR_CR=0x AR_DIAG_SW=0x DMADBG_7=0x [38951.876494] ath: phy0: Could not stop RX, we could be confusing the DMA engine when we start RX up At this point the wireless connection is gone and can't be restored without a full reboot. In the past while looking at this with the upstream RC kernels I tried setting ath9k.debug=0x, but it didn't seem to add anything useful ( https://bugzilla.kernel.org/show_bug.cgi?id=56301 ). Since the full kern.log is over 50 megs (lots of repeated error messages) I'm only attaching the first 1000 lines which should be more than enough. Not sure where to go from here since I'm using the most current ath9k that I could find. Is there anything else I could do to help get to the bottom of this issue? Joel
Re: [ath9k-devel] [PATCH 0/3] ath10k: fix beacon loss handling
Michal Kazior michal.kaz...@tieto.com writes: FW is lying about tx status. First two patches do a little cleanup. The last one fixes beacon loss handling. This can be considered a workaround depending on what original FW design called for. Michal Kazior (3): ath10k: report mgmt tx retry status as no_ack ath10k: cleanup tx completion ath10k: pass NullFunc frames through mgmt tx path Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] minstrel_ht: problems with HT40
Hallo Felix, i found your patches for moving ath9k to minstrel_ht and decided to do some testing. For some reason, minstrel_ht exclude all HT40 rates in my network. With native ath9k rate controller I'm able to use HT40. Do you have any idea where to start digging? -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] minstrel_ht: problems with HT40
On 2013-05-09 3:42 PM, Oleksij Rempel wrote: Hallo Felix, i found your patches for moving ath9k to minstrel_ht and decided to do some testing. For some reason, minstrel_ht exclude all HT40 rates in my network. With native ath9k rate controller I'm able to use HT40. Do you have any idea where to start digging? Do the rates not even show up in the debugfs rate control stats? If so, check the value of sta-bandwidth at the time minstrel_ht_update_caps() is called. - Felix ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] minstrel_ht: problems with HT40
Am 09.05.2013 16:41, schrieb Felix Fietkau: On 2013-05-09 3:42 PM, Oleksij Rempel wrote: Hallo Felix, i found your patches for moving ath9k to minstrel_ht and decided to do some testing. For some reason, minstrel_ht exclude all HT40 rates in my network. With native ath9k rate controller I'm able to use HT40. Do you have any idea where to start digging? Do the rates not even show up in the debugfs rate control stats? correct If so, check the value of sta-bandwidth at the time minstrel_ht_update_caps() is called. hmm... for some reasons sta-bandwidth is always 0. my rc_stats are in attachment -- Regards, Oleksij type rate throughput ewma prob this prob retry this succ/attempt successattempts CCK/LP1.0M 0.9 99.9 100.0 0 0( 0)29 30 CCK/SP2.0M 0.00.0 0.0 0 0( 0) 0 0 CCK/SP5.5M 0.00.0 0.0 0 0( 0) 0 0 CCK/SP 11.0M 0.00.0 0.0 0 0( 0) 0 0 HT20/LGI MCS06.2 100.0 100.0 1 0( 0) 1 1 HT20/LGI MCS1 11.7 100.0 100.0 0 0( 0) 1 1 HT20/LGI MCS2 16.4 100.0 100.0 0 0( 0) 1 1 HT20/LGI MCS3 20.7 100.0 100.0 0 0( 0) 1 1 HT20/LGI MCS4 28.0 100.0 100.0 5 0( 0) 1 1 HT20/LGI MCS5 27.9 82.9 100.0 5 0( 0)15 19 HT20/LGI t MCS6 28.9 80.225.0 5 0( 0) 109 123 HT20/LGI T P MCS7 38.9 99.9 100.0 5 1( 1) 782 813 Total packet count::ideal 975 lookaround 48 Average A-MPDU length: 1.0 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] minstrel_ht: problems with HT40
On 2013-05-09 5:09 PM, Oleksij Rempel wrote: Am 09.05.2013 16:41, schrieb Felix Fietkau: On 2013-05-09 3:42 PM, Oleksij Rempel wrote: Hallo Felix, i found your patches for moving ath9k to minstrel_ht and decided to do some testing. For some reason, minstrel_ht exclude all HT40 rates in my network. With native ath9k rate controller I'm able to use HT40. Do you have any idea where to start digging? Do the rates not even show up in the debugfs rate control stats? correct If so, check the value of sta-bandwidth at the time minstrel_ht_update_caps() is called. hmm... for some reasons sta-bandwidth is always 0. OK, maybe it's a mac80211 issue then. Maybe ath9k rate control checks this field even between HT capability updates. Check when/where this is updated in mac80211. - Felix ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] minstrel_ht: problems with HT40
Am 09.05.2013 17:16, schrieb Felix Fietkau: On 2013-05-09 5:09 PM, Oleksij Rempel wrote: Am 09.05.2013 16:41, schrieb Felix Fietkau: On 2013-05-09 3:42 PM, Oleksij Rempel wrote: Hallo Felix, i found your patches for moving ath9k to minstrel_ht and decided to do some testing. For some reason, minstrel_ht exclude all HT40 rates in my network. With native ath9k rate controller I'm able to use HT40. Do you have any idea where to start digging? Do the rates not even show up in the debugfs rate control stats? correct If so, check the value of sta-bandwidth at the time minstrel_ht_update_caps() is called. hmm... for some reasons sta-bandwidth is always 0. OK, maybe it's a mac80211 issue then. Maybe ath9k rate control checks this field even between HT capability updates. Check when/where this is updated in mac80211. I found the reason. menstrel was doing everything right. For some reasons my speedport router decided to turn off HT40. I didn't checked it before and started digging to the code. After i restarted it i got HT40 back ... :/ -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k: Disable spectral scan code to fix crash on rmmod.
On 05/08/2013 10:37 PM, Sujith Manoharan wrote: gree...@candelatech.com wrote: From: Ben Greear gree...@candelatech.com With CONFIG_ATH9K_DEBUGFS enabled, and slub memory poisoning enabled, I see this crash on rmmod of ath9k. I'm not sure how to fix this properly, but in the meantime, this patch to disable the spectral scan code works around the problem for me. With memory poisoning and the verify_mem_not_deleted code below added, the crash looks as follows... The dentry is not *always* freed at this point, probably because rcu callbacks haven't completed. You still get a crash soon after, however. The relay file should probably be closed before calling ieee80211_unregister_hw(). The ath9k debugfs directory is created inside the phy#/ directory and that would get cleaned up when the wiphy is unregistered. Does this help ? This fixes the problem for me, and certainly is less of a hack than what I posted. I did several module unloads with memory poisoning enabled, system remains stable. Tested-by: Ben Greear gree...@candelatech.com Thanks, Ben -- Ben Greear gree...@candelatech.com Candela Technologies Inc http://www.candelatech.com ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k: Disable spectral scan code to fix crash on rmmod.
On Thu, May 09, 2013 at 11:07:14AM +0530, Sujith Manoharan wrote: gree...@candelatech.com wrote: From: Ben Greear gree...@candelatech.com With CONFIG_ATH9K_DEBUGFS enabled, and slub memory poisoning enabled, I see this crash on rmmod of ath9k. I'm not sure how to fix this properly, but in the meantime, this patch to disable the spectral scan code works around the problem for me. With memory poisoning and the verify_mem_not_deleted code below added, the crash looks as follows... The dentry is not *always* freed at this point, probably because rcu callbacks haven't completed. You still get a crash soon after, however. The relay file should probably be closed before calling ieee80211_unregister_hw(). The ath9k debugfs directory is created inside the phy#/ directory and that would get cleaned up when the wiphy is unregistered. Does this help ? Looks good to me, moving the closing of the relayfs file before the unregistering. Thanks a lot for fixing my bugs, Sujith. :) Acked-by: Simon Wunderlich s...@hrz.tu-chemnitz.de (BTW, would you mind sending this as proper [PATCH] again?) diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 4101c4a..cecbe1f 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -1684,6 +1684,14 @@ void ath9k_get_et_stats(struct ieee80211_hw *hw, WARN_ON(i != ATH9K_SSTATS_LEN); } +void ath9k_deinit_debug(struct ath_softc *sc) +{ + if (config_enabled(CONFIG_ATH9K_DEBUGFS) sc-rfs_chan_spec_scan) { + relay_close(sc-rfs_chan_spec_scan); + sc-rfs_chan_spec_scan = NULL; + } +} + int ath9k_init_debug(struct ath_hw *ah) { struct ath_common *common = ath9k_hw_common(ah); diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h index 62da19c..223418d 100644 --- a/drivers/net/wireless/ath/ath9k/debug.h +++ b/drivers/net/wireless/ath/ath9k/debug.h @@ -297,6 +297,7 @@ struct ath9k_debug { }; int ath9k_init_debug(struct ath_hw *ah); +void ath9k_deinit_debug(struct ath_softc *sc); void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, @@ -332,6 +333,10 @@ static inline int ath9k_init_debug(struct ath_hw *ah) return 0; } +static inline void ath9k_deinit_debug(struct ath_softc *sc) +{ +} + static inline void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status) { diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index c7b888f..c0aa4ff 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -903,7 +903,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, if (!ath_is_world_regd(reg)) { error = regulatory_hint(hw-wiphy, reg-alpha2); if (error) - goto unregister; + goto debug_cleanup; } ath_init_leds(sc); @@ -911,6 +911,8 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, return 0; +debug_cleanup: + ath9k_deinit_debug(sc); unregister: ieee80211_unregister_hw(hw); rx_cleanup: @@ -939,11 +941,6 @@ static void ath9k_deinit_softc(struct ath_softc *sc) sc-dfs_detector-exit(sc-dfs_detector); ath9k_eeprom_release(sc); - - if (config_enabled(CONFIG_ATH9K_DEBUGFS) sc-rfs_chan_spec_scan) { - relay_close(sc-rfs_chan_spec_scan); - sc-rfs_chan_spec_scan = NULL; - } } void ath9k_deinit_device(struct ath_softc *sc) @@ -957,6 +954,7 @@ void ath9k_deinit_device(struct ath_softc *sc) ath9k_ps_restore(sc); + ath9k_deinit_debug(sc); ieee80211_unregister_hw(hw); ath_rx_cleanup(sc); ath9k_deinit_softc(sc); -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html signature.asc Description: Digital signature ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] Virtual Carrier Sensing with PHY Errors
Hello, I am interested in knowing how the Virtual NAV is updated when the PHY header FCS fails. This means the duration field could be incorrect. How does the card decide about updating the NAV in this case Thanks, M ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 0/2] ath10k: minor fixes
Michal Kazior (2): ath10k: fix typo in macro name ath10k: use msecs_to_jiffies() drivers/net/wireless/ath/ath10k/mac.c |2 +- drivers/net/wireless/ath/ath10k/wmi.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 1.7.9.5 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 2/2] ath10k: use msecs_to_jiffies()
Signed-off-by: Michal Kazior michal.kaz...@tieto.com --- drivers/net/wireless/ath/ath10k/mac.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index bf7954b..99cb5ad 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1516,7 +1516,7 @@ static int ath10k_start_scan(struct ath10k *ar, * false. Add a 200ms margin to account event/command * processing. */ mod_timer(ar-scan.timeout, jiffies + - ((arg-max_scan_time+200)*HZ)/1000); + msecs_to_jiffies(arg-max_scan_time+200)); return 0; } -- 1.7.9.5 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 1/2] ath10k: fix typo in macro name
Signed-off-by: Michal Kazior michal.kaz...@tieto.com --- drivers/net/wireless/ath/ath10k/wmi.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 2ad0431..ecd6487 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -570,7 +570,7 @@ enum wmi_channel_change_cause { #define WMI_VHT_CAP_RX_STBC_MASK 0x0300 #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP0x0380 -#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT 23 +#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23 #define WMI_VHT_CAP_RX_FIXED_ANT 0x1000 #define WMI_VHT_CAP_TX_FIXED_ANT 0x2000 -- 1.7.9.5 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel