Re: [PATCH 07/33] iwlwifi: mvm: use match_string() helper

2018-05-21 Thread Luca Coelho
On Mon, 2018-05-21 at 19:57 +0800, Yisheng Xie wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded variant. > > Cc: Kalle Valo > Cc: Intel Linux Wireless > Cc: Johannes Berg

Re: [PATCH][next] iwlwifi: mvm: remove division by size of sizeof(struct ieee80211_wmm_rule)

2018-04-17 Thread Luca Coelho
On Wed, 2018-04-11 at 14:05 +0100, Colin King wrote: > From: Colin Ian King > > The subtraction of two struct ieee80211_wmm_rule pointers leaves a > result > that is automatically scaled down by the size of the size of pointed- > to > type, hence the division by

Re: [PATCH 13/17] iwlwifi: mvm: Convert timers to use timer_setup()

2017-11-06 Thread Luca Coelho
On Mon, 2017-11-06 at 11:45 -0800, Kees Cook wrote: > On Sun, Oct 29, 2017 at 5:28 AM, Luca Coelho <l...@coelho.fi> wrote: > > From: Kees Cook <keesc...@chromium.org> > > > > In preparation for unconditionally passing the struct timer_list > > pointer to &

[PATCH 13/17] iwlwifi: mvm: Convert timers to use timer_setup()

2017-10-29 Thread Luca Coelho
direct copy of the rcu_ptr passed to the original callback. It may be possible to improve this to just use baid_data->mvm->baid_map[baid_data->baid] instead. Cc: Johannes Berg <johannes.b...@intel.com> Cc: Emmanuel Grumbach <emmanuel.grumb...@intel.com> Cc: Luca Coelho <lucia

Re: [PATCH] drivers/wireless: iwlwifi/mvm: Convert timers to use timer_setup()

2017-10-24 Thread Luca Coelho
baid_data is unclear, so this adds a direct copy > of the > rcu_ptr passed to the original callback. It may be possible to > improve this > to just use baid_data->mvm->baid_map[baid_data->baid] instead. > > Cc: Johannes Berg <johannes.b...@intel.com> > Cc: E

[PATCH] iwlwifi: mvm: only send LEDS_CMD when the FW supports it

2017-09-07 Thread Luca Coelho
From: Luca Coelho <luciano.coe...@intel.com> The LEDS_CMD command is only supported in some newer FW versions (e.g. iwlwifi-8000C-31.ucode), so we can't send it to older versions (such as iwlwifi-8000C-27.ucode). To fix this, check for a new bit in the FW capabilities TLV that tell

Re: [GIT] Networking

2017-09-06 Thread Luca Coelho
re it still works with version 27. Okay, I found the offending patch: commit 7089ae634c50544b29b31faf1a751e8765c8de3b Author: Johannes Berg <johannes.b...@intel.com> AuthorDate: Wed Jun 28 16:19:49 2017 +0200 Commit: Luca Coelho <luciano.coe...@intel.com> CommitDate: Wed Aug 9

Re: [PATCH] iwlwifi: Demote messages about fw flags size to info

2017-08-01 Thread Luca Coelho
Hi João Paulo, On Tue, 2017-08-01 at 15:58 -0700, João Paulo Rechi Vita wrote: > Hello Luca, > > On Mon, Jul 24, 2017 at 4:01 AM, Coelho, Luciano > wrote: > > On Fri, 2017-07-21 at 07:51 -0700, João Paulo Rechi Vita wrote: > > (...) > > > > Currently these messages

Re: [PATCH v2] iwlwifi: mvm: Fix a memory leak in an error handling path in 'iwl_mvm_sar_get_wgds_table()'

2017-07-19 Thread Luca Coelho
On Fri, 2017-07-14 at 12:06 +0200, Christophe JAILLET wrote: > We should free 'wgds.pointer' here as done a few lines above in another > error handling path. > It was allocated within 'acpi_evaluate_object()'. > > Signed-off-by: Christophe JAILLET > --- > v2:

Re: [PATCH] iwlwifi: mvm: add const to thermal_cooling_device_ops structure

2017-06-29 Thread Luca Coelho
On Wed, 2017-06-28 at 14:49 +0300, Luca Coelho wrote: > On Wed, 2017-06-21 at 14:10 +0530, Bhumika Goyal wrote: > > Declare thermal_cooling_device_ops structure as const as it is only passed > > as an argument to the function thermal_cooling_device_register and this > > argu

Re: [PATCH] iwlwifi: mvm: fix iwl_mvm_sar_find_wifi_pkg corner case

2017-06-28 Thread Luca Coelho
On Tue, 2017-06-27 at 17:24 +0200, Arnd Bergmann wrote: > gcc warns about what it thinks is an uninitialized variable > access: > > drivers/net/wireless/intel/iwlwifi/mvm/fw.c: In function > 'iwl_mvm_sar_find_wifi_pkg.isra.14': > drivers/net/wireless/intel/iwlwifi/mvm/fw.c:1102:5: error:

Re: [PATCH] iwlwifi: mvm: add const to thermal_cooling_device_ops structure

2017-06-28 Thread Luca Coelho
On Wed, 2017-06-21 at 14:10 +0530, Bhumika Goyal wrote: > Declare thermal_cooling_device_ops structure as const as it is only passed > as an argument to the function thermal_cooling_device_register and this > argument is of type const. So, declare the structure as const. > > Signed-off-by:

Re: [PATCH] net: wireless: intel: iwlwifi: dvm: remove unused defines

2017-06-07 Thread Luca Coelho
On Wed, 2017-06-07 at 01:20 +0200, Seraphime Kirkovski wrote: > Those constants have been unused for quite some time now. > > Signed-off-by: Seraphime Kirkovski > --- > I've compile-tested it. Thanks. I've applied it to our internal tree and it will reach the mainline at

Re: drivers/net/wireless/intel/iwlwifi/pcie/trans.c: 2 * suspicious code ?

2017-01-09 Thread Luca Coelho
On Fri, 2017-01-06 at 17:47 +, David Binderman wrote: > Hello there, Hi David, > 1. > > drivers/net/wireless/intel/iwlwifi/pcie/trans.c:2039:14: warning: decrement > of a boolean expression [-Wbool-operation] > > Source code is > >txq->block--; > > Maybe someone got a bool

Re: [PATCH 5/8] linux: drop __bitwise__ everywhere

2016-12-19 Thread Luca Coelho
intel/iwlwifi/iwl-fw-file.h | 4 ++-- For drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h: Acked-by: Luca Coelho <luciano.coe...@intel.com> -- Luca.

Re: [PATCH 8/8] Makefile: drop -D__CHECK_ENDIAN__ from cflags

2016-12-19 Thread Luca Coelho
| 2 -- > drivers/net/wireless/intel/iwlwifi/Makefile | 2 +- > drivers/net/wireless/intel/iwlwifi/dvm/Makefile | 2 +- > drivers/net/wireless/intel/iwlwifi/mvm/Makefile | 2 +- For the drivers/net/wireless/intel/iwlwifi/ part: Acked-by: Luca Coelho <luciano.coe...@intel.com> -- Luca.

Re: Intel Wireless 7260 Microcode SW error detected

2016-10-19 Thread Luca Coelho
Hi Tibor, On Sun, 2016-10-16 at 20:08 +0200, Billes Tibor wrote: > I have Lenovo laptop with an Intel Wireless 7260 wifi module and the > latest stable kernel 4.8.1. I was playing a movie from an sshfs mounted > file system, when the movie just froze and my network stopped working. > Dmesg

Re: linux-4.9-rc1/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561: poor error checking ?

2016-10-17 Thread Luca Coelho
Hi David, On Mon, 2016-10-17 at 07:40 +, David Binderman wrote: > Hello there, > > linux-4.9-rc1/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1561]: (style) > Checking if unsigned variable 'len' is less than zero. > > Source code is > > len = min((size_t)le32_to_cpu(rsp->len) << 2,

Re: [PATCH] iwlwifi: pcie: fix SPLC structure parsing

2016-10-13 Thread Luca Coelho
On Thu, 2016-10-13 at 14:55 +0200, Paul Bolle wrote: > On Thu, 2016-10-13 at 15:44 +0300, Luca Coelho wrote: > >  Even though there is apparently something wrong with this part of the > > ACPI table on you laptop, since it doesn't match our specifications. > >  In any case,

Re: [PATCH] iwlwifi: pcie: fix SPLC structure parsing

2016-10-13 Thread Luca Coelho
On Thu, 2016-10-13 at 08:56 -0500, Chris Rorvick wrote: > Hi Luca, > > > On Thu, 2016-10-13 at 13:21 +0300, Luca Coelho wrote: > > Could you please give this a spin? I have tested it with some handmade > > ACPI tables in QEMU and it seems to work fine now. > >

Re: [PATCH] iwlwifi: pcie: fix SPLC structure parsing

2016-10-13 Thread Luca Coelho
On Thu, 2016-10-13 at 14:36 +0200, Paul Bolle wrote: > On Thu, 2016-10-13 at 14:30 +0300, Luca Coelho wrote: > > I forgot to say... could you load the iwlwifi module with debug=0x01 > > (module parameter), so we can see the messages the driver is printing > > when it

Re: [PATCH] iwlwifi: pcie: fix SPLC structure parsing

2016-10-13 Thread Luca Coelho
On Thu, 2016-10-13 at 13:27 +0200, Paul Bolle wrote: > Luca, > > On Thu, 2016-10-13 at 13:21 +0300, Luca Coelho wrote: > > Could you please give this a spin? I have tested it with some handmade > > ACPI tables in QEMU and it seems to work fine now. > > &g

[PATCH] iwlwifi: pcie: fix SPLC structure parsing

2016-10-13 Thread Luca Coelho
From: Luca Coelho <luciano.coe...@intel.com> The SPLC data parsing is too restrictive and was not trying find the correct element for WiFi. This causes problems with some BIOSes where the SPLC method exists, but doesn't have a WiFi entry on the first element of the list. The domain type

Re: [PATCH] iwlwifi: pcie: reduce "unsupported splx" to a warning

2016-10-13 Thread Luca Coelho
Wed, 2016-10-12 at 15:24 +0300, Luca Coelho wrote: > > Hi Chris, > > On Tue, 2016-10-11 at 09:09 -0500, Chris Rorvick wrote: > > > On Tue, Oct 11, 2016 at 5:11 AM, Paul Bolle wrote: > > > > > This is not coming from the NIC itself, but from the platform's ACPI &

Re: [PATCH] iwlwifi: pcie: reduce "unsupported splx" to a warning

2016-10-12 Thread Luca Coelho
On Wed, 2016-10-12 at 14:36 +0200, Paul Bolle wrote: > On Wed, 2016-10-12 at 15:24 +0300, Luca Coelho wrote: > > Okay... Actually this is a structure in the BIOS and the actual method > > we call is SPLC.  The SPLC method may return one item from this table, > > or somethi

Re: [PATCH] iwlwifi: pcie: reduce "unsupported splx" to a warning

2016-10-12 Thread Luca Coelho
On Tue, 2016-10-11 at 23:32 -0500, Chris Rorvick wrote: > On Tue, Oct 11, 2016 at 5:11 AM, Paul Bolle wrote: > > For what it's worth, on my machine I have twenty (!) SPLX entries, all > > reading: > > Name (SPLX, Package (0x04) > > { > > Zero, > >

Re: [PATCH] iwlwifi: pcie: reduce "unsupported splx" to a warning

2016-10-12 Thread Luca Coelho
Hi Chris, On Tue, 2016-10-11 at 09:09 -0500, Chris Rorvick wrote: > On Tue, Oct 11, 2016 at 5:11 AM, Paul Bolle wrote: > > > This is not coming from the NIC itself, but from the platform's ACPI > > > tables. Can you tell us which platform you are using? > > > Interesting.

Re: [PATCH] iwlwifi: pcie: reduce "unsupported splx" to a warning

2016-10-12 Thread Luca Coelho
Hi Paul, On Tue, 2016-10-11 at 12:11 +0200, Paul Bolle wrote: > On Mon, 2016-10-10 at 17:02 +0300, Luca Coelho wrote: > > On Mon, 2016-10-10 at 02:19 -0500, Chris Rorvick wrote: > > This is not coming from the NIC itself, but from the platform's ACPI > > tables.  Can you tell

Re: [PATCH] iwlwifi: pcie: reduce "unsupported splx" to a warning

2016-10-10 Thread Luca Coelho
Hi, On Mon, 2016-10-10 at 02:19 -0500, Chris Rorvick wrote: > Commit bcb079a14d75 ("iwlwifi: pcie: retrieve and parse ACPI power > limitations") looks for a specific structure in the ACPI tables for > setting the default power limit. The data returned for at least some > dual band chipsets is not

Re: [PATCH RESEND] iwlwifi, Do not implement thermal zone unless ucode is loaded

2016-07-13 Thread Luca Coelho
On Wed, 2016-07-13 at 09:50 +0300, Kalle Valo wrote: > Prarit Bhargava writes: > > > > We implement thermal zone because we do support it, but the > > > problem is > > > that we need the firmware to be loaded for that. So you can argue > > > that > > > we should register

Re: [PATCH] iwlwifi: add missing type declaration

2016-07-12 Thread Luca Coelho
o just declare 'struct device' before its > first use, > rather than including the entire header file. > > Signed-off-by: Arnd Bergmann <a...@arndb.de> > Fixes: 21cb3222fe56 ("iwlwifi: decouple PCIe transport from > mac80211") > --- Acked-by: Luca Coelho <luciano.coe...@intel.com> Agree with Kalle that he will take this directly to wireless-drivers- next. -- Cheers, Luca.

Re: [PATCH] iwlwifi: Remove unused array 'iwlagn_loose_lookup'

2016-06-06 Thread Luca Coelho
On Fri, 2016-06-03 at 14:39 -0700, Guenter Roeck wrote: > gcc-6 reports the following error if -Werror=unused-const-variable > is enabled. > > drivers/net/wireless/intel/iwlwifi/dvm/lib.c:210:21: error: > 'iwlagn_loose_lookup' defined but not used > > Signed-off-by: Guenter Roeck

[PATCH] iwlwifi: mvm: fix merge damage in tx.c

2016-05-18 Thread Luca Coelho
From: Luca Coelho <luciano.coe...@intel.com> During the merge in commit 909b27f70643 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net"), there was a small merge damage where one instance of info was not converted into skb_info. Fix this. Signed-off-by: Luca Coe

Re: iwlwifi: mvm: add reorder buffer per queue

2016-05-16 Thread Luca Coelho
On Fri, 2016-05-13 at 11:54 +0300, Dan Carpenter wrote: > Hello Sara Sharon, > > The patch b915c10174fb: "iwlwifi: mvm: add reorder buffer per queue" > from Mar 23, 2016, leads to the following static checker warnings: > > drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:912 >