[PATCH] ath9k: fix radar parameters initialization

2014-09-11 Thread Lorenzo Bianconi
Move ath9k_hw_set_radar_params() in ath9k_hw_reset() in order to avoid AR_PHY_RADAR registers are overwritten after hw reset Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/channel.c | 2 -- drivers/net/wireless/ath/ath9k/hw.c | 5 + 2

[PATCHv2 01/10] ath9k: export methods related to ACK timeout estimation

2014-09-15 Thread Lorenzo Bianconi
Remove static keyword and export ath9k_hw_setslottime(), ath9k_hw_set_ack_timeout() and ath9k_hw_set_cts_timeout() in hw.h. These methods will be used in ACK timeout estimation algorithm (dynack) Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/hw.c

[PATCHv2 02/10] ath9k: add duration field to ath_tx_status

2014-09-15 Thread Lorenzo Bianconi
Add duration field to ath_tx_status in order to report frame duration for each entry in multi-retry chain. These fields will be used in ACK timeout estimation algorithm (dynack) Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/ar9002_mac.c | 7

[PATCHv2 08/10] ath9k: add debugfs support for dynack

2014-09-15 Thread Lorenzo Bianconi
Add ack_to entry to debugfs in order to dump current ACK timeout value Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/debug.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/debug.c

[PATCHv2 04/10] ath9k: add config for (en|dis)abling ACK timeout estimation

2014-09-15 Thread Lorenzo Bianconi
Add ACK timeout estimation algorithm to ath9k Makefile and Kconfig Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/Kconfig | 9 + drivers/net/wireless/ath/ath9k/Makefile | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers/net

[PATCHv2 05/10] ath9k: do not overwrite ACK timeout estimation

2014-09-15 Thread Lorenzo Bianconi
Do not overwrite ACK timeout estimation in ath9k_hw_init_global_settings() if dynack processing has been enabled Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/hw.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless

[PATCHv2 03/10] ath9k: add dynamic ACK timeout estimation

2014-09-15 Thread Lorenzo Bianconi
Add dynamic ACK timeout estimation algorithm based on ACK frame RX timestamp, TX frame timestamp and frame duration. Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com Tested-by: Philippe Duchein wireless-...@duchein.net --- drivers/net/wireless/ath/ath.h | 2 + drivers/net

[PATCHv2 07/10] ath9k: enable control frame reception

2014-09-15 Thread Lorenzo Bianconi
Set control frame bit in rx filter if dynack processing has been activated in order to enable ACK frame reception Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCHv2 10/10] ath9k: initialize ath_node linked list

2014-09-15 Thread Lorenzo Bianconi
Initialize neighbor linked list used by dynack to compute ACK timeout as the maximum STA ACK timeout Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k

[PATCHv2 06/10] ath9k: add sampling methods for (tx|rx) timestamp

2014-09-15 Thread Lorenzo Bianconi
Add sampling methods for ACK RX timestamp in ath_rx_tasklet() and for TX frame timestamp in ath_tx_complete_aggr() and in ath_tx_process_buffer(). These samples will be used in dynack processing for ACK timeout estimation Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers

[PATCH] ath9k: enable ext channel pulse detection

2014-09-16 Thread Lorenzo Bianconi
Enable pulse detection on extension channel if 40MHz channel width has been set Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/hw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath

Re: compile Failed in openwrt for [PATCH] “add support for ack timeout estimation in ath9k driver ”

2014-09-22 Thread Lorenzo Bianconi
Hi, all, Hi, I have read the http://www.spinics.net/lists/linux-wireless/msg124980.html for patching the ath9k driver in compat-wireless-2014-05-22 in openwrt trunk, but when I patch, for example, “the [PATCH 01/10] ath9k: export methods related to ack timeout estimation”, it failed.

Re: [PATCHv3 2/2] iw: add auto parameter to set distance command

2014-10-09 Thread Lorenzo Bianconi
On Sun, 2014-09-07 at 19:32 +0200, Lorenzo Bianconi wrote: Add auto parameter to set distance command in order to enable ACK timeout estimation algorithm (dynack). Dynack is automatically disabled setting valid value for coverage class. Currently dynack is supported just by ath9k This patch

[PATCH] ath9k: do not overwrite AR_PHY_RADAR_1 MSB

2014-10-14 Thread Lorenzo Bianconi
Do not overwrite AR_PHY_RADAR_1 most significant byte default value Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/ar5008_phy.c | 5 - drivers/net/wireless/ath/ath9k/ar9003_phy.c | 5 - 2 files changed, 8 insertions(+), 2 deletions

[RFC 0/3] add TPC capability for AR9003 based chips

2014-11-20 Thread Lorenzo Bianconi
) Lorenzo Bianconi (3): ath9k: add chainmask parameter to ath9k_hw_get_scaled_power() ath9k: add TX power per-rate per-chain tables ath9k: add TPC capability to TX descriptor path drivers/net/wireless/ath/ath9k/ar9002_mac.c| 8 +- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 68

[RFC 2/3] ath9k: add TX power per-rate per-chain tables

2014-11-20 Thread Lorenzo Bianconi
Add TX power per-rate per-chain tables for different MIMO modes (e.g STBC) in order to cap the maximum TX power value per-rate in the TX descriptor path. Cap TX power for self generated frames (ACK, RTS/CTS). Currently TPC is supported just by AR9003 based chips Signed-off-by: Lorenzo Bianconi

[RFC 3/3] ath9k: add TPC capability to TX descriptor path

2014-11-20 Thread Lorenzo Bianconi
Add TPC capability to TX descriptor path. Cap per-packet TX power according to TX power per-rate per-chain tables. Currently TPC is supported just by AR9003 based chips Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/ar9002_mac.c | 8

[RFC 1/3] ath9k: add chainmask parameter to ath9k_hw_get_scaled_power()

2014-11-20 Thread Lorenzo Bianconi
Add chainmask parameter to ath9k_hw_get_scaled_power() in order to compute maximum TX power per rate for different number of tx chains. ath9k_hw_get_scaled_power() will be used during TPC TX power initialization Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net

Re: [RFC 2/3] ath9k: add TX power per-rate per-chain tables

2014-11-21 Thread Lorenzo Bianconi
On 2014-11-20 14:31, Lorenzo Bianconi wrote: Add TX power per-rate per-chain tables for different MIMO modes (e.g STBC) in order to cap the maximum TX power value per-rate in the TX descriptor path. Cap TX power for self generated frames (ACK, RTS/CTS). Currently TPC is supported just

[PATCH 1/2] ath9k: add TX power per-rate tables

2014-11-24 Thread Lorenzo Bianconi
Add TX power per-rate tables for different MIMO modes (e.g STBC) in order to cap the maximum TX power value per-rate in the TX descriptor path. Cap TX power for self generated frames (ACK, RTS/CTS). Currently TPC is supported just by AR9003 based chips Signed-off-by: Lorenzo Bianconi

[PATCH 0/2] add TPC capability for AR9003 based chips

2014-11-24 Thread Lorenzo Bianconi
according to TX power per-rate tables This pachset is based on Adrian Chadd's hints (https://www.mail-archive.com/ath9k-devel@lists.ath9k.org/msg10396.html) Changes since RFC: - make the ah-txpower array one-dimensional and store max TX power for the current chainmask only Lorenzo Bianconi (2

[PATCH 2/2] ath9k: add TPC capability to TX descriptor path

2014-11-24 Thread Lorenzo Bianconi
Add TPC capability to TX descriptor path. Cap per-packet TX power according to TX power per-rate tables. Currently TPC is supported just by AR9003 based chips Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/ar9002_mac.c | 8 +++ drivers/net

Re: [PATCH] mac80211: enable TPC through mac80211 stack

2014-11-27 Thread Lorenzo Bianconi
On Thu, 2014-11-27 at 14:39 +0100, Lorenzo Bianconi wrote: Configure per packet Transmit Power Control (TPC) in lower drivers checking if user_power_level has been set to IEEE80211_UNSET_POWER_LEVEL Err, what? Why? how? what does this do? johannes I would like to enable TPC in ath9k using

Re: [PATCH] mac80211: enable TPC through mac80211 stack

2014-11-28 Thread Lorenzo Bianconi
I would like to enable TPC in ath9k using iw command: iw dev wlan0 set txpower auto I knew user_power_level is set to IEEE80211_UNSET_POWER_LEVEL in that case. Is there a better way than to check user_power_level? But ... the API already allows for that flexibility? I think if anything

Re: [PATCH] mac80211: enable TPC through mac80211 stack

2014-11-29 Thread Lorenzo Bianconi
On Fri, 2014-11-28 at 16:02 +0100, Lorenzo Bianconi wrote: I just need to notify lower driver (ath9k in my case) to setup TPC registers in order to take into account TX power configured in frame descriptors. For that purpose I added tpc_enabled flags in ieee80211_bss_conf

[PATCHv2] mac80211: enable TPC through mac80211 stack

2014-12-01 Thread Lorenzo Bianconi
using less than specified from userspace), whereas TPC is disabled if nl80211_tx_power_setting is set to NL80211_TX_POWER_FIXED (use value configured from userspace) Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- include/net/mac80211.h | 10 ++ net/mac80211/cfg.c

Re: [PATCHv2] mac80211: enable TPC through mac80211 stack

2014-12-12 Thread Lorenzo Bianconi
On Mon, 2014-12-01 at 11:30 +0100, Lorenzo Bianconi wrote: Enable/disable per packet Transmit Power Control (TPC) in lower drivers according to TX power settings configured by the user. In particular TPC is enabled if value passed in enum nl80211_tx_power_setting is NL80211_TX_POWER_AUTOMATIC

Re: [PATCHv2] mac80211: enable TPC through mac80211 stack

2014-12-15 Thread Lorenzo Bianconi
On Fri, 2014-12-12 at 15:16 +0100, Lorenzo Bianconi wrote: In multi-vif scenario, TPC could be enabled just on given interfaces, but driver TPC registers should be configured anyway (so I used a glob flag). However I can move that logic in driver code, what do you suggest? It seems strange

[PATCH 1/3] ath9k: enable TPC by default

2014-12-18 Thread Lorenzo Bianconi
Enable hw TPC by default on AR9003 based chips Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/hw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 6d4b273

[PATCH 0/3] add debugfs support to ath9k hw TPC

2014-12-18 Thread Lorenzo Bianconi
*[PATCH 1/3]: enable TPC by default on AR9003 based chips *[PATCH 2/3]: enable/disable hw TPC through debugfs *[PATCH 3/3]: fix typo Lorenzo Bianconi (3): ath9k: enable TPC by default ath9k: add debugfs support for hw TPC ath9k: fix typo drivers/net/wireless/ath/ath9k/debug.c | 71

[PATCH 2/3] ath9k: add debugfs support for hw TPC

2014-12-18 Thread Lorenzo Bianconi
Add tpc entry to ath9k debugfs in order to enable/disable hw TPC Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/debug.c | 71 ++ 1 file changed, 71 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/debug.c

[PATCH 3/3] ath9k: fix typo

2014-12-18 Thread Lorenzo Bianconi
Fix typo Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index e9bd02c..52d63de 100644

[PATCHv3] mac80211: enable TPC through mac80211 stack

2014-12-24 Thread Lorenzo Bianconi
less than specified from userspace), whereas TPC is disabled if nl80211_tx_power_setting is set to NL80211_TX_POWER_FIXED (use value configured from userspace) Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- include/net/mac80211.h | 8 net/mac80211/cfg.c | 16

[RFC 0/3] add TPC capability for AR9002 based chips

2014-12-27 Thread Lorenzo Bianconi
This pachset is based on Adrian Chadd's hints (https://www.mail-archive.com/ath9k-devel@lists.ath9k.org/msg10396.html) Lorenzo Bianconi (3): ath9k: add power per-rate tables for AR9002 chips ath9k: add TPC to TX path for AR9002 based chips ath9k: enable per-packet TPC on AR9002 based chips drivers

[RFC 1/3] ath9k: add power per-rate tables for AR9002 chips

2014-12-27 Thread Lorenzo Bianconi
Add TX power per-rate tables for MIMO/legacy modes for AR9002 based chips in order to cap the maximum TX power value per-rate in the TX descriptor path. Add TX power adjustments for HT40 mode, open loop CCK rates and eeprom power bias for AR9280 and later chips Signed-off-by: Lorenzo Bianconi

[RFC 2/3] ath9k: add TPC to TX path for AR9002 based chips

2014-12-27 Thread Lorenzo Bianconi
Add TPC capability to TX descriptor path for AR9002 based chips. Scale per-packet TX power according to eeprom power bias, power adjustments for HT40 mode and open loop CCK rates. Cap per-packet TX power according to TX power per-rate tables Signed-off-by: Lorenzo Bianconi lorenzo.biancon

[RFC 3/3] ath9k: enable per-packet TPC on AR9002 based chips

2014-12-27 Thread Lorenzo Bianconi
Enable per-packet TPC on AR9002 based chips by default Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/debug.c | 5 - drivers/net/wireless/ath/ath9k/hw.c| 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net

Re: [RFC 0/3] add TPC capability for AR9002 based chips

2014-12-28 Thread Lorenzo Bianconi
. Regards, Lorenzo Am 27.12.2014 um 15:12 schrieb Lorenzo Bianconi: This patchset adds TPC capability to ath9k for AR9002 based chips *[RFC 1/3]: add TX power per-rate tables to cap TX power in TX descriptor path *[RFC 2/3]: cap per-packet TX power according to TX power per-rate tables *[RFC 3/3

Re: [RFC 0/3] add TPC capability for AR9002 based chips

2014-12-29 Thread Lorenzo Bianconi
Am 28.12.2014 um 15:32 schrieb Lorenzo Bianconi: Hi, can you please describe some testcases for you patches. This patchset adds Transmission Power Control (TPC) for AR9002 based chips. IOW it enables the capability of correct TX power on per-packet basis. It is preparatory for upcoming

Re: [RFC 0/3] add TPC capability for AR9002 based chips

2014-12-30 Thread Lorenzo Bianconi
Am 29.12.2014 um 15:18 schrieb Lorenzo Bianconi: Am 28.12.2014 um 15:32 schrieb Lorenzo Bianconi: Hi, can you please describe some testcases for you patches. This patchset adds Transmission Power Control (TPC) for AR9002 based chips. IOW it enables the capability of correct TX power on per

[PATCH 0/3] add TPC capability for AR9002 based chips

2014-12-30 Thread Lorenzo Bianconi
This pachset is based on Adrian Chadd's hints (https://www.mail-archive.com/ath9k-devel@lists.ath9k.org/msg10396.html) Changes since RFC: - fix compilation error Lorenzo Bianconi (3): ath9k: add power per-rate tables for AR9002 chips ath9k: add TPC to TX path for AR9002 based chips ath9k: enable

[PATCH 3/3] ath9k: enable per-packet TPC on AR9002 based chips

2014-12-30 Thread Lorenzo Bianconi
Enable per-packet TPC on AR9002 based chips by default Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless/ath/ath9k/debug.c | 5 - drivers/net/wireless/ath/ath9k/hw.c| 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net

[PATCH 1/3] ath9k: add power per-rate tables for AR9002 chips

2014-12-30 Thread Lorenzo Bianconi
Add TX power per-rate tables for MIMO/legacy modes for AR9002 based chips in order to cap the maximum TX power value per-rate in the TX descriptor path. Add TX power adjustments for HT40 mode, open loop CCK rates and eeprom power bias for AR9280 and later chips Signed-off-by: Lorenzo Bianconi

[RFC 0/2] add per-vif TX power capability

2015-02-06 Thread Lorenzo Bianconi
Configure the HW with highest TX power among all vif when HW TPC has been enabled in order to add support for per-vif TX power capability. Cap per-packet TX power to vif configured power in the TX path Lorenzo Bianconi (2): ath9k: add per-vif TX power capability ath9k: add per-vif TX power

[RFC 1/2] ath9k: add per-vif TX power capability

2015-02-06 Thread Lorenzo Bianconi
Configure the HW with highest TX power among all vif when HW TPC has been enabled in order to add support for per-vif TX power capability. Use lowest configured power among all interfaces when TPC is disabled Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless

[RFC 2/2] ath9k: add per-vif TX power capability to TX path

2015-02-06 Thread Lorenzo Bianconi
In order to add per-vif TX power capability cap per-packet TX power to vif configured power if the latter is lower than per-rate TX power and mac80211 per-frame power. Use vif TX power if TPC has been disabled for current interface Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com

[PATCH 1/2] ath9k: add per-vif TX power capability

2015-02-17 Thread Lorenzo Bianconi
Configure the HW with highest TX power among all vif when HW TPC has been enabled in order to add support to per-vif TX power capability. Use lowest configured power among all interfaces when TPC is disabled Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- drivers/net/wireless

[PATCH 2/2] ath9k: add per-vif TX power capability to TX path

2015-02-17 Thread Lorenzo Bianconi
In order to add per-vif TX power capability cap per-packet TX power to vif configured power if the latter is lower than per-rate TX power and mac80211 per-frame power. Use vif TX power if TPC has been disabled for current the interface Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com

[PATCH 0/2] add per-vif TX power capability

2015-02-17 Thread Lorenzo Bianconi
Configure the HW with highest TX power among all vif when HW TPC has been enabled in order to add support to per-vif TX power capability. Cap per-packet TX power to vif configured power in the TX path Lorenzo Bianconi (2): ath9k: add per-vif TX power capability ath9k: add per-vif TX power

Re: (re)licensing the wireless wiki

2015-01-14 Thread Lorenzo Bianconi
2015-01-12 20:57 GMT+02:00 Pat Erley pat-l...@erley.org: On 01/12/2015 09:26 AM, Johannes Berg wrote: On Mon, 2015-01-12 at 12:16 +0100, Johannes Berg wrote: I've emailed every contributor who I could find an email address for, but some (~40) don't have an email address and I already have a

[PATCHv5] mac80211: enable TPC through mac80211 stack

2015-01-14 Thread Lorenzo Bianconi
is disabled if nl80211_tx_power_setting is set to NL80211_TX_POWER_FIXED (use value configured from userspace) Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- include/net/mac80211.h | 7 +++ net/mac80211/cfg.c | 19 --- net/mac80211/chan.c| 4

Re: [PATCHv4] mac80211: enable TPC through mac80211 stack

2015-01-07 Thread Lorenzo Bianconi
On Tue, 2015-01-06 at 18:41 +0100, Lorenzo Bianconi wrote: + * @txpower_type: TX power adjustment used to control per packet Transmit + * Power Control (TPC) in lower driver for the current vif. In particular + * TPC is enabled if value passed in %txpower_type

Re: [PATCHv4] mac80211: enable TPC through mac80211 stack

2015-01-08 Thread Lorenzo Bianconi
On Wed, 2015-01-07 at 15:39 +0100, Lorenzo Bianconi wrote: Does it really make sense to ask the driver to do automatic? After all, there are other limits in mac80211 (like 11h from the AP and regulatory) that need to be considered. So perhaps if userspace says automatic, the driver

[PATCHv4] mac80211: enable TPC through mac80211 stack

2015-01-06 Thread Lorenzo Bianconi
less than specified from userspace), whereas TPC is disabled if nl80211_tx_power_setting is set to NL80211_TX_POWER_FIXED (use value configured from userspace) Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- include/net/mac80211.h | 8 net/mac80211/cfg.c | 16

Re: [PATCHv3] mac80211: enable TPC through mac80211 stack

2015-01-06 Thread Lorenzo Bianconi
On Wed, 2014-12-24 at 10:21 +0100, Lorenzo Bianconi wrote: - list_for_each_entry(sdata, local-interfaces, list) + list_for_each_entry(sdata, local-interfaces, list) { sdata-user_power_level = local-user_power_level; + if (!update_tpc type != sdata

Re: [PATCH] ath9k: fix per-packet tx power configuration

2015-04-29 Thread Lorenzo Bianconi
Do not use ieee80211_vif pointer in ath_get_rate_txpower() since it has been overwritten by setup_frame_info() and it will result in a corrupted tx power configuration. Set per-packet tx power in setup_frame_info() according to current vif tx power. Signed-off-by: Lorenzo Bianconi

[PATCH] ath9k: fix per-packet tx power configuration

2015-04-08 Thread Lorenzo Bianconi
Do not use ieee80211_vif pointer in ath_get_rate_txpower() since it has been overwritten by setup_frame_info() and it will result in a corrupted tx power configuration. Set per-packet tx power in setup_frame_info() according to current vif tx power. Signed-off-by: Lorenzo Bianconi lorenzo.biancon

Re: mac80211: add rate mask logic for vht rates

2015-08-19 Thread Lorenzo Bianconi
Hello Lorenzo Bianconi, Hi Dan, The patch b119ad6e726c: mac80211: add rate mask logic for vht rates from Aug 6, 2015, leads to the following static checker warning: net/mac80211/cfg.c:2520 ieee80211_set_bitrate_mask() error: buffer overflow 'sdata-rc_rateidx_vht_mcs_mask[i

Re: [PATCH] mac80211: fix VHT MCS mask array overrun

2015-08-21 Thread Lorenzo Bianconi
]) { sdata-rc_has_vht_mcs_mask[i] = true; - - if (sdata-rc_has_mcs_mask[i] - sdata-rc_has_vht_mcs_mask[i]) break; + } } } -- 2.1.4 Acked-by: Lorenzo Bianconi

Re: [RFC 0/4] mac80211: define VHT rate mask logic

2015-07-28 Thread Lorenzo Bianconi
Lorenzo Bianconi wrote: [...] This patchset has been tested using mac80211/mt76 driver on Buffalo WHR-1166D router running OpenWrt trunk mt76 is an out of the tree driver, included only in OpenWrt. my router is a Buffalo WHR-1166D and AFAIK mt76 is the only open source driver for mt7612

[PATCH 4/4] mac80211: add rate mask logic for vht rates

2015-08-06 Thread Lorenzo Bianconi
Define rc_rateidx_vht_mcs_mask array and rate_idx_match_vht_mcs_mask() method in order to apply mcs mask for vht rates Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- net/mac80211/cfg.c| 16 +-- net/mac80211/debugfs_netdev.c | 34 ++ net/mac80211

[PATCH 2/4] mac80211: remove ieee80211_tx_rate dependency in rate mask code

2015-08-06 Thread Lorenzo Bianconi
() Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- net/mac80211/rate.c | 139 +++- 1 file changed, 71 insertions(+), 68 deletions(-) diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 4f02e07..4f61ca0 100644 --- a/net/mac80211

[PATCH 3/4] mac80211: define rate_control_apply_mask_ratetbl()

2015-08-06 Thread Lorenzo Bianconi
Define rate_control_apply_mask_ratetbl() in order to apply ratemask in rate_control_set_rates() for station rate table Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- net/mac80211/rate.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/net

[PATCH 0/4] mac80211: define VHT rate mask logic

2015-08-06 Thread Lorenzo Bianconi
using mac80211/mt76 driver on Buffalo WHR-1166D router running OpenWrt trunk Lorenzo Bianconi (4): mac80211: remove ieee80211_tx_info from rate_control_apply_mask signature mac80211: remove ieee80211_tx_rate dependency in rate mask code mac80211: define rate_control_apply_mask_ratetbl

[PATCH 1/4] mac80211: remove ieee80211_tx_info from rate_control_apply_mask signature

2015-08-06 Thread Lorenzo Bianconi
Remove unnecessary ieee80211_tx_info pointer from rate_control_apply_mask signature. rate_control_apply_mask() will be used to define a ratemask in rate_control_set_rates() for station rate table Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- net/mac80211/rate.c | 11

[RFC 4/4] mac80211: add rate mask logic for vht rates

2015-07-25 Thread Lorenzo Bianconi
Define rc_rateidx_vht_mcs_mask array and rate_idx_match_vht_mcs_mask() method in order to apply mcs mask for vht rates Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- net/mac80211/cfg.c| 16 +-- net/mac80211/debugfs_netdev.c | 34 ++ net/mac80211

[RFC 3/4] mac80211: define rate_control_apply_mask_ratetbl()

2015-07-25 Thread Lorenzo Bianconi
Define rate_control_apply_mask_ratetbl() in order to apply ratemask in rate_control_set_rates() for station rate table Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- net/mac80211/rate.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/net

[RFC 1/4] mac80211: remove ieee80211_tx_info from rate_control_apply_mask signature

2015-07-25 Thread Lorenzo Bianconi
Remove unnecessary ieee80211_tx_info pointer from rate_control_apply_mask signature. rate_control_apply_mask() will be used to define a ratemask in rate_control_set_rates() for station rate table Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- net/mac80211/rate.c | 11

[RFC 0/4] mac80211: define VHT rate mask logic

2015-07-25 Thread Lorenzo Bianconi
using mac80211/mt76 driver on Buffalo WHR-1166D router running OpenWrt trunk Lorenzo Bianconi (4): mac80211: remove ieee80211_tx_info from rate_control_apply_mask signature mac80211: remove ieee80211_tx_rate dependency in rate mask code mac80211: define rate_control_apply_mask_ratetbl

[RFC 2/4] mac80211: remove ieee80211_tx_rate dependency in rate mask code

2015-07-25 Thread Lorenzo Bianconi
() Signed-off-by: Lorenzo Bianconi lorenzo.biancon...@gmail.com --- net/mac80211/rate.c | 139 +++- 1 file changed, 71 insertions(+), 68 deletions(-) diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 4f02e07..4f61ca0 100644 --- a/net/mac80211

[PATCH] mac80211: fix wiphy supported_band access

2016-02-10 Thread Lorenzo Bianconi
Fix wiphy supported_band access in tx radiotap parsing. In particular, info->band is always set to 0 (IEEE80211_BAND_2GHZ) since it has not assigned yet. This cause a kernel crash on 5GHz only devices. Move ieee80211_parse_tx_radiotap() after info->band assignment Signed-off-by: Lorenzo Bi

[RFC 2/2] mac80211: parse VHT info in injected frames

2016-02-10 Thread Lorenzo Bianconi
Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap(). That capability has been tested on d-link dir-860l rev b1 running OpenWrt trunk and mt76 driver Signed-off-by: Lorenzo Bianconi <lorenzo.biancon...@gmail.com> --- Documentation/networking/mac80211-injection.txt | 10 +++

[RFC 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes

2016-02-10 Thread Lorenzo Bianconi
Add IEEE80211_RADIOTAP_VHT entry to rtap_namespace_sizes array in order to define alignment and size of VHT info in tx radiotap Signed-off-by: Lorenzo Bianconi <lorenzo.biancon...@gmail.com> --- net/wireless/radiotap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/wireless/radiot

[RFC 0/2] add VHT radiotap parsing support to mac80211

2016-02-10 Thread Lorenzo Bianconi
Lorenzo Bianconi (2): cfg80211: add radiotap VHT info to rtap_namespace_sizes mac80211: parse VHT info in injected frames Documentation/networking/mac80211-injection.txt | 10 net/mac80211/tx.c | 31 + net/wireless/radiotap.c

Re: [PATCH v2 2/2] mac80211: parse VHT info in injected frames

2016-02-23 Thread Lorenzo Bianconi
at 11:43 +0100, Lorenzo Bianconi wrote: >> Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap(). >> That capability has been tested using a d-link dir-860l rev b1 >> running >> OpenWrt trunk and mt76 driver >> >> Signed-off-by: L

[PATCH RESEND] mac80211: parse VHT info in injected frames

2016-02-23 Thread Lorenzo Bianconi
Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap(). That capability has been tested using a d-link dir-860l rev b1 running OpenWrt trunk and mt76 driver Signed-off-by: Lorenzo Bianconi <lorenzo.biancon...@gmail.com> --- Documentation/networking/mac80211-injection.tx

[PATCHv2] mac80211: parse VHT info in injected frames

2016-02-23 Thread Lorenzo Bianconi
Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap(). That capability has been tested using a d-link dir-860l rev b1 running OpenWrt trunk and mt76 driver Signed-off-by: Lorenzo Bianconi <lorenzo.biancon...@gmail.com> --- v2: - fix mac80211-injection documentation --- Documen

[PATCH] mac80211: parse VHT info in injected frames

2016-02-16 Thread Lorenzo Bianconi
Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap(). That capability has been tested using a d-link dir-860l rev b1 running OpenWrt trunk and mt76 driver Signed-off-by: Lorenzo Bianconi <lorenzo.biancon...@gmail.com> --- Documentation/networking/mac80211-injection.tx

Re: [RFC 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes

2016-02-19 Thread Lorenzo Bianconi
> On Wed, 2016-02-10 at 17:31 +0100, Lorenzo Bianconi wrote: >> Add IEEE80211_RADIOTAP_VHT entry to rtap_namespace_sizes array in >> order to >> define alignment and size of VHT info in tx radiotap >> > I think you forgot this patch in your [PATCH] resend, can you re

[PATCH v2 0/2] add VHT radiotap parsing support to mac80211

2016-02-19 Thread Lorenzo Bianconi
Changelog: v2: - added cfg80211 patch to the patchset Lorenzo Bianconi (2): cfg80211: add radiotap VHT info to rtap_namespace_sizes mac80211: parse VHT info in injected frames Documentation/networking/mac80211-injection.txt | 10 net/mac80211/tx.c

[PATCH v2 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes

2016-02-19 Thread Lorenzo Bianconi
Add IEEE80211_RADIOTAP_VHT entry to rtap_namespace_sizes array in order to define alignment and size of VHT info in tx radiotap Signed-off-by: Lorenzo Bianconi <lorenzo.biancon...@gmail.com> --- net/wireless/radiotap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/wireless/radiot

[PATCH v2 2/2] mac80211: parse VHT info in injected frames

2016-02-19 Thread Lorenzo Bianconi
Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap(). That capability has been tested using a d-link dir-860l rev b1 running OpenWrt trunk and mt76 driver Signed-off-by: Lorenzo Bianconi <lorenzo.biancon...@gmail.com> --- Documentation/networking/mac80211-injection.tx

[PATCH v2] mac80211: fix wiphy supported_band access

2016-02-19 Thread Lorenzo Bianconi
devices. Move ieee80211_parse_tx_radiotap() after info->band assignment Signed-off-by: Lorenzo Bianconi <lorenzo.biancon...@gmail.com> --- v2: - improved the commit message --- net/mac80211/tx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/mac80211/tx

Re: [PATCHv2] mac80211: parse VHT info in injected frames

2016-03-03 Thread Lorenzo Bianconi
> On Tue, 2016-02-23 at 15:43 +0100, Lorenzo Bianconi wrote: >> Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap(). >> That capability has been tested using a d-link dir-860l rev b1 >> running OpenWrt trunk and mt76 driver >> > Applied. In case you

Re: [PATCH v4 3/3] mt76: add driver code for MT76x2e

2017-02-02 Thread Lorenzo Bianconi
> Felix Fietkau <n...@nbd.name> writes: > >> On 2017-02-02 12:52, Felix Fietkau wrote: >>> This is a 2x2 PCIe 802.11ac chipset by MediaTek >>> >>> Signed-off-by: Felix Fietkau <n...@nbd.name> >> Kalle, Please also add: >>

[PATCH] mt76x2: eeprom: fix typo in mt76x2_get_power_info_5g()

2017-12-14 Thread Lorenzo Bianconi
Fix typo in 5GHz power vs channel eeprom parsing Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 2/2] mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi()

2017-12-14 Thread Lorenzo Bianconi
Verify wcid is not NULL before dereferencing the pointer to initialize txwi rate/power info Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 2 +- 1

[PATCH 1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()

2017-12-14 Thread Lorenzo Bianconi
Initialize mt76_txq pointer after ieee80211_txq pointer check. Remove space after the pointer cast Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 4 +++-

[PATCH 0/2] Fix two possible NULL pointer dereferencing issues

2017-12-14 Thread Lorenzo Bianconi
Lorenzo Bianconi (2): mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action() mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi() drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 4 +++- 2

[PATCH] mt76x2: add a polling delay in mt76x2_mac_stop routine

2018-05-10 Thread Lorenzo Bianconi
Add a usleep_range in mt76x2_mac_stop routine in order to add a polling delay checking values of MT_MAC_STATUS and IBI_R12 registers Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 10 +- 1 file changed, 5 inse

[RFC v2 15/18] mt76: add mt76x2_phy_common to mt76x2-common module

2018-05-20 Thread Lorenzo Bianconi
Move phy related code shared between mt76x2 and mt76x2u in mt76x2-common module Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/Makefile| 2 +- drivers/net/wireless/mediatek/mt76/mt76x2.h| 8 + drivers/net/wireless/me

[RFC v2 18/18] mt76: add driver code for MT76x2u based devices

2018-05-20 Thread Lorenzo Bianconi
MT76x2u is a 2x2 USB 802.11ac chipset by MediaTek. This driver currently support station mode. Frequency calibration is currently not supported Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/Kconfig| 9 + drivers/net/wi

[RFC v2 17/18] mt76: add usb support to mt76 layer

2018-05-20 Thread Lorenzo Bianconi
This will be used by drivers for MT76x2u based devices Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/Makefile | 3 +- drivers/net/wireless/mediatek/mt76/dma.h| 5 + drivers/net/wireless/mediatek/mt76/mt76.h | 115 +- d

[RFC v2 13/18] mt76: add mt76x2_init_common to mt76x2-common module

2018-05-20 Thread Lorenzo Bianconi
Move init related code shared between mt76x2 and mt76x2u in mt76x2-common module Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/Makefile| 3 +- drivers/net/wireless/mediatek/mt76/mt76x2.h| 6 + drivers/net/wi

[RFC v2 11/18] mt76: add mt76x2_tx_common to mt76x2-common module

2018-05-20 Thread Lorenzo Bianconi
Move tx related code shared between mt76x2 and mt76x2u in mt76x2-common module Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/Makefile| 2 +- drivers/net/wireless/mediatek/mt76/mt76x2.h| 2 + drivers/net/wireless/me

[RFC v2 08/18] mt76x2: add buffer len to mt76x2_mac_write_txwi signature

2018-05-20 Thread Lorenzo Bianconi
Add frame length to mt76x2_mac_write_txwi routine signature and do not fetch it from skb since txwi data structure is added at the beginning of the skb for usb based devices and mt76x2_mac_write_txwi will be shared between pci and usb related code Signed-off-by: Lorenzo Bianconi <lorenzo.bi

[RFC v2 16/18] mt76: move mt76x2_debugfs in mt76-common module

2018-05-20 Thread Lorenzo Bianconi
Move mt76x2_debugfs code in mt76-common module since it is shared between mt76x2 and mt76x2u Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/Makefile | 5 +++-- drivers/net/wireless/mediatek/mt76/mt76x2_debugfs.c | 1 + 2 files c

[RFC v2 09/18] mt76: introduce tx_queue_skb function pointer in mt76_bus_ops

2018-05-20 Thread Lorenzo Bianconi
Add tx_queue_skb function pointer in mt76_bus_ops since mt76x2u based devices do not map mt76x2_txwi on dma buffers and it is not possible to reuse mt76_tx_queue_skb() routine to enqueue tx frames to hw buffers Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drive

[RFC v2 12/18] mt76: add mt76x2_mac_common to mt76x2-common module

2018-05-20 Thread Lorenzo Bianconi
Move mac related code shared between mt76x2 and mt76x2u in mt76x2-common module Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/Makefile| 2 +- drivers/net/wireless/mediatek/mt76/mt76x2.h| 7 +- drivers/net/wi

[RFC v2 14/18] mt76: add mt76x2_common to mt76x2-common module

2018-05-20 Thread Lorenzo Bianconi
Move core related code shared between mt76x2 and mt76x2u in mt76x2-common module Signed-off-by: Lorenzo Bianconi <lorenzo.bianc...@redhat.com> --- drivers/net/wireless/mediatek/mt76/Makefile| 2 +- drivers/net/wireless/mediatek/mt76/mt76x2.h| 21 ++ drivers/net/wi

  1   2   3   4   5   6   7   8   >