Re: [PATCH v3 3/3] nfc: trf7970a: Prevent repeated polling from crashing the kernel

2016-12-24 Thread Geoff Lansberry
Mark - I'm sorry, but I did not write this code, and therefore was not able to accurately describe it. It is fixing a different issue, not the neard segfault that we are still chasing. Last week Jaret Cantu sent a separate email explaining the purpose of the code, which had you copied, did you

Re: [PATCH 6/6] wl1251: Set generated MAC address back to NVS data

2016-12-24 Thread Pali Rohár
On Saturday 24 December 2016 19:17:30 Pavel Machek wrote: > Hi! > > > In case there is no valid MAC address kernel generates random one. > > This patch propagate this generated MAC address back to NVS data > > which will be uploaded to wl1251 chip. So HW would have same MAC > > address as linux

Re: [PATCH v3 3/3] nfc: trf7970a: Prevent repeated polling from crashing the kernel

2016-12-24 Thread Mark Greer
On Sat, Dec 24, 2016 at 11:17:18AM -0500, Geoff Lansberry wrote: > Mark - I'm sorry, but I did not write this code, and therefore was not > able to accurately describe it. It is fixing a different issue, not > the neard segfault that we are still chasing. Last week Jaret Cantu > sent a separate

[PATCH 1/6] firmware: Add request_firmware_prefer_user() function

2016-12-24 Thread Pali Rohár
This function works pretty much like request_firmware(), but it prefer usermode helper. If usermode helper fails then it fallback to direct access. Useful for dynamic or model specific firmware data. Signed-off-by: Pali Rohár --- drivers/base/firmware_class.c | 45

[PATCH 0/6] wl1251: Fix MAC address for Nokia N900

2016-12-24 Thread Pali Rohár
This patch series fix processing MAC address for wl1251 chip found in Nokia N900. Pali Rohár (6): firmware: Add request_firmware_prefer_user() function wl1251: Use request_firmware_prefer_user() for loading NVS calibration data wl1251: Update wl->nvs_len after wl->nvs is valid

[PATCH 3/6] wl1251: Update wl->nvs_len after wl->nvs is valid

2016-12-24 Thread Pali Rohár
In case kmemdup fails thne wl->nvs_len will contains invalid non-zero size. This patch fixes it. Signed-off-by: Pali Rohár --- drivers/net/wireless/ti/wl1251/main.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 2/6] wl1251: Use request_firmware_prefer_user() for loading NVS calibration data

2016-12-24 Thread Pali Rohár
NVS calibration data for wl1251 are model specific. Every one device with wl1251 chip has different and calibrated in factory. Not all wl1251 chips have own EEPROM where are calibration data stored. And in that case there is no "standard" place. Every device has stored them on different place

Re: [PATCH 5/6] wl1251: Parse and use MAC address from supplied NVS data

2016-12-24 Thread Pavel Machek
On Sat 2016-12-24 17:53:00, Pali Rohár wrote: > This patch implements parsing MAC address from NVS data which are sent to > wl1251 chip. Calibration NVS data could contain valid MAC address and it > will be used instead randomly generated. will be used instead of randomly generated one. > This

Re: [PATCH 6/6] wl1251: Set generated MAC address back to NVS data

2016-12-24 Thread Pavel Machek
Hi! > In case there is no valid MAC address kernel generates random one. This > patch propagate this generated MAC address back to NVS data which will be > uploaded to wl1251 chip. So HW would have same MAC address as linux kernel > uses. > return 0; > } > > +static int

[PATCH 4/6] wl1251: Generate random MAC address only if driver does not have valid

2016-12-24 Thread Pali Rohár
Before this patch driver generated random MAC address every time when was doing initialization. And after that random MAC address could be overwritten with fixed one if provided. This patch changes order. First it tries to read fixed MAC address and if it fails then driver generates random MAC

[PATCH 6/6] wl1251: Set generated MAC address back to NVS data

2016-12-24 Thread Pali Rohár
In case there is no valid MAC address kernel generates random one. This patch propagate this generated MAC address back to NVS data which will be uploaded to wl1251 chip. So HW would have same MAC address as linux kernel uses. Signed-off-by: Pali Rohár ---

[PATCH 5/6] wl1251: Parse and use MAC address from supplied NVS data

2016-12-24 Thread Pali Rohár
This patch implements parsing MAC address from NVS data which are sent to wl1251 chip. Calibration NVS data could contain valid MAC address and it will be used instead randomly generated. This patch also move code for requesting NVS data from userspace to driver initialization code to make sure

Re: [PATCH 3/6] wl1251: Update wl->nvs_len after wl->nvs is valid

2016-12-24 Thread Pavel Machek
On Sat 2016-12-24 17:52:58, Pali Rohár wrote: > In case kmemdup fails thne wl->nvs_len will contains invalid non-zero size. > This patch fixes it. If kmemdup fails, then wl->nvs_len will contain invalid non-zero size. ? This probably should go as first in series, as it is bugfix?

Re: [PATCH 4/6] wl1251: Generate random MAC address only if driver does not have valid

2016-12-24 Thread Pavel Machek
On Sat 2016-12-24 17:52:59, Pali Rohár wrote: > Before this patch driver generated random MAC address every time when was > doing initialization. And after that random MAC address could be > overwritten with fixed one if provided. Before this patch, driver generated random MAC address every time

Re: [PATCH 4/6] wl1251: Generate random MAC address only if driver does not have valid

2016-12-24 Thread Pali Rohár
On Saturday 24 December 2016 19:08:54 Pavel Machek wrote: > On Sat 2016-12-24 17:52:59, Pali Rohár wrote: > > Before this patch driver generated random MAC address every time > > when was doing initialization. And after that random MAC address > > could be overwritten with fixed one if provided. >

Re: [PATCH 5/6] wl1251: Parse and use MAC address from supplied NVS data

2016-12-24 Thread Pali Rohár
On Saturday 24 December 2016 19:14:21 Pavel Machek wrote: > On Sat 2016-12-24 17:53:00, Pali Rohár wrote: > > @@ -1581,10 +1598,16 @@ int wl1251_init_ieee80211(struct wl1251 > > *wl) > > > > wl->hw->queues = 4; > > > > + if (wl->nvs == NULL && !wl->use_eeprom) { > > + ret =

Re: wl1251 NVS calibration data format

2016-12-24 Thread Pali Rohár
On Saturday 17 December 2016 12:14:50 Pali Rohár wrote: > I will try to play with driver if it is really truth! > > I already looked into original TI's multiplatform HAL driver for > wl1251 chip (big mess) and found there that there is wl1251 command > to read mac address from chip. It could be