Re: [RFC] ath9k: advertise p2p dev support when chanctx
Janusz Dziedzic wrote: Add p2p dev support when ath9k loaded with use_chanctx=1. This will fix problem, when first interface is an AP and next we would like to run p2p_find. Before p2p scan failed. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com --- @Felix, Sujith please review. I am not sure if didn't miss some case for NL80211_IFTYPE_P2P_DEVICE (special handling required?). At least the callbacks for adding/removing interfaces need to be handled ? But, can you describe the sequence of commands used that resulted in this issue ? Sujith -- 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
Re: [RFC] ath9k: advertise p2p dev support when chanctx
On 15 June 2015 at 12:33, Sujith Manoharan suj...@msujith.org wrote: Janusz Dziedzic wrote: Add p2p dev support when ath9k loaded with use_chanctx=1. This will fix problem, when first interface is an AP and next we would like to run p2p_find. Before p2p scan failed. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com --- @Felix, Sujith please review. I am not sure if didn't miss some case for NL80211_IFTYPE_P2P_DEVICE (special handling required?). At least the callbacks for adding/removing interfaces need to be handled ? Strange, but I didn't hit any problem yet with my simple patch. But, can you describe the sequence of commands used that resulted in this issue ? 1. load ath9k with use_chanctx=1 2. run wpa_supplicant using wlan0 3. connect wlan0 to AP 4. when we are connected, run p2p_find form wpa_cli 5. scan will failed with Operation not supported (even I will force-ap-scan, while chanctx version using hw_scan callback ...) 6. p2p_find will fail BR Janusz -- 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
Re: [1/3] rtlwifi: rtl8192cu: remove IS_HARDWARE_TYPE_8192CE andIS_HARDWARE_TYPE_8192CU
in the rtlwifi/rtl8192cu, IS_HARDWARE_TYPE_8192CE and IS_HARDWARE_TYPE_8192CU is unnecessary. because rtlwifi/rtl8192cu codes aren't shared. Signed-off-by: Taehee Yoo ap420...@gmail.com Thanks, 3 patches applied to wireless-drivers-next.git: f5372e940cdb rtlwifi: rtl8192cu: remove IS_HARDWARE_TYPE_8192CE and IS_HARDWARE_TYPE_8192CU 1d6b2fb1bc80 rtlwifi: rtl8192cu: remove _InitBeaconParameters(). fbcaee1c6da1 rtlwifi: rtl8192cu: remove INTF_PCI and INTF_USB Kalle Valo -- 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
Re: MAINTAINERS: remove rt2x00.serialmonkey.com list and web page
rt2x00.serialmonkey.com will be shutdown. Since traffic on rt2x00 mailing list is very low, we can use only linux-wireless list for any rt2x00 related topics. Thanks for Luis Correia, Ivo van Doorn and Mark Wallis for maintaining rt2x00 servers for years! Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com Thanks, applied to wireless-drivers-next.git. I just edited the commit title a bit. Kalle Valo -- 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
[PATCH] mwifiex: add missing break statement in switch case
This patch adds missing break statement at the end of EVENT_BT_COEX_WLAN_PARA_CHANGE switch section. Signed-off-by: Amitkumar Karwar akar...@marvell.com --- drivers/net/wireless/mwifiex/sta_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mwifiex/sta_event.c b/drivers/net/wireless/mwifiex/sta_event.c index ac229ef..848de26 100644 --- a/drivers/net/wireless/mwifiex/sta_event.c +++ b/drivers/net/wireless/mwifiex/sta_event.c @@ -592,6 +592,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv) dev_dbg(adapter-dev, EVENT: BT coex wlan param update\n); mwifiex_bt_coex_wlan_param_update_event(priv, adapter-event_skb); + break; default: mwifiex_dbg(adapter, ERROR, event: unknown event id: %#x\n, eventcause); -- 1.8.1.4 -- 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
Re: rtlwifi: fix tm_trigger usage
While working on getting my rtl8821au driver in pretty shape for inclusion, it is dicosvered that the tm_trigger flag is used only for the first device using this driver. This flag handles the thermal power management in the hardware. To change this add a entry in sttruct rtl_dm, so each device can handle is separately. Signed-off-by: Hans Ulli Kroll ulli.kr...@googlemail.com Thanks, applied to wireless-drivers-next.git. Kalle Valo -- 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
Re: [V2] rtlwifi: rtl8192c: Add init codes for fw_version andfw_subversion.
The variable fw_version is used in the _ResetDigitalProcedure1(). but It is not initialized. so I add init codes for fw_version and fw_subversion. Signed-off-by: Taehee Yoo ap420...@gmail.com Acked-by: Larry Finger larry.fin...@lwfinger.net Thanks, applied to wireless-drivers-next.git. Kalle Valo -- 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
Re: [RFC] ath9k: allow to receive probe request when offchannel
adding Sujith correct mail On 10 June 2015 at 07:03, Janusz Dziedzic janusz.dzied...@tieto.com wrote: This fix problem that p2p group negotiation didn't work correctly when chanctx used, because we didn't receive probe requests when offchannel and use_chanctx=1 Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com --- @Felix, Sujith could you review? I am not sure I put this in correct place. drivers/net/wireless/ath/ath9k/channel.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 2066650..6301d44 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -1157,6 +1157,7 @@ static bool ath_chanctx_defer_switch(struct ath_softc *sc) static void ath_offchannel_channel_change(struct ath_softc *sc) { struct ath_common *common = ath9k_hw_common(sc-sc_ah); + u32 rfilt; ath_dbg(common, CHAN_CTX, %s: offchannel state: %s\n, __func__, offchannel_state_string(sc-offchannel.state)); @@ -1179,6 +1180,11 @@ static void ath_offchannel_channel_change(struct ath_softc *sc) ath_scan_complete(sc, false); break; case ATH_OFFCHANNEL_ROC_START: + /* Allow to receive probe requests */ + rfilt = ath_calcrxfilter(sc); + rfilt |= ATH9K_RX_FILTER_PROBEREQ; + ath9k_hw_setrxfilter(sc-sc_ah, rfilt); + if (sc-cur_chan != sc-offchannel.chan) break; -- 1.9.1 -- 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
Re: ath9k_htc: add support of channel switch
Add the support of channel switching functionality, similar to ath9k support. Tested with TP-Link TL-WN722N and TL-WN821N. Signed-off-by: Chun-Yeow Yeoh yeohchuny...@gmail.com Thanks, applied to wireless-drivers-next.git. Kalle Valo -- 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
Re: [RFC] ath9k: advertise p2p dev support when chanctx
On 15 June 2015 at 13:38, Janusz Dziedzic janusz.dzied...@tieto.com wrote: On 15 June 2015 at 12:33, Sujith Manoharan suj...@msujith.org wrote: Janusz Dziedzic wrote: Add p2p dev support when ath9k loaded with use_chanctx=1. This will fix problem, when first interface is an AP and next we would like to run p2p_find. Before p2p scan failed. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com --- @Felix, Sujith please review. I am not sure if didn't miss some case for NL80211_IFTYPE_P2P_DEVICE (special handling required?). At least the callbacks for adding/removing interfaces need to be handled ? Strange, but I didn't hit any problem yet with my simple patch. But, can you describe the sequence of commands used that resulted in this issue ? 1. load ath9k with use_chanctx=1 2. run wpa_supplicant using wlan0 3. connect wlan0 to AP 3. setup AP using wlan0 4. run p2p_find form wpa_cli 5. scan will failed with Operation not supported (even I will force-ap-scan, while chanctx version using hw_scan callback ...) 6. p2p_find will fail BR Janusz -- 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
Re: [RFC] ath9k: allow to receive probe request when offchannel
On 2015-06-10 07:03, Janusz Dziedzic wrote: This fix problem that p2p group negotiation didn't work correctly when chanctx used, because we didn't receive probe requests when offchannel and use_chanctx=1 Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com --- @Felix, Sujith could you review? I am not sure I put this in correct place. drivers/net/wireless/ath/ath9k/channel.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 2066650..6301d44 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -1157,6 +1157,7 @@ static bool ath_chanctx_defer_switch(struct ath_softc *sc) static void ath_offchannel_channel_change(struct ath_softc *sc) { struct ath_common *common = ath9k_hw_common(sc-sc_ah); + u32 rfilt; ath_dbg(common, CHAN_CTX, %s: offchannel state: %s\n, __func__, offchannel_state_string(sc-offchannel.state)); @@ -1179,6 +1180,11 @@ static void ath_offchannel_channel_change(struct ath_softc *sc) ath_scan_complete(sc, false); break; case ATH_OFFCHANNEL_ROC_START: + /* Allow to receive probe requests */ + rfilt = ath_calcrxfilter(sc); + rfilt |= ATH9K_RX_FILTER_PROBEREQ; I think ath_calcrxfilter should set this, otherwise it might be overwritten, e.g. on BB watchdog reset. - Felix -- 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
Re: mwifiex: handle BT coex event to adjust Rx BA window size
From: Chunfan Chen je...@marvell.com If timeshare coexistance between bluetooth and WLAN gets enabled, firmware will give host an event to reduce Rx AMPDU BA window size. The event is handled in this patch. Signed-off-by: Chunfan Chen je...@marvell.com Signed-off-by: Cathy Luo c...@marvell.com Signed-off-by: Amitkumar Karwar akar...@marvell.com Thanks, applied to wireless-drivers-next.git. Kalle Valo -- 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
Re: [V2, 1/3] rtlwifi: rtl8192cu: remove duplicated routine in_rtl92c_phy_rf6052_config_parafile
in the _rtl92c_phy_rf6052_config_parafile(), cases RF90_PATH_A and RF90_PATH_B call the same routine. so i remove one of these routine. also the return routine is duplicated. so i remove it. Signed-off-by: Taehee Yoo ap420...@gmail.com Thanks, 3 patches applied to wireless-drivers-next.git: 138055e23b66 rtlwifi: rtl8192cu: remove duplicated routine in _rtl92c_phy_rf6052_config_parafile 8657f9c4d52f rtlwifi: rtl8192cu: debug message change RTL8192CE to RTL8192CU d92460097c00 rtlwifi: rtl8192cu: Fix variable isfirst_ampdu Kalle Valo -- 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
Re: [1/4] brcmfmac: Update msgbuf read pointer quicker.
From: Hante Meuleman meule...@broadcom.com On device to host data using msgbuf the read pointer gets updated once all data is processed. Updating this pointer more frequently allows the firmware to add more data quicker. This will result in slightly higher and more stable throughput on CPU bounded host processors. Reviewed-by: Arend Van Spriel ar...@broadcom.com Reviewed-by: Franky (Zhenhui) Lin fran...@broadcom.com Reviewed-by: Pieter-Paul Giesberts piete...@broadcom.com Signed-off-by: Hante Meuleman meule...@broadcom.com Signed-off-by: Arend van Spriel ar...@broadcom.com Thanks, 4 patches applied to wireless-drivers-next.git: df738c2f0cbf brcmfmac: Update msgbuf read pointer quicker. dbf967537dce brcmfmac: remove chipinfo debugfs entry c161f29bd69f brcmfmac: remove watchdog reset from brcmf_pcie_buscoreprep() 5b18ffb2d725 brcmfmac: use debugfs_create_devm_seqfile() helper function Kalle Valo -- 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
Re: [1/7] brcmfmac: Check if firmware supports p2p
From: Pontus Fuchs pont...@broadcom.com Add a feature flag to reflect the firmware's p2p capability. Reviewed-by: Pieter-Paul Giesberts piete...@broadcom.com Reviewed-by: Hante Meuleman meule...@broadcom.com Reviewed-by: Arend Van Spriel ar...@broadcom.com Signed-off-by: Pontus Fuchs pont...@broadcom.com Signed-off-by: Arend van Spriel ar...@broadcom.com Thanks, 7 patches applied to wireless-drivers-next.git: 2b560d7148eb brcmfmac: Check if firmware supports p2p 2e5f66fe9593 brcmfmac: Build wiphy mode and interface combinations dynamically 1f0dc59a6de9 brcmfmac: rework .get_station() callback 5768f31e4e75 brcmfmac: have sdio return -EIO when device communication is not possible f37d69a4babc brcmfmac: free ifp for non-netdev interface in p2p module 55479df8840d brcmfmac: move p2p attach/detach functions f7a40873d2fa brcmfmac: assure p2pdev is unregistered upon driver unload Kalle Valo -- 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
Re: mt7601u: don't warn about devices without per-rate power table
From: Jakub Kicinski kubak...@wp.pl We expect EEPROM per-rate power table to be filled with s6 values and warn user if values are invalid. However, there appear to be devices which don't have this section of EEPROM initialized. In such case we should ignore the values and leave the driver power tables set to zero. Note that vendor driver doesn't care about this case but mt76x2 skips 0xff per value. We take mt76x2's approach. Signed-off-by: Jakub Kicinski kubak...@wp.pl Thanks, applied to wireless-drivers-next.git. And your name looked correct in git log even though I used patchwork to apply your patch. Kalle Valo -- 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
[PATCH 2/2] staging: wilc1000: remove the warnings on prohibited spaces.
Remove space prohibited between function name and open parenthesis. Signed-off-by: Sunghoon Cho ywhsbl...@gmail.com --- drivers/staging/wilc1000/coreconfigsimulator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigsimulator.h b/drivers/staging/wilc1000/coreconfigsimulator.h index c4f32f0..5e01f8e 100644 --- a/drivers/staging/wilc1000/coreconfigsimulator.h +++ b/drivers/staging/wilc1000/coreconfigsimulator.h @@ -11,7 +11,7 @@ #ifndef CORECONFIGSIMULATOR_H #define CORECONFIGSIMULATOR_H -extern s32 CoreConfigSimulatorInit (void); -extern s32 CoreConfigSimulatorDeInit (void); +extern s32 CoreConfigSimulatorInit(void); +extern s32 CoreConfigSimulatorDeInit(void); #endif -- 1.9.1 -- 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
[PATCH 1/2] staging: wilc1000: remove multiple blank lines.
Remove the warnings for multiple blank lines reported by checkpatch.pl. Signed-off-by: Sunghoon Cho ywhsbl...@gmail.com --- drivers/staging/wilc1000/coreconfigsimulator.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigsimulator.h b/drivers/staging/wilc1000/coreconfigsimulator.h index 25e3c2c..c4f32f0 100644 --- a/drivers/staging/wilc1000/coreconfigsimulator.h +++ b/drivers/staging/wilc1000/coreconfigsimulator.h @@ -8,13 +8,10 @@ * @version 1.0 */ - #ifndef CORECONFIGSIMULATOR_H #define CORECONFIGSIMULATOR_H - extern s32 CoreConfigSimulatorInit (void); extern s32 CoreConfigSimulatorDeInit (void); - -#endif \ No newline at end of file +#endif -- 1.9.1 -- 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
Re: [RFC] ath9k: allow to receive probe request when offchannel
Janusz Dziedzic wrote: case ATH_OFFCHANNEL_ROC_START: + /* Allow to receive probe requests */ + rfilt = ath_calcrxfilter(sc); + rfilt |= ATH9K_RX_FILTER_PROBEREQ; + ath9k_hw_setrxfilter(sc-sc_ah, rfilt); + ath9k_set_offchannel_state() would be a better place to do this, since setting up various bits in the HW for offchannel operation is done there. Also, it would make sure that the HW state is retained when a chip reset is done for some reason. Sujith -- 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
Re: [PATCH v2] ath10k: enable VHT for IBSS
Janusz Dziedzic janusz.dzied...@tieto.com writes: On 11 June 2015 at 16:15, Kalle Valo kv...@qca.qualcomm.com wrote: Janusz Dziedzic janusz.dzied...@tieto.com writes: Enable VHT support for IBSS, while mac80211/cfg80211 and wpa_supplicant already support this. In my test env, ath10k 2x2 I get: (udp) ath10k-1 ath10k-2 (server) - speed: 419 Mbits/sec (tcp) ath10k-1 ath10k-2 (server) - speed: 404 Mbits/sec What hw and firmware version? Do you expect this to work with both qca988x and qca6174? Results are for qca9888x. But IBSS (VHT IBSS) works correctly also with qca6174 FW. Ok, thanks. I added this info to the commit log in the pending branch. Oh, we should still add ATH10K_FW_FEATURE_NO_ADHOC so that we can disable ad-hoc on 10.x firmwares. Anyone have some spare time to cook up a patch? I am not sure we need this, while we add ar-hw-wiphy-interface_modes |= BIT(NL80211_IFTYPE_ADHOC) only for main and tlv version. Seems we already cover 10.x case correctly. Ah, I had forgotten that. Good that we have that. -- Kalle Valo -- 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
[PATCH] staging: rtl8723au: core: Remove unneeded #ifdefs
In rtw_mlme_ext.c, nested #ifdef blocks form the following structure inside the file: #ifdef CONFIG_8723AU_AP_MODE (line 1323) [...] #ifdef CONFIG_8723AU_AP_MODE (line 1720) [...] #endif (2 more ifdef blocks with CONFIG_8723AU_AP_MODE follow) [...] #endif /* CONFIG_8723AU_AP_MODE */ (line 1763) The inner #ifdefs are unnecessary as they depend on the same condition as the outer #ifdef and can thus be removed. Signed-off-by: Andreas Ruprecht andreas.rupre...@fau.de --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 0d7e921..be9a3d5 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -1717,7 +1717,6 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) /* now the station is qualified to join our BSS... */ if (pstat pstat-state WIFI_FW_ASSOC_SUCCESS status == WLAN_STATUS_SUCCESS) { -#ifdef CONFIG_8723AU_AP_MODE /* 1 bss_cap_update sta_info_update23a */ bss_cap_update_on_sta_join23a(padapter, pstat); sta_info_update23a(padapter, pstat); @@ -1736,21 +1735,17 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) /* 3-(1) report sta add event */ report_add_sta_event23a(padapter, pstat-hwaddr, pstat-aid); -#endif } return _SUCCESS; asoc_class2_error: -#ifdef CONFIG_8723AU_AP_MODE issue_deauth23a(padapter, mgmt-sa, status); -#endif return _FAIL; OnAssocReq23aFail: -#ifdef CONFIG_8723AU_AP_MODE pstat-aid = 0; if (ieee80211_is_assoc_req(mgmt-frame_control)) issue_assocrsp(padapter, status, pstat, @@ -1758,7 +1753,6 @@ OnAssocReq23aFail: else issue_assocrsp(padapter, status, pstat, IEEE80211_STYPE_REASSOC_RESP); -#endif #endif /* CONFIG_8723AU_AP_MODE */ -- 1.9.1 -- 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
Re: [V2] rtlwifi: rtl8192c: Add init codes for fw_version andfw_subversion.
Kalle Valo kv...@codeaurora.org writes: The variable fw_version is used in the _ResetDigitalProcedure1(). but It is not initialized. so I add init codes for fw_version and fw_subversion. Signed-off-by: Taehee Yoo ap420...@gmail.com Acked-by: Larry Finger larry.fin...@lwfinger.net Thanks, applied to wireless-drivers-next.git. This patch adds a new sparse warning. Please send a new patch to fix this. drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c:242:36: sparse: incorrect type in assignment (different base types) drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c:242:36:expected unsigned short [unsigned] [usertype] fw_version drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c:242:36:got restricted __le16 [usertype] version -- Kalle Valo -- 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
Re: Question on beacon-miss offloading.
On 06/14/2015 10:36 PM, Michal Kazior wrote: On 12 June 2015 at 17:37, Ben Greear gree...@candelatech.com wrote: On 06/11/2015 11:03 PM, Michal Kazior wrote: On 12 June 2015 at 01:38, Ben Greear gree...@candelatech.com wrote: On 06/11/2015 02:07 PM, Ben Greear wrote: In my ath10k CT firmware, I am disabling the beacon-miss offloading to save space and because it will not work with lots of virtual stations. But, it must be that I need some way to tell the stack that this feature is not enabled, because when suddenly kill my AP, then the ath10k station connected to it shows endless 'beacon loss' events in 'iw events' output, but it never actually loses connection. Stock firmware works fine, so probably I just need to disable some feature flag when registering the ath10k hardware when using CT firmware. With stock firmware, I see a quick dissassociation due to inactivity. I am having poor luck finding how a driver tells the stack it has beacon miss offload or not, so, does anyone know how this is controlled? I still am not sure why stock firmware works, but it appears the reason mine is failing is that the ACK status for mgt frames is always set to TRUE since the ath10k wmi-mgt-tx API is so lame. So, mac80211 does a probe, ath10k lies and says it was acked, and mac80211 then things all is well for another few seconds. mac80211 shouldn't do a Probe Req to an AP on beacon loss because ath10k advertises it supports tx-status report. Hence mac80211 should use NullFunc frames which shouldn't go through wmi-mgmt-tx but htt tx-frm. But then again: NullFunc status reporting via htt tx-frm was broken on 10.1 if memory serves right. I believe it was fixed in 10.2 or 10.2.4. This problem has been effectively obscured on stock 10.1 by the offloaded beacon miss. Thanks for the hint. I was able to fix my firmware to properly return htt tx status, and now it appears to work properly. A quick throughput test works as well, so hopefully no regressions. I guess the NulFunc related comment is incorrect for 10.1 stock firmware? Maybe some others? static void ath10k_tx_htt(struct ath10k *ar, struct sk_buff *skb) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb-data; int ret = 0; if (ar-htt.target_version_major = 3) { /* Since HTT 3.0 there is no separate mgmt tx command */ ret = ath10k_htt_tx(ar-htt, skb); goto exit; } if (ieee80211_is_mgmt(hdr-frame_control)) { if (test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, ar-fw_features)) { if (skb_queue_len(ar-wmi_mgmt_tx_queue) = ATH10K_MAX_NUM_MGMT_PENDING) { ath10k_warn(ar, reached WMI management transmit queue limit\n); ret = -EBUSY; goto exit; } skb_queue_tail(ar-wmi_mgmt_tx_queue, skb); ieee80211_queue_work(ar-hw, ar-wmi_mgmt_tx_work); } else { ret = ath10k_htt_mgmt_tx(ar-htt, skb); } } else if (!test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, ar-fw_features) 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); } The NullFunc workaround was originally done for 999.999.0.636 but should be true for 10.1 as well with the sole exception the latter doesn't have htt-mgmt-tx to workaround the problem. Is it correct to say that this logic is completely broken for stock 10.1 firmware because null-func frames are not management frames, so the packet goes out the ath10k_htt_mgmt_tx call, and stock 10.1 does not properly do tx status for htt-tx frames? And slightly different question: Once I put in proper htt ACK reporting into my firmware, I notice that stations often loose connectivity when they are idle. I captured a sniff, and it appears the null-func packets are sent, but the header is not requesting an explicit ACK, and the AP does not ACK it, so connection is lost. I guess that the null-func frames should be requesting explicit ACK? Thanks, Ben -- Ben Greear gree...@candelatech.com Candela Technologies Inc http://www.candelatech.com -- 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
[PATCH] wil6210: restart AP upon change in privacy settings
privacy settings might change while AP is running. Inside wil_cfg80211_change_beacon(), detect change in privacy settings and handle it by stopping and re-starting the AP. Firmware cannot handle on-the-fly privacy settings change and so AP restart is required. Signed-off-by: Dedy Lansky qca_dlan...@qca.qualcomm.com Signed-off-by: Hamad Kadmany qca_hkadm...@qca.qualcomm.com Signed-off-by: Vladimir Kondratiev qca_vkond...@qca.qualcomm.com --- drivers/net/wireless/ath/wil6210/cfg80211.c | 217 +--- drivers/net/wireless/ath/wil6210/wil6210.h | 2 + 2 files changed, 135 insertions(+), 84 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index c79cfe0..e4be2d9 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -736,6 +736,92 @@ static int wil_fix_bcon(struct wil6210_priv *wil, return rc; } +/* internal functions for device reset and starting AP */ +static int _wil_cfg80211_set_ies(struct wiphy *wiphy, +size_t probe_ies_len, const u8 *probe_ies, +size_t assoc_ies_len, const u8 *assoc_ies) + +{ + int rc; + struct wil6210_priv *wil = wiphy_to_wil(wiphy); + + /* FW do not form regular beacon, so bcon IE's are not set +* For the DMG bcon, when it will be supported, bcon IE's will +* be reused; add something like: +* wmi_set_ie(wil, WMI_FRAME_BEACON, bcon-beacon_ies_len, +* bcon-beacon_ies); +*/ + rc = wmi_set_ie(wil, WMI_FRAME_PROBE_RESP, probe_ies_len, probe_ies); + if (rc) { + wil_err(wil, set_ie(PROBE_RESP) failed\n); + return rc; + } + + rc = wmi_set_ie(wil, WMI_FRAME_ASSOC_RESP, assoc_ies_len, assoc_ies); + if (rc) { + wil_err(wil, set_ie(ASSOC_RESP) failed\n); + return rc; + } + + return 0; +} + +static int _wil_cfg80211_start_ap(struct wiphy *wiphy, + struct net_device *ndev, + const u8 *ssid, size_t ssid_len, u32 privacy, + int bi, u8 chan, + size_t probe_ies_len, const u8 *probe_ies, + size_t assoc_ies_len, const u8 *assoc_ies, + u8 hidden_ssid) +{ + struct wil6210_priv *wil = wiphy_to_wil(wiphy); + int rc; + struct wireless_dev *wdev = ndev-ieee80211_ptr; + u8 wmi_nettype = wil_iftype_nl2wmi(wdev-iftype); + + wil_set_recovery_state(wil, fw_recovery_idle); + + mutex_lock(wil-mutex); + + __wil_down(wil); + rc = __wil_up(wil); + if (rc) + goto out; + + rc = wmi_set_ssid(wil, ssid_len, ssid); + if (rc) + goto out; + + rc = _wil_cfg80211_set_ies(wiphy, probe_ies_len, probe_ies, + assoc_ies_len, assoc_ies); + if (rc) + goto out; + + wil-privacy = privacy; + wil-channel = chan; + wil-hidden_ssid = hidden_ssid; + + netif_carrier_on(ndev); + + rc = wmi_pcp_start(wil, bi, wmi_nettype, chan, hidden_ssid); + if (rc) + goto err_pcp_start; + + rc = wil_bcast_init(wil); + if (rc) + goto err_bcast; + + goto out; /* success */ + +err_bcast: + wmi_pcp_stop(wil); +err_pcp_start: + netif_carrier_off(ndev); +out: + mutex_unlock(wil-mutex); + return rc; +} + static int wil_cfg80211_change_beacon(struct wiphy *wiphy, struct net_device *ndev, struct cfg80211_beacon_data *bcon) @@ -746,6 +832,7 @@ static int wil_cfg80211_change_beacon(struct wiphy *wiphy, const u8 *pr_ies = NULL; size_t pr_ies_len = 0; int rc; + u32 privacy = 0; wil_dbg_misc(wil, %s()\n, __func__); wil_print_bcon_data(bcon); @@ -760,40 +847,41 @@ static int wil_cfg80211_change_beacon(struct wiphy *wiphy, wil_print_bcon_data(bcon); } - /* FW do not form regular beacon, so bcon IE's are not set -* For the DMG bcon, when it will be supported, bcon IE's will -* be reused; add something like: -* wmi_set_ie(wil, WMI_FRAME_BEACON, bcon-beacon_ies_len, -* bcon-beacon_ies); -*/ - rc = wmi_set_ie(wil, WMI_FRAME_PROBE_RESP, pr_ies_len, pr_ies); - if (rc) { - wil_err(wil, set_ie(PROBE_RESP) failed\n); - return rc; - } + if (pr_ies cfg80211_find_ie(WLAN_EID_RSN, pr_ies, pr_ies_len)) + privacy = 1; - rc = wmi_set_ie(wil, WMI_FRAME_ASSOC_RESP, - bcon-assocresp_ies_len, - bcon-assocresp_ies); - if (rc) { - wil_err(wil,
Re: iwlwifi in AP mode is experimental?
On Sun, Jun 14, 2015 at 12:52 PM, Bjørn Mork bj...@mork.no wrote: Emmanuel Grumbach egrumb...@gmail.com writes: I can't think about anything specific that is not supported, Is AP mode on 5 GHz supported on the 3160? So apparently I was wrong. We do support AP mode on 5GHz, but only with 7265-D and onward. This will work only when regulatory conditions apply. -- 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
Re: [RFC] ath9k: advertise p2p dev support when chanctx
Janusz Dziedzic wrote: At least the callbacks for adding/removing interfaces need to be handled ? Strange, but I didn't hit any problem yet with my simple patch. Ok. But I am not very familiar with how p2p-device is supposed to be used... Sujith -- 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
Re: [V2] rtlwifi: rtl8192c: Add init codes for fw_version andfw_subversion.
On 06/15/2015 07:35 AM, Kalle Valo wrote: Kalle Valo kv...@codeaurora.org writes: The variable fw_version is used in the _ResetDigitalProcedure1(). but It is not initialized. so I add init codes for fw_version and fw_subversion. Signed-off-by: Taehee Yoo ap420...@gmail.com Acked-by: Larry Finger larry.fin...@lwfinger.net Thanks, applied to wireless-drivers-next.git. This patch adds a new sparse warning. Please send a new patch to fix this. drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c:242:36: sparse: incorrect type in assignment (different base types) drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c:242:36:expected unsigned short [unsigned] [usertype] fw_version drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c:242:36:got restricted __le16 [usertype] version Sorry, I missed that when I reviewed the patch. Larry -- 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
[PATCH 07/10] ath10k: Extend CE src desc flags for interrupt indication
QCA99X0 uses two new copy engine src desc flags for interrupt indication. Bit_2 is to mark if host interrupt is disabled after processing the current desc and bit_3 is to mark if target interrupt is diabled after the processing of current descriptor. CE_DESC_FLAGS_META_DATA_MASK and CE_DESC_FLAGS_META_DATA_LSB are based on the target type. Signed-off-by: Vasanthakumar Thiagarajan vthia...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/ce.c | 1 + drivers/net/wireless/ath/ath10k/ce.h | 9 +++-- drivers/net/wireless/ath/ath10k/hw.c | 6 ++ drivers/net/wireless/ath/ath10k/hw.h | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index e508c65..cf28fbe 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c @@ -452,6 +452,7 @@ int ath10k_ce_completed_recv_next_nolock(struct ath10k_ce_pipe *ce_state, { struct ath10k_ce_ring *dest_ring = ce_state-dest_ring; unsigned int nentries_mask = dest_ring-nentries_mask; + struct ath10k *ar = ce_state-ar; unsigned int sw_index = dest_ring-sw_index; struct ce_desc *base = dest_ring-base_addr_owner_space; diff --git a/drivers/net/wireless/ath/ath10k/ce.h b/drivers/net/wireless/ath/ath10k/ce.h index bb4b8f3..5c903e15 100644 --- a/drivers/net/wireless/ath/ath10k/ce.h +++ b/drivers/net/wireless/ath/ath10k/ce.h @@ -38,8 +38,13 @@ struct ath10k_ce_pipe; #define CE_DESC_FLAGS_GATHER (1 0) #define CE_DESC_FLAGS_BYTE_SWAP (1 1) -#define CE_DESC_FLAGS_META_DATA_MASK 0xFFFC -#define CE_DESC_FLAGS_META_DATA_LSB 2 + +/* Following desc flags are used in QCA99X0 */ +#define CE_DESC_FLAGS_HOST_INT_DIS (1 2) +#define CE_DESC_FLAGS_TGT_INT_DIS (1 3) + +#define CE_DESC_FLAGS_META_DATA_MASK ar-hw_values-ce_desc_meta_data_mask +#define CE_DESC_FLAGS_META_DATA_LSB ar-hw_values-ce_desc_meta_data_lsb struct ce_desc { __le32 addr; diff --git a/drivers/net/wireless/ath/ath10k/hw.c b/drivers/net/wireless/ath/ath10k/hw.c index e5fe33d9..1414e1f 100644 --- a/drivers/net/wireless/ath/ath10k/hw.c +++ b/drivers/net/wireless/ath/ath10k/hw.c @@ -114,6 +114,8 @@ const struct ath10k_hw_values qca988x_values = { .ce_count = 8, .msi_assign_ce_max = 7, .num_target_ce_config_wlan = 7, + .ce_desc_meta_data_mask = 0xFFFC, + .ce_desc_meta_data_lsb = 2, }; const struct ath10k_hw_values qca6174_values = { @@ -121,6 +123,8 @@ const struct ath10k_hw_values qca6174_values = { .ce_count = 8, .msi_assign_ce_max = 7, .num_target_ce_config_wlan = 7, + .ce_desc_meta_data_mask = 0xFFFC, + .ce_desc_meta_data_lsb = 2, }; const struct ath10k_hw_values qca99x0_values = { @@ -128,6 +132,8 @@ const struct ath10k_hw_values qca99x0_values = { .ce_count = 12, .msi_assign_ce_max = 12, .num_target_ce_config_wlan = 10, + .ce_desc_meta_data_mask = 0xFFF0, + .ce_desc_meta_data_lsb = 4, }; void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey, diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 5819659..35cd8ca 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -195,6 +195,8 @@ struct ath10k_hw_values { u8 ce_count; u8 msi_assign_ce_max; u8 num_target_ce_config_wlan; + u16 ce_desc_meta_data_mask; + u8 ce_desc_meta_data_lsb; }; extern const struct ath10k_hw_values qca988x_values; -- 1.9.1 -- 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
[PATCH 08/10] ath10k: Fix BMI communication timeout for QCA99X0
There is more than 1 sec delay in getting response from target through BMI in QCA99X0. Increase the BMI communication timeout to 2*HZ to fix BMI failures. Signed-off-by: Vasanthakumar Thiagarajan vthia...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/bmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/bmi.h b/drivers/net/wireless/ath/ath10k/bmi.h index 31a9906..df7c761 100644 --- a/drivers/net/wireless/ath/ath10k/bmi.h +++ b/drivers/net/wireless/ath/ath10k/bmi.h @@ -178,7 +178,7 @@ struct bmi_target_info { }; /* in msec */ -#define BMI_COMMUNICATION_TIMEOUT_HZ (1*HZ) +#define BMI_COMMUNICATION_TIMEOUT_HZ (2 * HZ) #define BMI_CE_NUM_TO_TARG 0 #define BMI_CE_NUM_TO_HOST 1 -- 1.9.1 -- 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
[PATCH 09/10] ath10k: Add support for code swap
Code swap is a mechanism to use host memory to store some fw binary code segment. Ath10k host driver allocates and loads the code swap binary into the host memory and configures the target with the host allocated memory information at the address taken from code swap binary. This patch adds code swap support for firmware binary. Code swap binary for firmware bin is available in ATH10K_FW_IE_FW_CODE_SWAP_IMAGE. Signed-off-by: Vasanthakumar Thiagarajan vthia...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/Makefile | 3 +- drivers/net/wireless/ath/ath10k/core.c | 24 drivers/net/wireless/ath/ath10k/core.h | 7 ++ drivers/net/wireless/ath/ath10k/hw.h | 3 + drivers/net/wireless/ath/ath10k/swap.c | 208 +++ drivers/net/wireless/ath/ath10k/swap.h | 72 +++ 6 files changed, 316 insertions(+), 1 deletion(-) create mode 100644 drivers/net/wireless/ath/ath10k/swap.c create mode 100644 drivers/net/wireless/ath/ath10k/swap.h diff --git a/drivers/net/wireless/ath/ath10k/Makefile b/drivers/net/wireless/ath/ath10k/Makefile index 9729e69..c04fb00 100644 --- a/drivers/net/wireless/ath/ath10k/Makefile +++ b/drivers/net/wireless/ath/ath10k/Makefile @@ -11,7 +11,8 @@ ath10k_core-y += mac.o \ wmi-tlv.o \ bmi.o \ hw.o \ -p2p.o +p2p.o \ +swap.o ath10k_core-$(CONFIG_ATH10K_DEBUGFS) += spectral.o ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index de85ec8..6346711 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -426,6 +426,13 @@ static int ath10k_download_fw(struct ath10k *ar, enum ath10k_firmware_mode mode) data = ar-firmware_data; data_len = ar-firmware_len; mode_name = normal; + ret = ath10k_swap_code_seg_configure(ar, + ATH10K_SWAP_CODE_SEG_BIN_TYPE_FW); + if (ret) { + ath10k_err(ar, failed to configure fw code swap: %d\n, + ret); + return ret; + } break; case ATH10K_FIRMWARE_MODE_UTF: data = ar-testmode.utf-data; @@ -465,6 +472,8 @@ static void ath10k_core_free_firmware_files(struct ath10k *ar) if (!IS_ERR(ar-cal_file)) release_firmware(ar-cal_file); + ath10k_swap_code_seg_release(ar); + ar-board = NULL; ar-board_data = NULL; ar-board_len = 0; @@ -478,6 +487,7 @@ static void ath10k_core_free_firmware_files(struct ath10k *ar) ar-firmware_len = 0; ar-cal_file = NULL; + } static int ath10k_fetch_cal_file(struct ath10k *ar) @@ -751,6 +761,13 @@ static int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name) ath10k_dbg(ar, ATH10K_DBG_BOOT, found fw ie htt op version %d\n, ar-htt.op_version); break; + case ATH10K_FW_IE_FW_CODE_SWAP_IMAGE: + ath10k_dbg(ar, ATH10K_DBG_BOOT, + found fw code swap image ie (%zd B)\n, + ie_len); + ar-swap.firmware_codeswap_data = data; + ar-swap.firmware_codeswap_len = ie_len; + break; default: ath10k_warn(ar, Unknown FW IE: %u\n, le32_to_cpu(hdr-id)); @@ -1344,6 +1361,13 @@ static int ath10k_core_probe_fw(struct ath10k *ar) goto err_free_firmware_files; } + ret = ath10k_swap_code_seg_init(ar); + if (ret) { + ath10k_err(ar, failed to initialize code swap segment: %d\n, + ret); + goto err_free_firmware_files; + } + mutex_lock(ar-conf_mutex); ret = ath10k_core_start(ar, ATH10K_FIRMWARE_MODE_NORMAL); diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index ae92f64..335b2fc 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -36,6 +36,7 @@ #include spectral.h #include thermal.h #include wow.h +#include swap.h #define MS(_v, _f) (((_v) _f##_MASK) _f##_LSB) #define SM(_v, _f) (((_v) _f##_LSB) _f##_MASK) @@ -603,6 +604,12 @@ struct ath10k { const struct firmware *cal_file; + struct { + const void *firmware_codeswap_data; + size_t firmware_codeswap_len; + struct ath10k_swap_code_seg_info *firmware_swap_code_seg_info; + } swap; + char spec_board_id[100]; bool spec_board_loaded; diff --git a/drivers/net/wireless/ath/ath10k/hw.h
[PATCH 03/10] ath10k: Add hw register/values for QCA99X0 chip
This is to prepare the driver for QCA99X0 chip support. This commit adds hw_params, hw register table and hw_values table for QCA99X0 chip. Please note this is only a partial patch adding support for QCA99X0, so the device id is not yet added to pci device table. Signed-off-by: Vasanthakumar Thiagarajan vthia...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/core.c | 18 drivers/net/wireless/ath/ath10k/hw.c| 44 + drivers/net/wireless/ath/ath10k/hw.h| 18 drivers/net/wireless/ath/ath10k/pci.c | 5 drivers/net/wireless/ath/ath10k/targaddrs.h | 3 ++ 5 files changed, 88 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 2a17664..de85ec8 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -101,6 +101,20 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, }, }, + { + .id = QCA99X0_HW_2_0_DEV_VERSION, + .name = qca99x0 hw2.0, + .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, + .uart_pin = 7, + .fw = { + .dir = QCA99X0_HW_2_0_FW_DIR, + .fw = QCA99X0_HW_2_0_FW_FILE, + .otp = QCA99X0_HW_2_0_OTP_FILE, + .board = QCA99X0_HW_2_0_BOARD_DATA_FILE, + .board_size = QCA99X0_BOARD_DATA_SZ, + .board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ, + }, + }, }; static void ath10k_send_suspend_complete(struct ath10k *ar) @@ -1476,6 +1490,10 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev, ar-regs = qca6174_regs; ar-hw_values = qca6174_values; break; + case ATH10K_HW_QCA99X0: + ar-regs = qca99x0_regs; + ar-hw_values = qca99x0_values; + break; default: ath10k_err(ar, unsupported core hardware revision %d\n, hw_rev); diff --git a/drivers/net/wireless/ath/ath10k/hw.c b/drivers/net/wireless/ath/ath10k/hw.c index cb09867..e5fe33d9 100644 --- a/drivers/net/wireless/ath/ath10k/hw.c +++ b/drivers/net/wireless/ath/ath10k/hw.c @@ -72,6 +72,43 @@ const struct ath10k_hw_regs qca6174_regs = { .pcie_intr_clr_address = 0x0014, }; +const struct ath10k_hw_regs qca99x0_regs = { + .rtc_state_cold_reset_mask = 0x0400, + .rtc_soc_base_address = 0x0008, + .rtc_wmac_base_address = 0x, + .soc_core_base_address = 0x00082000, + .ce_wrapper_base_address= 0x0004d000, + .ce0_base_address = 0x0004a000, + .ce1_base_address = 0x0004a400, + .ce2_base_address = 0x0004a800, + .ce3_base_address = 0x0004ac00, + .ce4_base_address = 0x0004b000, + .ce5_base_address = 0x0004b400, + .ce6_base_address = 0x0004b800, + .ce7_base_address = 0x0004bc00, + /* Note: qca99x0 supports upto 12 Copy Engines. Other than address of +* CE0 and CE1 no other copy engine is directly referred in the code. +* It is not really neccessary to assign address for newly supported +* CEs in this address table. +* Copy Engine Address +* CE8 0x0004c000 +* CE9 0x0004c400 +* CE100x0004c800 +* CE110x0004cc00 +*/ + .soc_reset_control_si0_rst_mask = 0x0001, + .soc_reset_control_ce_rst_mask = 0x0100, + .soc_chip_id_address= 0x00ec, + .scratch_3_address = 0x00040050, + .fw_indicator_address = 0x00040050, + .pcie_local_base_address= 0x, + .ce_wrap_intr_sum_host_msi_lsb = 0x000c, + .ce_wrap_intr_sum_host_msi_mask = 0x00fff000, + .pcie_intr_fw_mask = 0x0010, + .pcie_intr_ce_mask_all = 0x000fff00, + .pcie_intr_clr_address = 0x0010, +}; + const struct ath10k_hw_values qca988x_values = { .rtc_state_val_on = 3, .ce_count = 8, @@ -86,6 +123,13 @@ const struct ath10k_hw_values qca6174_values = { .num_target_ce_config_wlan = 7, }; +const struct ath10k_hw_values qca99x0_values = { + .rtc_state_val_on
[PATCH 10/10] ath10k: Add BMI param value to execute otp to hw_param
BMI parameter value to execute downloaded otp binary is different for QCA99X0. Have a member in hw_params to hold hw specific BMI param. Signed-off-by: Vasanthakumar Thiagarajan vthia...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/core.c | 8 +++- drivers/net/wireless/ath/ath10k/core.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 6346711..c6a39eeb 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -49,6 +49,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .has_shifted_cc_wraparound = true, + .otp_exe_param = 0, .fw = { .dir = QCA988X_HW_2_0_FW_DIR, .fw = QCA988X_HW_2_0_FW_FILE, @@ -63,6 +64,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .name = qca6174 hw2.1, .patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR, .uart_pin = 6, + .otp_exe_param = 0, .fw = { .dir = QCA6174_HW_2_1_FW_DIR, .fw = QCA6174_HW_2_1_FW_FILE, @@ -77,6 +79,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .name = qca6174 hw3.0, .patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR, .uart_pin = 6, + .otp_exe_param = 0, .fw = { .dir = QCA6174_HW_3_0_FW_DIR, .fw = QCA6174_HW_3_0_FW_FILE, @@ -91,6 +94,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .name = qca6174 hw3.2, .patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR, .uart_pin = 6, + .otp_exe_param = 0, .fw = { /* uses same binaries as hw3.0 */ .dir = QCA6174_HW_3_0_FW_DIR, @@ -106,6 +110,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .name = qca99x0 hw2.0, .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, + .otp_exe_param = 0x0700, .fw = { .dir = QCA99X0_HW_2_0_FW_DIR, .fw = QCA99X0_HW_2_0_FW_FILE, @@ -369,6 +374,7 @@ out: static int ath10k_download_and_run_otp(struct ath10k *ar) { u32 result, address = ar-hw_params.patch_load_addr; + u32 bmi_otp_exe_param = ar-hw_params.otp_exe_param; int ret; ret = ath10k_download_board_data(ar, ar-board_data, ar-board_len); @@ -394,7 +400,7 @@ static int ath10k_download_and_run_otp(struct ath10k *ar) return ret; } - ret = ath10k_bmi_execute(ar, address, 0, result); + ret = ath10k_bmi_execute(ar, address, bmi_otp_exe_param, result); if (ret) { ath10k_err(ar, could not execute otp (%d)\n, ret); return ret; diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 335b2fc..e9bf28e 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -572,6 +572,7 @@ struct ath10k { const char *name; u32 patch_load_addr; int uart_pin; + u32 otp_exe_param; /* This is true if given HW chip has a quirky Cycle Counter * wraparound which resets to 0x7fff instead of 0. All -- 1.9.1 -- 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
[PATCH 1/3] staging: wilc1000: rework include wilc_oswrapper.h
rework line '#include wilc_oswrapper.h' it does not require after change own data type to common data type. Signed-off-by: Dean Lee dean@atmel.com --- drivers/staging/wilc1000/coreconfigurator.h | 1 - drivers/staging/wilc1000/fifo_buffer.c | 1 - drivers/staging/wilc1000/fifo_buffer.h | 5 - drivers/staging/wilc1000/wilc_memory.c | 2 +- drivers/staging/wilc1000/wilc_memory.h | 4 +++- drivers/staging/wilc1000/wilc_msgqueue.c| 2 +- drivers/staging/wilc1000/wilc_msgqueue.h| 5 + drivers/staging/wilc1000/wilc_sleep.c | 2 +- drivers/staging/wilc1000/wilc_sleep.h | 3 +++ drivers/staging/wilc1000/wilc_strutils.c| 2 +- drivers/staging/wilc1000/wilc_strutils.h| 4 drivers/staging/wilc1000/wilc_timer.c | 2 +- drivers/staging/wilc1000/wilc_timer.h | 3 +++ 13 files changed, 27 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 6c1dad1..3ca067e 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -12,7 +12,6 @@ #ifndef CORECONFIGURATOR_H #define CORECONFIGURATOR_H -#include wilc_oswrapper.h #include wilc_wlan_if.h /*/ /* Constants */ diff --git a/drivers/staging/wilc1000/fifo_buffer.c b/drivers/staging/wilc1000/fifo_buffer.c index c801406..b6c07cf 100644 --- a/drivers/staging/wilc1000/fifo_buffer.c +++ b/drivers/staging/wilc1000/fifo_buffer.c @@ -1,6 +1,5 @@ -#include wilc_oswrapper.h #include fifo_buffer.h diff --git a/drivers/staging/wilc1000/fifo_buffer.h b/drivers/staging/wilc1000/fifo_buffer.h index 57f7732..7b76998 100644 --- a/drivers/staging/wilc1000/fifo_buffer.h +++ b/drivers/staging/wilc1000/fifo_buffer.h @@ -1,5 +1,8 @@ -#include wilc_oswrapper.h +#include linux/types.h +#include linux/semaphore.h +#include wilc_memory.h +#include wilc_strutils.h #define tHANDLEvoid * diff --git a/drivers/staging/wilc1000/wilc_memory.c b/drivers/staging/wilc1000/wilc_memory.c index 5670b5a..c70707f 100644 --- a/drivers/staging/wilc1000/wilc_memory.c +++ b/drivers/staging/wilc1000/wilc_memory.c @@ -1,5 +1,5 @@ -#include wilc_oswrapper.h +#include wilc_memory.h /*! * @authorsyounan diff --git a/drivers/staging/wilc1000/wilc_memory.h b/drivers/staging/wilc1000/wilc_memory.h index 1bc4b53..372d705 100644 --- a/drivers/staging/wilc1000/wilc_memory.h +++ b/drivers/staging/wilc1000/wilc_memory.h @@ -10,6 +10,9 @@ * @version 1.0 */ +#include linux/types.h +#include linux/slab.h + /*! * @struct tstrWILC_MemoryAttrs * @brief Memory API options @@ -234,4 +237,3 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs, #endif - diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index 04fe5a5..16bcef4 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -1,5 +1,5 @@ -#include wilc_oswrapper.h +#include wilc_msgqueue.h #include linux/spinlock.h /*! diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h index 2ca02db..35b1001 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.h +++ b/drivers/staging/wilc1000/wilc_msgqueue.h @@ -10,6 +10,11 @@ * @version 1.0 */ +#include wilc_platform.h +#include wilc_errorsupport.h +#include wilc_memory.h +#include wilc_strutils.h + /*! * @struct tstrWILC_MsgQueueAttrs * @brief Message Queue API options diff --git a/drivers/staging/wilc1000/wilc_sleep.c b/drivers/staging/wilc1000/wilc_sleep.c index 569b833..adab3ca 100644 --- a/drivers/staging/wilc1000/wilc_sleep.c +++ b/drivers/staging/wilc1000/wilc_sleep.c @@ -1,5 +1,5 @@ -#include wilc_oswrapper.h +#include wilc_sleep.h /* * @authormdaftedar diff --git a/drivers/staging/wilc1000/wilc_sleep.h b/drivers/staging/wilc1000/wilc_sleep.h index 261f4ed..cf9047f 100644 --- a/drivers/staging/wilc1000/wilc_sleep.h +++ b/drivers/staging/wilc1000/wilc_sleep.h @@ -1,6 +1,9 @@ #ifndef __WILC_SLEEP_H__ #define __WILC_SLEEP_H__ +#include linux/types.h +#include linux/delay.h + /*! * @brief forces the current thread to sleep until the given time has elapsed * @param[in] u32TimeMilliSec Time to sleep in Milli seconds diff --git a/drivers/staging/wilc1000/wilc_strutils.c b/drivers/staging/wilc1000/wilc_strutils.c index ac9bb06..e014595 100644 --- a/drivers/staging/wilc1000/wilc_strutils.c +++ b/drivers/staging/wilc1000/wilc_strutils.c @@ -1,7 +1,7 @@ #define _CRT_SECURE_NO_DEPRECATE -#include wilc_oswrapper.h +#include wilc_strutils.h /*! diff --git a/drivers/staging/wilc1000/wilc_strutils.h b/drivers/staging/wilc1000/wilc_strutils.h index bb31bea..d144557 100644 ---
[PATCH 2/3] staging: wilc1000: rework include wilc_type.h
rework line '#include wilc_type.h' it does not require after rework include wilc_oswrapper.h Signed-off-by: Dean Lee dean@atmel.com --- drivers/staging/wilc1000/wilc_wlan.h| 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 10 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index 0ba7ec6..5c9c4bb 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -1,7 +1,7 @@ #ifndef WILC_WLAN_H #define WILC_WLAN_H -#include wilc_type.h +#include linux/types.h #define ISWILC1000(id) (((id 0xf000) == 0x10) ? 1 : 0) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index ea0ec41..d7271b9 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -20,7 +20,15 @@ /* #define USE_OLD_SPI_SW */ -#include wilc_type.h +#include wilc_osconfig.h +#include wilc_platform.h +#include wilc_log.h +#include wilc_errorsupport.h +#include wilc_sleep.h +#include wilc_timer.h +#include wilc_memory.h +#include wilc_strutils.h +#include wilc_msgqueue.h #include linux_wlan_common.h -- 2.4.3 -- 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
[PATCH 7/8] ath10k: set max spatial stream to 4 for 10.4 fw
10.4 fw supports upto 4 spatial stream. Limit max spatial stream to 4 for 10.4 firmware and to 3 for non 10.4 firmware. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/core.c | 4 drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/wmi.c | 6 +++--- drivers/net/wireless/ath/ath10k/wmi.h | 3 ++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 23e855c..e9f2bf9f 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1292,6 +1292,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ar-htt.max_num_pending_tx = TARGET_NUM_MSDU_DESC; ar-fw_stats_req_mask = WMI_STAT_PDEV | WMI_STAT_VDEV | WMI_STAT_PEER; + ar-max_spatial_stream = WMI_MAX_SPATIAL_STREAM; break; case ATH10K_FW_WMI_OP_VERSION_10_1: case ATH10K_FW_WMI_OP_VERSION_10_2: @@ -1301,6 +1302,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ar-max_num_vdevs = TARGET_10X_NUM_VDEVS; ar-htt.max_num_pending_tx = TARGET_10X_NUM_MSDU_DESC; ar-fw_stats_req_mask = WMI_STAT_PEER; + ar-max_spatial_stream = WMI_MAX_SPATIAL_STREAM; break; case ATH10K_FW_WMI_OP_VERSION_TLV: ar-max_num_peers = TARGET_TLV_NUM_PEERS; @@ -1311,6 +1313,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ar-wow.max_num_patterns = TARGET_TLV_NUM_WOW_PATTERNS; ar-fw_stats_req_mask = WMI_STAT_PDEV | WMI_STAT_VDEV | WMI_STAT_PEER; + ar-max_spatial_stream = WMI_MAX_SPATIAL_STREAM; break; case ATH10K_FW_WMI_OP_VERSION_10_4: ar-max_num_peers = TARGET_10_4_NUM_PEERS; @@ -1320,6 +1323,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ar-num_tids = TARGET_10_4_TGT_NUM_TIDS; ar-htt.max_num_pending_tx = TARGET_10_4_NUM_MSDU_DESC; ar-fw_stats_req_mask = WMI_STAT_PEER; + ar-max_spatial_stream = WMI_10_4_MAX_SPATIAL_STREAM; break; case ATH10K_FW_WMI_OP_VERSION_UNSET: case ATH10K_FW_WMI_OP_VERSION_MAX: diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 7721548..8647ca3 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -578,6 +578,7 @@ struct ath10k { u32 ht_cap_info; u32 vht_cap_info; u32 num_rf_chains; + u32 max_spatial_stream; /* protected by conf_mutex */ bool ani_enabled; diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 00201eb..2f81ff2 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -3818,10 +3818,10 @@ void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb) if (ar-fw_api == 1 ar-fw_version_build 636) set_bit(ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX, ar-fw_features); - if (ar-num_rf_chains WMI_MAX_SPATIAL_STREAM) { + if (ar-num_rf_chains ar-max_spatial_stream) { ath10k_warn(ar, hardware advertises support for more spatial streams than it should (%d %d)\n, - ar-num_rf_chains, WMI_MAX_SPATIAL_STREAM); - ar-num_rf_chains = WMI_MAX_SPATIAL_STREAM; + ar-num_rf_chains, ar-max_spatial_stream); + ar-num_rf_chains = ar-max_spatial_stream; } ar-supp_tx_chainmask = (1 ar-num_rf_chains) - 1; diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 90c872c..aa9b313 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -1702,7 +1702,8 @@ enum wmi_channel_change_cause { /* Indicate reason for channel switch */ #define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 13) -#define WMI_MAX_SPATIAL_STREAM 3 +#define WMI_MAX_SPATIAL_STREAM3 /* default max ss */ +#define WMI_10_4_MAX_SPATIAL_STREAM 4 /* HT Capabilities*/ #define WMI_HT_CAP_ENABLED0x0001 /* HT Enabled/ disabled */ -- 1.8.1.2 -- 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
[PATCH 5/8] ath10k: add 10.4 fw specific htt msg definitions
New htt event table is added for 10.4 firmware. New htt event HTT_T2H_MSG_TYPE_EN_STATS is available only in 10.4, adding this to generic htt event table. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/core.c | 3 +++ drivers/net/wireless/ath/ath10k/htt.c| 35 drivers/net/wireless/ath/ath10k/htt.h| 30 +++ drivers/net/wireless/ath/ath10k/htt_rx.c | 3 +++ drivers/net/wireless/ath/ath10k/hw.h | 2 ++ 5 files changed, 73 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 4e762d0..23e855c 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1318,6 +1318,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ar-num_active_peers = TARGET_10_4_ACTIVE_PEERS; ar-max_num_vdevs = TARGET_10_4_NUM_VDEVS; ar-num_tids = TARGET_10_4_TGT_NUM_TIDS; + ar-htt.max_num_pending_tx = TARGET_10_4_NUM_MSDU_DESC; ar-fw_stats_req_mask = WMI_STAT_PEER; break; case ATH10K_FW_WMI_OP_VERSION_UNSET: @@ -1343,6 +1344,8 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ar-htt.op_version = ATH10K_FW_HTT_OP_VERSION_TLV; break; case ATH10K_FW_WMI_OP_VERSION_10_4: + ar-htt.op_version = ATH10K_FW_HTT_OP_VERSION_10_4; + break; case ATH10K_FW_WMI_OP_VERSION_UNSET: case ATH10K_FW_WMI_OP_VERSION_MAX: WARN_ON(1); diff --git a/drivers/net/wireless/ath/ath10k/htt.c b/drivers/net/wireless/ath/ath10k/htt.c index 6da6ef2..2bb9acc 100644 --- a/drivers/net/wireless/ath/ath10k/htt.c +++ b/drivers/net/wireless/ath/ath10k/htt.c @@ -102,6 +102,37 @@ static const enum htt_t2h_msg_type htt_tlv_t2h_msg_types[] = { [HTT_TLV_T2H_MSG_TYPE_TEST] = HTT_T2H_MSG_TYPE_TEST, }; +static const enum htt_t2h_msg_type htt_10_4_t2h_msg_types[] = { + [HTT_10_4_T2H_MSG_TYPE_VERSION_CONF] = HTT_T2H_MSG_TYPE_VERSION_CONF, + [HTT_10_4_T2H_MSG_TYPE_RX_IND] = HTT_T2H_MSG_TYPE_RX_IND, + [HTT_10_4_T2H_MSG_TYPE_RX_FLUSH] = HTT_T2H_MSG_TYPE_RX_FLUSH, + [HTT_10_4_T2H_MSG_TYPE_PEER_MAP] = HTT_T2H_MSG_TYPE_PEER_MAP, + [HTT_10_4_T2H_MSG_TYPE_PEER_UNMAP] = HTT_T2H_MSG_TYPE_PEER_UNMAP, + [HTT_10_4_T2H_MSG_TYPE_RX_ADDBA] = HTT_T2H_MSG_TYPE_RX_ADDBA, + [HTT_10_4_T2H_MSG_TYPE_RX_DELBA] = HTT_T2H_MSG_TYPE_RX_DELBA, + [HTT_10_4_T2H_MSG_TYPE_TX_COMPL_IND] = HTT_T2H_MSG_TYPE_TX_COMPL_IND, + [HTT_10_4_T2H_MSG_TYPE_PKTLOG] = HTT_T2H_MSG_TYPE_PKTLOG, + [HTT_10_4_T2H_MSG_TYPE_STATS_CONF] = HTT_T2H_MSG_TYPE_STATS_CONF, + [HTT_10_4_T2H_MSG_TYPE_RX_FRAG_IND] = HTT_T2H_MSG_TYPE_RX_FRAG_IND, + [HTT_10_4_T2H_MSG_TYPE_SEC_IND] = HTT_T2H_MSG_TYPE_SEC_IND, + [HTT_10_4_T2H_MSG_TYPE_RC_UPDATE_IND] = HTT_T2H_MSG_TYPE_RC_UPDATE_IND, + [HTT_10_4_T2H_MSG_TYPE_TX_INSPECT_IND] = + HTT_T2H_MSG_TYPE_TX_INSPECT_IND, + [HTT_10_4_T2H_MSG_TYPE_MGMT_TX_COMPL_IND] = + HTT_T2H_MSG_TYPE_MGMT_TX_COMPLETION, + [HTT_10_4_T2H_MSG_TYPE_CHAN_CHANGE] = HTT_T2H_MSG_TYPE_CHAN_CHANGE, + [HTT_10_4_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND] = + HTT_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND, + [HTT_10_4_T2H_MSG_TYPE_RX_PN_IND] = HTT_T2H_MSG_TYPE_RX_PN_IND, + [HTT_10_4_T2H_MSG_TYPE_RX_OFFLOAD_DELIVER_IND] = + HTT_T2H_MSG_TYPE_RX_OFFLOAD_DELIVER_IND, + [HTT_10_4_T2H_MSG_TYPE_TEST] = HTT_T2H_MSG_TYPE_TEST, + [HTT_10_4_T2H_MSG_TYPE_EN_STATS] = HTT_T2H_MSG_TYPE_EN_STATS, + [HTT_10_4_T2H_MSG_TYPE_AGGR_CONF] = HTT_T2H_MSG_TYPE_AGGR_CONF, + [HTT_10_4_T2H_MSG_TYPE_STATS_NOUPLOAD] = + HTT_T2H_MSG_TYPE_STATS_NOUPLOAD, +}; + int ath10k_htt_connect(struct ath10k_htt *htt) { struct ath10k_htc_svc_conn_req conn_req; @@ -147,6 +178,10 @@ int ath10k_htt_init(struct ath10k *ar) 2; /* ip4 dscp or ip6 priority */ switch (ar-htt.op_version) { + case ATH10K_FW_HTT_OP_VERSION_10_4: + ar-htt.t2h_msg_types = htt_10_4_t2h_msg_types; + ar-htt.t2h_msg_types_max = HTT_10_4_T2H_NUM_MSGS; + break; case ATH10K_FW_HTT_OP_VERSION_10_1: ar-htt.t2h_msg_types = htt_10x_t2h_msg_types; ar-htt.t2h_msg_types_max = HTT_10X_T2H_NUM_MSGS; diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h index 7e8a0d8..2a2ba12 100644 --- a/drivers/net/wireless/ath/ath10k/htt.h +++ b/drivers/net/wireless/ath/ath10k/htt.h @@ -349,6 +349,35 @@ enum htt_tlv_t2h_msg_type { HTT_TLV_T2H_NUM_MSGS }; +enum htt_10_4_t2h_msg_type { +
[PATCH 6/8] ath10k: advertise 10.4 fw ap and sta iface combination to mac80211
10.4 fw supports upto 16 interface in ap mode and 1 interface in station mode, overall total interfaces supported are 16 interfaces. Populate this limit in wiphy-iface_combinations. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/mac.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 187e524..3c5d2b0 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6620,6 +6620,33 @@ static struct ieee80211_iface_combination ath10k_tlv_qcs_if_comb[] = { }, }; +static const struct ieee80211_iface_limit ath10k_10_4_if_limits[] = { + { + .max = 1, + .types = BIT(NL80211_IFTYPE_STATION), + }, + { + .max= 16, + .types = BIT(NL80211_IFTYPE_AP) + }, +}; + +static const struct ieee80211_iface_combination ath10k_10_4_if_comb[] = { + { + .limits = ath10k_10_4_if_limits, + .n_limits = ARRAY_SIZE(ath10k_10_4_if_limits), + .max_interfaces = 16, + .num_different_channels = 1, + .beacon_int_infra_match = true, +#ifdef CONFIG_ATH10K_DFS_CERTIFIED + .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | + BIT(NL80211_CHAN_WIDTH_20) | + BIT(NL80211_CHAN_WIDTH_40) | + BIT(NL80211_CHAN_WIDTH_80), +#endif + }, +}; + static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar) { struct ieee80211_sta_vht_cap vht_cap = {0}; @@ -6942,6 +6969,9 @@ int ath10k_mac_register(struct ath10k *ar) ARRAY_SIZE(ath10k_10x_if_comb); break; case ATH10K_FW_WMI_OP_VERSION_10_4: + ar-hw-wiphy-iface_combinations = ath10k_10_4_if_comb; + ar-hw-wiphy-n_iface_combinations = + ARRAY_SIZE(ath10k_10_4_if_comb); break; case ATH10K_FW_WMI_OP_VERSION_UNSET: case ATH10K_FW_WMI_OP_VERSION_MAX: -- 1.8.1.2 -- 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
[PATCH 8/8] ath10k: configure frag desc memory to target for qca99X0
Pre qca99X0 chipsets follows the model where dynamically allocate memory for frag desc on getting new skb for TX. But, this is not going to be the case in qca99X0. It expects frag desc memory to be allocated at boot time and let the driver to reuse allocated memory after every TX completion. So there won't be any dynamic frag memory memory allocation in qca99X0 during data transmission. qca99X0 hardware doesn't need fragment desc address to be programmed in msdu descriptor for every data transaction. It needs to know only starting address of fragment descriptor at the time of the boot. During data transmission, qca99X0 hardware can retrieve corresponding frag addr by adding programmed frag desc base addr + msdu id. Allocate continuous fragment descriptor memory (same size as number of descriptor) at the time of target initialization and configure allocated dma address to the target via HTT_H2T_MSG_TYPE_FRAG_DESC_BANK_CFG. How this is allocated continuous memory is going to be used is not covered in this patch. It just allocates memory and hand over to firmware. If we don't do it at init time, qca99X0 will stall when firmware tries to do TX. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 6 +++ drivers/net/wireless/ath/ath10k/htt.c| 4 ++ drivers/net/wireless/ath/ath10k/htt.h| 11 + drivers/net/wireless/ath/ath10k/htt_tx.c | 76 +++- 5 files changed, 96 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index e9f2bf9f..566b1de 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -111,6 +111,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .otp_exe_param = 0x0700, + .continuous_frag_desc = true, .fw = { .dir = QCA99X0_HW_2_0_FW_DIR, .fw = QCA99X0_HW_2_0_FW_FILE, diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 8647ca3..bb1a4ed 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -614,6 +614,12 @@ struct ath10k { */ bool has_shifted_cc_wraparound; + /* Some of chip expects fragment descriptor to be continuous +* memory for any TX operation. Set continuous_frag_desc flag +* for the hardware which have such requirement. +*/ + bool continuous_frag_desc; + struct ath10k_hw_params_fw { const char *dir; const char *fw; diff --git a/drivers/net/wireless/ath/ath10k/htt.c b/drivers/net/wireless/ath/ath10k/htt.c index 2bb9acc..15f2a49 100644 --- a/drivers/net/wireless/ath/ath10k/htt.c +++ b/drivers/net/wireless/ath/ath10k/htt.c @@ -243,5 +243,9 @@ int ath10k_htt_setup(struct ath10k_htt *htt) if (status) return status; + status = ath10k_htt_send_frag_desc_bank_cfg(htt); + if (status) + return status; + return ath10k_htt_send_rx_ring_cfg_ll(htt); } diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h index 2a2ba12..230eca5 100644 --- a/drivers/net/wireless/ath/ath10k/htt.h +++ b/drivers/net/wireless/ath/ath10k/htt.h @@ -87,6 +87,11 @@ struct htt_data_tx_desc_frag { __le32 len; } __packed; +struct htt_msdu_ext_desc { + __le32 tso_flag[4]; + struct htt_data_tx_desc_frag frags[6]; +}; + enum htt_data_tx_desc_flags0 { HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT = 1 0, HTT_DATA_TX_DESC_FLAGS0_NO_AGGR = 1 1, @@ -1460,6 +1465,11 @@ struct ath10k_htt { /* rx_status template */ struct ieee80211_rx_status rx_status; + + struct { + dma_addr_t paddr; + struct htt_msdu_ext_desc *vaddr; + } frag_desc; }; #define RX_HTT_HDR_STATUS_LEN 64 @@ -1527,6 +1537,7 @@ void ath10k_htt_htc_tx_complete(struct ath10k *ar, struct sk_buff *skb); void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb); int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt); int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u8 mask, u64 cookie); +int ath10k_htt_send_frag_desc_bank_cfg(struct ath10k_htt *htt); int ath10k_htt_send_rx_ring_cfg_ll(struct ath10k_htt *htt); int ath10k_htt_h2t_aggr_cfg_msg(struct ath10k_htt *htt, u8 max_subfrms_ampdu, diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c index a60ef7d..148d5b6 100644 --- a/drivers/net/wireless/ath/ath10k/htt_tx.c +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c @@
[PATCH 07/10] ath10k: fill 10.4 fw wmi init cmd default values
Define 10.4 wmi init command structure and introduce new function ath10k_wmi_10_4_op_gen_init() to fill default values for each field which goes as part of wmi init cmd to 10.4 firmware. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/core.c | 7 ++ drivers/net/wireless/ath/ath10k/core.h | 2 + drivers/net/wireless/ath/ath10k/hw.h | 54 drivers/net/wireless/ath/ath10k/wmi.c | 83 + drivers/net/wireless/ath/ath10k/wmi.h | 220 + 5 files changed, 366 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index f4f6da6..4e762d0 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1313,6 +1313,13 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) WMI_STAT_PEER; break; case ATH10K_FW_WMI_OP_VERSION_10_4: + ar-max_num_peers = TARGET_10_4_NUM_PEERS; + ar-max_num_stations = TARGET_10_4_NUM_STATIONS; + ar-num_active_peers = TARGET_10_4_ACTIVE_PEERS; + ar-max_num_vdevs = TARGET_10_4_NUM_VDEVS; + ar-num_tids = TARGET_10_4_TGT_NUM_TIDS; + ar-fw_stats_req_mask = WMI_STAT_PEER; + break; case ATH10K_FW_WMI_OP_VERSION_UNSET: case ATH10K_FW_WMI_OP_VERSION_MAX: WARN_ON(1); diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 581f849..7c2ffb3 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -717,6 +717,8 @@ struct ath10k { int max_num_stations; int max_num_vdevs; int max_num_tdls_vdevs; + int num_active_peers; + int num_tids; struct work_struct offchan_tx_work; struct sk_buff_head offchan_tx_queue; diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index eb65709..d76b52a 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -355,6 +355,60 @@ enum ath10k_hw_rate_cck { #define NUM_TARGET_CE_CONFIG_WLAN ar-hw_values-num_target_ce_config_wlan +/* Target specific defines for 10.4 firmware */ +#define TARGET_10_4_NUM_VDEVS 16 +#define TARGET_10_4_NUM_STATIONS 32 +#define TARGET_10_4_NUM_PEERS ((TARGET_10_4_NUM_STATIONS) + \ +(TARGET_10_4_NUM_VDEVS)) +#define TARGET_10_4_ACTIVE_PEERS 0 +#define TARGET_10_4_NUM_OFFLOAD_PEERS 0 +#define TARGET_10_4_NUM_OFFLOAD_REORDER_BUFFS 0 +#define TARGET_10_4_NUM_PEER_KEYS 2 +#define TARGET_10_4_TGT_NUM_TIDS ((TARGET_10_4_NUM_PEERS) * 2) +#define TARGET_10_4_AST_SKID_LIMIT 32 +#define TARGET_10_4_TX_CHAIN_MASK (BIT(0) | BIT(1) | \ +BIT(2) | BIT(3)) +#define TARGET_10_4_RX_CHAIN_MASK (BIT(0) | BIT(1) | \ +BIT(2) | BIT(3)) + +/* 100 ms for video, best-effort, and background */ +#define TARGET_10_4_RX_TIMEOUT_LO_PRI 100 + +/* 40 ms for voice */ +#define TARGET_10_4_RX_TIMEOUT_HI_PRI 40 + +#define TARGET_10_4_RX_DECAP_MODE ATH10K_HW_TXRX_NATIVE_WIFI +#define TARGET_10_4_SCAN_MAX_REQS 4 +#define TARGET_10_4_BMISS_OFFLOAD_MAX_VDEV 3 +#define TARGET_10_4_ROAM_OFFLOAD_MAX_VDEV 3 +#define TARGET_10_4_ROAM_OFFLOAD_MAX_PROFILES 8 + +/* Note: mcast to ucast is disabled by default */ +#define TARGET_10_4_NUM_MCAST_GROUPS 0 +#define TARGET_10_4_NUM_MCAST_TABLE_ELEMS 0 +#define TARGET_10_4_MCAST2UCAST_MODE 0 + +#define TARGET_10_4_TX_DBG_LOG_SIZE1024 +#define TARGET_10_4_NUM_WDS_ENTRIES32 +#define TARGET_10_4_DMA_BURST_SIZE 1 +#define TARGET_10_4_MAC_AGGR_DELIM 0 +#define TARGET_10_4_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 1 +#define TARGET_10_4_VOW_CONFIG 0 +#define TARGET_10_4_GTK_OFFLOAD_MAX_VDEV 3 +#define TARGET_10_4_NUM_MSDU_DESC (1024 + 400) +#define TARGET_10_4_11AC_TX_MAX_FRAGS 2 +#define TARGET_10_4_MAX_PEER_EXT_STATS 16 +#define TARGET_10_4_SMART_ANT_CAP 0 +#define TARGET_10_4_BK_MIN_FREE0 +#define TARGET_10_4_BE_MIN_FREE0 +#define TARGET_10_4_VI_MIN_FREE0 +#define TARGET_10_4_VO_MIN_FREE0 +#define TARGET_10_4_RX_BATCH_MODE 1 +#define TARGET_10_4_THERMAL_THROTTLING_CONFIG 0 +#define TARGET_10_4_ATF_CONFIG 0 +#define TARGET_10_4_IPHDR_PAD_CONFIG 1 +#define TARGET_10_4_QWRAP_CONFIG 0 + /* Number of Copy Engines supported */ #define CE_COUNT
[PATCH 03/10] ath10k: include 10.4 fw specific wmi cmd and event ids
10.4 firmware wmi cmd and event id values are not exactly aligned with previous firmware versions (main, 10.x, 10.2, etc). Add new enum to define wmi cmd event definitions for 10.4 firmware and prepare wmi_10_4_cmd_map based on 10.4 firmware wmi cmd definitions. wmi_cmd_map is extended to accommodate new wmi commands which are exclusively available in 10.4 firmware. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/wmi.c | 172 ++ drivers/net/wireless/ath/ath10k/wmi.h | 225 ++ 2 files changed, 397 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 52493d1..d3a5d46 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -395,6 +395,177 @@ static struct wmi_cmd_map wmi_10_2_4_cmd_map = { .pdev_get_temperature_cmdid = WMI_10_2_PDEV_GET_TEMPERATURE_CMDID, }; +/* 10.4 WMI cmd track */ +static struct wmi_cmd_map wmi_10_4_cmd_map = { + .init_cmdid = WMI_10_4_INIT_CMDID, + .start_scan_cmdid = WMI_10_4_START_SCAN_CMDID, + .stop_scan_cmdid = WMI_10_4_STOP_SCAN_CMDID, + .scan_chan_list_cmdid = WMI_10_4_SCAN_CHAN_LIST_CMDID, + .scan_sch_prio_tbl_cmdid = WMI_10_4_SCAN_SCH_PRIO_TBL_CMDID, + .pdev_set_regdomain_cmdid = WMI_10_4_PDEV_SET_REGDOMAIN_CMDID, + .pdev_set_channel_cmdid = WMI_10_4_PDEV_SET_CHANNEL_CMDID, + .pdev_set_param_cmdid = WMI_10_4_PDEV_SET_PARAM_CMDID, + .pdev_pktlog_enable_cmdid = WMI_10_4_PDEV_PKTLOG_ENABLE_CMDID, + .pdev_pktlog_disable_cmdid = WMI_10_4_PDEV_PKTLOG_DISABLE_CMDID, + .pdev_set_wmm_params_cmdid = WMI_10_4_PDEV_SET_WMM_PARAMS_CMDID, + .pdev_set_ht_cap_ie_cmdid = WMI_10_4_PDEV_SET_HT_CAP_IE_CMDID, + .pdev_set_vht_cap_ie_cmdid = WMI_10_4_PDEV_SET_VHT_CAP_IE_CMDID, + .pdev_set_dscp_tid_map_cmdid = WMI_10_4_PDEV_SET_DSCP_TID_MAP_CMDID, + .pdev_set_quiet_mode_cmdid = WMI_10_4_PDEV_SET_QUIET_MODE_CMDID, + .pdev_green_ap_ps_enable_cmdid = WMI_10_4_PDEV_GREEN_AP_PS_ENABLE_CMDID, + .pdev_get_tpc_config_cmdid = WMI_10_4_PDEV_GET_TPC_CONFIG_CMDID, + .pdev_set_base_macaddr_cmdid = WMI_10_4_PDEV_SET_BASE_MACADDR_CMDID, + .vdev_create_cmdid = WMI_10_4_VDEV_CREATE_CMDID, + .vdev_delete_cmdid = WMI_10_4_VDEV_DELETE_CMDID, + .vdev_start_request_cmdid = WMI_10_4_VDEV_START_REQUEST_CMDID, + .vdev_restart_request_cmdid = WMI_10_4_VDEV_RESTART_REQUEST_CMDID, + .vdev_up_cmdid = WMI_10_4_VDEV_UP_CMDID, + .vdev_stop_cmdid = WMI_10_4_VDEV_STOP_CMDID, + .vdev_down_cmdid = WMI_10_4_VDEV_DOWN_CMDID, + .vdev_set_param_cmdid = WMI_10_4_VDEV_SET_PARAM_CMDID, + .vdev_install_key_cmdid = WMI_10_4_VDEV_INSTALL_KEY_CMDID, + .peer_create_cmdid = WMI_10_4_PEER_CREATE_CMDID, + .peer_delete_cmdid = WMI_10_4_PEER_DELETE_CMDID, + .peer_flush_tids_cmdid = WMI_10_4_PEER_FLUSH_TIDS_CMDID, + .peer_set_param_cmdid = WMI_10_4_PEER_SET_PARAM_CMDID, + .peer_assoc_cmdid = WMI_10_4_PEER_ASSOC_CMDID, + .peer_add_wds_entry_cmdid = WMI_10_4_PEER_ADD_WDS_ENTRY_CMDID, + .peer_remove_wds_entry_cmdid = WMI_10_4_PEER_REMOVE_WDS_ENTRY_CMDID, + .peer_mcast_group_cmdid = WMI_10_4_PEER_MCAST_GROUP_CMDID, + .bcn_tx_cmdid = WMI_10_4_BCN_TX_CMDID, + .pdev_send_bcn_cmdid = WMI_10_4_PDEV_SEND_BCN_CMDID, + .bcn_tmpl_cmdid = WMI_10_4_BCN_PRB_TMPL_CMDID, + .bcn_filter_rx_cmdid = WMI_10_4_BCN_FILTER_RX_CMDID, + .prb_req_filter_rx_cmdid = WMI_10_4_PRB_REQ_FILTER_RX_CMDID, + .mgmt_tx_cmdid = WMI_10_4_MGMT_TX_CMDID, + .prb_tmpl_cmdid = WMI_10_4_PRB_TMPL_CMDID, + .addba_clear_resp_cmdid = WMI_10_4_ADDBA_CLEAR_RESP_CMDID, + .addba_send_cmdid = WMI_10_4_ADDBA_SEND_CMDID, + .addba_status_cmdid = WMI_10_4_ADDBA_STATUS_CMDID, + .delba_send_cmdid = WMI_10_4_DELBA_SEND_CMDID, + .addba_set_resp_cmdid = WMI_10_4_ADDBA_SET_RESP_CMDID, + .send_singleamsdu_cmdid = WMI_10_4_SEND_SINGLEAMSDU_CMDID, + .sta_powersave_mode_cmdid = WMI_10_4_STA_POWERSAVE_MODE_CMDID, + .sta_powersave_param_cmdid = WMI_10_4_STA_POWERSAVE_PARAM_CMDID, + .sta_mimo_ps_mode_cmdid = WMI_10_4_STA_MIMO_PS_MODE_CMDID, + .pdev_dfs_enable_cmdid = WMI_10_4_PDEV_DFS_ENABLE_CMDID, + .pdev_dfs_disable_cmdid = WMI_10_4_PDEV_DFS_DISABLE_CMDID, + .roam_scan_mode = WMI_10_4_ROAM_SCAN_MODE, + .roam_scan_rssi_threshold = WMI_10_4_ROAM_SCAN_RSSI_THRESHOLD, + .roam_scan_period = WMI_10_4_ROAM_SCAN_PERIOD, + .roam_scan_rssi_change_threshold = + WMI_10_4_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, + .roam_ap_profile = WMI_10_4_ROAM_AP_PROFILE, + .ofl_scan_add_ap_profile = WMI_10_4_OFL_SCAN_ADD_AP_PROFILE, + .ofl_scan_remove_ap_profile = WMI_10_4_OFL_SCAN_REMOVE_AP_PROFILE, + .ofl_scan_period = WMI_10_4_OFL_SCAN_PERIOD, +
[PATCH 01/10] ath10k: include new wmi op version for 10.4 fw
qca99X0 chip uses firmware version 10.4. Define a new macro ATH10K_FW_WMI_OP_VERSION_10_4 for 10.4 firmware and include in switch cases where ATH10K_FW_WMI_OP_VERSION_* is used to avoid compilation error. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/core.c | 2 ++ drivers/net/wireless/ath/ath10k/hw.h | 1 + drivers/net/wireless/ath/ath10k/mac.c | 2 ++ drivers/net/wireless/ath/ath10k/wmi.c | 2 ++ 4 files changed, 7 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 102191a..f4f6da6 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1312,6 +1312,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) ar-fw_stats_req_mask = WMI_STAT_PDEV | WMI_STAT_VDEV | WMI_STAT_PEER; break; + case ATH10K_FW_WMI_OP_VERSION_10_4: case ATH10K_FW_WMI_OP_VERSION_UNSET: case ATH10K_FW_WMI_OP_VERSION_MAX: WARN_ON(1); @@ -1334,6 +1335,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar) case ATH10K_FW_WMI_OP_VERSION_TLV: ar-htt.op_version = ATH10K_FW_HTT_OP_VERSION_TLV; break; + case ATH10K_FW_WMI_OP_VERSION_10_4: case ATH10K_FW_WMI_OP_VERSION_UNSET: case ATH10K_FW_WMI_OP_VERSION_MAX: WARN_ON(1); diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 5635340..eb65709 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -137,6 +137,7 @@ enum ath10k_fw_wmi_op_version { ATH10K_FW_WMI_OP_VERSION_10_2 = 3, ATH10K_FW_WMI_OP_VERSION_TLV = 4, ATH10K_FW_WMI_OP_VERSION_10_2_4 = 5, + ATH10K_FW_WMI_OP_VERSION_10_4 = 6, /* keep last */ ATH10K_FW_WMI_OP_VERSION_MAX, diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index e834a9d..187e524 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6941,6 +6941,8 @@ int ath10k_mac_register(struct ath10k *ar) ar-hw-wiphy-n_iface_combinations = ARRAY_SIZE(ath10k_10x_if_comb); break; + case ATH10K_FW_WMI_OP_VERSION_10_4: + break; case ATH10K_FW_WMI_OP_VERSION_UNSET: case ATH10K_FW_WMI_OP_VERSION_MAX: WARN_ON(1); diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 6c046c2..b32bb68 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -5415,6 +5415,8 @@ static const struct wmi_ops wmi_10_2_4_ops = { int ath10k_wmi_attach(struct ath10k *ar) { switch (ar-wmi.op_version) { + case ATH10K_FW_WMI_OP_VERSION_10_4: + break; case ATH10K_FW_WMI_OP_VERSION_10_2_4: ar-wmi.cmd = wmi_10_2_4_cmd_map; ar-wmi.ops = wmi_10_2_4_ops; -- 1.8.1.2 -- 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
[PATCH 06/10] ath10k: add 10.4 fw wmi pdev cmd ids
Include 10.4 firmware wmi pdev cmd id and prepare wmi vdev map table wmi_10_4_pdev_param_map and update non 10.4 firmware pdev cmd map table with newly added vdev cmd id specifically for 10.4 firmware as unsupported. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 32 + drivers/net/wireless/ath/ath10k/wmi.c | 188 ++ drivers/net/wireless/ath/ath10k/wmi.h | 116 ++ 3 files changed, 336 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index df8ac2e..e165e26 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -3204,6 +3204,38 @@ static struct wmi_pdev_param_map wmi_tlv_pdev_param_map = { .burst_dur = WMI_TLV_PDEV_PARAM_BURST_DUR, .burst_enable = WMI_TLV_PDEV_PARAM_BURST_ENABLE, .cal_period = WMI_PDEV_PARAM_UNSUPPORTED, + .aggr_burst = WMI_PDEV_PARAM_UNSUPPORTED, + .rx_decap_mode = WMI_PDEV_PARAM_UNSUPPORTED, + .smart_antenna_default_antenna = WMI_PDEV_PARAM_UNSUPPORTED, + .igmpmld_override = WMI_PDEV_PARAM_UNSUPPORTED, + .igmpmld_tid = WMI_PDEV_PARAM_UNSUPPORTED, + .antenna_gain = WMI_PDEV_PARAM_UNSUPPORTED, + .rx_filter = WMI_PDEV_PARAM_UNSUPPORTED, + .set_mcast_to_ucast_tid = WMI_PDEV_PARAM_UNSUPPORTED, + .proxy_sta_mode = WMI_PDEV_PARAM_UNSUPPORTED, + .set_mcast2ucast_mode = WMI_PDEV_PARAM_UNSUPPORTED, + .set_mcast2ucast_buffer = WMI_PDEV_PARAM_UNSUPPORTED, + .remove_mcast2ucast_buffer = WMI_PDEV_PARAM_UNSUPPORTED, + .peer_sta_ps_statechg_enable = WMI_PDEV_PARAM_UNSUPPORTED, + .igmpmld_ac_override = WMI_PDEV_PARAM_UNSUPPORTED, + .block_interbss = WMI_PDEV_PARAM_UNSUPPORTED, + .set_disable_reset_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .set_msdu_ttl_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .set_ppdu_duration_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .txbf_sound_period_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .set_promisc_mode_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .set_burst_mode_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .en_stats = WMI_PDEV_PARAM_UNSUPPORTED, + .mu_group_policy = WMI_PDEV_PARAM_UNSUPPORTED, + .noise_detection = WMI_PDEV_PARAM_UNSUPPORTED, + .noise_threshold = WMI_PDEV_PARAM_UNSUPPORTED, + .dpd_enable = WMI_PDEV_PARAM_UNSUPPORTED, + .set_mcast_bcast_echo = WMI_PDEV_PARAM_UNSUPPORTED, + .atf_strict_sch = WMI_PDEV_PARAM_UNSUPPORTED, + .atf_sched_duration = WMI_PDEV_PARAM_UNSUPPORTED, + .ant_plzn = WMI_PDEV_PARAM_UNSUPPORTED, + .rts_fixed_rate = WMI_PDEV_PARAM_UNSUPPORTED, + .pdev_reset = WMI_PDEV_PARAM_UNSUPPORTED, }; static struct wmi_vdev_param_map wmi_tlv_vdev_param_map = { diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 9aa6989..0625009 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -1007,6 +1007,38 @@ static struct wmi_pdev_param_map wmi_pdev_param_map = { .burst_dur = WMI_PDEV_PARAM_UNSUPPORTED, .burst_enable = WMI_PDEV_PARAM_UNSUPPORTED, .cal_period = WMI_PDEV_PARAM_UNSUPPORTED, + .aggr_burst = WMI_PDEV_PARAM_UNSUPPORTED, + .rx_decap_mode = WMI_PDEV_PARAM_UNSUPPORTED, + .smart_antenna_default_antenna = WMI_PDEV_PARAM_UNSUPPORTED, + .igmpmld_override = WMI_PDEV_PARAM_UNSUPPORTED, + .igmpmld_tid = WMI_PDEV_PARAM_UNSUPPORTED, + .antenna_gain = WMI_PDEV_PARAM_UNSUPPORTED, + .rx_filter = WMI_PDEV_PARAM_UNSUPPORTED, + .set_mcast_to_ucast_tid = WMI_PDEV_PARAM_UNSUPPORTED, + .proxy_sta_mode = WMI_PDEV_PARAM_UNSUPPORTED, + .set_mcast2ucast_mode = WMI_PDEV_PARAM_UNSUPPORTED, + .set_mcast2ucast_buffer = WMI_PDEV_PARAM_UNSUPPORTED, + .remove_mcast2ucast_buffer = WMI_PDEV_PARAM_UNSUPPORTED, + .peer_sta_ps_statechg_enable = WMI_PDEV_PARAM_UNSUPPORTED, + .igmpmld_ac_override = WMI_PDEV_PARAM_UNSUPPORTED, + .block_interbss = WMI_PDEV_PARAM_UNSUPPORTED, + .set_disable_reset_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .set_msdu_ttl_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .set_ppdu_duration_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .txbf_sound_period_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .set_promisc_mode_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .set_burst_mode_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, + .en_stats = WMI_PDEV_PARAM_UNSUPPORTED, + .mu_group_policy = WMI_PDEV_PARAM_UNSUPPORTED, + .noise_detection = WMI_PDEV_PARAM_UNSUPPORTED, + .noise_threshold = WMI_PDEV_PARAM_UNSUPPORTED, + .dpd_enable = WMI_PDEV_PARAM_UNSUPPORTED, + .set_mcast_bcast_echo = WMI_PDEV_PARAM_UNSUPPORTED, + .atf_strict_sch = WMI_PDEV_PARAM_UNSUPPORTED, + .atf_sched_duration = WMI_PDEV_PARAM_UNSUPPORTED, + .ant_plzn =
[PATCH 02/10] ath10k: add 10.4 fw wmi service bitmap definition
Include new enum to define wmi service bitmap definitions for 10.4 firmware and a function wmi_10_4_svc_map() to remap 10.4 firmware wmi service bitmap definitions to ath10k generic wmi services. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/wmi.c | 5 ++ drivers/net/wireless/ath/ath10k/wmi.h | 128 ++ 2 files changed, 133 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index b32bb68..52493d1 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -5412,10 +5412,15 @@ static const struct wmi_ops wmi_10_2_4_ops = { /* .gen_adaptive_qcs not implemented */ }; +static const struct wmi_ops wmi_10_4_ops = { + .map_svc = wmi_10_4_svc_map, +}; + int ath10k_wmi_attach(struct ath10k *ar) { switch (ar-wmi.op_version) { case ATH10K_FW_WMI_OP_VERSION_10_4: + ar-wmi.ops = wmi_10_4_ops; break; case ATH10K_FW_WMI_OP_VERSION_10_2_4: ar-wmi.cmd = wmi_10_2_4_cmd_map; diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index cf44a3d..95b7c89 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -150,6 +150,9 @@ enum wmi_service { WMI_SERVICE_SAP_AUTH_OFFLOAD, WMI_SERVICE_ATF, WMI_SERVICE_COEX_GPIO, + WMI_SERVICE_ENHANCED_PROXY_STA, + WMI_SERVICE_TT, + WMI_SERVICE_PEER_CACHING, /* keep last */ WMI_SERVICE_MAX, @@ -218,6 +221,47 @@ enum wmi_main_service { WMI_MAIN_SERVICE_TX_ENCAP, }; +enum wmi_10_4_service { + WMI_10_4_SERVICE_BEACON_OFFLOAD = 0, + WMI_10_4_SERVICE_SCAN_OFFLOAD, + WMI_10_4_SERVICE_ROAM_OFFLOAD, + WMI_10_4_SERVICE_BCN_MISS_OFFLOAD, + WMI_10_4_SERVICE_STA_PWRSAVE, + WMI_10_4_SERVICE_STA_ADVANCED_PWRSAVE, + WMI_10_4_SERVICE_AP_UAPSD, + WMI_10_4_SERVICE_AP_DFS, + WMI_10_4_SERVICE_11AC, + WMI_10_4_SERVICE_BLOCKACK, + WMI_10_4_SERVICE_PHYERR, + WMI_10_4_SERVICE_BCN_FILTER, + WMI_10_4_SERVICE_RTT, + WMI_10_4_SERVICE_RATECTRL, + WMI_10_4_SERVICE_WOW, + WMI_10_4_SERVICE_RATECTRL_CACHE, + WMI_10_4_SERVICE_IRAM_TIDS, + WMI_10_4_SERVICE_BURST, + WMI_10_4_SERVICE_SMART_ANTENNA_SW_SUPPORT, + WMI_10_4_SERVICE_GTK_OFFLOAD, + WMI_10_4_SERVICE_SCAN_SCH, + WMI_10_4_SERVICE_CSA_OFFLOAD, + WMI_10_4_SERVICE_CHATTER, + WMI_10_4_SERVICE_COEX_FREQAVOID, + WMI_10_4_SERVICE_PACKET_POWER_SAVE, + WMI_10_4_SERVICE_FORCE_FW_HANG, + WMI_10_4_SERVICE_SMART_ANTENNA_HW_SUPPORT, + WMI_10_4_SERVICE_GPIO, + WMI_10_4_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, + WMI_10_4_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, + WMI_10_4_SERVICE_STA_KEEP_ALIVE, + WMI_10_4_SERVICE_TX_ENCAP, + WMI_10_4_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, + WMI_10_4_SERVICE_EARLY_RX, + WMI_10_4_SERVICE_ENHANCED_PROXY_STA, + WMI_10_4_SERVICE_TT, + WMI_10_4_SERVICE_ATF, + WMI_10_4_SERVICE_PEER_CACHING, +}; + static inline char *wmi_service_name(int service_id) { #define SVCSTR(x) case x: return #x @@ -299,6 +343,9 @@ static inline char *wmi_service_name(int service_id) SVCSTR(WMI_SERVICE_SAP_AUTH_OFFLOAD); SVCSTR(WMI_SERVICE_ATF); SVCSTR(WMI_SERVICE_COEX_GPIO); + SVCSTR(WMI_SERVICE_ENHANCED_PROXY_STA); + SVCSTR(WMI_SERVICE_TT); + SVCSTR(WMI_SERVICE_PEER_CACHING); default: return NULL; } @@ -437,6 +484,87 @@ static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out, WMI_SERVICE_TX_ENCAP, len); } +static inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out, + size_t len) +{ + SVCMAP(WMI_10_4_SERVICE_BEACON_OFFLOAD, + WMI_SERVICE_BEACON_OFFLOAD, len); + SVCMAP(WMI_10_4_SERVICE_SCAN_OFFLOAD, + WMI_SERVICE_SCAN_OFFLOAD, len); + SVCMAP(WMI_10_4_SERVICE_ROAM_OFFLOAD, + WMI_SERVICE_ROAM_OFFLOAD, len); + SVCMAP(WMI_10_4_SERVICE_BCN_MISS_OFFLOAD, + WMI_SERVICE_BCN_MISS_OFFLOAD, len); + SVCMAP(WMI_10_4_SERVICE_STA_PWRSAVE, + WMI_SERVICE_STA_PWRSAVE, len); + SVCMAP(WMI_10_4_SERVICE_STA_ADVANCED_PWRSAVE, + WMI_SERVICE_STA_ADVANCED_PWRSAVE, len); + SVCMAP(WMI_10_4_SERVICE_AP_UAPSD, + WMI_SERVICE_AP_UAPSD, len); + SVCMAP(WMI_10_4_SERVICE_AP_DFS, + WMI_SERVICE_AP_DFS, len); + SVCMAP(WMI_10_4_SERVICE_11AC, + WMI_SERVICE_11AC, len); + SVCMAP(WMI_10_4_SERVICE_BLOCKACK, + WMI_SERVICE_BLOCKACK, len); + SVCMAP(WMI_10_4_SERVICE_PHYERR, + WMI_SERVICE_PHYERR, len); + SVCMAP(WMI_10_4_SERVICE_BCN_FILTER, +
[PATCH 00/10] introduce wmi support for qca99X0
qca99X0 uses 10.4 firmware. This patch series adds 10.4 firmware specific WMI cmds/events/parsing logic. All these patches tested on top of qca99X0 initial bring up patches. Raja Mani (10): ath10k: include new wmi op version for 10.4 fw ath10k: add 10.4 fw wmi service bitmap definition ath10k: include 10.4 fw specific wmi cmd and event ids ath10k: set 10.4 fw exclusive wmi cmd as unsupported for other fw versions ath10k: add 10.4 fw wmi vdev cmd ids ath10k: add 10.4 fw wmi pdev cmd ids ath10k: fill 10.4 fw wmi init cmd default values ath10k: handle 10.4 fw wmi mgmt rx event ath10k: adjust default peer limits if qcache enabled in 10.4 fw ath10k: handle 10.4 fw wmi ready event drivers/net/wireless/ath/ath10k/core.c| 9 + drivers/net/wireless/ath/ath10k/core.h| 2 + drivers/net/wireless/ath/ath10k/hw.h | 61 +++ drivers/net/wireless/ath/ath10k/mac.c | 2 + drivers/net/wireless/ath/ath10k/wmi-tlv.c | 47 ++ drivers/net/wireless/ath/ath10k/wmi.c | 793 +- drivers/net/wireless/ath/ath10k/wmi.h | 792 - 7 files changed, 1700 insertions(+), 6 deletions(-) -- 1.8.1.2 -- 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
Re: Question on beacon-miss offloading.
On 15 June 2015 at 21:45, Ben Greear gree...@candelatech.com wrote: On 06/15/2015 08:35 AM, Ben Greear wrote: On 06/14/2015 10:36 PM, Michal Kazior wrote: On 12 June 2015 at 17:37, Ben Greear gree...@candelatech.com wrote: On 06/11/2015 11:03 PM, Michal Kazior wrote: On 12 June 2015 at 01:38, Ben Greear gree...@candelatech.com wrote: On 06/11/2015 02:07 PM, Ben Greear wrote: In my ath10k CT firmware, I am disabling the beacon-miss offloading to save space and because it will not work with lots of virtual stations. But, it must be that I need some way to tell the stack that this feature is not enabled, because when suddenly kill my AP, then the ath10k station connected to it shows endless 'beacon loss' events in 'iw events' output, but it never actually loses connection. Stock firmware works fine, so probably I just need to disable some feature flag when registering the ath10k hardware when using CT firmware. With stock firmware, I see a quick dissassociation due to inactivity. I am having poor luck finding how a driver tells the stack it has beacon miss offload or not, so, does anyone know how this is controlled? I still am not sure why stock firmware works, but it appears the reason mine is failing is that the ACK status for mgt frames is always set to TRUE since the ath10k wmi-mgt-tx API is so lame. So, mac80211 does a probe, ath10k lies and says it was acked, and mac80211 then things all is well for another few seconds. mac80211 shouldn't do a Probe Req to an AP on beacon loss because ath10k advertises it supports tx-status report. Hence mac80211 should use NullFunc frames which shouldn't go through wmi-mgmt-tx but htt tx-frm. But then again: NullFunc status reporting via htt tx-frm was broken on 10.1 if memory serves right. I believe it was fixed in 10.2 or 10.2.4. This problem has been effectively obscured on stock 10.1 by the offloaded beacon miss. Thanks for the hint. I was able to fix my firmware to properly return htt tx status, and now it appears to work properly. A quick throughput test works as well, so hopefully no regressions. I guess the NulFunc related comment is incorrect for 10.1 stock firmware? Maybe some others? static void ath10k_tx_htt(struct ath10k *ar, struct sk_buff *skb) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb-data; int ret = 0; if (ar-htt.target_version_major = 3) { /* Since HTT 3.0 there is no separate mgmt tx command */ ret = ath10k_htt_tx(ar-htt, skb); goto exit; } if (ieee80211_is_mgmt(hdr-frame_control)) { if (test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, ar-fw_features)) { if (skb_queue_len(ar-wmi_mgmt_tx_queue) = ATH10K_MAX_NUM_MGMT_PENDING) { ath10k_warn(ar, reached WMI management transmit queue limit\n); ret = -EBUSY; goto exit; } skb_queue_tail(ar-wmi_mgmt_tx_queue, skb); ieee80211_queue_work(ar-hw, ar-wmi_mgmt_tx_work); } else { ret = ath10k_htt_mgmt_tx(ar-htt, skb); } } else if (!test_bit(ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX, ar-fw_features) 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); } The NullFunc workaround was originally done for 999.999.0.636 but should be true for 10.1 as well with the sole exception the latter doesn't have htt-mgmt-tx to workaround the problem. Is it correct to say that this logic is completely broken for stock 10.1 firmware because null-func frames are not management frames, so the packet goes out the ath10k_htt_mgmt_tx call, and stock 10.1 does not properly do tx status for htt-tx frames? The has-wmi-mgmt-tx was originally designed to identify FW supporting htt-mgmt-tx. It ended up to be used (implicitly) as a part of the NullFunc workaround. Hmm.. I guess it's not really ideal now because latest 10.2.4 FW which supports htt-mgmt-tx doesn't need the workaround (htt-tx report correct tx-status for NullFuncs).. And slightly different question: Once I put in proper htt ACK reporting into my firmware, I notice that stations often loose connectivity when they are idle. I captured a sniff, and it appears the null-func packets are sent, but the
Re: [Bug ?] 10ec:b723 Realtek RTL8723BE wireless card drops connection
On Sun, Jun 14, 2015 at 06:13:56PM -0500, Larry Finger wrote: On 06/14/2015 06:04 PM, James Cameron wrote: On Sun, Jun 14, 2015 at 10:10:30AM -0500, Larry Finger wrote: To address your problem, power saving does not work correctly on this device. That is why there are numerous posts on the web telling people to use ips=0. It seems that Ubuntu people never look at anything but the Ubuntu literature; however, I'm sure that I posted this suggestion there as well. The Realtek group is currently rewriting the entire dynamic management code for all their drivers. When complete, this should improve performance and should help the power-save condition. No, I do not know when the new code will be ready, or how much improvement it will make. Thanks for summary. OLPC is also seeing the issue. Power saving mode impacts battery run time; one of our design goals. ips=0 seems to solve with 3.19, but not fully with 4.1-rc7; still some periods of packet loss. I offer to test any rtl8723be changes. Please do a bisection between 4.1-rc7 and 3.19. Thanks. But I was too hasty in reporting a good result. Now no difference across those kernel versions; still some periods of packet loss with ips=0. Workaround is to use both ips=0 and fwlps=0. We'll ship with that unless we hear of a fix. -- James Cameron http://quozl.linux.org.au/ -- 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
[PATCH 10/10] ath10k: handle 10.4 fw wmi ready event
Reuse existing function ath10k_wmi_op_pull_rdy_ev() to parse WMI_10_4_READY_EVENTID and handle the same event in ath10k_wmi_10_4_op_rx(). Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/wmi.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index e5d948e..8d4ff3e 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -4252,6 +4252,9 @@ static void ath10k_wmi_10_4_op_rx(struct ath10k *ar, struct sk_buff *skb) ath10k_wmi_event_mgmt_rx(ar, skb); /* mgmt_rx() owns the skb now! */ return; + case WMI_10_4_READY_EVENTID: + ath10k_wmi_event_ready(ar, skb); + break; default: ath10k_warn(ar, Unknown eventid: %d\n, id); break; @@ -6184,6 +6187,7 @@ static const struct wmi_ops wmi_10_4_ops = { .map_svc = wmi_10_4_svc_map, .pull_mgmt_rx = ath10k_wmi_10_4_op_pull_mgmt_rx_ev, .pull_svc_rdy = ath10k_wmi_main_op_pull_svc_rdy_ev, + .pull_rdy = ath10k_wmi_op_pull_rdy_ev, .gen_init = ath10k_wmi_10_4_op_gen_init, }; -- 1.8.1.2 -- 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
[PATCH 06/10] ath10k: Add chip reset sequence for QCA99X0
QCA99X0 supports only cold reset. Also, made ath10k_pci_irq_msi_fw_mask() and ath10k_pci_irq_msi_fw_unmask() non-99X0 specific till we get proper register configuration to mask/unmask irq/MSI. Signed-off-by: Vasanthakumar Thiagarajan vthia...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/pci.c | 81 ++- 1 file changed, 71 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 422232c..fe41b61 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -82,7 +82,7 @@ static const struct ath10k_pci_supp_chip ath10k_pci_supp_chips[] = { static void ath10k_pci_buffer_cleanup(struct ath10k *ar); static int ath10k_pci_cold_reset(struct ath10k *ar); -static int ath10k_pci_warm_reset(struct ath10k *ar); +static int ath10k_pci_safe_chip_reset(struct ath10k *ar); static int ath10k_pci_wait_for_target_init(struct ath10k *ar); static int ath10k_pci_init_irq(struct ath10k *ar); static int ath10k_pci_deinit_irq(struct ath10k *ar); @@ -91,6 +91,7 @@ static void ath10k_pci_free_irq(struct ath10k *ar); static int ath10k_pci_bmi_wait(struct ath10k_ce_pipe *tx_pipe, struct ath10k_ce_pipe *rx_pipe, struct bmi_xfer *xfer); +static int ath10k_pci_qca99x0_chip_reset(struct ath10k *ar); static const struct ce_attr host_ce_config_wlan[] = { /* CE0: host-target HTC control and raw streams */ @@ -1415,20 +1416,42 @@ static void ath10k_pci_irq_msi_fw_mask(struct ath10k *ar) { u32 val; - val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS + CORE_CTRL_ADDRESS); - val = ~CORE_CTRL_PCIE_REG_31_MASK; - - ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS + CORE_CTRL_ADDRESS, val); + switch (ar-hw_rev) { + case ATH10K_HW_QCA988X: + case ATH10K_HW_QCA6174: + val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS + + CORE_CTRL_ADDRESS); + val = ~CORE_CTRL_PCIE_REG_31_MASK; + ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS + + CORE_CTRL_ADDRESS, val); + break; + case ATH10K_HW_QCA99X0: + /* TODO: Find appropriate register configuration for QCA99X0 +* to mask irq/MSI. +*/ +break; + } } static void ath10k_pci_irq_msi_fw_unmask(struct ath10k *ar) { u32 val; - val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS + CORE_CTRL_ADDRESS); - val |= CORE_CTRL_PCIE_REG_31_MASK; - - ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS + CORE_CTRL_ADDRESS, val); + switch (ar-hw_rev) { + case ATH10K_HW_QCA988X: + case ATH10K_HW_QCA6174: + val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS + + CORE_CTRL_ADDRESS); + val |= CORE_CTRL_PCIE_REG_31_MASK; + ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS + + CORE_CTRL_ADDRESS, val); + break; + case ATH10K_HW_QCA99X0: + /* TODO: Find appropriate register configuration for QCA99X0 +* to unmask irq/MSI. +*/ + break; + } } static void ath10k_pci_irq_disable(struct ath10k *ar) @@ -1590,7 +1613,7 @@ static void ath10k_pci_hif_stop(struct ath10k *ar) * masked. To prevent the device from asserting the interrupt reset it * before proceeding with cleanup. */ - ath10k_pci_warm_reset(ar); + ath10k_pci_safe_chip_reset(ar); ath10k_pci_irq_disable(ar); ath10k_pci_irq_sync(ar); @@ -2102,6 +2125,18 @@ static int ath10k_pci_warm_reset(struct ath10k *ar) return 0; } +static int ath10k_pci_safe_chip_reset(struct ath10k *ar) +{ + if (QCA_REV_988X(ar) || QCA_REV_6174(ar)) { + return ath10k_pci_warm_reset(ar); + } else if (QCA_REV_99X0(ar)) { + ath10k_pci_irq_disable(ar); + return ath10k_pci_qca99x0_chip_reset(ar); + } else { + return -ENOTSUPP; + } +} + static int ath10k_pci_qca988x_chip_reset(struct ath10k *ar) { int i, ret; @@ -2208,12 +2243,38 @@ static int ath10k_pci_qca6174_chip_reset(struct ath10k *ar) return 0; } +static int ath10k_pci_qca99x0_chip_reset(struct ath10k *ar) +{ + int ret; + + ath10k_dbg(ar, ATH10K_DBG_BOOT, boot qca99x0 chip reset\n); + + ret = ath10k_pci_cold_reset(ar); + if (ret) { + ath10k_warn(ar, failed to cold reset: %d\n, ret); + return ret; + } + + ret = ath10k_pci_wait_for_target_init(ar); + if (ret) { + ath10k_warn(ar, failed to wait for target after cold reset: %d\n, + ret); + return ret; + } + +
[PATCH 00/10] Add QCA99X0 support
This patch set adds changes for QCA99X0 chip in pci probe, Copy Engine init and firmware downloads. Since it is still work in progress the support for this chip is not yet advertised in pci device table. Vasanthakumar Thiagarajan (10): ath10k: Add a table to store hw specific values ath10k: Add new reg_address/mask to hw register table ath10k: Add hw register/values for QCA99X0 chip ath10k: Copy Engine related changes for QCA99X0 ath10k: Make target cpu address to CE address conversion chip specific ath10k: Add chip reset sequence for QCA99X0 ath10k: Extend CE src desc flags for interrupt indication ath10k: Fix BMI communication timeout for QCA99X0 ath10k: Add support for code swap ath10k: Add BMI param value to execute otp to hw_param drivers/net/wireless/ath/ath10k/Makefile| 3 +- drivers/net/wireless/ath/ath10k/bmi.h | 2 +- drivers/net/wireless/ath/ath10k/ce.c| 1 + drivers/net/wireless/ath/ath10k/ce.h| 17 ++- drivers/net/wireless/ath/ath10k/core.c | 52 ++- drivers/net/wireless/ath/ath10k/core.h | 9 ++ drivers/net/wireless/ath/ath10k/hw.c| 86 +++- drivers/net/wireless/ath/ath10k/hw.h| 61 ++-- drivers/net/wireless/ath/ath10k/pci.c | 180 ++-- drivers/net/wireless/ath/ath10k/pci.h | 12 -- drivers/net/wireless/ath/ath10k/swap.c | 208 drivers/net/wireless/ath/ath10k/swap.h | 72 ++ drivers/net/wireless/ath/ath10k/targaddrs.h | 3 + 13 files changed, 659 insertions(+), 47 deletions(-) create mode 100644 drivers/net/wireless/ath/ath10k/swap.c create mode 100644 drivers/net/wireless/ath/ath10k/swap.h -- 1.9.1 -- 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
[PATCH 02/10] ath10k: Add new reg_address/mask to hw register table
Add more register address and mask which can be different for newer chip to hw_reg table. Signed-off-by: Vasanthakumar Thiagarajan vthia...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/ce.h | 6 -- drivers/net/wireless/ath/ath10k/hw.c | 22 ++ drivers/net/wireless/ath/ath10k/hw.h | 17 - 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.h b/drivers/net/wireless/ath/ath10k/ce.h index 0eddb20..93939de 100644 --- a/drivers/net/wireless/ath/ath10k/ce.h +++ b/drivers/net/wireless/ath/ath10k/ce.h @@ -423,8 +423,10 @@ static inline u32 ath10k_ce_base_address(struct ath10k *ar, unsigned int ce_id) #define CE_RING_IDX_INCR(nentries_mask, idx) (((idx) + 1) (nentries_mask)) -#define CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB 8 -#define CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK 0xff00 +#define CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB \ + ar-regs-ce_wrap_intr_sum_host_msi_lsb +#define CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK \ + ar-regs-ce_wrap_intr_sum_host_msi_mask #define CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_GET(x) \ (((x) CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK) \ CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB) diff --git a/drivers/net/wireless/ath/ath10k/hw.c b/drivers/net/wireless/ath/ath10k/hw.c index 48bcd2c..cb09867 100644 --- a/drivers/net/wireless/ath/ath10k/hw.c +++ b/drivers/net/wireless/ath/ath10k/hw.c @@ -34,8 +34,15 @@ const struct ath10k_hw_regs qca988x_regs = { .ce7_base_address = 0x00059000, .soc_reset_control_si0_rst_mask = 0x0001, .soc_reset_control_ce_rst_mask = 0x0004, - .soc_chip_id_address= 0x00ec, - .scratch_3_address = 0x0030, + .soc_chip_id_address= 0x00ec, + .scratch_3_address = 0x0030, + .fw_indicator_address = 0x9030, + .pcie_local_base_address= 0x0008, + .ce_wrap_intr_sum_host_msi_lsb = 0x0008, + .ce_wrap_intr_sum_host_msi_mask = 0xff00, + .pcie_intr_fw_mask = 0x0400, + .pcie_intr_ce_mask_all = 0x0007f800, + .pcie_intr_clr_address = 0x0014, }; const struct ath10k_hw_regs qca6174_regs = { @@ -54,8 +61,15 @@ const struct ath10k_hw_regs qca6174_regs = { .ce7_base_address = 0x00036000, .soc_reset_control_si0_rst_mask = 0x, .soc_reset_control_ce_rst_mask = 0x0001, - .soc_chip_id_address= 0x000f0, - .scratch_3_address = 0x0028, + .soc_chip_id_address= 0x00f0, + .scratch_3_address = 0x0028, + .fw_indicator_address = 0x9028, + .pcie_local_base_address= 0x0008, + .ce_wrap_intr_sum_host_msi_lsb = 0x0008, + .ce_wrap_intr_sum_host_msi_mask = 0xff00, + .pcie_intr_fw_mask = 0x0400, + .pcie_intr_ce_mask_all = 0x0007f800, + .pcie_intr_clr_address = 0x0014, }; const struct ath10k_hw_values qca988x_values = { diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index b218388..5d04317 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -164,6 +164,13 @@ struct ath10k_hw_regs { u32 soc_reset_control_ce_rst_mask; u32 soc_chip_id_address; u32 scratch_3_address; + u32 fw_indicator_address; + u32 pcie_local_base_address; + u32 ce_wrap_intr_sum_host_msi_lsb; + u32 ce_wrap_intr_sum_host_msi_mask; + u32 pcie_intr_fw_mask; + u32 pcie_intr_ce_mask_all; + u32 pcie_intr_clr_address; }; extern const struct ath10k_hw_regs qca988x_regs; @@ -386,7 +393,7 @@ enum ath10k_hw_rate_cck { #define CE7_BASE_ADDRESS ar-regs-ce7_base_address #define DBI_BASE_ADDRESS 0x0006 #define WLAN_ANALOG_INTF_PCIE_BASE_ADDRESS 0x0006c000 -#define PCIE_LOCAL_BASE_ADDRESS0x0008 +#define PCIE_LOCAL_BASE_ADDRESS ar-regs-pcie_local_base_address #define SOC_RESET_CONTROL_ADDRESS 0x #define SOC_RESET_CONTROL_OFFSET 0x @@ -460,7 +467,7 @@ enum ath10k_hw_rate_cck { #define CORE_CTRL_ADDRESS 0x #define PCIE_INTR_ENABLE_ADDRESS 0x0008 #define PCIE_INTR_CAUSE_ADDRESS0x000c -#define PCIE_INTR_CLR_ADDRESS 0x0014 +#define PCIE_INTR_CLR_ADDRESS ar-regs-pcie_intr_clr_address #define SCRATCH_3_ADDRESS
[PATCH 05/10] ath10k: Make target cpu address to CE address conversion chip specific
Make the helper converting target virtual address space to CE address space a target type specific to support QCA99X0. Also make this as function instead of macro. Signed-off-by: Vasanthakumar Thiagarajan vthia...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/pci.c | 25 ++--- drivers/net/wireless/ath/ath10k/pci.h | 12 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 980390a..422232c 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -743,6 +743,26 @@ static void ath10k_pci_rx_replenish_retry(unsigned long ptr) ath10k_pci_rx_post(ar); } +static u32 ath10k_pci_targ_cpu_to_ce_addr(struct ath10k *ar, u32 addr) +{ + u32 val = 0; + + switch (ar-hw_rev) { + case ATH10K_HW_QCA988X: + case ATH10K_HW_QCA6174: + val = (ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS + + CORE_CTRL_ADDRESS) + 0x7fff) 21; + break; + case ATH10K_HW_QCA99X0: + val = ath10k_pci_read32(ar, PCIE_BAR_REG_ADDRESS); + break; + } + + val |= 0x10 | (addr 0xf); + return val; +} + /* * Diagnostic read/write access is provided for startup/config/debug usage. * Caller must guarantee proper alignment, when applicable, and single user @@ -805,8 +825,7 @@ static int ath10k_pci_diag_read_mem(struct ath10k *ar, u32 address, void *data, * convert it from Target CPU virtual address space * to CE address space */ - address = TARG_CPU_SPACE_TO_CE_SPACE(ar, ar_pci-mem, -address); + address = ath10k_pci_targ_cpu_to_ce_addr(ar, address); ret = ath10k_ce_send_nolock(ce_diag, NULL, (u32)address, nbytes, 0, 0); @@ -964,7 +983,7 @@ static int ath10k_pci_diag_write_mem(struct ath10k *ar, u32 address, * to *CE address space */ - address = TARG_CPU_SPACE_TO_CE_SPACE(ar, ar_pci-mem, address); + address = ath10k_pci_targ_cpu_to_ce_addr(ar, address); remaining_bytes = orig_nbytes; ce_data = ce_data_base; diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h index d7696dd..67f8d07 100644 --- a/drivers/net/wireless/ath/ath10k/pci.h +++ b/drivers/net/wireless/ath/ath10k/pci.h @@ -236,18 +236,6 @@ static inline struct ath10k_pci *ath10k_pci_priv(struct ath10k *ar) #define CDC_WAR_MAGIC_STR 0xceef #define CDC_WAR_DATA_CE 4 -/* - * TODO: Should be a function call specific to each Target-type. - * This convoluted macro converts from Target CPU Virtual Address Space to CE - * Address Space. As part of this process, we conservatively fetch the current - * PCIE_BAR. MOST of the time, this should match the upper bits of PCI space - * for this device; but that's not guaranteed. - */ -#define TARG_CPU_SPACE_TO_CE_SPACE(ar, pci_addr, addr) \ - (((ath10k_pci_read32(ar, (SOC_CORE_BASE_ADDRESS | \ - CORE_CTRL_ADDRESS)) 0x7ff) 21) | \ -0x10 | ((addr) 0xf)) - /* Wait up to this many Ms for a Diagnostic Access CE operation to complete */ #define DIAG_ACCESS_CE_TIMEOUT_MS 10 -- 1.9.1 -- 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
[PATCH 04/10] ath10k: Copy Engine related changes for QCA99X0
QCA99X0 supports upto 12 Copy engines. Host and target CE configuration table is updated to support new copy engine pipes. This also fixes the assumption of diagnostic CE by making CE_7 as the one instead of CE_COUNT - 1. Signed-off-by: Vasanthakumar Thiagarajan vthia...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/ce.h | 2 +- drivers/net/wireless/ath/ath10k/hw.h | 3 ++ drivers/net/wireless/ath/ath10k/pci.c | 69 ++- 3 files changed, 71 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.h b/drivers/net/wireless/ath/ath10k/ce.h index 93939de..bb4b8f3 100644 --- a/drivers/net/wireless/ath/ath10k/ce.h +++ b/drivers/net/wireless/ath/ath10k/ce.h @@ -21,7 +21,7 @@ #include hif.h /* Maximum number of Copy Engine's supported */ -#define CE_COUNT_MAX 8 +#define CE_COUNT_MAX 12 #define CE_HTT_H2T_MSG_SRC_NENTRIES 4096 /* Descriptor rings must be aligned to this boundary */ diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 76caeab..5819659 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -343,6 +343,9 @@ enum ath10k_hw_rate_cck { #define TARGET_TLV_NUM_MSDU_DESC (1024 + 32) #define TARGET_TLV_NUM_WOW_PATTERNS22 +/* Diagnostic Window */ +#define CE_DIAG_PIPE 7 + #define NUM_TARGET_CE_CONFIG_WLAN ar-hw_values-num_target_ce_config_wlan /* Number of Copy Engines supported */ diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 190f7f3..980390a 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -156,6 +156,38 @@ static const struct ce_attr host_ce_config_wlan[] = { .src_sz_max = DIAG_TRANSFER_LIMIT, .dest_nentries = 2, }, + + /* CE8: target-host pktlog */ + { + .flags = CE_ATTR_FLAGS, + .src_nentries = 0, + .src_sz_max = 2048, + .dest_nentries = 128, + }, + + /* CE9 target autonomous qcache memcpy */ + { + .flags = CE_ATTR_FLAGS, + .src_nentries = 0, + .src_sz_max = 0, + .dest_nentries = 0, + }, + + /* CE10: target autonomous hif memcpy */ + { + .flags = CE_ATTR_FLAGS, + .src_nentries = 0, + .src_sz_max = 0, + .dest_nentries = 0, + }, + + /* CE11: target autonomous hif memcpy */ + { + .flags = CE_ATTR_FLAGS, + .src_nentries = 0, + .src_sz_max = 0, + .dest_nentries = 0, + }, }; /* Target firmware's Copy Engine configuration. */ @@ -233,6 +265,38 @@ static const struct ce_pipe_config target_ce_config_wlan[] = { }, /* CE7 used only by Host */ + { + .pipenum = __cpu_to_le32(7), + .pipedir = __cpu_to_le32(PIPEDIR_INOUT), + .nentries = __cpu_to_le32(0), + .nbytes_max = __cpu_to_le32(0), + .flags = __cpu_to_le32(0), + .reserved = __cpu_to_le32(0), + }, + + /* CE8 target-host packtlog */ + { + .pipenum = __cpu_to_le32(8), + .pipedir = __cpu_to_le32(PIPEDIR_IN), + .nentries = __cpu_to_le32(64), + .nbytes_max = __cpu_to_le32(2048), + .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR), + .reserved = __cpu_to_le32(0), + }, + + /* CE9 target autonomous qcache memcpy */ + { + .pipenum = __cpu_to_le32(9), + .pipedir = __cpu_to_le32(PIPEDIR_INOUT), + .nentries = __cpu_to_le32(32), + .nbytes_max = __cpu_to_le32(2048), + .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR), + .reserved = __cpu_to_le32(0), + }, + + /* It not necessary to send target wlan configuration for CE10 CE11 +* as these CEs are not actively used in target. +*/ }; /* @@ -1759,7 +1823,8 @@ static int ath10k_pci_init_config(struct ath10k *ar) ret = ath10k_pci_diag_write_mem(ar, pipe_cfg_targ_addr, target_ce_config_wlan, - sizeof(target_ce_config_wlan)); + sizeof(struct ce_pipe_config) * + NUM_TARGET_CE_CONFIG_WLAN); if (ret != 0) { ath10k_err(ar, Failed to write pipe cfg: %d\n, ret); @@ -1873,7 +1938,7 @@ static int ath10k_pci_alloc_pipes(struct ath10k *ar) } /* Last CE is Diagnostic Window */ - if (i == CE_COUNT - 1) { + if (i == CE_DIAG_PIPE) { ar_pci-ce_diag = pipe-ce_hdl; continue;
[PATCH 01/10] ath10k: Add a table to store hw specific values
This is to prepare ath10k to support newer chip set. Values like CE_COUNT, MSI_ASSIGN_CE_MAX and RTC_STATE_V_ON can be different for different chips. Signed-off-by: Vasanthakumar Thiagarajan vthia...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/core.c | 2 ++ drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/hw.c | 14 ++ drivers/net/wireless/ath/ath10k/hw.h | 18 +++--- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 59496a9..2a17664 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1470,9 +1470,11 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev, switch (hw_rev) { case ATH10K_HW_QCA988X: ar-regs = qca988x_regs; + ar-hw_values = qca988x_values; break; case ATH10K_HW_QCA6174: ar-regs = qca6174_regs; + ar-hw_values = qca6174_values; break; default: ath10k_err(ar, unsupported core hardware revision %d\n, diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 78094f2..ae92f64 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -560,6 +560,7 @@ struct ath10k { struct completion target_suspend; const struct ath10k_hw_regs *regs; + const struct ath10k_hw_values *hw_values; struct ath10k_bmi bmi; struct ath10k_wmi wmi; struct ath10k_htc htc; diff --git a/drivers/net/wireless/ath/ath10k/hw.c b/drivers/net/wireless/ath/ath10k/hw.c index 5997f00..48bcd2c 100644 --- a/drivers/net/wireless/ath/ath10k/hw.c +++ b/drivers/net/wireless/ath/ath10k/hw.c @@ -58,6 +58,20 @@ const struct ath10k_hw_regs qca6174_regs = { .scratch_3_address = 0x0028, }; +const struct ath10k_hw_values qca988x_values = { + .rtc_state_val_on = 3, + .ce_count = 8, + .msi_assign_ce_max = 7, + .num_target_ce_config_wlan = 7, +}; + +const struct ath10k_hw_values qca6174_values = { + .rtc_state_val_on = 3, + .ce_count = 8, + .msi_assign_ce_max = 7, + .num_target_ce_config_wlan = 7, +}; + void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey, u32 cc, u32 rcc, u32 cc_prev, u32 rcc_prev) { diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 85cca29..b218388 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -169,6 +169,16 @@ struct ath10k_hw_regs { extern const struct ath10k_hw_regs qca988x_regs; extern const struct ath10k_hw_regs qca6174_regs; +struct ath10k_hw_values { + u32 rtc_state_val_on; + u8 ce_count; + u8 msi_assign_ce_max; + u8 num_target_ce_config_wlan; +}; + +extern const struct ath10k_hw_values qca988x_values; +extern const struct ath10k_hw_values qca6174_values; + void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey, u32 cc, u32 rcc, u32 cc_prev, u32 rcc_prev); @@ -310,8 +320,10 @@ enum ath10k_hw_rate_cck { #define TARGET_TLV_NUM_MSDU_DESC (1024 + 32) #define TARGET_TLV_NUM_WOW_PATTERNS22 +#define NUM_TARGET_CE_CONFIG_WLAN ar-hw_values-num_target_ce_config_wlan + /* Number of Copy Engines supported */ -#define CE_COUNT 8 +#define CE_COUNT ar-hw_values-ce_count /* * Total number of PCIe MSI interrupts requested for all interrupt sources. @@ -335,10 +347,10 @@ enum ath10k_hw_rate_cck { /* MSIs for Copy Engines */ #define MSI_ASSIGN_CE_INITIAL 1 -#define MSI_ASSIGN_CE_MAX 7 +#define MSI_ASSIGN_CE_MAX ar-hw_values-msi_assign_ce_max /* as of IP3.7.1 */ -#define RTC_STATE_V_ON 3 +#define RTC_STATE_V_ON ar-hw_values-rtc_state_val_on #define RTC_STATE_COLD_RESET_MASK ar-regs-rtc_state_cold_reset_mask #define RTC_STATE_V_LSB0 -- 1.9.1 -- 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
[PATCH 2/8] ath10k: handle 10.4 firmware wmi swba event
10.4 firmware swba event payload has space to accommodate upto 512 client traffic indication info one p2p noa descriptor. It's is not matching with exiting swba event format defined for non 10.4 firmware. Non 10.4 firmware swba event format is designed to support only upto only 128 client and four p2p notice of absence descriptor. following changes are done in this patch to enable ath10k to handle 10.4 firmware swba event, - link generic ath10k_wmi_event_host_swba() to handle 10.4 swba event in 10.4 wmi rx handler. - add 10.4 specific swba event structure wmi_10_4_host_swba_event. - new function ath10k_wmi_10_4_op_pull_swba_ev() to parse 10.4 swba event. - increase tim_bitmap[] size in ath10k_vif to 64 to hold 512 station power save state. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/core.h | 4 +-- drivers/net/wireless/ath/ath10k/wmi.c | 61 ++ drivers/net/wireless/ath/ath10k/wmi.h | 41 +++ 3 files changed, 104 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 7c2ffb3..7721548 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -360,8 +360,8 @@ struct ath10k_vif { u32 uapsd; } sta; struct { - /* 127 stations; wmi limit */ - u8 tim_bitmap[16]; + /* 512 stations */ + u8 tim_bitmap[64]; u8 tim_len; u32 ssid_len; u8 ssid[IEEE80211_MAX_SSID_LEN]; diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 793d7c21..bbcc943 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2944,6 +2944,63 @@ static int ath10k_wmi_op_pull_swba_ev(struct ath10k *ar, struct sk_buff *skb, return 0; } +static int ath10k_wmi_10_4_op_pull_swba_ev(struct ath10k *ar, + struct sk_buff *skb, + struct wmi_swba_ev_arg *arg) +{ + struct wmi_10_4_host_swba_event *ev = (void *)skb-data; + u32 map, tim_len; + size_t i; + + if (skb-len sizeof(*ev)) + return -EPROTO; + + skb_pull(skb, sizeof(*ev)); + arg-vdev_map = ev-vdev_map; + + for (i = 0, map = __le32_to_cpu(ev-vdev_map); map; map = 1) { + if (!(map BIT(0))) + continue; + + /* If this happens there were some changes in firmware and +* ath10k should update the max size of tim_info array. +*/ + if (WARN_ON_ONCE(i == ARRAY_SIZE(arg-tim_info))) + break; + + if (__le32_to_cpu(ev-bcn_info[i].tim_info.tim_len) + sizeof(ev-bcn_info[i].tim_info.tim_bitmap)) { + ath10k_warn(ar, refusing to parse invalid swba structure\n); + return -EPROTO; + } + + tim_len = __le32_to_cpu(ev-bcn_info[i].tim_info.tim_len); + if (tim_len) { + /* Exclude 4 byte guard length */ + tim_len -= 4; + arg-tim_info[i].tim_len = __cpu_to_le32(tim_len); + } else { + arg-tim_info[i].tim_len = 0; + } + + arg-tim_info[i].tim_mcast = ev-bcn_info[i].tim_info.tim_mcast; + arg-tim_info[i].tim_bitmap = + ev-bcn_info[i].tim_info.tim_bitmap; + arg-tim_info[i].tim_changed = + ev-bcn_info[i].tim_info.tim_changed; + arg-tim_info[i].tim_num_ps_pending = + ev-bcn_info[i].tim_info.tim_num_ps_pending; + + /* 10.4 firmware doesn't have p2p support. notice of absence +* info can be ignored for now. +*/ + + i++; + } + + return 0; +} + void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb) { struct wmi_swba_ev_arg arg = {}; @@ -4278,6 +4335,9 @@ static void ath10k_wmi_10_4_op_rx(struct ath10k *ar, struct sk_buff *skb) case WMI_10_4_READY_EVENTID: ath10k_wmi_event_ready(ar, skb); break; + case WMI_10_4_HOST_SWBA_EVENTID: + ath10k_wmi_event_host_swba(ar, skb); + break; default: ath10k_warn(ar, Unknown eventid: %d\n, id); break; @@ -6209,6 +6269,7 @@ static const struct wmi_ops wmi_10_4_ops = { .rx = ath10k_wmi_10_4_op_rx, .map_svc = wmi_10_4_svc_map, .pull_mgmt_rx = ath10k_wmi_10_4_op_pull_mgmt_rx_ev, + .pull_swba =
[PATCH 3/8] ath10k: enable vdev and peer related operations for 10.4 fw
Most of existing vdev and peer related functions (vdev create, vdev delete, vdev start, peer create, peer delete, peer flush, etc) are reusable for 10.4 firmware. Link those general vdev and peer functions to 10.4 wmi function table. Existing general pktlog enable/disable, dbglog configuration functions are reusable for 10.4 and add them also in wmi function table. Also handle few wmi events (sevice rdy, echo, dbg msg, tbtt offset update, dbg print) in ath10k_wmi_10_4_op_rx(). wow event is not applicable in 10.4 firmware, have it under not implemented print. Signed-off-by: Raja Mani rm...@qti.qualcomm.com --- drivers/net/wireless/ath/ath10k/wmi.c | 62 +++ 1 file changed, 62 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index bbcc943..da21597 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -4332,12 +4332,40 @@ static void ath10k_wmi_10_4_op_rx(struct ath10k *ar, struct sk_buff *skb) ath10k_wmi_event_mgmt_rx(ar, skb); /* mgmt_rx() owns the skb now! */ return; + case WMI_10_4_ECHO_EVENTID: + ath10k_wmi_event_echo(ar, skb); + break; + case WMI_10_4_DEBUG_MESG_EVENTID: + ath10k_wmi_event_debug_mesg(ar, skb); + break; + case WMI_10_4_SERVICE_READY_EVENTID: + ath10k_wmi_event_service_ready(ar, skb); + break; case WMI_10_4_READY_EVENTID: ath10k_wmi_event_ready(ar, skb); break; + case WMI_10_4_PEER_STA_KICKOUT_EVENTID: + ath10k_wmi_event_peer_sta_kickout(ar, skb); + break; case WMI_10_4_HOST_SWBA_EVENTID: ath10k_wmi_event_host_swba(ar, skb); break; + case WMI_10_4_TBTTOFFSET_UPDATE_EVENTID: + ath10k_wmi_event_tbttoffset_update(ar, skb); + break; + case WMI_10_4_DEBUG_PRINT_EVENTID: + ath10k_wmi_event_debug_print(ar, skb); + break; + case WMI_10_4_VDEV_START_RESP_EVENTID: + ath10k_wmi_event_vdev_start_resp(ar, skb); + break; + case WMI_10_4_VDEV_STOPPED_EVENTID: + ath10k_wmi_event_vdev_stopped(ar, skb); + break; + case WMI_10_4_WOW_WAKEUP_HOST_EVENTID: + ath10k_dbg(ar, ATH10K_DBG_WMI, + received event id %d not implemented\n, id); + break; default: ath10k_warn(ar, Unknown eventid: %d\n, id); break; @@ -6269,10 +6297,44 @@ static const struct wmi_ops wmi_10_4_ops = { .rx = ath10k_wmi_10_4_op_rx, .map_svc = wmi_10_4_svc_map, .pull_mgmt_rx = ath10k_wmi_10_4_op_pull_mgmt_rx_ev, + .pull_vdev_start = ath10k_wmi_op_pull_vdev_start_ev, + .pull_peer_kick = ath10k_wmi_op_pull_peer_kick_ev, .pull_swba = ath10k_wmi_10_4_op_pull_swba_ev, .pull_svc_rdy = ath10k_wmi_main_op_pull_svc_rdy_ev, .pull_rdy = ath10k_wmi_op_pull_rdy_ev, + + .gen_pdev_suspend = ath10k_wmi_op_gen_pdev_suspend, + .gen_pdev_resume = ath10k_wmi_op_gen_pdev_resume, + .gen_pdev_set_rd = ath10k_wmi_10x_op_gen_pdev_set_rd, + .gen_pdev_set_param = ath10k_wmi_op_gen_pdev_set_param, .gen_init = ath10k_wmi_10_4_op_gen_init, + .gen_vdev_create = ath10k_wmi_op_gen_vdev_create, + .gen_vdev_delete = ath10k_wmi_op_gen_vdev_delete, + .gen_vdev_start = ath10k_wmi_op_gen_vdev_start, + .gen_vdev_stop = ath10k_wmi_op_gen_vdev_stop, + .gen_vdev_up = ath10k_wmi_op_gen_vdev_up, + .gen_vdev_down = ath10k_wmi_op_gen_vdev_down, + .gen_vdev_set_param = ath10k_wmi_op_gen_vdev_set_param, + .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key, + .gen_peer_create = ath10k_wmi_op_gen_peer_create, + .gen_peer_delete = ath10k_wmi_op_gen_peer_delete, + .gen_peer_flush = ath10k_wmi_op_gen_peer_flush, + .gen_peer_set_param = ath10k_wmi_op_gen_peer_set_param, + .gen_set_psmode = ath10k_wmi_op_gen_set_psmode, + .gen_set_sta_ps = ath10k_wmi_op_gen_set_sta_ps, + .gen_set_ap_ps = ath10k_wmi_op_gen_set_ap_ps, + .gen_scan_chan_list = ath10k_wmi_op_gen_scan_chan_list, + .gen_beacon_dma = ath10k_wmi_op_gen_beacon_dma, + .gen_pdev_set_wmm = ath10k_wmi_op_gen_pdev_set_wmm, + .gen_force_fw_hang = ath10k_wmi_op_gen_force_fw_hang, + .gen_mgmt_tx = ath10k_wmi_op_gen_mgmt_tx, + .gen_dbglog_cfg = ath10k_wmi_op_gen_dbglog_cfg, + .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, + .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, + .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, + + /* shared with 10.2 */ + .gen_peer_assoc = ath10k_wmi_10_2_op_gen_peer_assoc, }; int ath10k_wmi_attach(struct
[PATCH] wireless: ipw2100: fix timeout bug - always evaluated to 0
commit: commit 2c86c275015c (Add ipw2100 wireless driver.) introduced HW_PHY_OFF_LOOP_DELAY (HZ / 5000) which always evaluated to 0. Clarified by Stanislav Yakovlev stas.yakov...@gmail.com that it should be 50 milliseconds thus fixed up to msecs_to_jiffies(50). Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- Patch was compile tested with x86_64_defconfig + CONFIG_IPW2100=m (with a few buildwarnings in ipw2100.c though not related to this patch) Patch is against 4.1-rc7 (localversion-next is -next-20150615) drivers/net/wireless/ipw2x00/ipw2100.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 08eb229..36818c7 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c @@ -1410,7 +1410,7 @@ static int ipw2100_power_cycle_adapter(struct ipw2100_priv *priv) static int ipw2100_hw_phy_off(struct ipw2100_priv *priv) { -#define HW_PHY_OFF_LOOP_DELAY (HZ / 5000) +#define HW_PHY_OFF_LOOP_DELAY (msecs_to_jiffies(50)) struct host_command cmd = { .host_command = CARD_DISABLE_PHY_OFF, -- 1.7.10.4 -- 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
Re: [RFC] ath9k: advertise p2p dev support when chanctx
+ Jouni On 06/15/15 17:47, Sujith Manoharan wrote: Janusz Dziedzic wrote: At least the callbacks for adding/removing interfaces need to be handled ? Strange, but I didn't hit any problem yet with my simple patch. Ok. But I am not very familiar with how p2p-device is supposed to be used... The p2p-device is designed to be used for p2p discovery and p2p action frame exchange. It make it easier for driver and/or firmware to determine if user-space request is p2p related or not. However, in discussions with Jouni I got the impression that ath (or qca) firmware and/or drivers did not need this design. Not sure if that claim is unaffected by the use_chanctx=1 parameter. Regards, Arend Sujith -- 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 -- 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
Re: [1/7] brcmfmac: Check if firmware supports p2p
On 06/15/15 12:10, Kalle Valo wrote: From: Pontus Fuchspont...@broadcom.com Add a feature flag to reflect the firmware's p2p capability. Reviewed-by: Pieter-Paul Giesbertspiete...@broadcom.com Reviewed-by: Hante Meulemanmeule...@broadcom.com Reviewed-by: Arend Van Sprielar...@broadcom.com Signed-off-by: Pontus Fuchspont...@broadcom.com Signed-off-by: Arend van Sprielar...@broadcom.com Thanks, 7 patches applied to wireless-drivers-next.git: 2b560d7148eb brcmfmac: Check if firmware supports p2p 2e5f66fe9593 brcmfmac: Build wiphy mode and interface combinations dynamically 1f0dc59a6de9 brcmfmac: rework .get_station() callback 5768f31e4e75 brcmfmac: have sdio return -EIO when device communication is not possible f37d69a4babc brcmfmac: free ifp for non-netdev interface in p2p module 55479df8840d brcmfmac: move p2p attach/detach functions f7a40873d2fa brcmfmac: assure p2pdev is unregistered upon driver unload Hi Kalle, As it turns out two patches in this series introduced a new issue (I had one of those days :-( ). I have fixes for them. Should I send them now or can it wait until 4.2-rc1 has landed. Regards, Arend Kalle Valo -- 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
Re: [PATCH] wireless: ipw2100: fix timeout bug - always evaluated to 0
On 15 June 2015 at 21:24, Nicholas Mc Guire hof...@osadl.org wrote: commit: commit 2c86c275015c (Add ipw2100 wireless driver.) introduced HW_PHY_OFF_LOOP_DELAY (HZ / 5000) which always evaluated to 0. Clarified by Stanislav Yakovlev stas.yakov...@gmail.com that it should be 50 milliseconds thus fixed up to msecs_to_jiffies(50). Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- Patch was compile tested with x86_64_defconfig + CONFIG_IPW2100=m (with a few buildwarnings in ipw2100.c though not related to this patch) Patch is against 4.1-rc7 (localversion-next is -next-20150615) drivers/net/wireless/ipw2x00/ipw2100.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Stanislav Yakovlev stas.yakov...@gmail.com Stanislav. -- 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
Re: [BUG ?] delay always evaluates to 0
On Mon, 15 Jun 2015, Stanislav Yakovlev wrote: Hi Nicholas, On 12 June 2015 at 20:58, Nicholas Mc Guire der.h...@hofr.at wrote: Hi ! commit 2c86c275015c (Add ipw2100 wireless driver.) introduced drivers/net/wireless/ipw2100.c - line-numbers are from next-20150511 1410 static int ipw2100_hw_phy_off(struct ipw2100_priv *priv) 1411 { 1412 1413 #define HW_PHY_OFF_LOOP_DELAY (HZ / 5000) 1414 ... 1437 1438 schedule_timeout_uninterruptible(HW_PHY_OFF_LOOP_DELAY); 1439 } but (HZ / 5000) will evaluate to 0 for all configurable HZ values - typo ? and this schedule_timeout_uninterruptible() is probably not doing what is intended. Yes, you are right. This is a bug. I think it should be: -#define HW_PHY_OFF_LOOP_DELAY (HZ / 5000) +#define HW_PHY_OFF_LOOP_DELAY (msecs_to_jiffies(50)) Will you send us a patch? just sent it out - thanks! hofrat -- 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