Re: [PATCH v6 2/6] wl12xx: use frequency instead of enumerations for pdata clocks
Arnd Bergmann writes: > On Sunday 15 March 2015 10:43:35 Eliad Peller wrote: >> >> > The other option would be to have the whole series in a immutable >> > branch against v3.0-rc1 that can be merged into both wirelss tree >> > and omap tree. >> > >> i think that could be easier. >> >> or maybe you can just take them all through the omap tree? the wlcore >> tree is not under active development, so i don't expect conflicts >> there. > > I'm fine with both these approaches. I prefer these going through the omap tree. Like Eliad said, drivers/net/wireless/ti does not get that many changes nowadays so the chances of this patchset conflicting with something is very small. -- Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [4.0] ath9k: disable TPC support again (for now)
> TPC support has been observed to cause some tx power fluctuations on > some devices with at least AR934x and AR938x chips. > Disable it for now until the bugs have been found and fixed > > Signed-off-by: Felix Fietkau Thanks, applied to wireless-drivers.git. Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [4.0] ath9k: fix tracking of enabled AP beacons
> sc->nbcnvifs tracks assigned beacon slots, not enabled beacons. > Therefore, it cannot be used to decide if cur_conf->enable_beacon (bool) > should be updated, or if beacons have been enabled already. > With the current code (depending on the order of calls), beacons often > do not get enabled in an AP+STA setup. > To fix tracking of enabled beacons, convert cur_conf->enable_beacon to a > bitmask of enabled beacon slots. > > Cc: sta...@vger.kernel.org > Signed-off-by: Felix Fietkau Thanks, applied to wireless-drivers.git. Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] wil6210: NAPI completion refactor
Vladimir Kondratiev writes: > On Sunday, March 15, 2015 04:00:15 PM Vladimir Kondratiev wrote: >> t is expected that driver completes NAPI when less than >> full budget is consumed. >> >> Fulfill this requirement. >> >> Signed-off-by: Vladimir Kondratiev >> > Please ignore, old patch, sent by mistake. Ok, I dropped the three old patches from my queue. -- Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ath9k_htc: check seq number instead of cmd id for timeout
On 15/03/2015 14:48, Oleksij Rempel wrote: > thank you for your patch. Looks good for me. Did you tested it? Yes. Working all right for two days. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Broadcom 43340
Hi On 2015-03-15, Jürgen Bausa wrote: > Arend van Spriel writes: > > On 03/14/15 23:13, Ochal Christophe wrote: [...] > would be nice, if you could make it clear. > > I am in the exact some position (asus x205 with linux 4.0 rc3) but my > /sys/firmware/efi/efivars/ is empty. I am running debian jessie with a > kernel taken from ubuntu. Am I missing something? Even loading efivars via > modprobe doesnt change a thing. You need to have efivarfs mounted, which Debian/jessie and systemd should do by default (it certainly does, at least when booted in UEFI mode - you probably won't have access to it in BIOS CSM mode): $ grep efivarfs /proc/mounts efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0 If it isn't for some weird reason, you'll have to mount it by hand. # mount -t efivarfs -o rw,nosuid,nodev,noexec,relatime efivarfs /sys/firmware/efi/efivars Regards Stefan Lippers-Hollmann -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Broadcom 43340
On 03/15/15 21:38, Jürgen Bausa wrote: Arend van Spriel writes: On 03/14/15 23:13, Ochal Christophe wrote: All, On 03/14/2015 09:39 PM, Stefan Lippers-Hollmann wrote: You don't need to run windows for that, the nvram (calibration data, probably the MAC address and related device specific data) is stored in your mainboard's firmware - and exposed to userspace (under linux) via /sys/firmware/efi/efivars/. You just need to identify the correct file and copy it to a place where linux expects to find it (/lib/firmware/brcm/brcmfmac43340-sdio.txt). Regards Stefan Lippers-Hollmann Thanks for the hint, that did it, I'm online! Apparently my hint was not clear enough. Good to hear it works for you. Dear Arend, would be nice, if you could make it clear. I am in the exact some position (asus x205 with linux 4.0 rc3) but my /sys/firmware/efi/efivars/ is empty. I am running debian jessie with a kernel taken from ubuntu. Am I missing something? Even loading efivars via modprobe doesnt change a thing. Maybe you need to mount it. This is what I found [1]: $ sudo mount -t efivarfs none /sys/firmware/efi/efivars Regards, Arend [1] http://firmware.intel.com/blog/accessing-uefi-variables-linux Juergen -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Broadcom 43340
Arend van Spriel writes: > > On 03/14/15 23:13, Ochal Christophe wrote: > > All, > > > > On 03/14/2015 09:39 PM, Stefan Lippers-Hollmann wrote: > >> You don't need to run windows for that, the nvram (calibration data, > >> probably the MAC address and related device specific data) is stored > >> in your mainboard's firmware - and exposed to userspace (under linux) > >> via /sys/firmware/efi/efivars/. You just need to identify the correct > >> file and copy it to a place where linux expects to find it > >> (/lib/firmware/brcm/brcmfmac43340-sdio.txt). Regards Stefan > >> Lippers-Hollmann > > > > Thanks for the hint, that did it, I'm online! > > Apparently my hint was not clear enough. Good to hear it works for you. > Dear Arend, would be nice, if you could make it clear. I am in the exact some position (asus x205 with linux 4.0 rc3) but my /sys/firmware/efi/efivars/ is empty. I am running debian jessie with a kernel taken from ubuntu. Am I missing something? Even loading efivars via modprobe doesnt change a thing. Juergen -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] mac80211: add an intermediate software queue implementation
This allows drivers to request per-vif and per-sta-tid queues from which they can pull frames. This makes it easier to keep the hardware queues short, and to improve fairness between clients and vifs. The task of scheduling packet transmission is left up to the driver - queueing is controlled by mac80211. Drivers can only dequeue packets by calling ieee80211_tx_dequeue. This makes it possible to add active queue management later without changing drivers using this code. This can also be used as a starting point to implement A-MSDU aggregation in a way that does not add artificially induced latency. Signed-off-by: Felix Fietkau --- include/net/mac80211.h | 77 ++ net/mac80211/driver-ops.h | 17 ++ net/mac80211/ieee80211_i.h | 14 net/mac80211/iface.c | 26 +++ net/mac80211/main.c| 3 ++ net/mac80211/rx.c | 15 + net/mac80211/sta_info.c| 83 +- net/mac80211/sta_info.h| 3 ++ net/mac80211/trace.h | 34 +++ net/mac80211/tx.c | 72 ++-- net/mac80211/util.c| 38 + 11 files changed, 370 insertions(+), 12 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index a1db2ea..21b03e3 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -84,6 +84,33 @@ * */ +/** + * DOC: mac80211 software tx queueing + * + * mac80211 provides an optional intermediate queueing implementation designed + * to allow the driver to keep hardware queues short and provide some fairness + * between different stations/interfaces. + * In this model, the driver pulls data frames from the mac80211 queue instead + * of letting mac80211 push them via drv_tx(). Management frames are still sent + * via drv_tx(). + * + * Intermediate queues (struct ieee80211_txq) are kept per-sta per-tid, with a + * single per-vif queue for multicast data frames. + * + * The driver is expected to initialize its private per-queue data for stations + * and interfaces in the .add_interface and .sta_add ops. + * + * The driver can not access the queue directly. To dequeue a frame, it calls + * ieee80211_tx_dequeue(). Whenever mac80211 adds a new frame to a queue, it + * calls the .wake_tx_queue driver op. + * + * For AP powersave TIM handling, the driver only needs to indicate if it has + * buffered packets in the driver specific data structures. For frames buffered + * in the ieee80211_txq struct, mac80211 sets TIM and the driver is expected + * to dequeue and transmit packets on demand via the .release_buffered_frames + * op. + */ + struct device; /** @@ -1257,6 +1284,8 @@ struct ieee80211_vif { u8 cab_queue; u8 hw_queue[IEEE80211_NUM_ACS]; + struct ieee80211_txq *txq; + struct ieee80211_chanctx_conf __rcu *chanctx_conf; u32 driver_flags; @@ -1519,6 +1548,8 @@ struct ieee80211_sta { bool tdls_initiator; bool mfp; + struct ieee80211_txq *txq[IEEE80211_NUM_TIDS]; + /* must be last */ u8 drv_priv[0] __aligned(sizeof(void *)); }; @@ -1547,6 +1578,27 @@ struct ieee80211_tx_control { }; /** + * struct ieee80211_txq - Software intermediate tx queue + * + * @vif: &struct ieee80211_vif pointer from the add_interface callback. + * @sta: station table entry, may be NULL for per-vif queue + * @tid: the TID for this queue (unset for per-vif queue) + * @ac: the AC for this queue + * + * The driver can obtain packets from this queue by calling + * ieee80211_tx_dequeue(). + */ +struct ieee80211_txq { + struct ieee80211_vif *vif; + struct ieee80211_sta *sta; + u8 tid; + u8 ac; + + /* must be last */ + u8 drv_priv[0] __aligned(sizeof(void *)); +}; + +/** * enum ieee80211_hw_flags - hardware flags * * These flags are used to indicate hardware capabilities to @@ -1770,6 +1822,8 @@ enum ieee80211_hw_flags { * within &struct ieee80211_sta. * @chanctx_data_size: size (in bytes) of the drv_priv data area * within &struct ieee80211_chanctx_conf. + * @txq_data_size: size (in bytes) of the drv_priv data area + * within @struct ieee80211_txq. * * @max_rates: maximum number of alternate rate retry stages the hw * can handle. @@ -1818,6 +1872,9 @@ enum ieee80211_hw_flags { * @n_cipher_schemes: a size of an array of cipher schemes definitions. * @cipher_schemes: a pointer to an array of cipher scheme definitions * supported by HW. + * + * @txq_ac_max_pending: maximum number of frames per AC pending in all txq + * entries for a vif. */ struct ieee80211_hw { struct ieee80211_conf conf; @@ -1830,6 +1887,7 @@ struct ieee80211_hw { int vif_data_size; int sta_data_size; int chanctx_data_size; + int txq_data_size; u16 queues; u16 max_listen_interval; s8 max_signal; @@ -1846,6 +
[PATCH] bcma: gpio: use predictable base for all BCM47XX buses
Some BCM47XX SoC routers have LEDs connected to extra PCIe bcma buses. Handling them in arch code requires predictable GPIO numbers. Signed-off-by: Rafał Miłecki --- drivers/bcma/driver_gpio.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/bcma/driver_gpio.c b/drivers/bcma/driver_gpio.c index dce34fb..74ccb02 100644 --- a/drivers/bcma/driver_gpio.c +++ b/drivers/bcma/driver_gpio.c @@ -17,6 +17,8 @@ #include "bcma_private.h" +#define BCMA_GPIO_MAX_PINS 32 + static inline struct bcma_drv_cc *bcma_gpio_get_cc(struct gpio_chip *chip) { return container_of(chip, struct bcma_drv_cc, gpio); @@ -204,6 +206,7 @@ static void bcma_gpio_irq_domain_exit(struct bcma_drv_cc *cc) int bcma_gpio_init(struct bcma_drv_cc *cc) { + struct bcma_bus *bus = cc->core->bus; struct gpio_chip *chip = &cc->gpio; int err; @@ -222,7 +225,7 @@ int bcma_gpio_init(struct bcma_drv_cc *cc) if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC) chip->of_node = cc->core->dev.of_node; #endif - switch (cc->core->bus->chipinfo.id) { + switch (bus->chipinfo.id) { case BCMA_CHIP_ID_BCM5357: case BCMA_CHIP_ID_BCM53572: chip->ngpio = 32; @@ -231,13 +234,17 @@ int bcma_gpio_init(struct bcma_drv_cc *cc) chip->ngpio = 16; } - /* There is just one SoC in one device and its GPIO addresses should be -* deterministic to address them more easily. The other buses could get -* a random base number. */ - if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC) - chip->base = 0; - else - chip->base = -1; + /* +* On MIPS we register GPIO devices (LEDs, buttons) using absolute GPIO +* pin numbers. We don't have Device Tree there and we can't really use +* relative (per chip) numbers. +* So let's use predictable base for BCM47XX and "random" for all other. +*/ +#if IS_BUILTIN(CONFIG_BCM47XX) + chip->base = bus->num * BCMA_GPIO_MAX_PINS; +#else + chip->base = -1; +#endif err = bcma_gpio_irq_domain_init(cc); if (err) -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH next] drivers: wireless: carl9170: shrink carl9170_tx_info
On Saturday, March 14, 2015 06:55:32 PM Florian Westphal wrote: > Christian Lamparter wrote: > > On Friday, March 13, 2015 04:37:25 PM Florian Westphal wrote: > > > its embededded inside rate_driver_data of the ieee80211_tx_info struct, > > > which in turn is stored in skb->cb[]. > > > > > > In order to shrink cb, we need to shrink ieee80211_tx_info which means > > > to downsize all users first. > > > > > > Alternatively, one might be able to remove kref but > > > its less intrusive/simpler to use u32 for timeout handling. > > > > > > Signed-off-by: Florian Westphal > > > --- > > u32 jiffies... that's a lot of pointing (well not so much) and really > > ugly casting (a lot). I guess it would be easier to just use a "per-queue" > > timeout watchdog like almost everybody else. This way, the driver will > > be ready for the next skb->cb shrink as well. > > > > carl9170_tx_ampdu_timeout can be completely removed. > > Maybe, but there is only so much I am willing to do with "compile > tested only" patches... well, reinventing jiffies_32 is just a ugly hack and not "intrusive/simpler" than removing kref here. Please try again. Don't worry about testing, I'm sure this is not a problem and someone will test the patches with the hw on 32-bit and 64-bit platforms. Regards, Christian -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/6] ath10k: move driver state check before setting throttle
Since thermal daemon is unaware of the device state, it might try to adjust the throttle state when the device is powered down. So the driver caches the value and will configure it while powering up the target. The cached value will be programed later once the device is brought up. In such case, returning error status is confusing and misleading the user application. Hence moving the driver state check before sending wmi command to target. Reported-by: Matthias Kaehlcke Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/thermal.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c index 0b4cd3f..c48c71d 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.c +++ b/drivers/net/wireless/ath/ath10k/thermal.c @@ -50,7 +50,6 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, unsigned long throttle_state) { struct ath10k *ar = cdev->devdata; - int ret = 0; if (throttle_state > ATH10K_THERMAL_THROTTLE_MAX) { ath10k_warn(ar, "throttle state %ld is exceeding the limit %d\n", @@ -59,16 +58,9 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, } mutex_lock(&ar->conf_mutex); ar->thermal.throttle_state = throttle_state; - - if (ar->state != ATH10K_STATE_ON) { - ret = -ENETDOWN; - goto out; - } - ath10k_thermal_set_throttling(ar); -out: mutex_unlock(&ar->conf_mutex); - return ret; + return 0; } static struct thermal_cooling_device_ops ath10k_thermal_ops = { @@ -147,6 +139,9 @@ void ath10k_thermal_set_throttling(struct ath10k *ar) lockdep_assert_held(&ar->conf_mutex); + if (ar->state != ATH10K_STATE_ON) + return; + period = ar->thermal.quiet_period; duration = (period * ar->thermal.throttle_state) / 100; enabled = duration ? 1 : 0; -- 2.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/6] ath10k: configure thermal throttle while powering up
Thermal throttling is not handled in software restart and device bootup. Also it needs to be configured whenever quiet period got updated. Fix that. Reported-by: Matthias Kaehlcke Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/debug.c | 1 + drivers/net/wireless/ath/ath10k/mac.c | 1 + drivers/net/wireless/ath/ath10k/thermal.c | 34 +++ drivers/net/wireless/ath/ath10k/thermal.h | 5 + 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 812365c..d684edf 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -2008,6 +2008,7 @@ static ssize_t ath10k_write_quiet_period(struct file *file, } mutex_lock(&ar->conf_mutex); ar->thermal.quiet_period = period; + ath10k_thermal_set_throttling(ar); mutex_unlock(&ar->conf_mutex); return count; diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index a2302bf..5cb0cb6 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3159,6 +3159,7 @@ static int ath10k_start(struct ieee80211_hw *hw) ath10k_regd_update(ar); ath10k_spectral_start(ar); + ath10k_thermal_set_throttling(ar); mutex_unlock(&ar->conf_mutex); return 0; diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c index dc0ebf3..8640f41 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.c +++ b/drivers/net/wireless/ath/ath10k/thermal.c @@ -73,7 +73,6 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, unsigned long throttle_state) { struct ath10k *ar = cdev->devdata; - u32 period, duration, enabled; int num_bss, ret = 0; mutex_lock(&ar->conf_mutex); @@ -99,19 +98,8 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, ret = -ENETDOWN; goto out; } - period = ar->thermal.quiet_period; - duration = (period * throttle_state) / 100; - enabled = duration ? 1 : 0; - - ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration, -ATH10K_QUIET_START_OFFSET, -enabled); - if (ret) { - ath10k_warn(ar, "failed to set quiet mode period %u duarion %u enabled %u ret %d\n", - period, duration, enabled, ret); - goto out; - } ar->thermal.throttle_state = throttle_state; + ath10k_thermal_set_throttling(ar); out: mutex_unlock(&ar->conf_mutex); return ret; @@ -186,6 +174,26 @@ static struct attribute *ath10k_hwmon_attrs[] = { }; ATTRIBUTE_GROUPS(ath10k_hwmon); +void ath10k_thermal_set_throttling(struct ath10k *ar) +{ + u32 period, duration, enabled; + int ret; + + lockdep_assert_held(&ar->conf_mutex); + + period = ar->thermal.quiet_period; + duration = (period * ar->thermal.throttle_state) / 100; + enabled = duration ? 1 : 0; + + ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration, +ATH10K_QUIET_START_OFFSET, +enabled); + if (ret) { + ath10k_warn(ar, "failed to set quiet mode period %u duarion %u enabled %u ret %d\n", + period, duration, enabled, ret); + } +} + int ath10k_thermal_register(struct ath10k *ar) { struct thermal_cooling_device *cdev; diff --git a/drivers/net/wireless/ath/ath10k/thermal.h b/drivers/net/wireless/ath/ath10k/thermal.h index 5728010..b610ea5 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.h +++ b/drivers/net/wireless/ath/ath10k/thermal.h @@ -40,6 +40,7 @@ struct ath10k_thermal { int ath10k_thermal_register(struct ath10k *ar); void ath10k_thermal_unregister(struct ath10k *ar); void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature); +void ath10k_thermal_set_throttling(struct ath10k *ar); #else static inline int ath10k_thermal_register(struct ath10k *ar) { @@ -55,5 +56,9 @@ static inline void ath10k_thermal_event_temperature(struct ath10k *ar, { } +static inline void ath10k_thermal_set_throttling(struct ath10k *ar) +{ +} + #endif #endif /* _THERMAL_ */ -- 2.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/6] ath10k: do not restrict thermal throttling to ap mode
Recently thermal mitigation is validated in station mode as well. Hence allowing thermal throttling for all interfaces. This enables user to validate thermal mitigation with different modes. Reported-by: Matthias Kaehlcke Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/thermal.c | 36 +-- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c index 8640f41..604ea00 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.c +++ b/drivers/net/wireless/ath/ath10k/thermal.c @@ -23,29 +23,6 @@ #include "debug.h" #include "wmi-ops.h" -static int ath10k_thermal_get_active_vifs(struct ath10k *ar, - enum wmi_vdev_type type) -{ - struct ath10k_vif *arvif; - int count = 0; - - lockdep_assert_held(&ar->conf_mutex); - - list_for_each_entry(arvif, &ar->arvifs, list) { - if (!arvif->is_started) - continue; - - if (!arvif->is_up) - continue; - - if (arvif->vdev_type != type) - continue; - - count++; - } - return count; -} - static int ath10k_thermal_get_max_throttle_state(struct thermal_cooling_device *cdev, unsigned long *state) @@ -73,7 +50,7 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, unsigned long throttle_state) { struct ath10k *ar = cdev->devdata; - int num_bss, ret = 0; + int ret = 0; mutex_lock(&ar->conf_mutex); if (ar->state != ATH10K_STATE_ON) { @@ -87,17 +64,6 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, ret = -EINVAL; goto out; } - /* TODO: Right now, thermal mitigation is handled only for single/multi -* vif AP mode. Since quiet param is not validated in STA mode, it needs -* to be investigated further to handle multi STA and multi-vif (AP+STA) -* mode properly. -*/ - num_bss = ath10k_thermal_get_active_vifs(ar, WMI_VDEV_TYPE_AP); - if (!num_bss) { - ath10k_warn(ar, "no active AP interfaces\n"); - ret = -ENETDOWN; - goto out; - } ar->thermal.throttle_state = throttle_state; ath10k_thermal_set_throttling(ar); out: -- 2.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/6] ath10k: cache throttle state when device is down
Allow driver to cache the throttle state when the devie is not yet started. Configure the cached throttle state while powering up the device. Since thermal daemon is unaware of the up/down cycle, it assumes that device is throttled. Reported-by: Matthias Kaehlcke Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/thermal.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c index 604ea00..0b4cd3f 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.c +++ b/drivers/net/wireless/ath/ath10k/thermal.c @@ -52,19 +52,19 @@ ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, struct ath10k *ar = cdev->devdata; int ret = 0; + if (throttle_state > ATH10K_THERMAL_THROTTLE_MAX) { + ath10k_warn(ar, "throttle state %ld is exceeding the limit %d\n", + throttle_state, ATH10K_THERMAL_THROTTLE_MAX); + return -EINVAL; + } mutex_lock(&ar->conf_mutex); + ar->thermal.throttle_state = throttle_state; + if (ar->state != ATH10K_STATE_ON) { ret = -ENETDOWN; goto out; } - if (throttle_state > ATH10K_THERMAL_THROTTLE_MAX) { - ath10k_warn(ar, "throttle state %ld is exceeding the limit %d\n", - throttle_state, ATH10K_THERMAL_THROTTLE_MAX); - ret = -EINVAL; - goto out; - } - ar->thermal.throttle_state = throttle_state; ath10k_thermal_set_throttling(ar); out: mutex_unlock(&ar->conf_mutex); -- 2.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/6] ath10k: Fix interpretation of cooling device state
Setting the sysfs attribute ends up configuring the duty cycle, but the interface through which the attribute is exposed (cooling_device) is for setting the throttle/cooling state. This is confusing the user. Hence renaming the cooling device interfaces for better readability. Cc: Matthias Kaehlcke Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/thermal.c | 35 +-- drivers/net/wireless/ath/ath10k/thermal.h | 4 ++-- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c index d3fd2ab..dc0ebf3 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.c +++ b/drivers/net/wireless/ath/ath10k/thermal.c @@ -46,28 +46,31 @@ static int ath10k_thermal_get_active_vifs(struct ath10k *ar, return count; } -static int ath10k_thermal_get_max_dutycycle(struct thermal_cooling_device *cdev, - unsigned long *state) +static int +ath10k_thermal_get_max_throttle_state(struct thermal_cooling_device *cdev, + unsigned long *state) { - *state = ATH10K_QUIET_DUTY_CYCLE_MAX; + *state = ATH10K_THERMAL_THROTTLE_MAX; return 0; } -static int ath10k_thermal_get_cur_dutycycle(struct thermal_cooling_device *cdev, - unsigned long *state) +static int +ath10k_thermal_get_cur_throttle_state(struct thermal_cooling_device *cdev, + unsigned long *state) { struct ath10k *ar = cdev->devdata; mutex_lock(&ar->conf_mutex); - *state = ar->thermal.duty_cycle; + *state = ar->thermal.throttle_state; mutex_unlock(&ar->conf_mutex); return 0; } -static int ath10k_thermal_set_cur_dutycycle(struct thermal_cooling_device *cdev, - unsigned long duty_cycle) +static int +ath10k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, + unsigned long throttle_state) { struct ath10k *ar = cdev->devdata; u32 period, duration, enabled; @@ -79,9 +82,9 @@ static int ath10k_thermal_set_cur_dutycycle(struct thermal_cooling_device *cdev, goto out; } - if (duty_cycle > ATH10K_QUIET_DUTY_CYCLE_MAX) { - ath10k_warn(ar, "duty cycle %ld is exceeding the limit %d\n", - duty_cycle, ATH10K_QUIET_DUTY_CYCLE_MAX); + if (throttle_state > ATH10K_THERMAL_THROTTLE_MAX) { + ath10k_warn(ar, "throttle state %ld is exceeding the limit %d\n", + throttle_state, ATH10K_THERMAL_THROTTLE_MAX); ret = -EINVAL; goto out; } @@ -97,7 +100,7 @@ static int ath10k_thermal_set_cur_dutycycle(struct thermal_cooling_device *cdev, goto out; } period = ar->thermal.quiet_period; - duration = (period * duty_cycle) / 100; + duration = (period * throttle_state) / 100; enabled = duration ? 1 : 0; ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration, @@ -108,16 +111,16 @@ static int ath10k_thermal_set_cur_dutycycle(struct thermal_cooling_device *cdev, period, duration, enabled, ret); goto out; } - ar->thermal.duty_cycle = duty_cycle; + ar->thermal.throttle_state = throttle_state; out: mutex_unlock(&ar->conf_mutex); return ret; } static struct thermal_cooling_device_ops ath10k_thermal_ops = { - .get_max_state = ath10k_thermal_get_max_dutycycle, - .get_cur_state = ath10k_thermal_get_cur_dutycycle, - .set_cur_state = ath10k_thermal_set_cur_dutycycle, + .get_max_state = ath10k_thermal_get_max_throttle_state, + .get_cur_state = ath10k_thermal_get_cur_throttle_state, + .set_cur_state = ath10k_thermal_set_cur_throttle_state, }; static ssize_t ath10k_thermal_show_temp(struct device *dev, diff --git a/drivers/net/wireless/ath/ath10k/thermal.h b/drivers/net/wireless/ath/ath10k/thermal.h index 050f41d..5728010 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.h +++ b/drivers/net/wireless/ath/ath10k/thermal.h @@ -19,16 +19,16 @@ #define ATH10K_QUIET_PERIOD_DEFAULT 100 #define ATH10K_QUIET_PERIOD_MIN 25 #define ATH10K_QUIET_START_OFFSET 10 -#define ATH10K_QUIET_DUTY_CYCLE_MAX 100 #define ATH10K_HWMON_NAME_LEN 15 #define ATH10K_THERMAL_SYNC_TIMEOUT_HZ (5*HZ) +#define ATH10K_THERMAL_THROTTLE_MAX 100 struct ath10k_thermal { struct thermal_cooling_device *cdev; struct completion wmi_sync; /* protected by conf_mutex */ - u32 duty_cycle; + u32 throttle_state; u32 quiet_period; /* temperature value in Celcius degree * protected by data_lock -- 2.3.2 -- To unsubscribe from this list: se
[PATCH 0/6] ath10k: thermal mitigation fixes
Here are few enhancements in thermal throttling that allows user to control throttling state and quiet period. Also enables throttling for station mode. These patches are rebased on latest TOT. Rajkumar Manoharan (6): ath10k: add debugfs entry to configure quiet period ath10k: Fix interpretation of cooling device state ath10k: configure thermal throttle while powering up ath10k: do not restrict thermal throttling to ap mode ath10k: cache throttle state when device is down ath10k: move driver state check before setting throttle drivers/net/wireless/ath/ath10k/debug.c | 47 drivers/net/wireless/ath/ath10k/mac.c | 1 + drivers/net/wireless/ath/ath10k/thermal.c | 120 -- drivers/net/wireless/ath/ath10k/thermal.h | 10 ++- 4 files changed, 102 insertions(+), 76 deletions(-) -- 2.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/6] ath10k: add debugfs entry to configure quiet period
Add support to configure quiet period (in milliseconds) via debugfs. This is useful to experiment different quiet period values along with different throttle ratio. echo 100 > /sys/kernel/debug/ieee80211/phyX/ath10k/quiet_period Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/debug.c | 46 +++ drivers/net/wireless/ath/ath10k/thermal.c | 4 +-- drivers/net/wireless/ath/ath10k/thermal.h | 1 + 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 301081d..812365c 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -1991,6 +1991,49 @@ static const struct file_operations fops_pktlog_filter = { .open = simple_open }; +static ssize_t ath10k_write_quiet_period(struct file *file, +const char __user *ubuf, +size_t count, loff_t *ppos) +{ + struct ath10k *ar = file->private_data; + u32 period; + + if (kstrtouint_from_user(ubuf, count, 0, &period)) + return -EINVAL; + + if (period < ATH10K_QUIET_PERIOD_MIN) { + ath10k_warn(ar, "Quiet period %u can not be lesser than 25ms\n", + period); + return -EINVAL; + } + mutex_lock(&ar->conf_mutex); + ar->thermal.quiet_period = period; + mutex_unlock(&ar->conf_mutex); + + return count; +} + +static ssize_t ath10k_read_quiet_period(struct file *file, char __user *ubuf, + size_t count, loff_t *ppos) +{ + char buf[32]; + struct ath10k *ar = file->private_data; + int len = 0; + + mutex_lock(&ar->conf_mutex); + len = scnprintf(buf, sizeof(buf) - len, "%d\n", + ar->thermal.quiet_period); + mutex_unlock(&ar->conf_mutex); + + return simple_read_from_buffer(ubuf, count, ppos, buf, len); +} + +static const struct file_operations fops_quiet_period = { + .read = ath10k_read_quiet_period, + .write = ath10k_write_quiet_period, + .open = simple_open +}; + int ath10k_debug_create(struct ath10k *ar) { ar->debug.fw_crash_data = vzalloc(sizeof(*ar->debug.fw_crash_data)); @@ -2088,6 +2131,9 @@ int ath10k_debug_register(struct ath10k *ar) debugfs_create_file("pktlog_filter", S_IRUGO | S_IWUSR, ar->debug.debugfs_phy, ar, &fops_pktlog_filter); + debugfs_create_file("quiet_period", S_IRUGO | S_IWUSR, + ar->debug.debugfs_phy, ar, &fops_quiet_period); + return 0; } diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c index 747fea7..d3fd2ab 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.c +++ b/drivers/net/wireless/ath/ath10k/thermal.c @@ -96,8 +96,7 @@ static int ath10k_thermal_set_cur_dutycycle(struct thermal_cooling_device *cdev, ret = -ENETDOWN; goto out; } - period = max(ATH10K_QUIET_PERIOD_MIN, -(ATH10K_QUIET_PERIOD_DEFAULT / num_bss)); + period = ar->thermal.quiet_period; duration = (period * duty_cycle) / 100; enabled = duration ? 1 : 0; @@ -207,6 +206,7 @@ int ath10k_thermal_register(struct ath10k *ar) } ar->thermal.cdev = cdev; + ar->thermal.quiet_period = ATH10K_QUIET_PERIOD_DEFAULT; /* Do not register hwmon device when temperature reading is not * supported by firmware diff --git a/drivers/net/wireless/ath/ath10k/thermal.h b/drivers/net/wireless/ath/ath10k/thermal.h index 5e87d9a..050f41d 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.h +++ b/drivers/net/wireless/ath/ath10k/thermal.h @@ -29,6 +29,7 @@ struct ath10k_thermal { /* protected by conf_mutex */ u32 duty_cycle; + u32 quiet_period; /* temperature value in Celcius degree * protected by data_lock */ -- 2.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] wil6210: support AP isolation
On Sunday, March 15, 2015 04:00:20 PM Vladimir Kondratiev wrote: > For the AP, configuration may say not to bridge traffic between > wireless clients. This is conveyed from user space (ex: hostapd has > ap_isolate parameter) with NL80211_CMD_SET_BSS, to the driver's > cfg80211 ops method change_bss > > Add support for this setting. > > Signed-off-by: Vladimir Kondratiev > Please ignore, old patch, sent by mistake. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] wil6210: NAPI completion refactor
On Sunday, March 15, 2015 04:00:15 PM Vladimir Kondratiev wrote: > t is expected that driver completes NAPI when less than > full budget is consumed. > > Fulfill this requirement. > > Signed-off-by: Vladimir Kondratiev > Please ignore, old patch, sent by mistake. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] wil6210: re-submit Rx frames to the wireless media if appropriate
On Sunday, March 15, 2015 04:00:18 PM Vladimir Kondratiev wrote: > This is for AP only. If Rx data frame targeted to one of associated clients, > transmit it back to the wireless media and don't deliver to the host. > For the multicast frames, deliver to both host and wireless media. > > Signed-off-by: Vladimir Kondratiev > Please ignore, old patch, sent by mistake. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] wil6210: NAPI completion refactor
It is expected that driver completes NAPI when less than full budget is consumed. Fulfill this requirement. Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/netdev.c b/drivers/net/wireless/ath/wil6210/netdev.c index ace30c1..f2f7ea2 100644 --- a/drivers/net/wireless/ath/wil6210/netdev.c +++ b/drivers/net/wireless/ath/wil6210/netdev.c @@ -82,7 +82,7 @@ static int wil6210_netdev_poll_rx(struct napi_struct *napi, int budget) wil_rx_handle(wil, "a); done = budget - quota; - if (done <= 1) { /* burst ends - only one packet processed */ + if (done < budget) { napi_complete(napi); wil6210_unmask_irq_rx(wil); wil_dbg_txrx(wil, "NAPI RX complete\n"); @@ -110,7 +110,7 @@ static int wil6210_netdev_poll_tx(struct napi_struct *napi, int budget) tx_done += wil_tx_complete(wil, i); } - if (tx_done <= 1) { /* burst ends - only one packet processed */ + if (tx_done < budget) { napi_complete(napi); wil6210_unmask_irq_tx(wil); wil_dbg_txrx(wil, "NAPI TX complete\n"); -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] wil6210: re-submit Rx frames to the wireless media if appropriate
This is for AP only. If Rx data frame targeted to one of associated clients, transmit it back to the wireless media and don't deliver to the host. For the multicast frames, deliver to both host and wireless media. Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/txrx.c | 72 ++--- 1 file changed, 58 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 7f2f560..08d3cac 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -492,17 +492,71 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count) */ void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev) { - gro_result_t rc; + gro_result_t rc = GRO_NORMAL; struct wil6210_priv *wil = ndev_to_wil(ndev); + struct wireless_dev *wdev = wil_to_wdev(wil); unsigned int len = skb->len; struct vring_rx_desc *d = wil_skb_rxdesc(skb); int cid = wil_rxdesc_cid(d); + struct ethhdr *eth = (void *)skb->data; + /* here looking for DA, not A1, thus Rxdesc's 'mcast' indication +* is not suitable, need to look at data +*/ + int mcast = is_multicast_ether_addr(eth->h_dest); struct wil_net_stats *stats = &wil->sta[cid].stats; + struct sk_buff *xmit_skb = NULL; + static const char * const gro_res_str[] = { + [GRO_MERGED]= "GRO_MERGED", + [GRO_MERGED_FREE] = "GRO_MERGED_FREE", + [GRO_HELD] = "GRO_HELD", + [GRO_NORMAL]= "GRO_NORMAL", + [GRO_DROP] = "GRO_DROP", + }; skb_orphan(skb); - rc = napi_gro_receive(&wil->napi_rx, skb); + if (wdev->iftype == NL80211_IFTYPE_AP) { + if (mcast) { + /* send multicast frames both to higher layers in +* local net stack and back to the wireless medium +*/ + xmit_skb = skb_copy(skb, GFP_ATOMIC); + } else { + int xmit_cid = wil_find_cid(wil, eth->h_dest); + + if (xmit_cid >= 0) { + /* The destination station is associated to +* this AP (in this VLAN), so send the frame +* directly to it and do not pass it to local +* net stack. +*/ + xmit_skb = skb; + skb = NULL; + } + } + } + if (xmit_skb) { + /* Send to wireless media and increase priority by 256 to +* keep the received priority instead of reclassifying +* the frame (see cfg80211_classify8021d). +*/ + xmit_skb->dev = ndev; + xmit_skb->priority += 256; + xmit_skb->protocol = htons(ETH_P_802_3); + skb_reset_network_header(xmit_skb); + skb_reset_mac_header(xmit_skb); + wil_dbg_txrx(wil, "Rx -> Tx %d bytes\n", len); + dev_queue_xmit(xmit_skb); + } + + if (skb) { /* deliver to local stack */ + skb->protocol = eth_type_trans(skb, ndev); + rc = napi_gro_receive(&wil->napi_rx, skb); + wil_dbg_txrx(wil, "Rx complete %d bytes => %s\n", +len, gro_res_str[rc]); + } + /* statistics. rc set to GRO_NORMAL for AP bridging */ if (unlikely(rc == GRO_DROP)) { ndev->stats.rx_dropped++; stats->rx_dropped++; @@ -512,17 +566,8 @@ void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev) stats->rx_packets++; ndev->stats.rx_bytes += len; stats->rx_bytes += len; - } - { - static const char * const gro_res_str[] = { - [GRO_MERGED]= "GRO_MERGED", - [GRO_MERGED_FREE] = "GRO_MERGED_FREE", - [GRO_HELD] = "GRO_HELD", - [GRO_NORMAL]= "GRO_NORMAL", - [GRO_DROP] = "GRO_DROP", - }; - wil_dbg_txrx(wil, "Rx complete %d bytes => %s\n", -len, gro_res_str[rc]); + if (mcast) + ndev->stats.multicast++; } } @@ -553,7 +598,6 @@ void wil_rx_handle(struct wil6210_priv *wil, int *quota) skb->protocol = htons(ETH_P_802_2); wil_netif_rx_any(skb, ndev); } else { - skb->protocol = eth_type_trans(skb, ndev); wil_rx_reorder(wil,
[PATCH 0/7] wil6210 patches
- real broadcast, in DMG networks it is not that trivial... - found approach to achieve 4*n+2 alignment of Rx frames - small fixes here and there Vladimir Kondratiev (7): wil6210: optimize index manipulation in wil_vring_reap_rx wil6210: fix check for FW responsiveness wil6210: Align Rx frames on 4*n+2 by having SNAP wil6210: Prefer ether_addr_copy() over memcpy() wil6210: add bcast structures to WMI wil6210: implement broadcast/multicast data wil6210: fall back to pseudo-DMS mcast for secure link and PBSS drivers/net/wireless/ath/wil6210/cfg80211.c | 18 ++- drivers/net/wireless/ath/wil6210/debugfs.c | 18 ++- drivers/net/wireless/ath/wil6210/main.c | 35 + drivers/net/wireless/ath/wil6210/pcie_bus.c | 2 - drivers/net/wireless/ath/wil6210/txrx.c | 230 drivers/net/wireless/ath/wil6210/wil6210.h | 7 + drivers/net/wireless/ath/wil6210/wmi.c | 16 +- drivers/net/wireless/ath/wil6210/wmi.h | 23 ++- 8 files changed, 296 insertions(+), 53 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/7] wil6210: fix check for FW responsiveness
"echo" used to be called when no firmware loaded to the NIC, this causes error output. Probe firmware with "echo" only after it returned "ready" event. Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/main.c | 2 ++ drivers/net/wireless/ath/wil6210/pcie_bus.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index afff8d3..a5fd605 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -724,6 +724,8 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw) /* we just started MAC, wait for FW ready */ rc = wil_wait_for_fw_ready(wil); + if (rc == 0) /* check FW is responsive */ + rc = wmi_echo(wil); } return rc; diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c index 25343cf..1099861 100644 --- a/drivers/net/wireless/ath/wil6210/pcie_bus.c +++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c @@ -246,8 +246,6 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) wil6210_debugfs_init(wil); - /* check FW is alive */ - wmi_echo(wil); return 0; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/7] wil6210: optimize index manipulation in wil_vring_reap_rx
Use temporal variable for often used vring->swhead; and use proper index in debug printing - vring->swhead used before was modified in wil_vring_advance_head and then increased value was used in debug print Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/txrx.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 689081c..3feb86c4 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -369,6 +369,7 @@ static struct sk_buff *wil_vring_reap_rx(struct wil6210_priv *wil, u16 dmalen; u8 ftype; int cid; + int i = (int)vring->swhead; struct wil_net_stats *stats; BUILD_BUG_ON(sizeof(struct vring_rx_desc) > sizeof(skb->cb)); @@ -376,24 +377,28 @@ static struct sk_buff *wil_vring_reap_rx(struct wil6210_priv *wil, if (unlikely(wil_vring_is_empty(vring))) return NULL; - _d = &vring->va[vring->swhead].rx; + _d = &vring->va[i].rx; if (unlikely(!(_d->dma.status & RX_DMA_STATUS_DU))) { /* it is not error, we just reached end of Rx done area */ return NULL; } - skb = vring->ctx[vring->swhead].skb; + skb = vring->ctx[i].skb; + vring->ctx[i].skb = NULL; + wil_vring_advance_head(vring, 1); + if (!skb) { + wil_err(wil, "No Rx skb at [%d]\n", i); + return NULL; + } d = wil_skb_rxdesc(skb); *d = *_d; pa = wil_desc_addr(&d->dma.addr); - vring->ctx[vring->swhead].skb = NULL; - wil_vring_advance_head(vring, 1); dma_unmap_single(dev, pa, sz, DMA_FROM_DEVICE); dmalen = le16_to_cpu(d->dma.length); - trace_wil6210_rx(vring->swhead, d); - wil_dbg_txrx(wil, "Rx[%3d] : %d bytes\n", vring->swhead, dmalen); + trace_wil6210_rx(i, d); + wil_dbg_txrx(wil, "Rx[%3d] : %d bytes\n", i, dmalen); wil_hex_dump_txrx("Rx ", DUMP_PREFIX_NONE, 32, 4, (const void *)d, sizeof(*d), false); -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 7/7] wil6210: fall back to pseudo-DMS mcast for secure link and PBSS
Multicast is not yet properly supported for all connection types; actually, only non-secure AP is supported. For all other cases, fall back to old "pseudo-DMS" approach. Namely, for: - PBSS - secure connection When re-routing MCAST Rx->Tx on the AP, do not Tx back to the origin of the frame Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/txrx.c | 103 +++- 1 file changed, 101 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 1fe390f..e8bd512 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -908,8 +908,20 @@ static struct vring *wil_find_tx_vring_sta(struct wil6210_priv *wil, return NULL; } -static struct vring *wil_find_tx_bcast(struct wil6210_priv *wil, - struct sk_buff *skb) +/* Use one of 2 strategies: + * + * 1. New (real broadcast): + *use dedicated broadcast vring + * 2. Old (pseudo-DMS): + *Find 1-st vring and return it; + *duplicate skb and send it to other active vrings; + *in all cases override dest address to unicast peer's address + * Use old strategy when new is not supported yet: + * - for PBSS + * - for secure link + */ +static struct vring *wil_find_tx_bcast_1(struct wil6210_priv *wil, +struct sk_buff *skb) { struct vring *v; int i = wil->bcast_vring; @@ -923,6 +935,93 @@ static struct vring *wil_find_tx_bcast(struct wil6210_priv *wil, return v; } +static void wil_set_da_for_vring(struct wil6210_priv *wil, +struct sk_buff *skb, int vring_index) +{ + struct ethhdr *eth = (void *)skb->data; + int cid = wil->vring2cid_tid[vring_index][0]; + + ether_addr_copy(eth->h_dest, wil->sta[cid].addr); +} + +static struct vring *wil_find_tx_bcast_2(struct wil6210_priv *wil, +struct sk_buff *skb) +{ + struct vring *v, *v2; + struct sk_buff *skb2; + int i; + u8 cid; + struct ethhdr *eth = (void *)skb->data; + char *src = eth->h_source; + + /* find 1-st vring eligible for data */ + for (i = 0; i < WIL6210_MAX_TX_RINGS; i++) { + v = &wil->vring_tx[i]; + if (!v->va) + continue; + + cid = wil->vring2cid_tid[i][0]; + if (cid >= WIL6210_MAX_CID) /* skip BCAST */ + continue; + if (!wil->sta[cid].data_port_open) + continue; + + /* don't Tx back to source when re-routing Rx->Tx at the AP */ + if (0 == memcmp(wil->sta[cid].addr, src, ETH_ALEN)) + continue; + + goto found; + } + + wil_dbg_txrx(wil, "Tx while no vrings active?\n"); + + return NULL; + +found: + wil_dbg_txrx(wil, "BCAST -> ring %d\n", i); + wil_set_da_for_vring(wil, skb, i); + + /* find other active vrings and duplicate skb for each */ + for (i++; i < WIL6210_MAX_TX_RINGS; i++) { + v2 = &wil->vring_tx[i]; + if (!v2->va) + continue; + cid = wil->vring2cid_tid[i][0]; + if (cid >= WIL6210_MAX_CID) /* skip BCAST */ + continue; + if (!wil->sta[cid].data_port_open) + continue; + + if (0 == memcmp(wil->sta[cid].addr, src, ETH_ALEN)) + continue; + + skb2 = skb_copy(skb, GFP_ATOMIC); + if (skb2) { + wil_dbg_txrx(wil, "BCAST DUP -> ring %d\n", i); + wil_set_da_for_vring(wil, skb2, i); + wil_tx_vring(wil, v2, skb2); + } else { + wil_err(wil, "skb_copy failed\n"); + } + } + + return v; +} + +static struct vring *wil_find_tx_bcast(struct wil6210_priv *wil, + struct sk_buff *skb) +{ + struct wireless_dev *wdev = wil->wdev; + + if (wdev->iftype != NL80211_IFTYPE_AP) + return wil_find_tx_bcast_2(wil, skb); + + if (wil->privacy) + return wil_find_tx_bcast_2(wil, skb); + + return wil_find_tx_bcast_1(wil, skb); +} + static int wil_tx_desc_map(struct vring_tx_desc *d, dma_addr_t pa, u32 len, int vring_index) { -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/7] wil6210: Align Rx frames on 4*n+2 by having SNAP
For the networking code and for hardware network accelerators, it is better to have IP header 4*n aligned. On the other side, DMA on Rx path require buffer to be aligned on 4*n as well. Having 14 bytes of Ethernet header, these 2 alignment requests are in contradiction. To solve this, order hardware offload block to not remove SNAP header. This adds extra 6 bytes between addresses and ethertype, making it 20 bytes total. This way, both buffer and IP header are 4*n aligned. Remaining is only to remove SNAP by shifting addresses 6 bytes. This involves data copying, so this feature should be disabled unless required by the platform. Module parameter "rx_align_2" (bool, default - false) introduced to control this feature. Feature is completely disabled when parameter is false. Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/txrx.c| 27 --- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + drivers/net/wireless/ath/wil6210/wmi.c | 5 + drivers/net/wireless/ath/wil6210/wmi.h | 3 +++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 3feb86c4..2453470 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -33,6 +33,15 @@ module_param(rtap_include_phy_info, bool, S_IRUGO); MODULE_PARM_DESC(rtap_include_phy_info, " Include PHY info in the radiotap header, default - no"); +bool rx_align_2; +module_param(rx_align_2, bool, S_IRUGO); +MODULE_PARM_DESC(rx_align_2, " align Rx buffers on 4*n+2, default - no"); + +static inline uint wil_rx_snaplen(void) +{ + return rx_align_2 ? 6 : 0; +} + static inline int wil_vring_is_empty(struct vring *vring) { return vring->swhead == vring->swtail; @@ -209,7 +218,7 @@ static int wil_vring_alloc_skb(struct wil6210_priv *wil, struct vring *vring, u32 i, int headroom) { struct device *dev = wil_to_dev(wil); - unsigned int sz = mtu_max + ETH_HLEN; + unsigned int sz = mtu_max + ETH_HLEN + wil_rx_snaplen(); struct vring_rx_desc dd, *d = ⅆ volatile struct vring_rx_desc *_d = &vring->va[i].rx; dma_addr_t pa; @@ -365,7 +374,8 @@ static struct sk_buff *wil_vring_reap_rx(struct wil6210_priv *wil, struct vring_rx_desc *d; struct sk_buff *skb; dma_addr_t pa; - unsigned int sz = mtu_max + ETH_HLEN; + unsigned int snaplen = wil_rx_snaplen(); + unsigned int sz = mtu_max + ETH_HLEN + snaplen; u16 dmalen; u8 ftype; int cid; @@ -438,7 +448,7 @@ static struct sk_buff *wil_vring_reap_rx(struct wil6210_priv *wil, return NULL; } - if (unlikely(skb->len < ETH_HLEN)) { + if (unlikely(skb->len < ETH_HLEN + snaplen)) { wil_err(wil, "Short frame, len = %d\n", skb->len); /* TODO: process it (i.e. BAR) */ kfree_skb(skb); @@ -460,6 +470,17 @@ static struct sk_buff *wil_vring_reap_rx(struct wil6210_priv *wil, */ } + if (snaplen) { + /* Packet layout +* +---+---+-++--+ +* | SA(6) | DA(6) | SNAP(6) | ETHTYPE(2) | DATA | +* +---+---+-++--+ +* Need to remove SNAP, shifting SA and DA forward +*/ + memmove(skb->data + snaplen, skb->data, 2 * ETH_ALEN); + skb_pull(skb, snaplen); + } + return skb; } diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index c1a71ab..a6b096e 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -28,6 +28,7 @@ extern unsigned int mtu_max; extern unsigned short rx_ring_overflow_thrsh; extern int agg_wsize; extern u32 vring_idle_trsh; +extern bool rx_align_2; #define WIL_NAME "wil6210" #define WIL_FW_NAME "wil6210.fw" /* code */ diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 0213135..8c18a46 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c @@ -1109,6 +1109,11 @@ int wmi_rx_chain_add(struct wil6210_priv *wil, struct vring *vring) */ cmd.l3_l4_ctrl |= (1 << L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS); } + + if (rx_align_2) + cmd.l2_802_3_offload_ctrl |= + L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK; + /* typical time for secure PCP is 840ms */ rc = wmi_call(wil, WMI_CFG_RX_CHAIN_CMDID, &cmd, sizeof(cmd), WMI_CFG_RX_CHAIN_DONE_EVENTID, &evt, sizeof(evt), 2000); diff --git a/drivers/net/wireless/ath/wil6210/wmi.h b/drivers/net/wireless/ath/wil6210/wmi.h index 8a4af61..0
[PATCH 3/3] wil6210: support AP isolation
For the AP, configuration may say not to bridge traffic between wireless clients. This is conveyed from user space (ex: hostapd has ap_isolate parameter) with NL80211_CMD_SET_BSS, to the driver's cfg80211 ops method change_bss Add support for this setting. Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/cfg80211.c | 16 drivers/net/wireless/ath/wil6210/debugfs.c | 1 + drivers/net/wireless/ath/wil6210/main.c | 1 + drivers/net/wireless/ath/wil6210/txrx.c | 2 +- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 4bd708c..5db6a6d 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -917,6 +917,21 @@ static int wil_cfg80211_probe_client(struct wiphy *wiphy, return 0; } +static int wil_cfg80211_change_bss(struct wiphy *wiphy, + struct net_device *dev, + struct bss_parameters *params) +{ + struct wil6210_priv *wil = wiphy_to_wil(wiphy); + + if (params->ap_isolate >= 0) { + wil_dbg_misc(wil, "%s(ap_isolate %d => %d)\n", __func__, +wil->ap_isolate, params->ap_isolate); + wil->ap_isolate = params->ap_isolate; + } + + return 0; +} + static struct cfg80211_ops wil_cfg80211_ops = { .scan = wil_cfg80211_scan, .connect = wil_cfg80211_connect, @@ -937,6 +952,7 @@ static struct cfg80211_ops wil_cfg80211_ops = { .stop_ap = wil_cfg80211_stop_ap, .del_station = wil_cfg80211_del_station, .probe_client = wil_cfg80211_probe_client, + .change_bss = wil_cfg80211_change_bss, }; static void wil_wiphy_init(struct wiphy *wiphy) diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c index 3830cc2..a42cb89 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c @@ -1405,6 +1405,7 @@ static const struct dbg_off dbg_wil_off[] = { WIL_FIELD(fw_version, S_IRUGO,doff_u32), WIL_FIELD(hw_version, S_IRUGO,doff_x32), WIL_FIELD(recovery_count, S_IRUGO, doff_u32), + WIL_FIELD(ap_isolate, S_IRUGO,doff_u32), {}, }; diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index db74e81..afff8d3 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -714,6 +714,7 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw) /* init after reset */ wil->pending_connect_cid = -1; + wil->ap_isolate = 0; reinit_completion(&wil->wmi_ready); reinit_completion(&wil->wmi_call); diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 08d3cac..689081c 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -515,7 +515,7 @@ void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev) skb_orphan(skb); - if (wdev->iftype == NL80211_IFTYPE_AP) { + if (wdev->iftype == NL80211_IFTYPE_AP && !wil->ap_isolate) { if (mcast) { /* send multicast frames both to higher layers in * local net stack and back to the wireless medium diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index b6e65c3..c1a71ab 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -542,6 +542,7 @@ struct wil6210_priv { u32 monitor_flags; u32 privacy; /* secure connection? */ int sinfo_gen; + u32 ap_isolate; /* no intra-BSS communication */ /* interrupt moderation */ u32 tx_max_burst_duration; u32 tx_interframe_timeout; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/7] wil6210: Prefer ether_addr_copy() over memcpy()
Fix checkpatch warning: WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/cfg80211.c | 7 --- drivers/net/wireless/ath/wil6210/wmi.c | 11 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 5db6a6d..c9f362c 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -14,6 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include "wil6210.h" #include "wmi.h" @@ -217,7 +218,7 @@ static int wil_cfg80211_dump_station(struct wiphy *wiphy, if (cid < 0) return -ENOENT; - memcpy(mac, wil->sta[cid].addr, ETH_ALEN); + ether_addr_copy(mac, wil->sta[cid].addr); wil_dbg_misc(wil, "%s(%pM) CID %d\n", __func__, mac, cid); rc = wil_cid_fill_sinfo(wil, cid, sinfo); @@ -478,8 +479,8 @@ static int wil_cfg80211_connect(struct wiphy *wiphy, } conn.channel = ch - 1; - memcpy(conn.bssid, bss->bssid, ETH_ALEN); - memcpy(conn.dst_mac, bss->bssid, ETH_ALEN); + ether_addr_copy(conn.bssid, bss->bssid); + ether_addr_copy(conn.dst_mac, bss->bssid); set_bit(wil_status_fwconnecting, wil->status); diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 8c18a46..9fe2085 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c @@ -466,7 +466,7 @@ static void wmi_evt_connect(struct wil6210_priv *wil, int id, void *d, int len) /* FIXME FW can transmit only ucast frames to peer */ /* FIXME real ring_id instead of hard coded 0 */ - memcpy(wil->sta[evt->cid].addr, evt->bssid, ETH_ALEN); + ether_addr_copy(wil->sta[evt->cid].addr, evt->bssid); wil->sta[evt->cid].status = wil_sta_conn_pending; wil->pending_connect_cid = evt->cid; @@ -524,8 +524,8 @@ static void wmi_evt_eapol_rx(struct wil6210_priv *wil, int id, } eth = (struct ethhdr *)skb_put(skb, ETH_HLEN); - memcpy(eth->h_dest, ndev->dev_addr, ETH_ALEN); - memcpy(eth->h_source, evt->src_mac, ETH_ALEN); + ether_addr_copy(eth->h_dest, ndev->dev_addr); + ether_addr_copy(eth->h_source, evt->src_mac); eth->h_proto = cpu_to_be16(ETH_P_PAE); memcpy(skb_put(skb, eapol_len), evt->eapol, eapol_len); skb->protocol = eth_type_trans(skb, ndev); @@ -851,7 +851,7 @@ int wmi_set_mac_address(struct wil6210_priv *wil, void *addr) { struct wmi_set_mac_address_cmd cmd; - memcpy(cmd.mac, addr, ETH_ALEN); + ether_addr_copy(cmd.mac, addr); wil_dbg_wmi(wil, "Set MAC %pM\n", addr); @@ -1162,7 +1162,8 @@ int wmi_disconnect_sta(struct wil6210_priv *wil, const u8 *mac, u16 reason) struct wmi_disconnect_sta_cmd cmd = { .disconnect_reason = cpu_to_le16(reason), }; - memcpy(cmd.dst_mac, mac, ETH_ALEN); + + ether_addr_copy(cmd.dst_mac, mac); wil_dbg_wmi(wil, "%s(%pM, reason %d)\n", __func__, mac, reason); -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/7] wil6210: implement broadcast/multicast data
Use dedicated vring for multicast frames; this vring allocated for AP and PBSS (both P2P GO and client) configurations For short frames, use MCS0; for long - MCS1 Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/cfg80211.c | 11 +- drivers/net/wireless/ath/wil6210/debugfs.c | 18 ++- drivers/net/wireless/ath/wil6210/main.c | 33 ++ drivers/net/wireless/ath/wil6210/txrx.c | 175 +--- drivers/net/wireless/ath/wil6210/wil6210.h | 6 + 5 files changed, 167 insertions(+), 76 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index c9f362c..8f7596f 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -783,8 +783,17 @@ static int wil_cfg80211_start_ap(struct wiphy *wiphy, rc = wmi_pcp_start(wil, info->beacon_interval, wmi_nettype, channel->hw_value); if (rc) - netif_carrier_off(ndev); + goto err_pcp_start; + rc = wil_bcast_init(wil); + if (rc) + goto err_bcast; + + goto out; /* success */ +err_bcast: + wmi_pcp_stop(wil); +err_pcp_start: + netif_carrier_off(ndev); out: mutex_unlock(&wil->mutex); return rc; diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c index a42cb89..bbc22d8 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c @@ -121,12 +121,18 @@ static int wil_vring_debugfs_show(struct seq_file *s, void *data) snprintf(name, sizeof(name), "tx_%2d", i); - seq_printf(s, - "\n%pM CID %d TID %d BACK([%d] %d TU A%s) [%3d|%3d] idle %s\n", - wil->sta[cid].addr, cid, tid, - txdata->agg_wsize, txdata->agg_timeout, - txdata->agg_amsdu ? "+" : "-", - used, avail, sidle); + if (cid < WIL6210_MAX_CID) + seq_printf(s, + "\n%pM CID %d TID %d BACK([%u] %u TU A%s) [%3d|%3d] idle %s\n", + wil->sta[cid].addr, cid, tid, + txdata->agg_wsize, + txdata->agg_timeout, + txdata->agg_amsdu ? "+" : "-", + used, avail, sidle); + else + seq_printf(s, + "\nBroadcast [%3d|%3d] idle %s\n", + used, avail, sidle); wil_print_vring(s, wil, name, vring, '_', 'H'); } diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index a5fd605..c2a2384 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -68,6 +68,7 @@ MODULE_PARM_DESC(mtu_max, " Max MTU value."); static uint rx_ring_order = WIL_RX_RING_SIZE_ORDER_DEFAULT; static uint tx_ring_order = WIL_TX_RING_SIZE_ORDER_DEFAULT; +static uint bcast_ring_order = WIL_BCAST_RING_SIZE_ORDER_DEFAULT; static int ring_order_set(const char *val, const struct kernel_param *kp) { @@ -216,6 +217,7 @@ static void _wil6210_disconnect(struct wil6210_priv *wil, const u8 *bssid, switch (wdev->iftype) { case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_P2P_CLIENT: + wil_bcast_fini(wil); netif_tx_stop_all_queues(ndev); netif_carrier_off(ndev); @@ -360,6 +362,35 @@ static int wil_find_free_vring(struct wil6210_priv *wil) return -EINVAL; } +int wil_bcast_init(struct wil6210_priv *wil) +{ + int ri = wil->bcast_vring, rc; + + if ((ri >= 0) && wil->vring_tx[ri].va) + return 0; + + ri = wil_find_free_vring(wil); + if (ri < 0) + return ri; + + rc = wil_vring_init_bcast(wil, ri, 1 << bcast_ring_order); + if (rc == 0) + wil->bcast_vring = ri; + + return rc; +} + +void wil_bcast_fini(struct wil6210_priv *wil) +{ + int ri = wil->bcast_vring; + + if (ri < 0) + return; + + wil->bcast_vring = -1; + wil_vring_fini_tx(wil, ri); +} + static void wil_connect_worker(struct work_struct *work) { int rc; @@ -407,6 +438,7 @@ int wil_priv_init(struct wil6210_priv *wil) init_completion(&wil->wmi_call); wil->pending_connect_cid = -1; + wil->bcast_vring = -1; setup_timer(&wil->connect_timer, wil_connect_timer_fn, (ulong)wil); setup_timer(&wil->scan_timer, wil_scan_timer_fn, (ulong)wil); @@ -656,6 +688,7 @@ int w
[PATCH 5/7] wil6210: add bcast structures to WMI
Sync with the wmi definitions from the firmware team Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/wmi.h | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/wmi.h b/drivers/net/wireless/ath/wil6210/wmi.h index 0979650..b290553 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.h +++ b/drivers/net/wireless/ath/wil6210/wmi.h @@ -70,7 +70,6 @@ enum wmi_command_id { WMI_SET_UCODE_IDLE_CMDID= 0x0813, WMI_SET_WORK_MODE_CMDID = 0x0815, WMI_LO_LEAKAGE_CALIB_CMDID = 0x0816, - WMI_MARLON_R_ACTIVATE_CMDID = 0x0817, WMI_MARLON_R_READ_CMDID = 0x0818, WMI_MARLON_R_WRITE_CMDID= 0x0819, WMI_MARLON_R_TXRX_SEL_CMDID = 0x081a, @@ -80,6 +79,7 @@ enum wmi_command_id { WMI_RF_RX_TEST_CMDID= 0x081e, WMI_CFG_RX_CHAIN_CMDID = 0x0820, WMI_VRING_CFG_CMDID = 0x0821, + WMI_BCAST_VRING_CFG_CMDID = 0x0822, WMI_VRING_BA_EN_CMDID = 0x0823, WMI_VRING_BA_DIS_CMDID = 0x0824, WMI_RCP_ADDBA_RESP_CMDID= 0x0825, @@ -99,6 +99,7 @@ enum wmi_command_id { WMI_BF_TXSS_MGMT_CMDID = 0x0837, WMI_BF_SM_MGMT_CMDID= 0x0838, WMI_BF_RXSS_MGMT_CMDID = 0x0839, + WMI_BF_TRIG_CMDID = 0x083A, WMI_SET_SECTORS_CMDID = 0x0849, WMI_MAINTAIN_PAUSE_CMDID= 0x0850, WMI_MAINTAIN_RESUME_CMDID = 0x0851, @@ -596,6 +597,22 @@ struct wmi_vring_cfg_cmd { } __packed; /* + * WMI_BCAST_VRING_CFG_CMDID + */ +struct wmi_bcast_vring_cfg { + struct wmi_sw_ring_cfg tx_sw_ring; + u8 ringid; /* 0-23 vrings */ + u8 encap_trans_type; + u8 ds_cfg; /* 802.3 DS cfg */ + u8 nwifi_ds_trans_type; +} __packed; + +struct wmi_bcast_vring_cfg_cmd { + __le32 action; + struct wmi_bcast_vring_cfg vring_cfg; +} __packed; + +/* * WMI_VRING_BA_EN_CMDID */ struct wmi_vring_ba_en_cmd { @@ -844,7 +861,6 @@ enum wmi_event_id { WMI_IQ_RX_CALIB_DONE_EVENTID= 0x1812, WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815, WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816, - WMI_MARLON_R_ACTIVATE_DONE_EVENTID = 0x1817, WMI_MARLON_R_READ_DONE_EVENTID = 0x1818, WMI_MARLON_R_WRITE_DONE_EVENTID = 0x1819, WMI_MARLON_R_TXRX_SEL_DONE_EVENTID = 0x181a, -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 00/16] checkpatch clean-up of rtl8723au's rtw_security.c
On Sun, March 15, 2015 10:31:42 Matthias Beyer wrote: > Hi, > > On 14-03-2015 20:10:25, M. Vefa Bicakci wrote: > > These commits address a number of checkpatch.pl warnings and errors > > in rtl8723au's rtw_security.c. > > Were these patches already applied? I cannot apply them on top of Greg > KHs latest staging-next! > > I reviewed them and I want to add Reviewed-by: tags, but I would like > to apply them on my kernel source copy first, just to re-check them! Hello Matthias, Thank you for reviewing the patches! I have based and tested these commits on Stephen Rothwell's linux-next.git/master branch. It is possible that I made a mistake by doing this. Nevertheless, I have just verified that these patches cleanly apply to the current version of Greg Kroah-Hartman's staging.git/staging-next branch, [1] as well as Stephen Rothwell's linux-next.git/master branch. [2] In my local repo, here are my remotes: $ git remote -v | grep -E "staging|next" | grep "(fetch)$" nexthttps://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (fetch) staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git (fetch) I have just fetched both of these remotes. $ git log -1 --oneline next/master a68b04c773 Add linux-next specific files for 20150313 $ git log -1 --oneline staging/staging-next 7aa5d5097d Staging: rtl8192u: Use __packed instead of __attribute__((packed)) And here are my two local branches with my commits applied: # Output slightly edited to reduce line length. $ git branch -vv | grep -E "staging|next" * linux-nextc8ab62fb9c [next/master: ahead 16] staging: rtl8723au: Remove unneeded comments staging-next 63f451681e [staging/staging-next: ahead 16] staging: rtl8723au: Remove unneeded comments I hope this clarifies my set-up. Is there something I am doing incorrectly? If there is anything I can assist with, please let me know. Thank you, Vefa [1] https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/log/?h=staging-next [2] https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/log/ -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] wireless: cw1200: Fix suspend
The cw1200 driver implements suspend and resume callbacks and assigns them to the suspend and resume fields of the device_driver struct. These callbacks are never actually called by anything though. Modify the driver to properly use dev_pm_ops so that the suspend function is actually executed upon suspend and drop the empty resume function. Signed-off-by: Lars-Peter Clausen --- drivers/net/wireless/cw1200/cw1200_spi.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c index 964b64a..7603546 100644 --- a/drivers/net/wireless/cw1200/cw1200_spi.c +++ b/drivers/net/wireless/cw1200/cw1200_spi.c @@ -447,7 +447,7 @@ static int cw1200_spi_disconnect(struct spi_device *func) } #ifdef CONFIG_PM -static int cw1200_spi_suspend(struct device *dev, pm_message_t state) +static int cw1200_spi_suspend(struct device *dev) { struct hwbus_priv *self = spi_get_drvdata(to_spi_device(dev)); @@ -458,10 +458,8 @@ static int cw1200_spi_suspend(struct device *dev, pm_message_t state) return 0; } -static int cw1200_spi_resume(struct device *dev) -{ - return 0; -} +static SIMPLE_DEV_PM_OPS(cw1200_pm_ops, cw1200_spi_suspend, NULL); + #endif static struct spi_driver spi_driver = { @@ -472,8 +470,7 @@ static struct spi_driver spi_driver = { .bus= &spi_bus_type, .owner = THIS_MODULE, #ifdef CONFIG_PM - .suspend= cw1200_spi_suspend, - .resume = cw1200_spi_resume, + .pm = &cw1200_pm_ops, #endif }, }; -- 1.8.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 6/6] wlcore: remove wl12xx_platform_data
On Sunday 15 March 2015 10:50:42 Eliad Peller wrote: > yeah, i missed it :/ > > looks like there's no platform that defines platform data for it. > i'll replace the dev_get_platdata() with a function that only parses > the clock-frequency properties (the irq is taken in this case from the > spi_device). > (or maybe i should just drop it, as no one actually uses it?) I don't think we should drop the driver, but dropping the platform_data support sounds reasonable. New users of this driver should all be using DT, and if there is a good reason to use platform_data, it's easily put back. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 2/6] wl12xx: use frequency instead of enumerations for pdata clocks
On Sunday 15 March 2015 10:43:35 Eliad Peller wrote: > > > The other option would be to have the whole series in a immutable > > branch against v3.0-rc1 that can be merged into both wirelss tree > > and omap tree. > > > i think that could be easier. > > or maybe you can just take them all through the omap tree? the wlcore > tree is not under active development, so i don't expect conflicts > there. I'm fine with both these approaches. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Broadcom 43340
On 03/15/15 03:03, Koen Bulcke wrote: Hi, Finally I got some progress thanks to your comment, I can now see the Wifi networks on my Asus X205TA (kernel 4.0RC3). However, connecting to any network seems still to be an issue: vempc:~$ sudo wpa_supplicant -Dwext -iwlan0 -cwpa.conf Forget about wext and try nl80211 driver so: $ sudo wpa_supplicant -Dnl80211 -iwlan0 -cwpa.conf Regards, Arend -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Broadcom 43340
On 03/14/15 23:13, Ochal Christophe wrote: All, On 03/14/2015 09:39 PM, Stefan Lippers-Hollmann wrote: You don't need to run windows for that, the nvram (calibration data, probably the MAC address and related device specific data) is stored in your mainboard's firmware - and exposed to userspace (under linux) via /sys/firmware/efi/efivars/. You just need to identify the correct file and copy it to a place where linux expects to find it (/lib/firmware/brcm/brcmfmac43340-sdio.txt). Regards Stefan Lippers-Hollmann Thanks for the hint, that did it, I'm online! Apparently my hint was not clear enough. Good to hear it works for you. Regards, Arend -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] ath10k: core: harmonize error case handling in ath10k_core_start
On Sat, 14 Mar 2015, Sergei Shtylyov wrote: > Hello. > > On 03/14/2015 11:55 AM, Nicholas Mc Guire wrote: > >> All of the bringup/init functions called in ath10k_core_start return 0 on >> success and != 0 on failure - ath10k_wmi_wait_for_service_ready and >> ath10k_wmi_wait_for_unified_ready were adjusted to fit this model and the >> call sites here fixed up accordingly. > >If you've changed the sense of these function's results, you need to > adjust the call sites in the same patch, because otherwise one wouldn't > be able to bisect this... > yup both patches would mess up if individually applied or reverted. sorry my ignorance - did not think of that problem - will fix it up as a single patch and repost. thx! hofrat -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 00/16] checkpatch clean-up of rtl8723au's rtw_security.c
Hi, On 14-03-2015 20:10:25, M. Vefa Bicakci wrote: > These commits address a number of checkpatch.pl warnings and errors > in rtl8723au's rtw_security.c. Were these patches already applied? I cannot apply them on top of Greg KHs latest staging-next! I reviewed them and I want to add Reviewed-by: tags, but I would like to apply them on my kernel source copy first, just to re-check them! -- Mit freundlichen Grüßen, Kind regards, Matthias Beyer Proudly sent with mutt. Happily signed with gnupg. pgpSDKDxKgmEC.pgp Description: PGP signature
Re: [PATCH v6 0/6] wlcore: add device-tree support
hi Sébastien, On Fri, Mar 13, 2015 at 6:11 PM, Sébastien Szymanski wrote: > Hello, > > On 03/12/2015 01:09 PM, Eliad Peller wrote: >> >> NOTE: all the platform patches were compile-tested >> only. I'm looking for some wl12xx card (that i should >> have somewhere) to test the wl12xx changes (wrt. clocks), >> but haven't found it yet. >> > > I have tested this series on a APF6 board, i.MX6 based board with a > Jorjin WG7311-0A Wifi/BT module which is based on the wl1271l. > > It works. I was able to power up the wlan0 interface and ping google. > thanks for testing it! Eliad. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 5/6] ARM: dts: add wl12xx/wl18xx bindings
On Fri, Mar 13, 2015 at 5:27 PM, Tony Lindgren wrote: > * Eliad Peller [150312 05:09]: >> --- a/arch/arm/mach-omap2/pdata-quirks.c >> +++ b/arch/arm/mach-omap2/pdata-quirks.c >> >> -static void __init omap3_evm_legacy_init(void) >> -{ >> - legacy_init_wl12xx(3840, 0, 149); >> -} > > FYI, at least this part conflicts with the fixes in the arm-soc > tree for the v4.0-rc series as omap3 evm also needs the copy clock > quirk. > >> @@ -419,20 +351,9 @@ static struct pdata_init pdata_quirks[] __initdata = { >> { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, >> { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, }, >> { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, }, >> - { "ti,omap3-evm-37xx", omap3_evm_legacy_init, }, > > So this function cannot be yet removed. > > With that fixed, I was able to iw dev wlan0 scan with series on > omap3 evm :) > thanks for testing it! let's continue the discussion in the other thread regarding the way to merge the patches, and i'll rebase the patches appropriately. Eliad. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 6/6] wlcore: remove wl12xx_platform_data
On Fri, Mar 13, 2015 at 5:13 PM, Tony Lindgren wrote: > * Eliad Peller [150312 05:10]: >> Now that we have wlcore device-tree bindings in place >> (for both wl12xx and wl18xx), remove the legacy >> wl12xx_platform_data struct, and move its members >> into the platform device data (that is passed to wlcore) >> >> Davinci 850 is the only platform that still set >> the platform data in the legacy way (and doesn't >> have DT bindings), so remove the relevant >> code/Kconfig option from the board file (as suggested >> by Sekhar Nori) >> >> Signed-off-by: Luciano Coelho >> Signed-off-by: Eliad Peller >> --- >> arch/arm/mach-davinci/Kconfig | 11 --- >> arch/arm/mach-davinci/board-da850-evm.c| 113 >> - >> drivers/net/wireless/ti/wilink_platform_data.c | 25 -- >> drivers/net/wireless/ti/wl12xx/main.c | 19 ++--- >> drivers/net/wireless/ti/wlcore/boot.c | 1 - >> drivers/net/wireless/ti/wlcore/main.c | 4 +- >> drivers/net/wireless/ti/wlcore/sdio.c | 75 +--- >> drivers/net/wireless/ti/wlcore/wlcore_i.h | 8 +- >> include/linux/wl12xx.h | 25 -- >> 9 files changed, 36 insertions(+), 245 deletions(-) > > I got a build error related to the SPI driver with this series, probably > need to update this patch: > > drivers/net/wireless/ti/wlcore/spi.c: In function ‘wl1271_probe’: > drivers/net/wireless/ti/wlcore/spi.c:334:11: error: ‘struct > wlcore_platdev_data’ has no member named ‘pdata’ > pdev_data.pdata = dev_get_platdata(&spi->dev); >^ > drivers/net/wireless/ti/wlcore/spi.c:335:16: error: ‘struct > wlcore_platdev_data’ has no member named ‘pdata’ > if (!pdev_data.pdata) { > yeah, i missed it :/ looks like there's no platform that defines platform data for it. i'll replace the dev_get_platdata() with a function that only parses the clock-frequency properties (the irq is taken in this case from the spi_device). (or maybe i should just drop it, as no one actually uses it?) thanks, Eliad. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 2/6] wl12xx: use frequency instead of enumerations for pdata clocks
+Kalle On Fri, Mar 13, 2015 at 5:00 PM, Tony Lindgren wrote: > * Eliad Peller [150312 05:09]: >> From: Luciano Coelho >> >> Instead of defining an enumeration with the FW specific values for the >> different clock rates, use the actual frequency instead. Also add a >> boolean to specify whether the clock is XTAL or not. > > Thanks for doing this. Just one comment on how we're going to get this > all merged. Chances are this will cause merge conflicts between the > wireless tree and the omap tree for the platform data and dts changes. > > Can you please separate the wireless changes in this series so we can > do this in the following sets: > > 1. Add support for new things to wireless driver > > 2. Switch platform code to use the new support > > 3. Remove support for platform data with a follow-up patch > the series will still be dependent on each other (e.g. (3) must come only after (2) was applied), so i'm not sure that will be very helpful? > The other option would be to have the whole series in a immutable > branch against v3.0-rc1 that can be merged into both wirelss tree > and omap tree. > i think that could be easier. or maybe you can just take them all through the omap tree? the wlcore tree is not under active development, so i don't expect conflicts there. Eliad. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ath10k: move driver state check before setting throttle
On Fri, Mar 13, 2015 at 06:48:21PM +0200, Kalle Valo wrote: > Rajkumar Manoharan writes: > > > Since thermal daemon is unaware of the device state, it might > > try to adjust the throttle state when the device is powered down. > > So the driver caches the value and will configure it while > > powering up the target. The cached value will be programed later > > once the device is brought up. In such case, returning error > > status is confusing and misleading the user application. Hence > > moving the driver state check before sending wmi command to target. > > > > Reported-by: Matthias Kaehlcke > > Signed-off-by: Rajkumar Manoharan > > What tree do you use as the baseline? Three-way merge doesn't work as > sha1 ids are not found: > Will send rebased version. -Rajkumar -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] ath10k: fix wrong symlink name on error path
On Thu, Mar 12, 2015 at 03:00:32PM +0200, Kalle Valo wrote: > Rajkumar Manoharan writes: > > > Wrong symlink name is used on error path of thermal registration > > and also correcting the error message. > > > > Signed-off-by: Rajkumar Manoharan > > Thanks, patch 2 applied. Not sure yet what to do with patch 1 and 3. > Will rework on patch 1 (ath10k: add sysfs entry to configure quiet period) to use debugfs instead of sysfs. Patch 3 can be dropped. -Rajkumar -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/4] ath10k: Fix interpretation of cooling device state
On Tue, Mar 10, 2015 at 05:59:19PM +0200, Kalle Valo wrote: > Rajkumar Manoharan writes: > > > Setting the sysfs attribute ends up configuring the duty cycle, > > but the interface through which the attribute is exposed > > (cooling_device) is for setting the throttle/cooling state. This > > is confusing the user. Hence renaming the cooling device interfaces > > for better readability. > > > > Cc: Matthias Kaehlcke > > Signed-off-by: Rajkumar Manoharan > > The four patches don't apply for some reason, please rebase. > Sure. Will send v2 patchset. -Rajkumar -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/2] ath10k: Bypass PLL setting on target init for QCA9888
On Thu, Mar 05, 2015 at 02:41:16PM +0200, Kalle Valo wrote: > Rajkumar Manoharan writes: > > > Some of of qca988x solutions are having global reset issue > > during target initialization. Bypassing PLL setting before > > downloading firmware and letting the SoC run on REF_CLK is fixing > > the problem. Corresponding firmware change is also needed to set > > the clock source once the target is initialized. Since 10.2.4 > > firmware is having this ROM patch, applying skip_clock_init only > > for 10.2.4 firmware versions. > > > > Signed-off-by: Rajkumar Manoharan > > --- > > drivers/net/wireless/ath/ath10k/core.c | 10 ++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/drivers/net/wireless/ath/ath10k/core.c > > b/drivers/net/wireless/ath/ath10k/core.c > > index 310e12b..cd20805 100644 > > --- a/drivers/net/wireless/ath/ath10k/core.c > > +++ b/drivers/net/wireless/ath/ath10k/core.c > > @@ -797,6 +797,16 @@ static int ath10k_download_cal_data(struct ath10k *ar) > > ar->cal_mode = ATH10K_CAL_MODE_OTP; > > > > done: > > + if ((ar->hw_rev == ATH10K_HW_QCA988X) && > > + (ar->wmi.op_version == ATH10K_FW_WMI_OP_VERSION_10_2_4)) { > > + ret = ath10k_bmi_write32(ar, hi_skip_clock_init, 1); > > + if (ret) { > > + ath10k_err(ar, "could not write skip_clock_init (%d)\n", > > + ret); > > + return ret; > > + } > > + } > > Didn't Michal mention that this should be a firmware feature flag? > Checking for firmware versions can easily get too complicated, that's > why we have tried to use feature flags for things like this. > Oops.. Sorry for the delay. I missed this mail. IIRC i replied to Michal's question for previous version. From the existing fw_feature flag, there is no clear way to identify 10.2.4 firmware version. Since this patch is needed only for 10.2.4, I used op_version. Otherwise fw_feature has to be extended for 10.2.4. Am i correct? > Also I think this should not be hidden inside > ath10k_download_cal_data(). Maybe ath10k_core_start() is a better place > to do this? > Hmm.. agree. > I can send v3 for this patch. > Thanks for taking care of this. Please let me know if you need help. -Rajkumar -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4.0] ath9k: disable TPC support again (for now)
TPC support has been observed to cause some tx power fluctuations on some devices with at least AR934x and AR938x chips. Disable it for now until the bugs have been found and fixed Signed-off-by: Felix Fietkau --- drivers/net/wireless/ath/ath9k/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 60aa8d7..8529014 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -424,7 +424,7 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah) ah->power_mode = ATH9K_PM_UNDEFINED; ah->htc_reset_init = true; - ah->tpc_enabled = true; + ah->tpc_enabled = false; ah->ani_function = ATH9K_ANI_ALL; if (!AR_SREV_9300_20_OR_LATER(ah)) -- 2.2.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html