Re: [ath9k-devel] [PATCH] ath9k: Fix basic connectivity issue
Vasanthakumar Thiagarajan vasa...@atheros.com writes: This patch temporarily fixes a regression introduced by BT coexistence support. There is an instability in connection when BT coexistence is enabled on some h/w. This interim fix introduces a module parameter for BT coexistence configuration. [...] +static int btcoex_enable; +module_param(btcoex_enable, bool, 0); +MODULE_PARM_DESC(btcoex_enable, Enable Bluetooth coexistence support); Somehow I guessed that this was coming :) I still think that a proper nl80211 interface for this is in order. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] ath9k module-Unable to set channel-since ath comes
Jouni Malinen jouni.mali...@atheros.com writes: On Tue, 2009-05-12 at 01:35 -0700, Davide Pesavento wrote: I've already reported ath9k's issues with PS multiple times [1] [2] [3], but the driver hasn't been fixed yet. You can find a verbose debugging output at [4], I hope that helps in fixing the problem (I can provide even more info if needed and I'm willing to test patches). I submitted a set of patches to resolve some of the PS issues in ath9k. I would expect these to hit wireless-testing.git eventually, but if you are willing to test the changes before that, you can find the patches from http://w1.fi/p/ps/ One thing to note here is that there are still some issues with the timeout=0 case (use of PS-Poll to fetch buffered frames) which is enabled with iwconfig wlan0 power on, so at this point, I would recommend running the test either with the default wireless-testing.git PS mode setting or by enabling power saving with iwconfig wlan0 power timeout 500ms which should result in the same configuration. Most probably that's because mac80211 does not disable power save mode when sending PS-Poll frames. So stlc45xx does not require disable of PSM but then again ath9k requires it, we need to solve this somehow. I have been thinking about separating power save mode and firmware wakeup/sleep modes from each other in mac80211 API. To me it looks like ath9k does more like firmware wakeup/sleep when power save mode is changing. But this is just a wild idea, I have no idea if it's practical or not. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
Luis R. Rodriguez lrodrig...@atheros.com writes: Devices with external radios have revisions which we can count on. On single chip solutions these EEPROM values for these radio revision also exist but are not meaningful as the radios are embedded onto the same chip. Each single-chip device evolves together as one device. Signed-off-by: Luis R. Rodriguez lrodrig...@atheros.com --- Changes hw_name to 60 bytes. Thanks, much better now. Another minor comment, sorry that I didn't notice it earlier: +void ath9k_hw_name(struct ath_hw *ah, char *hw_name) +{ + /* chipsets = AR9280 are single-chip */ + if (AR_SREV_9280_10_OR_LATER(ah)) { + sprintf(hw_name, + Atheros single-chip AR%s Rev:%x, + ath9k_hw_mac_bb_name(ah-hw_version.macVersion), + ah-hw_version.macRev); + } + else { + sprintf(hw_name, + Atheros AR%s MAC/BB Rev:%x AR%s RF Rev:%x: , + ath9k_hw_mac_bb_name(ah-hw_version.macVersion), + ah-hw_version.macRev, + ath9k_hw_rf_name((ah-hw_version.analog5GhzRev + AR_RADIO_SREV_MAJOR)), + ah-hw_version.phyRev); + } +} I think you should provide the size of hw_name to this function and use snprintf() to avoid writing out of bounds. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
Luis R. Rodriguez lrodrig...@atheros.com writes: I think you should provide the size of hw_name to this function and use snprintf() to avoid writing out of bounds. I was going to do this but since I know the users of it and control it seemed to not matter. I'll respin with this added, better to be careful. Yeah, you never know if someone (for example a crazy Finn just after a refreshing sauna) comes along, changes the function a bit to clean it up and creates a subtle bug ;) -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] ath9k ps poll performance
Satanand Burla satanand_bu...@phoenix.com writes: for example with the same wep AP, I get around 150 to 200 Kbps without enabling ps poll. That's very low. What kind of test are you using here? but if I enable ps poll with the above settings, I get only around 20 Kbps and the packet loss is around 20 to 30%. My question is, is this the expected speed drop when turning on ps poll ? Or is this a problem with the driver that still needs to be addressed ? With PS-Poll (ie. timeout is zero) you should still get in range of megabits per second and no packet loss. So something is wrong. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k: fix MGMT packets when using TKIP
Bill Jordan bjor...@rajant.com writes: Prevent 8 bytes from being truncated from MGMT packets when using TKIP. A bit more information in the commit log would be nice. Is this is a regression or an old bug? Maybe a stable candidate? -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k: rename ath9k_platform.h to ath_platform.h
Hi Sangwook, On 11/15/2011 01:23 PM, Sangwook Lee wrote: The patch series proposes to rename ath9k_platform.h to ath_platform.h This header file handles platform data used only for ath9k, but it can used by ath6k as well. We can take wl12xx.h as as a example. Please let us change this file name so that other Atheors WLANs use this file for their own platform data ath9k and ath6kl are very different devices, I'm not sure if sharing a platfrom struct between the two is really a good idea. Most likely there is very little the two drivers can share. What are your plans here? I myself was thinking that we would have include/linux/ath6kl.h dedicated just for ath6kl. That would makes things simpler. Kalle ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k: rename ath9k_platform.h to ath_platform.h
Hi Sangwook, On 11/16/2011 01:34 PM, Sangwook Lee wrote: On 15 November 2011 16:37, Kalle Valo kv...@adurom.com mailto:kv...@adurom.com wrote: Hi Sangwook, On 11/15/2011 01:23 PM, Sangwook Lee wrote: The patch series proposes to rename ath9k_platform.h to ath_platform.h This header file handles platform data used only for ath9k, but it can used by ath6k as well. We can take wl12xx.h as as a example. Please let us change this file name so that other Atheors WLANs use this file for their own platform data ath9k and ath6kl are very different devices, I'm not sure if sharing a platfrom struct between the two is really a good idea. Most likely there is very little the two drivers can share. What are your plans here? As you know, if ath6kl is not SDIO powered (in most of cases, including mine) we need to use platform struct in order to control reset/power line, because ath6k is designed for mobile and embedded devices. We have been actually planning to do the same, but it's still on our todo list. If you can do this it would be awesome. Also we need to provide some clock configuration from the board file and I'm sure there will be more in the future. But let's start with the power control. so I found out that there is already header file for ath9k's platform struct. How about using the one header file instead of include/linux/ath9k_platform.h , and include/linux/ath6k_platform.h ? I myself was thinking that we would have include/linux/ath6kl.h dedicated just for ath6kl. That would makes things simpler. But since I don't know much about ath9k, if you want to make the separate header file for ath6kl's own struct, It would be fine as well. Yeah, I really would like to use separate file for ath6kl. Kalle ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k: Improve ath_tx_aggr_stop to avoid TID stuck in cleanup state.
Nikolay Martynov mar.ko...@gmail.com writes: From: kolya mar.ko...@gmail.com Please use your full name here. When tx agg is being stopped TID is flushed using ath_tx_flush_tid. It is possible that ath_tx_flush_tid completelly flushes TID (if all packets in this TID have already been retried). If this happened ath_tx_aggr_stop would leave TID in cleanup state permanently. Fix this by making ath_tx_flush_tid remove AGGR_ADDBA_COMPLETE and AGGR_CLEANUP flags from TID status if TID is empty. And word wrap your commits to 72 chars or so. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [RFC] ath9k: validate for non-zero BSSID
Mohammed Shafi Shajakhan moham...@qca.qualcomm.com writes: unassociated state for station. but I observed this when i tested ad-hoc mode. I just started an ad-hoc mode creator and left it for some time with no one joining. i observed there are few frames in rx_tasklet of ath9k driver which seem to be beacons and their BSSID is '0', as our curbssid is also '0' they seem to be wrongly identified as 'my_beacons'. This is a perfect addition to the commit log. Remember that the commit log should especially answer the question why?. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath9k: Support ethtool getstats api.
Ben Greear gree...@candelatech.com writes: No, there is a check later that does a BUG_ON if our we have screwed up the indexing of the stats. Please, no BUG_ON() calls in wifi drivers. They just make users life miserable. WARN_ON() with a safe bailout is enough. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 4/6] ath9k: Only spectral scan relay file when it was created
Sven Eckelmann s...@narfation.org writes: The relay file depends on relayfs. Trying to close this file without having ATH9K_DEBUGFS (and therefore RELAY) activated causes build failures. Signed-off-by: Sven Eckelmann s...@narfation.org [...] +#ifdef CONFIG_ATH9K_DEBUGFS if (sc-rfs_chan_spec_scan) { relay_close(sc-rfs_chan_spec_scan); sc-rfs_chan_spec_scan = NULL; } +#endif Instead of ugly #ifdef you could do something like this: if (config_enabled(CONFIG_ATH6KL_REGDOMAIN) I think you could use that elsehwere in your patchset as well, but I didn't check that carefully. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] mac80211: regression: fd0f979 no long authenticates w/ath9k_htc
Corey Richardson co...@octayn.net writes: On Wed, Mar 6, 2013 at 7:02 AM, Johannes Berg johan...@sipsolutions.net wrote: Do you think you could run trace-cmd to capture what's going on before and after? What should I be recording? The NetworkManager process? I'm unfamiliar with ftrace. You should use trace-cmd. Something like this: trace-cmd record -e mac80211 -e cfg80211 And then send compressed trace.dat to Johannes. More info: http://wireless.kernel.org/en/developers/Documentation/mac80211/tracing -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/3] remaining ath10k_ prefixes for sub-modules
Bartosz Markowski bartosz.markow...@tieto.com writes: After this patch only core, mac and txrx files are not explicitly prefixed. And I think we can leave it like that for now. Bartosz Markowski (3): ath10k: add ath10k_ prefixes into wmi functions ath10k: add ath10k_ prefixes into htt_tx functions ath10k: add ath10k_ prefixes into htt_rx functions Thanks, all applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/4] small cleanups
Bartosz Markowski bartosz.markow...@tieto.com writes: Bartosz Markowski (4): ath10k: fix indentation ath10k: remove odd 'todo' comment ath10k: remove 'todo' comments ath10k: remove obsolete define Thanks, all four applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: split way to long line of code
Bartosz Markowski bartosz.markow...@tieto.com writes: split into functional blocks, to reduce almost 200 char line. Now it's easier to read both, the code and the logs produced. Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Now the debug log output is four lines, I don't think that's any better either. I'll split the output into two lines. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/2] ath10k: wmi_mgmt_rx setup band
Janusz Dziedzic janusz.dzied...@tieto.com writes: Setup band using wmi_event and phy_mode reported by FW/HW. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Both applied, thanks. But the commit logs don't still answer the question why?. Especially the change from user space point of view is important (if there are any). --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -240,6 +240,35 @@ static int wmi_event_scan(struct ath10k *ar, struct sk_buff *skb) return 0; } + +static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) I also removed the extra new line. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/2] ath10k: wmi_mgmt_rx setup band
Kalle Valo kv...@qca.qualcomm.com writes: Janusz Dziedzic janusz.dzied...@tieto.com writes: Setup band using wmi_event and phy_mode reported by FW/HW. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Both applied, thanks. Forgot to mention that there were conflicts with both patches. Please check that I didn't do anything stupid when fixing the conflicts. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/2] ath10k: don't defer mgmt_rx frames
Janusz Dziedzic janusz.dzied...@tieto.com writes: Don't defer mgmt_rx frames. Pass them immediately to mac80211 layer. Also this will prevent mixing context we will call ieee80211_rx()/ieee80211_tx_status(). Now this will be called from tasklet. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Thanks, both applied. Patch 1 had conflicts, I also did a minor change to that patch. Please check. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/5] ath10k: replace debug_mtx with conf_mutex
Michal Kazior michal.kaz...@tieto.com writes: It's not a good to have too many mutexes. The patch simplifies locking of debufs to use conf_mutex. Signed-off-by: Michal Kazior michal.kaz...@tieto.com [...] @@ -328,7 +328,7 @@ int ath10k_debug_create(struct ath10k *ar) return -ENOMEM; init_completion(ar-debug.event_stats_compl); - mutex_init(ar-debug.debug_mtx); + mutex_init(ar-conf_mutex); Can this be right? We already initialise conf_mutex in core.c. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/5] ath10k: cleanups
Michal Kazior michal.kaz...@tieto.com writes: Michal Kazior (5): ath10k: replace debug_mtx with conf_mutex ath10k: change wmi structure access ath10k: fix coding style ath10k: use ath10k_warn() instead of ath10k_info() ath10k: fix function prototype argument name When you resend can you also rebase the patches, please? Quite a lot of conflicts in wmi.c -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: improve FW QoS workaround
Michal Kazior michal.kaz...@tieto.com writes: This fixes two things: * recently broken AP mode, * a scenario when mac80211 requests us to send a non-QoS Data. The latter is done by upgrading non-QoS Data frame to QoS Data (we modify the frame_control). This is the only way we can work around this FW issue for now. Signed-off-by: Michal Kazior michal.kaz...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: fix double-prefixed functions
Bartosz Markowski bartosz.markow...@tieto.com writes: A few functions have been double-prefixed 'ath10k_ath10k_'. Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Ouch, apparently I was sloppy when reviewing patches :) Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/3] ath10k: pci memleak fix
Michal Kazior michal.kaz...@tieto.com writes: By looking at the code I spotted a possible memleak. I haven't observed it yet but it seems it could happen. This patchset addresses it. Patch #1 just removes code that is effectively a no-op. Patch #2 would touch the dead code. Michal Kazior (3): ath10k: drop dead code ath10k: make htc cancellation a generic thing ath10k: reorder pci shutdown sequences Skipping this as there's v2. (This is just for my own bookkeping :) -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2 0/5] ath10k: pci memleak fix
Michal Kazior michal.kaz...@tieto.com writes: The v2 fixes patch 2, and introduces new patches 4 and 5. There were two possible memleaks. Michal Kazior (5): ath10k: drop dead code ath10k: make HTC cancellation a generic thing ath10k: fix HTC tx flushing ath10k: reorder pci shutdown sequences ath10k: fix memory leak during PCI teardown Thanks, all five applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/6] various cleanup patches
Bartosz Markowski bartosz.markow...@tieto.com writes: Bartosz Markowski (6): ath10k: remove obsolete function prototype ath10k: fix typo in ath10k Kconfig ath10k: use if statement instead of cond. operator ath10k: remove pointless goto label ath10k: rename PCI target PS contol functions ath10k: remove fw event chain for target dump notification Thanks, all six applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2 0/5] ath10k: pci memleak fix
Kalle Valo kv...@qca.qualcomm.com writes: Michal Kazior michal.kaz...@tieto.com writes: The v2 fixes patch 2, and introduces new patches 4 and 5. There were two possible memleaks. Michal Kazior (5): ath10k: drop dead code ath10k: make HTC cancellation a generic thing ath10k: fix HTC tx flushing ath10k: reorder pci shutdown sequences ath10k: fix memory leak during PCI teardown Thanks, all five applied. I'm not sure, but I suspect this set added a new warning: drivers/net/wireless/ath/ath10k/htc.c:341:24: warning: unused variable skb_cb [-Wunused-variable] -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 2/7] ath10k: move suspend/resume exports to core.c file
Bartosz Markowski bartosz.markow...@tieto.com writes: --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -663,6 +663,31 @@ void ath10k_core_unregister(struct ath10k *ar) } EXPORT_SYMBOL(ath10k_core_unregister); +#if defined(CONFIG_PM_SLEEP) +int ath10k_pdev_suspend_target(struct ath10k *ar) { + int ret; + + ath10k_dbg(ATH10K_DBG_CORE, %s: called, __func__); + + ret = ath10k_wmi_pdev_suspend_target(ar); + + return ret; +} +EXPORT_SYMBOL(ath10k_pdev_suspend_target); + +int ath10k_pdev_resume_target(struct ath10k *ar) { + + int ret; + + ath10k_dbg(ATH10K_DBG_CORE, %s: called, __func__); + + ret = ath10k_wmi_pdev_resume_target(ar); + + return ret; +} +EXPORT_SYMBOL(ath10k_pdev_resume_target); Please rename them to ath10k_core_suspend() and _resume() or something like that. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 4/7] ath10k: reindent ath10k_pci_suspend
Bartosz Markowski bartosz.markow...@tieto.com writes: Also throw an error to PCI if WMI suspend command fails. Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Separate patches for reindent and the new error, please. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 5/7] ath10k: fix pointer casts in debug code
Bartosz Markowski bartosz.markow...@tieto.com writes: Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com --- drivers/net/wireless/ath/ath10k/core.h |2 -- drivers/net/wireless/ath/ath10k/debug.h |6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 00cf53a..c585a67 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -276,10 +276,8 @@ struct ath10k { void *wmi; } modules; -#if defined(CONFIG_PM_SLEEP) wait_queue_head_t event_queue; bool is_target_paused; -#endif I think this is leftovers from a previous patch. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/3] ath10k: kill CE_SEND_CB/CE_RECV_CB
Janusz Dziedzic janusz.dzied...@tieto.com writes: kill typedefs CE_SEND_CB/CE_RECV_CB Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Thanks, all three patches applied. Patch 2 had conflicts, please check I didn't break anything. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/7] ath10k: non-functional cleanups
Michal Kazior michal.kaz...@tieto.com writes: Michal Kazior (7): ath10k: fix code style ath10k: use if() instead of ternary operator ath10k: remove unnecessary void cast ath10k: kill WARN_ONs in htt_rx.c ath10k: use macros instead of if() for value range limiting ath10k: use ath10k_warn() instead of WARN() ath10k: remove old function prototype Thanks, all seven applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: add bmi_read32/bmi_write32 function
Michal Kazior michal.kaz...@tieto.com writes: On 18/04/13 10:08, Janusz Dziedzic wrote: Add ath10k_bmi_read32/ath10k_bmi_write32 functions and use them in core layer when read32/write32. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com --- drivers/net/wireless/ath/ath10k/bmi.h | 10 ++ drivers/net/wireless/ath/ath10k/core.c | 24 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/bmi.h b/drivers/net/wireless/ath/ath10k/bmi.h index e2bd70b..2035d5d 100644 --- a/drivers/net/wireless/ath/ath10k/bmi.h +++ b/drivers/net/wireless/ath/ath10k/bmi.h @@ -191,6 +191,16 @@ int ath10k_bmi_read_memory(struct ath10k *ar, u32 address, void *buffer, u32 length); int ath10k_bmi_write_memory(struct ath10k *ar, u32 address, const void *buffer, u32 length); +static inline int ath10k_bmi_read32(struct ath10k *ar, u32 address, +void *buffer) +{ +return ath10k_bmi_read_memory(ar, address, buffer, sizeof(u32)); +} +static inline int ath10k_bmi_write32(struct ath10k *ar, u32 address, + void *buffer) +{ +return ath10k_bmi_write_memory(ar, address, buffer, sizeof(u32)); +} I think these functions should do endianess converions so it is not necessary at call sites anymore. Also the buffer could be a u32* instead of a void* implicitly stating what the functions are meant to do. Yeah, the idea is that the wrappers simplify writing to registers instead of duplicating the same code in every register access. I think we can just follow what ath6kl does: #define ath6kl_bmi_write_hi32(ar, item, val)\ ({ \ u32 addr; \ __le32 v; \ \ addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item)); \ v = cpu_to_le32(val); \ ath6kl_bmi_write(ar, addr, (u8 *) v, sizeof(v)); \ }) #define ath6kl_bmi_read_hi32(ar, item, val) \ ({ \ u32 addr, *check_type = val;\ __le32 tmp; \ int ret;\ \ (void) (check_type == val); \ addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item)); \ ret = ath6kl_bmi_read(ar, addr, (u8 *) tmp, 4);\ *val = le32_to_cpu(tmp);\ ret;\ }) -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2 0/5] ath10k: pci memleak fix
Michal Kazior michal.kaz...@tieto.com writes: On 18/04/13 12:29, Kalle Valo wrote: Kalle Valo kv...@qca.qualcomm.com writes: Michal Kazior michal.kaz...@tieto.com writes: The v2 fixes patch 2, and introduces new patches 4 and 5. There were two possible memleaks. Michal Kazior (5): ath10k: drop dead code ath10k: make HTC cancellation a generic thing ath10k: fix HTC tx flushing ath10k: reorder pci shutdown sequences ath10k: fix memory leak during PCI teardown Thanks, all five applied. I'm not sure, but I suspect this set added a new warning: drivers/net/wireless/ath/ath10k/htc.c:341:24: warning: unused variable skb_cb [-Wunused-variable] Yes. My apologies. I must've missed that somehow. It was introduced by patch #2. No worries. Can you send a followup patch to fix that, please? -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/7] ath10k: htt tx cleanup
Michal Kazior michal.kaz...@tieto.com writes: My plan is to remove htt_tx_info wrapper. Before the wrapper can be actually killed off htt tx code needs a cleanup. The cleanup seems like a generally good idea as it merges and simplifies tx completion code. Awesome! This makes it so much easier to handle packets inside ath10k. Do we have any other per packet structs left in ath10k after your patches? Michal Kazior (7): ath10k: flatten htt_tx_info ath10k: share htc tx completion for data/mgmt tx ath10k: move htt completion handler up in the code ath10k: share a single htc tx completion for htt data/mgmt/conf tx I applied these four. ath10k: remove per-packet completion handling ath10k: remove `priv` from ath10k_skb_cb ath10k: share htt tx completion for data/mgmt tx These three I wasn't able to apply as there were conflicts which were not that simple to fix. Can you rebase there three and resend, please? -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: cleanup ath10k_bmi_fast_download()
Michal Kazior michal.kaz...@tieto.com writes: Signed-off-by: Michal Kazior michal.kaz...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/2] ath10k: kill vdev_mtx and use conf_mutex
Michal Kazior michal.kaz...@tieto.com writes: The vdev_mtx doesn't serve any purpose anymore. The locking should be done with conf_mutex (it was already, implicitly anyway). Signed-off-by: Michal Kazior michal.kaz...@tieto.com Patch 1 applied, but I have a question with patch 2. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 2/2] ath10k: refactor scan locking
Michal Kazior michal.kaz...@tieto.com writes: Since we have data_lock it is no longer necessary to have scan.lock. Signed-off-by: Michal Kazior michal.kaz...@tieto.com --- [...] ret = ath10k_wmi_stop_scan(ar, arg); if (ret) ath10k_warn(%s: ath10k_wmi_stop_scan failed (%d)\n, __func__, ret); + ath10k_wmi_flush_tx(ar); Is this by accident? -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2 0/5] ath10k: cleanups
Michal Kazior michal.kaz...@tieto.com writes: Rebased on top of latest master branch (https://github.com/kvalo/ath10k) Patch #1 updated. Michal Kazior (5): ath10k: replace debug_mtx with conf_mutex ath10k: change wmi structure access ath10k: fix coding style ath10k: use ath10k_warn() instead of ath10k_info() ath10k: fix function prototype argument name Thanks, all five applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: fix unused variable warning
Michal Kazior michal.kaz...@tieto.com writes: Signed-off-by: Michal Kazior michal.kaz...@tieto.com Thanks, applied. I just added the function name to the title. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 2/2] ath10k: refactor scan locking
Michal Kazior michal.kaz...@tieto.com writes: On 22/04/13 10:08, Kalle Valo wrote: Michal Kazior michal.kaz...@tieto.com writes: Since we have data_lock it is no longer necessary to have scan.lock. Signed-off-by: Michal Kazior michal.kaz...@tieto.com --- [...] ret = ath10k_wmi_stop_scan(ar, arg); if (ret) ath10k_warn(%s: ath10k_wmi_stop_scan failed (%d)\n, __func__, ret); + ath10k_wmi_flush_tx(ar); Is this by accident? Oh. I noticed we were missing it. Must've mixed it into the patch. Should I resend the patches split? Yes, please split patch 2. That makes it easier to bisect etc. And please note that I have already applied patch 1. But please wait an hour or two so that I have gone through my patch backlog. Less conflicts that way. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v3] ath10k: move suspend/resume exports to core.c file
Bartosz Markowski bartosz.markow...@tieto.com writes: Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Thanks, patch 1 applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2 0/7] various fixes
Bartosz Markowski bartosz.markow...@tieto.com writes: Fix since V1: * rename core suspend/resume functions * split reindentation and new error path * remove all excessive CONFIG_PM_SLEEP in one patch. Bartosz Markowski (7): ath10k: move suspend/resume exports to core.c file ath10k: remove excessive ifdef checks ath10k: fix pointer casts in debug code ath10k: shift extern variable where it belongs ath10k: remove unnecessary NULL check ath10k: reindent ath10k_pci_suspend ath10k: return error if suspend command fails Patch 1 not applied as you resent it separately. Patches 2-5 applied, but with conflicts. Please check Patches 6-7 not applied due to conflicts, please resend. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: simplify FW binary names
Bartosz Markowski bartosz.markow...@tieto.com writes: If we have a folder tree to store the fw files, there's no need to keep the names so complicated. Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: split ath10k_pci_target_ps_control
Bartosz Markowski bartosz.markow...@tieto.com writes: Divide the target_ps_control into 2 logical pieces: - ath10k_pci_wake - ath10k_pci_sleep Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Thanks, applied with conflicts. Please check. And I think we can change ath10k_target_ps to static now. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: fix QoS tx
Michal Kazior michal.kaz...@tieto.com writes: Since we have a silly FW workaround we must extract the tid *before* we apply the workaround. Otherwise we cut out QoS Control field containing the tid so it can't be accessed later on from inside the tx frame. Signed-off-by: Michal Kazior michal.kaz...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: fix HW version/revision names
Sujith Manoharan suj...@msujith.org writes: Michal Kazior wrote: static const struct ath10k_hw_params ath10k_hw_params_list[] = { { .id = AR9888_HW_1_0_VERSION, - .name = ar9888 rev1 (build 44), + .name = qca9880 hw1.0, Is it 9888 or is it 9880? Both actually. QCA9888 is the chip part for the computing cards and QCA9880 is for Access Points. Maybe we can have QCA988x. Yeah, qca988x is a good choise. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: move QCA9880_1.0 PCI-specific hacks to pci sub-module
Bartosz Markowski bartosz.markow...@tieto.com writes: Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2] ath10k: fix HW version/revision names
Bartosz Markowski bartosz.markow...@tieto.com writes: In this patch we change only the string values we print during hw_params initialization. Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/3] ath10k: remove per-packet completion handling
Michal Kazior michal.kaz...@tieto.com writes: Having a tx completion handler in the ath10k_skb_cb is very costly (memory wise). The saved space will be used to merge htt_tx_info. Signed-off-by: Michal Kazior michal.kaz...@tieto.com --- rebased on top of latest master Thanks, all three applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/3] ath10k: remove per-packet completion handling
Kalle Valo kv...@qca.qualcomm.com writes: Michal Kazior michal.kaz...@tieto.com writes: Having a tx completion handler in the ath10k_skb_cb is very costly (memory wise). The saved space will be used to merge htt_tx_info. Signed-off-by: Michal Kazior michal.kaz...@tieto.com --- rebased on top of latest master Thanks, all three applied. Oh, but there were conflicts. Please check extra carefully that I didn't break anything. Also the xx bytes left in ath10k_skb_cb is most likely wrong. BTW, I think we have to remove that comment in the future. It causes conflicts very easily. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/6] ath10k: cleanups
Michal Kazior michal.kaz...@tieto.com writes: Michal Kazior (6): ath10k: rename htt_struct ath10k: fix code style ath10k: fix code style of handling errors ath10k: fix code style a little ath10k: cleanup tx/rx mode handling ath10k: cleanup hw init-related code Sorry, but there are just too many conflicts for me to fix and three merge didn't work as the patches didn't have valid commit ids. Can you rebase, please? -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: split ath10k_pci_target_ps_control
Markowski Bartosz bartosz.markow...@tieto.com writes: On 22/04/13 10:50, bartosz.markow...@tieto.com wrote: -Original Message- From: Kalle Valo [mailto:kv...@qca.qualcomm.com] And I think we can change ath10k_target_ps to static now. Yes. I will send a patch-set with this and remaining rebases after you iterate over the list. hmm, seems like we actually can't make it static yet. The ath10k_pci_sleep/wake() are called from ce and pci code. Sorry, I don't understand how that prevents making the variable static. Just to be clear, I was thinking doing something like this: diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 4bba532..9c650df 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -33,7 +33,7 @@ #include ce.h #include pci.h -unsigned int ath10k_target_ps; +static unsigned int ath10k_target_ps; module_param(ath10k_target_ps, uint, 0644); MODULE_PARM_DESC(ath10k_target_ps, Enable ath10k Target (SoC) PS option); diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h index a3b5e88..e0ed0b0 100644 --- a/drivers/net/wireless/ath/ath10k/pci.h +++ b/drivers/net/wireless/ath/ath10k/pci.h @@ -353,8 +353,6 @@ static inline void WAR_CE_SRC_RING_WRITE_IDX_SET(struct ath10k *ar, } } -extern unsigned int ath10k_target_ps; - void ath10k_pci_wake(struct ath10k *ar); void ath10k_pci_sleep(struct ath10k *ar); ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/3] ath10k: htc cleanup
Michal Kazior michal.kaz...@tieto.com writes: Patch #1 is quite big, but I wanted to avoid sending like 15 patches. I can send an unsquashed patchset if need be. If my understanding is correct we should also rename htt and wmi structures and add ath10k_ prefix to them. If not, then we should probably drop this most of this patchset and add the prefix only to some selected structs. Michal Kazior (3): ath10k: add ath10k_ prefix to htc structs, defs, enums ath10k: merge htc-priv.h into htc.h ath10k: rename htc_tx_lock Thanks, applied. Patch 1 had conflicts, please check. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/2] rebase patch 6 and 7 from 'various fixes' patch-set
Bartosz Markowski bartosz.markow...@tieto.com writes: * [PATCH v2 6/7] ath10k: reindent ath10k_pci_suspend * [PATCH v2 7/7] ath10k: return error if suspend command fails Markowski Bartosz (2): ath10k: reindent ath10k_pci_suspend ath10k: return error if suspend command fails Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: add bmi_read32/bmi_write32 functions
Janusz Dziedzic janusz.dzied...@tieto.com writes: Add ath10k_bmi_read32/ath10k_bmi_write32 functions and use them in core layer when read32/write32. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Thanks, applied. But can you do a followup patch, please: + param_host = HTC_PROTOCOL_VERSION; + ret = ath10k_bmi_write32(ar, hi_app_host_interest, param_host); [...] + param_host = 0; /* We do all byte-swapping on the host */ - host_addr = host_interest_item_address(ar-target_type, -HI_ITEM(hi_be)); - ret = ath10k_bmi_write_memory(ar, host_addr, (u8 *)param_target, 4); + ret = ath10k_bmi_write32(ar, hi_be, param_host); [...] + param_host = 0; + ret = ath10k_bmi_write32(ar, hi_fw_swap, param_host); [...] + param_host = (board_ext_data_size 16) | 1; + ath10k_bmi_write32(ar, hi_board_ext_data_config, param_host); [...] + param_host = 1; + ath10k_bmi_write32(ar, hi_board_data_initialized, param_host); [...] + param_host = 7; + ath10k_bmi_write32(ar, hi_dbg_uart_txpin, param_host); + + param_host = 1; + ath10k_bmi_write32(ar, hi_serial_enable, param_host); [...] + param_host = 0; + ath10k_bmi_write32(ar, hi_serial_enable, param_host); In the cases above the use of param_host variable is not really needed. For example, in the last case you can simplify the code like this: ath10k_bmi_write32(ar, hi_serial_enable, 0); It's a lot more comfortable to read code like that. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: Fix PCI probe
Sujith Manoharan suj...@msujith.org writes: From: Sujith Manoharan c_man...@qca.qualcomm.com The target should always be woken up when the device is being probed and this shouldn't depend on the module parameter ath10k_target_ps, which is used to enable target PowerSave. Signed-off-by: Sujith Manoharan c_man...@qca.qualcomm.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: tag ath10k_target_ps as static
Bartosz Markowski bartosz.markow...@tieto.com writes: Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Thanks, applied with conflicts. Please check. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: tag ath10k_target_ps as static
Kalle Valo kv...@qca.qualcomm.com writes: Bartosz Markowski bartosz.markow...@tieto.com writes: Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Thanks, applied with conflicts. Please check. Actually, I was too hasty. I cannot apply this as after Sujith's ath10k: Fix PCI probe ath10k_target_ps needs to be extern again. So let's drop this patch for now. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [RFC] ath10k: kill regtable
Janusz Dziedzic janusz.dzied...@tieto.com writes: Remove register table abstraction layer. Use direct defines for ar988x. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Thanks, I applied this even if you sent it as RFC. I hope that's ok. But the commit log doesn't answer the question Why?. I know why, but rest of the community doesn't. I added a comment explaining that. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: ath10k_bmi_write32() calls cleanup
Janusz Dziedzic janusz.dzied...@tieto.com writes: Remove not needed param_host variable, simplify code. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/2] ath10k: scan fixes
Michal Kazior michal.kaz...@tieto.com writes: This is a result of a patch split. Michal Kazior (2): ath10k: sync wmi before starting scan timeout ath10k: refactor scan locking Thanks, both patches applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/2] ath10k: simplify txi lifespan
Michal Kazior michal.kaz...@tieto.com writes: Up until now we were using two booleans to keep track of htt and htc tx completions. These can come in no specific order. Keep in mind that it was safe to access those without any locks since tx completion processing is done one endpoint at a time (that's the current PCI backend implementation). The new approach uses refcount. Since we need 2 completions we setup refcount=2 for mgmt and data tx. This also depends on the tx completion behaviour. If the PCI tx completion scheme ever changes we'll need locking to synchronize tx completions for htt. Signed-off-by: Michal Kazior michal.kaz...@tieto.com Few comments, can you send a followup patch to address those separately, please? [...] int ath10k_htt_h2t_ver_req_msg(struct htt_struct *htt) @@ -315,6 +277,7 @@ int ath10k_htt_mgmt_tx(struct htt_struct *htt, struct sk_buff *msdu) skb_cb = ATH10K_SKB_CB(txi-txdesc); skb_cb-htt.msdu_id = txi-msdu_id; + skb_cb-htt.refcount = 2; res = ath10k_htc_send(htt-htc, htt-eid, txi-txdesc); if (res) @@ -436,6 +399,7 @@ int ath10k_htt_tx(struct htt_struct *htt, struct sk_buff *msdu) skb_cb = ATH10K_SKB_CB(txi-txdesc); skb_cb-htt.msdu_id = txi-msdu_id; + skb_cb-htt.refcount = 2; It would be good to have a comment in the code why refcount needs to be 2. I know you had it in the commit log already, but people go through commit logs only when they are really desparate :) [...] --- a/drivers/net/wireless/ath/ath10k/txrx.c +++ b/drivers/net/wireless/ath/ath10k/txrx.c @@ -44,22 +44,17 @@ out: spin_unlock_bh(ar-data_lock); } -void ath10k_txrx_tx_completed(struct htt_struct *htt, - const struct htt_tx_done *tx_done) +void ath10k_txrx_tx_unref(struct htt_struct *htt, struct htt_tx_info *txi) { struct device *dev = htt-ar-dev; struct ieee80211_tx_info *info; - struct htt_tx_info *txi; int ret; - ath10k_dbg(ATH10K_DBG_HTT, htt tx completion msdu_id %u discard %d no_ack %d\n, -tx_done-msdu_id, !!tx_done-discard, !!tx_done-no_ack); + if (ATH10K_SKB_CB(txi-txdesc)-htt.refcount == 0) + return; - txi = ath10k_htt_tx_info_lookup(htt, tx_done-msdu_id); - if (!txi) { - ath10k_dbg(ATH10K_DBG_HTT, htt txi lookup fail\n); + if (--ATH10K_SKB_CB(txi-txdesc)-htt.refcount 0) return; - } The 'if (--foo 0)' is correct but IMHO bad style. It's easy to miss the operator in front and that's why I would prefer: foo--; if (foo 0) ... -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/2] ath10k: kill off htt_tx_info wrapper
Michal Kazior michal.kaz...@tieto.com writes: This patchset merges the htt_tx_info into ath10k_skb_cb. This depends upon my 'htt tx cleanup' patchset. Michal Kazior (2): ath10k: simplify txi lifespan ath10k: merge htt_tx_info into ath10k_skb_cb Thanks, both patches applied. It's truly awesome that we can work directly with sk_buffs now. It's pain in the butt to deal with struct htc_packet, struct htt_tx_info and whatnot. Thank you very much for working on this. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: use config_enabled() for CONFIG_PM_SLEEP
Bartosz Markowski bartosz.markow...@tieto.com writes: Make use of config_enabled() check insted of raw #ifdef's within function bodies when checking CONFIG_PM_SLEEP option. Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com [...] @@ -72,10 +72,10 @@ static void ath10k_send_suspend_complete(struct ath10k *ar) { ath10k_dbg(ATH10K_DBG_CORE, %s\n, __func__); -#if defined(CONFIG_PM_SLEEP) - ar-is_target_paused = true; - wake_up(ar-event_queue); -#endif + if(config_enabled(CONFIG_PM_SLEEP)) { + ar-is_target_paused = true; + wake_up(ar-event_queue); + } [...] @@ -468,9 +468,9 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev, INIT_WORK(ar-offchan_tx_work, ath10k_offchan_tx_work); skb_queue_head_init(ar-offchan_tx_queue); -#if defined(CONFIG_PM_SLEEP) - init_waitqueue_head(ar-event_queue); -#endif + if (config_enabled(CONFIG_PM_SLEEP)) + init_waitqueue_head(ar-event_queue); + Do we really need config_enabled() here? To keep things simple what if we just remove the ifdefs and let that code run even if CONFIG_PM_SLEEP is disabled? The overhead from init_waitqueue_head() is meaningless and I doubt the wake_up() call makes any pratical difference either. Thoughts? -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/2] ath10k: wmi fixes
Michal Kazior michal.kaz...@tieto.com writes: Michal Kazior (2): ath10k: use skb_queue_purge() instead of custom loop ath10k: fix mgmt rx processing Thanks, both patches applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/3] ath10k: kill A_PCIE_LOCAL_REG_READ
Bartosz Markowski bartosz.markow...@tieto.com writes: Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com [...] -#define A_PCIE_LOCAL_REG_READ(mem, addr) \ - ioread32((mem) + PCIE_LOCAL_BASE_ADDRESS_T(ar) + (u32)(addr)) I think it would be better to convert this to a function and call it ath10k_pci_reg_read32() or something like that. And the same for the write function. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/3] ath10k: kill unnecessary macros
Bartosz Markowski bartosz.markow...@tieto.com writes: * use iowrite32/ioread32 directly * fix comment Bartosz Markowski (3): ath10k: kill A_PCIE_LOCAL_REG_READ ath10k: kill A_PCIE_LOCAL_REG_WRITE ath10k: fix comment to reflect time in mili-seconds Thanks. Patch 1-2 dropped, patch 3 applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/2] ath10k: WMI overhaul
Sujith Manoharan suj...@msujith.org writes: From: Sujith Manoharan c_man...@qca.qualcomm.com Sync with internal WMI changes. Signed-off-by: Sujith Manoharan c_man...@qca.qualcomm.com Thanks, both patches applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/3] ath10k: WMI API updates
Sujith Manoharan suj...@msujith.org writes: From: Sujith Manoharan c_man...@qca.qualcomm.com To sync with new FW. What version? -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 1/3] ath10k: WMI API updates
Sujith Manoharan suj...@msujith.org writes: Kalle Valo wrote: To sync with new FW. What version? I think with version .603. Please add the firmware version to the commit log and update SUPPORTED_FW_BUILD accordingly. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 3/3] ath10k: Initialize CW mode
Sujith Manoharan suj...@msujith.org writes: From: Sujith Manoharan c_man...@qca.qualcomm.com Set the channel width mode to static by default. Signed-off-by: Sujith Manoharan c_man...@qca.qualcomm.com Why? What's the change from user's point of view? (The patch is ok, the reasoning just needs to be documented.) -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 5/5] ath10k: copy ieee80211_supported_band for each instance
If we run multiple instances of ath10k the supported band structures were shared with all instances. This is wrong and would cause corruption. Fix it by making a private copy for each instance. I didn't copy the rate structure ath10k_rates as ath9k also doesn't copy it. Most likely nothing modifies that structure, but that needs to be verified. Signed-off-by: Kalle Valo kv...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/core.h |4 ++ drivers/net/wireless/ath/ath10k/mac.c | 63 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 42d9e72..c50ef59 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -322,6 +322,10 @@ struct ath10k { int vdev_id; } scan; + struct { + struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; + } mac; + /* should never be NULL; needed for regular htt rx */ struct ieee80211_channel __rcu *rx_channel; diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 8f58dda..20fba5d 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2429,7 +2429,7 @@ static const struct ieee80211_ops ath10k_ops = { .max_power = 30, \ } -static struct ieee80211_channel ath10k_2ghz_channels[] = { +static const struct ieee80211_channel ath10k_2ghz_channels[] = { CHAN2G(1, 2412, 0), CHAN2G(2, 2417, 0), CHAN2G(3, 2422, 0), @@ -2446,7 +2446,7 @@ static struct ieee80211_channel ath10k_2ghz_channels[] = { CHAN2G(14, 2484, 0), }; -static struct ieee80211_channel ath10k_5ghz_channels[] = { +static const struct ieee80211_channel ath10k_5ghz_channels[] = { CHAN5G(36, 5180, 14), CHAN5G(40, 5200, 15), CHAN5G(44, 5220, 16), @@ -2495,22 +2495,6 @@ static struct ieee80211_rate ath10k_rates[] = { #define ath10k_g_rates (ath10k_rates + 0) #define ath10k_g_rates_size (ARRAY_SIZE(ath10k_rates)) -static struct ieee80211_supported_band ath10k_band_2ghz = { - .n_channels = ARRAY_SIZE(ath10k_2ghz_channels), - .channels = ath10k_2ghz_channels, - .n_bitrates = ath10k_g_rates_size, - .bitrates = ath10k_g_rates, - /* .ht_cap depends on FW capabilities */ -}; - -static struct ieee80211_supported_band ath10k_band_5ghz = { - .n_channels = ARRAY_SIZE(ath10k_5ghz_channels), - .channels = ath10k_5ghz_channels, - .n_bitrates = ath10k_a_rates_size, - .bitrates = ath10k_a_rates, - /* .ht_cap depends on FW capabilities */ -}; - struct ath10k *ath10k_mac_create(void) { struct ieee80211_hw *hw; @@ -2652,7 +2636,9 @@ struct ath10k_vif *ath10k_get_arvif(struct ath10k *ar, u32 vdev_id) int ath10k_mac_register(struct ath10k *ar) { struct ath_common *common = ath10k_common(ar); + struct ieee80211_supported_band *band; struct ieee80211_sta_ht_cap ht_cap; + void *channels; int ret; SET_IEEE80211_PERM_ADDR(ar-hw, ar-mac_addr); @@ -2660,14 +2646,40 @@ int ath10k_mac_register(struct ath10k *ar) SET_IEEE80211_DEV(ar-hw, ar-dev); ht_cap = ath10k_get_ht_cap(ar); - ath10k_band_2ghz.ht_cap = ht_cap; - ath10k_band_5ghz.ht_cap = ht_cap; - if (ar-phy_capability WHAL_WLAN_11G_CAPABILITY) - ar-hw-wiphy-bands[IEEE80211_BAND_2GHZ] = ath10k_band_2ghz; + if (ar-phy_capability WHAL_WLAN_11G_CAPABILITY) { + channels = kmemdup(ath10k_2ghz_channels, + sizeof(ath10k_2ghz_channels), + GFP_KERNEL); + if (!channels) + return -ENOMEM; + + band = ar-mac.sbands[IEEE80211_BAND_2GHZ]; + band-n_channels = ARRAY_SIZE(ath10k_2ghz_channels); + band-channels = channels; + band-n_bitrates = ath10k_g_rates_size; + band-bitrates = ath10k_g_rates; + band-ht_cap = ht_cap; + ar-hw-wiphy-bands[IEEE80211_BAND_2GHZ] = band; + } - if (ar-phy_capability WHAL_WLAN_11A_CAPABILITY) - ar-hw-wiphy-bands[IEEE80211_BAND_5GHZ] = ath10k_band_5ghz; + + + if (ar-phy_capability WHAL_WLAN_11A_CAPABILITY) { + channels = kmemdup(ath10k_5ghz_channels, + sizeof(ath10k_5ghz_channels), + GFP_KERNEL); + if (!channels) + return -ENOMEM; + + band = ar-mac.sbands[IEEE80211_BAND_2GHZ]; + band-n_channels = ARRAY_SIZE(ath10k_5ghz_channels); + band-channels = channels; + band-n_bitrates = ath10k_a_rates_size; + band-bitrates = ath10k_a_rates; + band-ht_cap = ht_cap
[ath9k-devel] [PATCH 1/5] ath10k: make rx_legacy_rate_idx variable const
It's not modified in any way. Signed-off-by: Kalle Valo kv...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/txrx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c index 6a66dc2..239eff5 100644 --- a/drivers/net/wireless/ath/ath10k/txrx.c +++ b/drivers/net/wireless/ath/ath10k/txrx.c @@ -120,7 +120,7 @@ void ath10k_txrx_tx_completed(struct htt_struct *htt, ath10k_txrx_tx_unref(htt, txdesc); } -static u8 rx_legacy_rate_idx[] = { +static const u8 rx_legacy_rate_idx[] = { 3, /* 0x00 - 11Mbps */ 2, /* 0x01 - 5.5Mbps */ 1, /* 0x02 - 2Mbps */ ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 2/5] ath10k: make host_ce_config_wlan static variable const
Nothing modifies it. Signed-off-by: Kalle Valo kv...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/ce.c |8 drivers/net/wireless/ath/ath10k/ce.h |2 +- drivers/net/wireless/ath/ath10k/pci.c |8 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index d5351a3..d3aa515 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c @@ -703,7 +703,7 @@ void ath10k_ce_recv_cb_register(struct ce_state *ce_state, static int ath10k_ce_init_src_ring(struct ath10k *ar, unsigned int ce_id, struct ce_state *ce_state, - struct ce_attr *attr) + const struct ce_attr *attr) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); struct ce_ring_state *src_ring; @@ -795,7 +795,7 @@ static int ath10k_ce_init_src_ring(struct ath10k *ar, static int ath10k_ce_init_dest_ring(struct ath10k *ar, unsigned int ce_id, struct ce_state *ce_state, - struct ce_attr *attr) + const struct ce_attr *attr) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); struct ce_ring_state *dest_ring; @@ -877,7 +877,7 @@ static int ath10k_ce_init_dest_ring(struct ath10k *ar, static struct ce_state *ath10k_ce_init_state(struct ath10k *ar, unsigned int ce_id, - struct ce_attr *attr) + const struct ce_attr *attr) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); struct ce_state *ce_state = NULL; @@ -916,7 +916,7 @@ static struct ce_state *ath10k_ce_init_state(struct ath10k *ar, */ struct ce_state *ath10k_ce_init(struct ath10k *ar, unsigned int ce_id, - struct ce_attr *attr) + const struct ce_attr *attr) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); struct ce_state *ce_state; diff --git a/drivers/net/wireless/ath/ath10k/ce.h b/drivers/net/wireless/ath/ath10k/ce.h index 084b997..01879eb 100644 --- a/drivers/net/wireless/ath/ath10k/ce.h +++ b/drivers/net/wireless/ath/ath10k/ce.h @@ -275,7 +275,7 @@ int ath10k_ce_completed_send_next(struct ce_state *ce_state, /* Initialize an instance of a CE */ struct ce_state *ath10k_ce_init(struct ath10k *ar, unsigned int ce_id, - struct ce_attr *attr); + const struct ce_attr *attr); /*==CE Engine Shutdown===*/ /* diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 0d1523b..22a5451 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -52,7 +52,7 @@ static int ath10k_pci_post_recv_buffers(struct ath10k *ar); static int ath10k_pci_post_recv_buffers_pipe(struct hif_ce_pipe_info *pipe_info, int num); -static struct ce_attr host_ce_config_wlan[] = { +static const struct ce_attr host_ce_config_wlan[] = { /* host-target HTC control and raw streams */ { /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL,}, /* could be moved to share CE3 */ @@ -770,7 +770,7 @@ static void ath10k_pci_start_ce(struct ath10k *ar) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); struct ce_state *ce_diag = ar_pci-ce_diag; - struct ce_attr *attr; + const struct ce_attr *attr; struct hif_ce_pipe_info *pipe_info; struct hif_ce_completion_state *compl; int i, pipe_num, completions; @@ -1075,7 +1075,7 @@ static int ath10k_pci_post_recv_buffers(struct ath10k *ar) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); struct hif_ce_pipe_info *pipe_info; - struct ce_attr *attr; + const struct ce_attr *attr; int pipe_num, ret = 0; for (pipe_num = 0; pipe_num ar_pci-ce_count; pipe_num++) { @@ -1622,7 +1622,7 @@ static void ath10k_pci_ce_init(struct ath10k *ar) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); struct hif_ce_pipe_info *pipe_info; - struct ce_attr *attr; + const struct ce_attr *attr; int pipe_num; for (pipe_num = 0; pipe_num ar_pci-ce_count; pipe_num++) { ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 3/5] ath10k: make target_ce_config_wlan and target_service_to_ce_map_wlan const
Nothing modifies them. Signed-off-by: Kalle Valo kv...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/pci.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 22a5451..7a35234 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -74,7 +74,7 @@ static const struct ce_attr host_ce_config_wlan[] = { }; /* Target firmware's Copy Engine configuration. */ -static struct ce_pipe_config target_ce_config_wlan[] = { +static const struct ce_pipe_config target_ce_config_wlan[] = { /* host-target HTC control and raw streams */ { /* CE0 */ 0, PIPEDIR_OUT, 32, 256, CE_ATTR_FLAGS, 0,}, /* target-host HTT + HTC control */ @@ -1358,7 +1358,7 @@ static void ath10k_pci_bmi_recv_data(struct ce_state *ce_state, * This table is derived from the CE_PCI TABLE, above. * It is passed to the Target at startup for use by firmware. */ -static struct service_to_pipe target_service_to_ce_map_wlan[] = { +static const struct service_to_pipe target_service_to_ce_map_wlan[] = { { ATH10K_HTC_SVC_ID_WMI_DATA_VO, PIPEDIR_OUT, /* out = UL = host - target */ ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 0/5] ath10k: making static variables const
Did some review of static variables and noticed that we had quite a few variables which were not const. Please review carefully, I might have missed something. --- Kalle Valo (5): ath10k: make rx_legacy_rate_idx variable const ath10k: make host_ce_config_wlan static variable const ath10k: make target_ce_config_wlan and target_service_to_ce_map_wlan const ath10k: make iee80211 iface combination structures static ath10k: copy ieee80211_supported_band for each instance drivers/net/wireless/ath/ath10k/ce.c |8 ++-- drivers/net/wireless/ath/ath10k/ce.h |2 - drivers/net/wireless/ath/ath10k/core.h |4 ++ drivers/net/wireless/ath/ath10k/mac.c | 67 drivers/net/wireless/ath/ath10k/pci.c | 12 +++--- drivers/net/wireless/ath/ath10k/txrx.c |2 - 6 files changed, 57 insertions(+), 38 deletions(-) ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 4/5] ath10k: make iee80211 iface combination structures static
Nothing modifies them. Signed-off-by: Kalle Valo kv...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/mac.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 60855fb..8f58dda 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2531,7 +2531,7 @@ void ath10k_mac_destroy(struct ath10k *ar) ieee80211_free_hw(ar-hw); } -static struct ieee80211_iface_limit ath10k_if_limits[] = { +static const struct ieee80211_iface_limit ath10k_if_limits[] = { { .max= 8, .types = BIT(NL80211_IFTYPE_STATION) @@ -2541,7 +2541,7 @@ static struct ieee80211_iface_limit ath10k_if_limits[] = { } }; -static struct ieee80211_iface_combination ath10k_if_comb = { +static const struct ieee80211_iface_combination ath10k_if_comb = { .limits = ath10k_if_limits, .n_limits = ARRAY_SIZE(ath10k_if_limits), .max_interfaces = 8, ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 4/5] ath10k: make iee80211 iface combination structures static
Michal Kazior michal.kaz...@tieto.com writes: On 24/04/13 08:37, Kalle Valo wrote: Nothing modifies them. I think the title should be s/static/const/ Yup, I fixed that in my branch. Thanks for review. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: kill ar9888def.h file
Janusz Dziedzic janusz.dzied...@tieto.com writes: Move ar9888 definitions to hw.h file. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups
Michal Kazior michal.kaz...@tieto.com writes: Rebased on the tip of master branch. Michal Kazior (6): ath10k: rename htt_struct ath10k: fix code style ath10k: fix code style of handling errors ath10k: fix code style a little ath10k: cleanup tx/rx mode handling ath10k: cleanup hw init-related code Thanks, applied. Patch 6 had conflicts, please check. BTW, 3-way merge didn't work: Applying: ath10k: cleanup hw init-related code fatal: sha1 information is lacking or useless (drivers/net/wireless/ath/ath10k/hw.h). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0006 ath10k: cleanup hw init-related code Are you sure you don't have any custom patches as parent of the patchset you are submitting? Or do you submit patches somehow differently? The thing is that I really would like the patches have proper sha1 information. It makes my life so much easier. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/3] ath10k: cleanup - respin
Bartosz Markowski bartosz.markow...@tieto.com writes: Couple of updated patches. Bartosz Markowski (3): ath10k: remove excessive CONFIG_PM_SLEEP checks ath10k: kill PCIE_LOCAL_REG_READ/WRITE macros ath10k: update supported firmware tag to .599 Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/3] ath10k: PCI cleanups
Bartosz Markowski bartosz.markow...@tieto.com writes: Bartosz Markowski (3): ath10k: update FIXME comments ath10k: rename WAR_CE_SRC_RING_WRITE_IDX_SET ath10k: replace TARGET_READ/WRITE macros with inline funcitons Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/7] ath10k: more cleanup
Bartosz Markowski bartosz.markow...@tieto.com writes: Bartosz Markowski (7): ath10k: Print more elgant HW name/version ath10k: shift ath10k_generic_iter structure to mac header ath10k: kill HIF_TYPE_AR9888 ath10k: shift REG_DUMP_COUNT_AR9888 to pci block ath10k: move DIAG_TRANSFER_LIMIT to pci block ath10k: remove leftover prototypes ath10k: rename ath10k_pci_wait_for_target_to_awake Thanks, applied. Patch 4 had conflicts but git took care of that. But there's a new warning now: drivers/net/wireless/ath/ath10k/pci.c: In function 'ath10k_pci_probe': drivers/net/wireless/ath/ath10k/pci.c:2150:6: warning: unused variable 'hif_type' [-Wunused-variable] -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2 0/6] ath10k: cleanups
Michal Kazior michal.kaz...@tieto.com writes: On 24/04/13 12:35, Kalle Valo wrote: Michal Kazior michal.kaz...@tieto.com writes: Rebased on the tip of master branch. Michal Kazior (6): ath10k: rename htt_struct ath10k: fix code style ath10k: fix code style of handling errors ath10k: fix code style a little ath10k: cleanup tx/rx mode handling ath10k: cleanup hw init-related code Thanks, applied. Patch 6 had conflicts, please check. Patch 6 is incomplete. I'll send a follow up patch to fix it. Our emails crossed. I already pushed a patch to fix my error. Sorry about that. BTW, 3-way merge didn't work: Applying: ath10k: cleanup hw init-related code fatal: sha1 information is lacking or useless (drivers/net/wireless/ath/ath10k/hw.h). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0006 ath10k: cleanup hw init-related code Are you sure you don't have any custom patches as parent of the patchset you are submitting? Or do you submit patches somehow differently? I try to send patchsets rebased upon github master branch. Some patchsets have subtle dependencies between each other and I didn't rebase those (since there would be conflicts anyways). I'll rebase everything from now on. Yeah, even if you know patches conflict it's still a lot easier for me to handle the conflicts with 3-way merge than have useless sha1 informwation. 3-way merge is so good. Of course in some cases depending on uncommitted patches is justified, but even when it would be better to plan beforehand. For example, we could freeze the tree, or something like that, just to avoid conflicts. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/5] ath10k: making static variables const
Kalle Valo kv...@qca.qualcomm.com writes: Did some review of static variables and noticed that we had quite a few variables which were not const. Please review carefully, I might have missed something. --- Kalle Valo (5): ath10k: make rx_legacy_rate_idx variable const ath10k: make host_ce_config_wlan static variable const ath10k: make target_ce_config_wlan and target_service_to_ce_map_wlan const ath10k: make iee80211 iface combination structures static ath10k: copy ieee80211_supported_band for each instance Applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: kill static int max_delay
Janusz Dziedzic janusz.dzied...@tieto.com writes: Kill static variable max_delay. Move this to struct ath10k_pci. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com --- drivers/net/wireless/ath/ath10k/pci.c |5 ++--- drivers/net/wireless/ath/ath10k/pci.h |2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 0d1523b..9ee678a 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -445,7 +445,6 @@ void ath10k_do_pci_wake(struct ath10k *ar) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); void __iomem *pci_addr = ar_pci-mem; - static int max_delay; int tot_delay = 0; int curr_delay = 5; @@ -475,8 +474,8 @@ void ath10k_do_pci_wake(struct ath10k *ar) curr_delay += 5; } - if (tot_delay max_delay) - max_delay = tot_delay; + if (tot_delay ar_pci-max_delay) + ar_pci-max_delay = tot_delay; } But do we use this max_delay value for anything sensible? The way I see it we only store values but don't do anything with it. Unless I'm missing something, of course. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/2] ath10k: htt fixes
Michal Kazior michal.kaz...@tieto.com writes: This one addresses a rare memory leak when FW hangs leaving some HTT tx transactions unfinished. Michal Kazior (2): ath10k: clear pending_tx[] upon tx completion ath10k: cleanup htt pending tx Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 0/5] ath10k: checkpatch fixes 20130424
Few checkpatch fixes. --- Kalle Valo (5): ath10k: cosmetic checkpatch fixes to bmi.h, hw.h and txrx.h ath10k: shorten lines in ath10k_debug_read_target_stats() ath10k: fix checkpatch warnings from bmi.c, debug.c, htc.h and pci.h ath10k: fix checkpatch warnings in ce.h, core.c, htc.c, htt_tx.c and txrx.c ath10k: fix some checkpatch warnings in htt_rx.c and ce.c drivers/net/wireless/ath/ath10k/bmi.c|7 +- drivers/net/wireless/ath/ath10k/bmi.h|2 - drivers/net/wireless/ath/ath10k/ce.c | 32 +--- drivers/net/wireless/ath/ath10k/ce.h |4 + drivers/net/wireless/ath/ath10k/core.c | 12 ++- drivers/net/wireless/ath/ath10k/debug.c | 15 +++- drivers/net/wireless/ath/ath10k/debug.h | 117 -- drivers/net/wireless/ath/ath10k/htc.c| 45 ++-- drivers/net/wireless/ath/ath10k/htc.h| 27 --- drivers/net/wireless/ath/ath10k/htt_rx.c | 27 +-- drivers/net/wireless/ath/ath10k/htt_tx.c | 46 +++- drivers/net/wireless/ath/ath10k/hw.h |7 +- drivers/net/wireless/ath/ath10k/pci.h| 25 -- drivers/net/wireless/ath/ath10k/txrx.c |3 + drivers/net/wireless/ath/ath10k/txrx.h |6 +- drivers/net/wireless/ath/ath10k/wmi.h|2 - 16 files changed, 215 insertions(+), 162 deletions(-) -- Signature ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 1/5] ath10k: cosmetic checkpatch fixes to bmi.h, hw.h and txrx.h
Signed-off-by: Kalle Valo kv...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/bmi.h |2 +- drivers/net/wireless/ath/ath10k/hw.h |7 +++ drivers/net/wireless/ath/ath10k/txrx.h |6 -- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/bmi.h b/drivers/net/wireless/ath/ath10k/bmi.h index f431589..d94cbfe 100644 --- a/drivers/net/wireless/ath/ath10k/bmi.h +++ b/drivers/net/wireless/ath/ath10k/bmi.h @@ -206,7 +206,7 @@ int ath10k_bmi_write_memory(struct ath10k *ar, u32 address, }) #define ath10k_bmi_write32(ar, item, val) \ - ({ \ + ({ \ int ret;\ u32 address;\ __le32 v = __cpu_to_le32(val); \ diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 2e6fed9..646386a 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -71,7 +71,7 @@ enum ath10k_mcast2ucast_mode { #define TARGET_NUM_PEERS 16 #define TARGET_NUM_OFFLOAD_PEERS 0 #define TARGET_NUM_PEER_KEYS 2 -#define TARGET_NUM_TIDS(2 * ((TARGET_NUM_PEERS) + (TARGET_NUM_VDEVS))) +#define TARGET_NUM_TIDS(2 * ((TARGET_NUM_PEERS) + (TARGET_NUM_VDEVS))) #define TARGET_TX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2)) #define TARGET_RX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2)) #define TARGET_RX_TIMEOUT_LO_PRI 100 @@ -223,7 +223,7 @@ enum ath10k_mcast2ucast_mode { #define SCRATCH_3_ADDRESS 0x0030 /* Firmware indications to the Host via SCRATCH_3 register. */ -#define FW_INDICATOR_ADDRESS (SOC_CORE_BASE_ADDRESS + SCRATCH_3_ADDRESS) +#define FW_INDICATOR_ADDRESS (SOC_CORE_BASE_ADDRESS + SCRATCH_3_ADDRESS) #define FW_IND_EVENT_PENDING 1 #define FW_IND_INITIALIZED 2 @@ -303,7 +303,6 @@ enum ath10k_mcast2ucast_mode { #define MY_TARGET_BOARD_DATA_SZAR9888_BOARD_DATA_SZ #define MY_TARGET_BOARD_EXT_DATA_SZAR9888_BOARD_EXT_DATA_SZ -#define RTC_STATE_V_GET(x) \ - (((x) RTC_STATE_V_MASK) RTC_STATE_V_LSB) +#define RTC_STATE_V_GET(x) (((x) RTC_STATE_V_MASK) RTC_STATE_V_LSB) #endif /* _HW_H_ */ diff --git a/drivers/net/wireless/ath/ath10k/txrx.h b/drivers/net/wireless/ath/ath10k/txrx.h index 8d08c4f..72afb20 100644 --- a/drivers/net/wireless/ath/ath10k/txrx.h +++ b/drivers/net/wireless/ath/ath10k/txrx.h @@ -26,8 +26,10 @@ void ath10k_process_rx(struct ath10k *ar, struct htt_rx_info *info); struct ath10k_peer *ath10k_peer_find(struct ath10k *ar, int vdev_id, const u8 *addr); -int ath10k_wait_for_peer_created(struct ath10k *ar, int vdev_id, const u8 *addr); -int ath10k_wait_for_peer_deleted(struct ath10k *ar, int vdev_id, const u8 *addr); +int ath10k_wait_for_peer_created(struct ath10k *ar, int vdev_id, +const u8 *addr); +int ath10k_wait_for_peer_deleted(struct ath10k *ar, int vdev_id, +const u8 *addr); void ath10k_peer_map_event(struct ath10k_htt *htt, struct htt_peer_map_event *ev); ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 2/5] ath10k: shorten lines in ath10k_debug_read_target_stats()
This makes checkpatch a happy boy. No functional changes. Signed-off-by: Kalle Valo kv...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/debug.h | 117 +-- drivers/net/wireless/ath/ath10k/wmi.h |2 - 2 files changed, 65 insertions(+), 54 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h index 3ae598a..960e07a 100644 --- a/drivers/net/wireless/ath/ath10k/debug.h +++ b/drivers/net/wireless/ath/ath10k/debug.h @@ -57,66 +57,74 @@ static inline void ath10k_debug_read_target_stats(struct ath10k *ar, struct wmi_stats_event *ev) { u8 *tmp = ev-data; - struct ath10k_target_stats *fw_stats; + struct ath10k_target_stats *stats; int num_pdev_stats, num_vdev_stats, num_peer_stats; + struct wmi_pdev_stats *ps; int i; mutex_lock(ar-conf_mutex); - fw_stats = ar-debug.target_stats; + stats = ar-debug.target_stats; num_pdev_stats = __le32_to_cpu(ev-num_pdev_stats); /* 0 or 1 */ num_vdev_stats = __le32_to_cpu(ev-num_vdev_stats); /* 0 or max vdevs */ num_peer_stats = __le32_to_cpu(ev-num_peer_stats); /* 0 or max peers */ if (num_pdev_stats) { - struct wmi_pdev_stats *pdev_stats = (struct wmi_pdev_stats *)tmp; - - fw_stats-ch_noise_floor = __le32_to_cpu(pdev_stats-chan_nf); - fw_stats-tx_frame_count = __le32_to_cpu(pdev_stats-tx_frame_count); - fw_stats-rx_frame_count = __le32_to_cpu(pdev_stats-rx_frame_count); - fw_stats-rx_clear_count = __le32_to_cpu(pdev_stats-rx_clear_count); - fw_stats-cycle_count = __le32_to_cpu(pdev_stats-cycle_count); - fw_stats-phy_err_count = __le32_to_cpu(pdev_stats-phy_err_count); - fw_stats-chan_tx_power = __le32_to_cpu(pdev_stats-chan_tx_pwr); - - fw_stats-comp_queued = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.comp_queued); - fw_stats-comp_delivered = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.comp_delivered); - fw_stats-msdu_enqued = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.msdu_enqued); - fw_stats-mpdu_enqued = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.mpdu_enqued); - fw_stats-wmm_drop = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.wmm_drop); - fw_stats-local_enqued = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.local_enqued); - fw_stats-local_freed = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.local_freed); - fw_stats-hw_queued = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.hw_queued); - fw_stats-hw_reaped = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.hw_reaped); - fw_stats-underrun = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.underrun); - fw_stats-tx_abort = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.tx_abort); - fw_stats-mpdus_requed = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.mpdus_requed); - fw_stats-tx_ko = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.tx_ko); - fw_stats-data_rc = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.data_rc); - fw_stats-self_triggers = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.self_triggers); - fw_stats-sw_retry_failure = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.sw_retry_failure); - fw_stats-illgl_rate_phy_err = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.illgl_rate_phy_err); - fw_stats-pdev_cont_xretry = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.pdev_cont_xretry); - fw_stats-pdev_tx_timeout = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.pdev_tx_timeout); - fw_stats-pdev_resets = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.pdev_resets); - fw_stats-phy_underrun = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.phy_underrun); - fw_stats-txop_ovf = __le32_to_cpu(pdev_stats-wal_pdev_stats.tx.txop_ovf); - - fw_stats-mid_ppdu_route_change = __le32_to_cpu(pdev_stats-wal_pdev_stats.rx.mid_ppdu_route_change); - fw_stats-status_rcvd = __le32_to_cpu(pdev_stats-wal_pdev_stats.rx.status_rcvd); - fw_stats-r0_frags = __le32_to_cpu(pdev_stats-wal_pdev_stats.rx.r0_frags); - fw_stats-r1_frags = __le32_to_cpu(pdev_stats-wal_pdev_stats.rx.r1_frags); - fw_stats-r2_frags = __le32_to_cpu(pdev_stats-wal_pdev_stats.rx.r2_frags); - fw_stats-r3_frags = __le32_to_cpu(pdev_stats-wal_pdev_stats.rx.r3_frags); - fw_stats-htt_msdus = __le32_to_cpu(pdev_stats-wal_pdev_stats.rx.htt_msdus); - fw_stats-htt_mpdus = __le32_to_cpu(pdev_stats-wal_pdev_stats.rx.htt_mpdus); - fw_stats-loc_msdus = __le32_to_cpu(pdev_stats-wal_pdev_stats.rx.loc_msdus); - fw_stats-loc_mpdus
[ath9k-devel] [PATCH 3/5] ath10k: fix checkpatch warnings from bmi.c, debug.c, htc.h and pci.h
Signed-off-by: Kalle Valo kv...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/bmi.c |7 --- drivers/net/wireless/ath/ath10k/debug.c | 15 ++- drivers/net/wireless/ath/ath10k/htc.h | 27 ++- drivers/net/wireless/ath/ath10k/pci.h | 25 - 4 files changed, 44 insertions(+), 30 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/bmi.c b/drivers/net/wireless/ath/ath10k/bmi.c index 85bf366..5dc4b14 100644 --- a/drivers/net/wireless/ath/ath10k/bmi.c +++ b/drivers/net/wireless/ath/ath10k/bmi.c @@ -68,7 +68,7 @@ int ath10k_bmi_get_target_info(struct ath10k *ar, if (resplen sizeof(resp.get_target_info)) { ath10k_warn(invalid get_target_info response length (%d)\n, - resplen); + resplen); return -EIO; } @@ -102,7 +102,8 @@ int ath10k_bmi_read_memory(struct ath10k *ar, cmd.read_mem.addr = __cpu_to_le32(address); cmd.read_mem.len = __cpu_to_le32(rxlen); - ret = ath10k_hif_exchange_bmi_msg(ar, cmd, cmdlen, resp, rxlen); + ret = ath10k_hif_exchange_bmi_msg(ar, cmd, cmdlen, + resp, rxlen); if (ret) { ath10k_warn(unable to read from the device\n); return ret; @@ -192,7 +193,7 @@ int ath10k_bmi_execute(struct ath10k *ar, u32 address, u32 *param) if (resplen sizeof(resp.execute)) { ath10k_warn(invalid execute response length (%d)\n, - resplen); + resplen); return ret; } diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 7e6b7034..3357917 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -236,9 +236,11 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf, len += scnprintf(buf + len, buf_len - len, %30s %10d\n, Sched self tiggers, fw_stats-self_triggers); len += scnprintf(buf + len, buf_len - len, %30s %10d\n, -Dropped due to SW retries, fw_stats-sw_retry_failure); +Dropped due to SW retries, +fw_stats-sw_retry_failure); len += scnprintf(buf + len, buf_len - len, %30s %10d\n, -Illegal rate phy errors, fw_stats-illgl_rate_phy_err); +Illegal rate phy errors, +fw_stats-illgl_rate_phy_err); len += scnprintf(buf + len, buf_len - len, %30s %10d\n, Pdev continous xretry, fw_stats-pdev_cont_xretry); len += scnprintf(buf + len, buf_len - len, %30s %10d\n, @@ -257,7 +259,8 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf, =); len += scnprintf(buf + len, buf_len - len, %30s %10d\n, -Mid PPDU route change, fw_stats-mid_ppdu_route_change); +Mid PPDU route change, +fw_stats-mid_ppdu_route_change); len += scnprintf(buf + len, buf_len - len, %30s %10d\n, Tot. number of statuses, fw_stats-status_rcvd); len += scnprintf(buf + len, buf_len - len, %30s %10d\n, @@ -293,11 +296,13 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf, for (i = 0; i fw_stats-peers; i++) { len += scnprintf(buf + len, buf_len - len, %30s %pM\n, -Peer MAC address, fw_stats-peer_stat[i].peer_macaddr); +Peer MAC address, +fw_stats-peer_stat[i].peer_macaddr); len += scnprintf(buf + len, buf_len - len, %30s %u\n, Peer RSSI, fw_stats-peer_stat[i].peer_rssi); len += scnprintf(buf + len, buf_len - len, %30s %u\n, -Peer TX rate, fw_stats-peer_stat[i].peer_tx_rate); +Peer TX rate, +fw_stats-peer_stat[i].peer_tx_rate); len += scnprintf(buf + len, buf_len - len, \n); } diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h index a9619e6..3d03019 100644 --- a/drivers/net/wireless/ath/ath10k/htc.h +++ b/drivers/net/wireless/ath/ath10k/htc.h @@ -234,23 +234,23 @@ enum ath10k_htc_svc_gid { enum ath10k_htc_svc_id { /* NOTE: service ID of 0x is reserved and should never be used */ - ATH10K_HTC_SVC_ID_RESERVED = 0x, - ATH10K_HTC_SVC_ID_UNUSED= ATH10K_HTC_SVC_ID_RESERVED, + ATH10K_HTC_SVC_ID_RESERVED
[ath9k-devel] [PATCH 4/5] ath10k: fix checkpatch warnings in ce.h, core.c, htc.c, htt_tx.c and txrx.c
Signed-off-by: Kalle Valo kv...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/ce.h |4 +-- drivers/net/wireless/ath/ath10k/core.c | 12 +--- drivers/net/wireless/ath/ath10k/htc.c| 45 - drivers/net/wireless/ath/ath10k/htt_tx.c | 46 +- drivers/net/wireless/ath/ath10k/txrx.c |3 +- 5 files changed, 62 insertions(+), 48 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.h b/drivers/net/wireless/ath/ath10k/ce.h index 110532f..4558630 100644 --- a/drivers/net/wireless/ath/ath10k/ce.h +++ b/drivers/net/wireless/ath/ath10k/ce.h @@ -193,7 +193,7 @@ int ath10k_ce_send(struct ce_state *ce_state, void ath10k_ce_send_cb_register(struct ce_state *ce_state, void (*send_cb) (struct ce_state *ce_state, -void *per_transfer_send_context, +void *transfer_context, u32 buffer, unsigned int nbytes, unsigned int transfer_id), @@ -240,7 +240,7 @@ int ath10k_ce_recv_buf_enqueue(struct ce_state *ce_state, void ath10k_ce_recv_cb_register(struct ce_state *ce_state, void (*recv_cb) (struct ce_state *ce_state, -void *per_transfer_recv_context, +void *transfer_context, u32 buffer, unsigned int nbytes, unsigned int transfer_id, diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 4ff500c..ed2c94f 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -132,7 +132,8 @@ static int ath10k_init_configure_target(struct ath10k *ar) int ret; /* tell target which HTC version it is used*/ - ret = ath10k_bmi_write32(ar, hi_app_host_interest, HTC_PROTOCOL_VERSION); + ret = ath10k_bmi_write32(ar, hi_app_host_interest, +HTC_PROTOCOL_VERSION); if (ret) { ath10k_err(settings HTC version failed\n); return ret; @@ -285,7 +286,8 @@ static int ath10k_init_transfer_bin_file(struct ath10k *ar, } /* -* Record the fact that extended board Data IS initialized +* Record the fact that extended board Data IS +* initialized */ ath10k_bmi_write32(ar, hi_board_ext_data_config, (board_ext_data_size 16) | 1); @@ -602,7 +604,8 @@ void ath10k_core_unregister(struct ath10k *ar) } EXPORT_SYMBOL(ath10k_core_unregister); -int ath10k_core_target_suspend(struct ath10k *ar) { +int ath10k_core_target_suspend(struct ath10k *ar) +{ int ret; ath10k_dbg(ATH10K_DBG_CORE, %s: called, __func__); @@ -613,7 +616,8 @@ int ath10k_core_target_suspend(struct ath10k *ar) { } EXPORT_SYMBOL(ath10k_core_target_suspend); -int ath10k_core_target_resume(struct ath10k *ar) { +int ath10k_core_target_resume(struct ath10k *ar) +{ int ret; diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index f2a9e63..56a06b0 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -132,7 +132,8 @@ static bool ath10k_htc_ep_need_credit_update(struct ath10k_htc_ep *ep) if (ep-tx_credits = ep-tx_credits_per_max_message) return false; - ath10k_dbg(ATH10K_DBG_HTC, HTC: endpoint %d needs credit update\n, ep-eid); + ath10k_dbg(ATH10K_DBG_HTC, HTC: endpoint %d needs credit update\n, + ep-eid); return true; } @@ -249,7 +250,8 @@ static struct sk_buff *ath10k_htc_get_skb_credit_based(struct ath10k_htc *htc, /* shouldn't happen, but print a warning just in case */ if (credits_required = 1 (8*sizeof(skb_cb-htc.credits_used))) - ath10k_warn(credits_required value overflow (%d)\n, credits_required); + ath10k_warn(credits_required value overflow (%d)\n, + credits_required); skb_cb-htc.credits_used = credits_required; return skb; @@ -524,7 +526,7 @@ static int ath10k_htc_rx_completion_handler(struct ath10k *ar, if (payload_len + sizeof(*hdr) ATH10K_HTC_MAX_LEN) { ath10k_warn(HTC rx frame too long, len: %zu\n, - payload_len + sizeof(*hdr)); + payload_len + sizeof(*hdr)); ath10k_dbg_dump(ATH10K_DBG_HTC, htc
[ath9k-devel] [PATCH 5/5] ath10k: fix some checkpatch warnings in htt_rx.c and ce.c
Signed-off-by: Kalle Valo kv...@qca.qualcomm.com --- drivers/net/wireless/ath/ath10k/ce.c | 32 +- drivers/net/wireless/ath/ath10k/htt_rx.c | 27 + 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index 969f24d..454025e 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c @@ -552,7 +552,8 @@ void ath10k_ce_per_engine_service(struct ath10k *ar, unsigned int ce_id) buf, nbytes, id, flags) == 0) { spin_unlock_bh(ar_pci-ce_lock); - ce_state-recv_cb(ce_state, transfer_context, buf, nbytes, id, flags); + ce_state-recv_cb(ce_state, transfer_context, buf, + nbytes, id, flags); spin_lock_bh(ar_pci-ce_lock); } } @@ -568,7 +569,8 @@ void ath10k_ce_per_engine_service(struct ath10k *ar, unsigned int ce_id) nbytes, id) == 0) { spin_unlock_bh(ar_pci-ce_lock); - ce_state-send_cb(ce_state, transfer_context, buf, nbytes, id); + ce_state-send_cb(ce_state, transfer_context, + buf, nbytes, id); spin_lock_bh(ar_pci-ce_lock); } } @@ -626,7 +628,8 @@ static void ath10k_ce_per_engine_handler_adjust(struct ce_state *ce_state, ath10k_pci_wake(ar); - if ((!disable_copy_compl_intr) (ce_state-send_cb || ce_state-recv_cb)) + if ((!disable_copy_compl_intr) + (ce_state-send_cb || ce_state-recv_cb)) CE_COPY_COMPLETE_INTR_ENABLE(ar, ctrl_addr); else CE_COPY_COMPLETE_INTR_DISABLE(ar, ctrl_addr); @@ -845,7 +848,8 @@ static int ath10k_ce_init_dest_ring(struct ath10k *ar, } ath10k_pci_wake(ar); - CE_DEST_RING_BASE_ADDR_SET(ar, ctrl_addr, dest_ring-base_addr_ce_space); + CE_DEST_RING_BASE_ADDR_SET(ar, ctrl_addr, + dest_ring-base_addr_ce_space); CE_DEST_RING_SZ_SET(ar, ctrl_addr, nentries); CE_DEST_RING_BYTE_SWAP_SET(ar, ctrl_addr, 0); CE_DEST_RING_LOWMARK_SET(ar, ctrl_addr, 0); @@ -943,21 +947,21 @@ void ath10k_ce_deinit(struct ce_state *ce_state) if (ce_state-src_ring) { kfree(ce_state-src_ring-shadow_base_unaligned); pci_free_consistent(ar_pci-pdev, - (ce_state-src_ring-nentries * - sizeof(struct ce_desc) + - CE_DESC_RING_ALIGN), - ce_state-src_ring-base_addr_owner_space, - ce_state-src_ring-base_addr_ce_space); + (ce_state-src_ring-nentries * +sizeof(struct ce_desc) + +CE_DESC_RING_ALIGN), + ce_state-src_ring-base_addr_owner_space, + ce_state-src_ring-base_addr_ce_space); kfree(ce_state-src_ring); } if (ce_state-dest_ring) { pci_free_consistent(ar_pci-pdev, - (ce_state-dest_ring-nentries * - sizeof(struct ce_desc) + - CE_DESC_RING_ALIGN), - ce_state-dest_ring-base_addr_owner_space, - ce_state-dest_ring-base_addr_ce_space); + (ce_state-dest_ring-nentries * +sizeof(struct ce_desc) + +CE_DESC_RING_ALIGN), + ce_state-dest_ring-base_addr_owner_space, + ce_state-dest_ring-base_addr_ce_space); kfree(ce_state-dest_ring); } kfree(ce_state); diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 8c018ab..e88b031 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -126,7 +126,9 @@ static void ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num) } if (!IS_ALIGNED((unsigned long)skb-data, HTT_RX_DESC_ALIGN)) - skb_pull(skb, PTR_ALIGN(skb-data, HTT_RX_DESC_ALIGN) - skb-data); + skb_pull(skb, +PTR_ALIGN(skb-data, HTT_RX_DESC_ALIGN
Re: [ath9k-devel] [PATCH] ath10k: fix supported band setup
Michal Kazior michal.kaz...@tieto.com writes: This fixes a crash and a possible memleak. Signed-off-by: Michal Kazior michal.kaz...@tieto.com Damn, I broke this. Sorry about it. Applied, thank you for fixing my bug! -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: Handle P2P_GO NOA notification FW 599+
Janusz Dziedzic janusz.dzied...@tieto.com writes: In FW 599+ NOA structure was changed. So we have to change this in case of using newest firmware. Signed-off-by: Janusz Dziedzic janusz.dzied...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2 1/3] ath10k: WMI API updates
Sujith Manoharan suj...@msujith.org writes: Sujith Manoharan wrote: From: Sujith Manoharan c_man...@qca.qualcomm.com To sync with new FW ver .614 A rebased patch below. (Also, http://msujith.org/patches/wl/Apr-24-2013/0005-ath10k-WMI-API-updates.patch). Sujith [PATCH] ath10k: WMI API updates To sync with new FW ver .614 Signed-off-by: Sujith Manoharan c_man...@qca.qualcomm.com Thanks, I applied this rebased version of patch 1as well as patch 2 and 3 from the original patchset. But in the future, when rebasing please just resend the complete patchset. It's much more reliable that way. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [RFC 0/2] ath10k: fix qos workaround
Hi Michal, Michal Kazior michal.kaz...@tieto.com writes: On 24/04/13 12:53, Sujith Manoharan wrote: Michal Kazior wrote: From what I've observed so far is frames in monitor mode (non promiscuous) are corrupted. They have the QoS Control stripped, with LLC header finding itself in the QoS Control. Wireshark shows such packets as A-MSDU corrupted frames. I tried restoring the QoS Control but it didn't fix that. I don't understand. Why should pure monitor mode care about the TX path ? This is not concerned with the pure (I hope we don't have a misunderstanding here) monitor mode. You can create monitor vif when associated and you might want to listen to the traffic *without* going into the promiscuous mode (no monitor vdev is created). It simply passes raw 802.11 frames that pass through mac80211 (both tx and rx) on other interfaces (i.e. associated station interface). From prioritising point of view I consider that mode as a very low priority feature. For me most important is to support the real monitor mode (iw wlan0 set type monitor), anything else is just nice to have. I haven't even looked at your patches, but I'm worried that if a very low priority feature jeopardizes normal functionality. What if we just don't support the monitor mode while associated feature? Can we do that? Disclaimer: I haven't looked at your patches -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: fix compilation warning
Bartosz Markowski bartosz.markow...@tieto.com writes: In function ‘ath10k_pci_probe’: /wireless-testing/drivers/net/wireless/ath/ath10k/pci.c:2150: warning: unused variable ‘hif_type’ Signed-off-by: Bartosz Markowski bartosz.markow...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH v2] ath10k: kill static int max_delay
Janusz Dziedzic janusz.dzied...@tieto.com writes: Kill not used max_delay variable Signed-off-by: Janusz Dziedzic janusz.dzie...@tieto.com Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel