Re: FTM/measurement APIs

2018-08-22 Thread Johannes Berg
Hi Lior, > Yes AOA (angle of arrival) is based on CIR(channel impulse response) or CFR > (channel frequency response). Our 11ad chip can do CIR but most other chips do > CFR (I think). AOA finds azimuth and elevation from CIR by running some > algorithm in user space and using a database. Not sure

Re: FTM/measurement APIs

2018-08-22 Thread Lior David
Hi Johannes, On 8/20/2018 3:03 PM, Johannes Berg wrote: > Hi all, > > After much delay on our side (don't ask), I'm contemplating upstream > APIs for FTM again. > I appreciate the effort. I had a discussion with Luca on the previous API a long time ago and gave some comments, mainly to ensure it

[PATCH 0/2] correct use of IEEE80211_VHT_CAP_RXSTBC_X

2018-08-22 Thread Danek Duvall
Fix two slightly different problematic usages of IEEE80211_VHT_CAP_RXSTBC_[1234] as discussed on the list. Danek Duvall (2): mac80211: correct use of IEEE80211_VHT_CAP_RXSTBC_X mac80211_hwsim: correct use of IEEE80211_VHT_CAP_RXSTBC_X drivers/net/wireless/mac80211_hwsim.c | 3 --- net/mac802

[PATCH 2/2] mac80211_hwsim: correct use of IEEE80211_VHT_CAP_RXSTBC_X

2018-08-22 Thread Danek Duvall
The mac80211_hwsim driver intends to say that it supports up to four STBC receive streams, but instead it ends up saying something undefined. The IEEE80211_VHT_CAP_RXSTBC_X macros aren't independent bits that can be ORed together, but values. In this case, _4 is the appropriate one to use. Signed

[PATCH 1/2] mac80211: correct use of IEEE80211_VHT_CAP_RXSTBC_X

2018-08-22 Thread Danek Duvall
The mod mask for VHT capabilities intends to say that you can override the number of STBC receive streams, and it does, but only by accident. The IEEE80211_VHT_CAP_RXSTBC_X aren't bits to be set, but values (albeit left-shifted). ORing the bits together gets the right answer, but we should use the

Re: [PATCH] rt2x00: use simple_read_from_buffer()

2018-08-22 Thread Stanislaw Gruszka
On Wed, Aug 22, 2018 at 01:41:26PM +0300, Dan Carpenter wrote: > The problem with this copy_to_user() calls is that they don't ensure > that "size" is less than the "length" which the user provided. > > Obviously, this is debugfs and "size" is normally going to be very small > so it probably doesn

Re: [PATCH 1/2] cfg80211: let's wmm_rule be part of reg_rule structure

2018-08-22 Thread Stanislaw Gruszka
On Wed, Aug 22, 2018 at 01:54:27PM +0200, Johannes Berg wrote: > On Wed, 2018-08-22 at 13:52 +0200, Stanislaw Gruszka wrote: > > Make wmm_rule be part of reg_rule structure. This simplify code > > a lot at cost of having bigger memory usage. However in most cases > > we have only few reg_rule's and

Re: [PATCH 07/15] iwlwifi: add 80211 hdr offset to trace data

2018-08-22 Thread Luca Coelho
On Wed, 2018-08-22 at 14:45 +0300, Kalle Valo wrote: > Luca Coelho writes: > > > From: Mordechay Goodstein > > > > Every rx mpdu cmd is built from cmd_hdr | 80211_hdr. The problem > > is > > that the size of cmd_hdr changes with API changes and we don't know > > where the 80211_hdr starts. > >

Re: [PATCH 1/2] cfg80211: let's wmm_rule be part of reg_rule structure

2018-08-22 Thread Johannes Berg
On Wed, 2018-08-22 at 13:52 +0200, Stanislaw Gruszka wrote: > Make wmm_rule be part of reg_rule structure. This simplify code > a lot at cost of having bigger memory usage. However in most cases > we have only few reg_rule's and when we have many like in iwlwifi > we do not save memory as we alloca

[PATCH 1/2] cfg80211: let's wmm_rule be part of reg_rule structure

2018-08-22 Thread Stanislaw Gruszka
Make wmm_rule be part of reg_rule structure. This simplify code a lot at cost of having bigger memory usage. However in most cases we have only few reg_rule's and when we have many like in iwlwifi we do not save memory as we allocate wmm_rule for each channel. Signed-off-by: Stanislaw Gruszka ---

[PATCH 2/2] cfg80211: validate wmm rule when setting

2018-08-22 Thread Stanislaw Gruszka
Add validation check for wmm rule when copy rules from fwdb and print error when rule is invalid. Signed-off-by: Stanislaw Gruszka --- net/wireless/reg.c | 64 +- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/net/wireless/reg.

Re: Use of IEEE80211_VHT_CAP_RXSTBC_* in mac80211_hwsim

2018-08-22 Thread Johannes Berg
On Fri, 2018-08-17 at 14:21 -0700, Danek Duvall wrote: > The mac80211_hwsim driver puts this in its VHT capabilities info field: > > IEEE80211_VHT_CAP_RXSTBC_1 | > IEEE80211_VHT_CAP_RXSTBC_2 | > IEEE80211_VHT_CAP_RXSTBC_3 | > IEEE80211_VHT_CAP_RXSTBC_4 Uh, yeah, that's garbage.

Re: [PATCH 07/15] iwlwifi: add 80211 hdr offset to trace data

2018-08-22 Thread Kalle Valo
Luca Coelho writes: > From: Mordechay Goodstein > > Every rx mpdu cmd is built from cmd_hdr | 80211_hdr. The problem is > that the size of cmd_hdr changes with API changes and we don't know > where the 80211_hdr starts. > > By adding the size of cmd_hdr dynamically, we can ensure that we always

Re: [PATCH v2 05/17] iwlwifi: add d3 debug data support

2018-08-22 Thread Luca Coelho
On Wed, 2018-08-22 at 14:37 +0300, Kalle Valo wrote: > Luca Coelho writes: > > > From: Shahar S Matityahu > > > > During d3, the firmware records debug data into internal buffer > > if debug data collection occurs, collect the data that was written > > to the > > buffer > > > > Signed-off-by:

Re: [PATCH v2 05/17] iwlwifi: add d3 debug data support

2018-08-22 Thread Kalle Valo
Luca Coelho writes: > From: Shahar S Matityahu > > During d3, the firmware records debug data into internal buffer > if debug data collection occurs, collect the data that was written to the > buffer > > Signed-off-by: Shahar S Matityahu > Signed-off-by: Luca Coelho [...] > --- a/drivers/net

Re: [RFC 3/3] mac80211: add ieee80211_reorder_txq

2018-08-22 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > On 2018-08-21 05:24, Toke Høiland-Jørgensen wrote: >> Rajkumar Manoharan writes: >> >>> This allows the driver to refill airtime fairness deficit >>> where the driver will not access txqs by ieee80211_next_txq. >>> In tx push mode data path, high priority txqs will

[PATCH] rt2x00: use simple_read_from_buffer()

2018-08-22 Thread Dan Carpenter
The problem with this copy_to_user() calls is that they don't ensure that "size" is less than the "length" which the user provided. Obviously, this is debugfs and "size" is normally going to be very small so it probably doesn't matter, but this is the correct thing to do. Signed-off-by: Dan Carpe