[PATCH v2] staging: vt6656: Fix warning: unused variable vnt_frame_time

2020-05-27 Thread Malcolm Priestley
In commit 61bb798767e4 ("staging: vt6656: vnt_get_rtscts_rsvtime_le replace with rts/cts duration.") not quite all of the code was removed. Remove unused vnt_frame_time variable. Reported-by: kbuild test robot Signed-off-by: Malcolm Priestley --- v2 corrected the commit drive

[PATCH] staging: vt6656: Fix warning: unused variable vnt_frame_time

2020-05-27 Thread Malcolm Priestley
In commit 3436accadc3f ("staging: vt6656: Move vnt_get_frame_time and vnt_get_phy_field to rxtx") not quite all of the code was removed. Remove unused vnt_frame_time variable. Reported-by: kbuild test robot Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 4 --

[PATCH 2/2] staging: vt6656: Move vnt_tx_usb_header to vnt_tx_context

2020-05-27 Thread Malcolm Priestley
placed with urb->actual_length in vnt_tx_context_complete. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 4 +--- drivers/staging/vt6656/main_usb.c | 3 ++- drivers/staging/vt6656/rxtx.c | 30 +- drivers/staging/vt6656/rxtx.h

[PATCH 1/2] staging: vt6656: vnt_tx_packet use skb_clone to preserve sk_buff.

2020-05-27 Thread Malcolm Priestley
handling continues as before. Only one place in function needs to change from ieee80211_get_hdrlen_from_skb to ieee80211_hdrlen(hdr) which is already to pointing to correct position. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 17 +++-- 1 file changed, 11

[PATCH] staging: vt6656: Fix vnt_tx_usb_header static checker warning

2020-05-23 Thread Malcolm Priestley
droom.") Reported-by: Dan Carpenter Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 12 ++-- drivers/staging/vt6656/rxtx.h | 5 - 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rx

[PATCH 10/10] staging: vt6656: move key frag controls to vnt_fill_txkey

2020-05-21 Thread Malcolm Priestley
vnt_fill_txkey now has access to tx_buffer move cipher frag controls The icv_len is the only thing needed from hw_key in vnt_tx_packet. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 23 +-- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git

[PATCH 09/10] staging: vt6656: Move calling point of vnt_fill_txkey.

2020-05-21 Thread Malcolm Priestley
Change vnt_fill_txkey to return true if mic_hdr is needed and change calling point at where it is to be placed. tx_buffer is already in tx_context. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 191 +- 1 file changed, 95 insertions(+), 96

[PATCH 08/10] staging: vt6656: Move tx_key inside vnt_fill_txkey.

2020-05-21 Thread Malcolm Priestley
tx_key can be got directly from info. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index b9164142e2b5..a0672ca51138 100644 --- a/drivers

[PATCH 07/10] staging: vt6656: move tx_body_size/payload_len to skb->len

2020-05-21 Thread Malcolm Priestley
both variables can be removed and replaced with skb->len. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 2d7a8fc70

[PATCH 06/10] staging: vt6656: Move key_buffer inside vnt_fill_txkey.

2020-05-21 Thread Malcolm Priestley
Use vnt_tx_fifo_head to point directly at tx_key removing key_buffer. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index

[PATCH 05/10] staging: vt6656: rxtx use ieee80211_tx_info for rts/cts control

2020-05-21 Thread Malcolm Priestley
Use the control for rts/cts exhanges replacing need_rts and use_cts_prot for packet type PK_TYPE_11GB / PK_TYPE_11GA Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/staging

[PATCH 04/10] staging: vt6656: use ieee80211_tx_info to replace need_mic

2020-05-21 Thread Malcolm Priestley
Use the info->control.hw_key to replace need mic which is only present when info->control.hw_key->cipher == WLAN_CIPHER_SUITE_CCMP. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 39 +-- 1 file changed, 23 insertions(+), 16

[PATCH 03/10] staging: vt6656: Move vnt_mic_hdr pointers to vnt_fill_txkey

2020-05-21 Thread Malcolm Priestley
mic_hdr has three possible locations ieee80211_tx_info can controls these with control.use_cts_prot for rts or cts exchange or otherwise the rts/data position. Removing double pointer. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 37

[PATCH 02/10] staging: vt6656: rxtx remove unused need_ack

2020-05-21 Thread Malcolm Priestley
need_ack is no longer used by driver remove it. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/rxtx.c | 5 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h

[PATCH 01/10] staging: vt6656: remove ieee80211_hdr from vnt_usb_send_context.

2020-05-21 Thread Malcolm Priestley
It is only used in one place were it can be pointed to at skb->data. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/rxtx.c | 5 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/vt6656/device.h b/driv

Re: [PATCH 2/4] staging: vt6656: vnt_beacon_xmit use extra_tx_headroom.

2020-05-18 Thread Malcolm Priestley
On 18/05/2020 13:39, Dan Carpenter wrote: On Sat, May 16, 2020 at 11:39:34AM +0100, Malcolm Priestley wrote: Create room for vnt_tx_short_buf_head in sk_buff and vnt_tx_usb_header. The struct ieee80211_mgmt is not longer in the header and is at the initial skb->data point. I feel l

[PATCH 4/4] staging: vt6656: use usb_anchor for tx queue.

2020-05-16 Thread Malcolm Priestley
Use usb_anchor to track tx submitted urbs and initialize the urb as needed in vnt_tx_context. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 18 -- drivers/staging/vt6656/usbpipe.c | 14 -- 3 files

[PATCH 3/4] staging: vt6656: vnt_usb_send_context remove variable data.

2020-05-16 Thread Malcolm Priestley
A limit is also placed in vnt_tx_context of MAX_TOTAL_SIZE_WITH_ALL_HEADERS limiting size. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/rxtx.c| 3 --- drivers/staging/vt6656/usbpipe.c | 5 + 3 files changed, 5 insertions(+), 4

[PATCH 2/4] staging: vt6656: vnt_beacon_xmit use extra_tx_headroom.

2020-05-16 Thread Malcolm Priestley
Create room for vnt_tx_short_buf_head in sk_buff and vnt_tx_usb_header. The struct ieee80211_mgmt is not longer in the header and is at the initial skb->data point. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 22 +- drivers/staging/vt6656/rxt

[PATCH 1/4] staging: vt6656: Use sk_buff buffer for tx header

2020-05-16 Thread Malcolm Priestley
combinations of tx header size which are found in vnt_get_hdr_size replacing vnt_mac_hdr_pos. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 + drivers/staging/vt6656/main_usb.c | 1 + drivers/staging/vt6656/rxtx.c | 91 ++- drivers

[PATCH 6/6] staging: vt6656: remove difs / sifs adjustments.

2020-05-05 Thread Malcolm Priestley
Now mac89211 is doing frame timing in rxtx these vendor adjustments need to be removed. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/card.c | 32 1 file changed, 32 deletions(-) diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656

[PATCH 5/6] staging: vt6656: vnt_get_rtscts_rsvtime_le replace with rts/cts duration.

2020-05-05 Thread Malcolm Priestley
are no longer required. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 113 ++ 1 file changed, 5 insertions(+), 108 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 47da9dabb133..8348ffe6ebfa 100644

[PATCH 4/6] staging: vt6656: Split RTS and CTS Duration functions

2020-05-05 Thread Malcolm Priestley
split vnt_get_rtscts_duration_le into vnt_get_rts_duration and vnt_get_cts_duration. The duration's are all the same in vnt_rxtx_rts_g_head. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 56 ++- 1 file changed, 16 insertions(+), 40

[PATCH 3/6] staging: vt6656: vnt_get_rtscts_duration_le use ieee80211_ctstoself_duration

2020-05-05 Thread Malcolm Priestley
use the mac80211 ieee80211_ctstoself_duration for CTS to self frames. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 32 +++- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656

[PATCH 2/6] staging: vt6656: vnt_get_rtscts_duration_le use ieee80211_rts_duration

2020-05-05 Thread Malcolm Priestley
use the mac80211 ieee80211_rts_duration for RTS frames. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 6724b213a723

[PATCH 1/6] staging: vt6656: vnt_rxtx_rsvtime_le16 to use ieee80211_generic_frame_duration.

2020-05-05 Thread Malcolm Priestley
ieee80211_generic_frame_duration is the mac80211 equivalent to vnt_get_rsvtime use this to get our frame time. There is a change where there is rrv_time_a and rrv_time_b the frame duration is always the same so both are equal. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c

Re: [PATCH ] staging: vt6656: refactor power save operation

2020-05-02 Thread Malcolm Priestley
Drop this patch v2 sent corrected TTBT. Regards Malcolm ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH v2] staging: vt6656: refactor power save operation

2020-05-02 Thread Malcolm Priestley
BTT A further enhancement because the TBTT is more precise the dtim_period can be used instead. When Power save is off the TBTT continues to run at the listen interval but all the other beacons are passed. The code in vnt_int_process_data is no longer required. Signed-off-by: Malcolm Priest

[PATCH ] staging: vt6656: refactor power save operation

2020-05-02 Thread Malcolm Priestley
TBT A further enhancement because the TTBT is more precise the dtim_period can be used instead. When Power save is off the TTBT continues to run at the listen interval but all the other beacons are passed. The code in vnt_int_process_data is no longer required. Signed-off-by: Malcolm Priest

[PATCH] staging: vt6656: Return on isr0 when zero.

2020-05-01 Thread Malcolm Priestley
When isr0 is zero there is nothing more todo so return and pull following code in. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/usbpipe.c | 47 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/drivers/staging/vt6656/usbpipe.c b

PATCH] staging: vt6656: use struct wiphy retry short and long settings.

2020-04-29 Thread Malcolm Priestley
Remove driver options for short and long retry and use the ones set by user in wiphy. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 3 --- drivers/staging/vt6656/main_usb.c | 8 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/staging

[PATCH 3/3] staging: vt6656: return all key calls to mac80211 stack.

2020-04-29 Thread Malcolm Priestley
vnt_mac_set_keyentry can return USB calls so return them to mac80211. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/key.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c index

[PATCH 2/3] staging: vt6656 remove vnt_mac_disable_keyentry calls

2020-04-29 Thread Malcolm Priestley
It is not necessary to disable all the keys mac80211 will have removed any existing keys that were used. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/key.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/vt6656/key.c b/drivers/staging

[PATCH 1/3] staging: vt6656: vnt_set_keymode simplify key modes.

2020-04-29 Thread Malcolm Priestley
Unused macros and onfly_latch are removed and others contain to actual key_type value is or-ed with key_mode. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/key.c | 25 + drivers/staging/vt6656/key.h | 13 +++-- 2 files changed, 16 insertions(+), 22

[PATCH v2] staging: vt6656: rxtx: remove duration_id and void returns.

2020-04-25 Thread Malcolm Priestley
duration_id is not used by driver anymore so remove the returns and set all functions in patch to void. Signed-off-by: Malcolm Priestley --- v1 had missing returns in vnt_generate_tx_parameter and vnt_rxtx_ab drivers/staging/vt6656/rxtx.c | 84 +-- 1 file

Re: [PATCH] staging: vt6656: rxtx: remove duration_id and void returns.

2020-04-25 Thread Malcolm Priestley
Drop this patch there is a mistake in it. Regards Malcolm ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 2/2] staging: vt6656: Remove preamble_type setting from vnt_tx_packet.

2020-04-23 Thread Malcolm Priestley
preamble_type is set in vnt_bss_info_changed no need to set it here. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 7e15534e52ff..f56a2b02fe36 100644

[PATCH 1/2] staging: vt6656: Remove set short time in vnt_init_registers.

2020-04-23 Thread Malcolm Priestley
The short time is set in vnt_bss_info_changed no need to set it here. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/main_usb.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index

[PATCH] staging: vt6656: rxtx: remove duration_id and void returns.

2020-04-23 Thread Malcolm Priestley
duration_id is not used by driver anymore so remove the returns and set all functions in path to void. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 78 --- 1 file changed, 36 insertions(+), 42 deletions(-) diff --git a/drivers/staging

Re: [PATCH] staging: vt6656: Refactor the vnt_ofdm_min_rate function

2020-04-19 Thread Malcolm Priestley
Hi all On 19/04/2020 18:55, Stefano Brivio wrote: Hi Oscar, On Sat, 18 Apr 2020 15:45:53 +0200 Oscar Carter wrote: Replace the for loop by a ternary operator whose condition is an AND bitmask against the priv->basic_rates variable. The purpose of the for loop was to check if any of bits

[PATCH] staging: vt6656: Move vnt_get_frame_time and vnt_get_phy_field to rxtx

2020-04-19 Thread Malcolm Priestley
These functions are only used by rxtx so move them and their arrays used with them abbreviating the function description. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/baseband.c | 139 -- drivers/staging/vt6656/baseband.h | 13 --- drivers/staging

[PATCH] staging: vt6656: call vnt_update_pre_ed_threshold from vnt_config.

2020-04-19 Thread Malcolm Priestley
vnt_update_pre_ed_threshold needs to be updated more often so call from vnt_config where it updated on any of config changes. It must have maximum sensitivity when the device is off channel or idle. Remove all the other calls in scanning and bss. Signed-off-by: Malcolm Priestley --- drivers

[PATCH] staging: vt6656: Move firmware functions into main_usb.

2020-04-19 Thread Malcolm Priestley
The firmware function are not that complicated so move them into main_usb as static functions in callers visibility Firmware definitions moved to device.h and MODULE_FIRMWARE move to below module_usb_driver. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/Makefile | 3

Re: [PATCH 2/2] staging: vt6656: Fix functions' documentation

2020-04-19 Thread Malcolm Priestley
On 19/04/2020 08:47, Oscar Carter wrote: > On Sat, Apr 18, 2020 at 07:05:53PM +0100, Malcolm Priestley wrote: >> Actually I don't really think the function descriptions are needed at all the >> names of the functions are enough. >> > Then, it would be better

[PATCH] staging: vt6656: Fix pairwise key entry save.

2020-04-18 Thread Malcolm Priestley
using vnt_mac_disable_keyentry. Fixes: f9ef05ce13e4 ("staging: vt6656: Fix pairwise key for non station modes") Cc: stable Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/key.c | 14 +++--- drivers/staging/vt6656/main_usb.c | 6 +- 2 files changed, 8 inserti

Re: [PATCH 2/2] staging: vt6656: Fix functions' documentation

2020-04-18 Thread Malcolm Priestley
Actually I don't really think the function descriptions are needed at all the names of the functions are enough. card.c needs to be removed the bss callers to baseband.c, the tbtt's to power.c and the rest to mac.c Regards Malcolm ___ devel mailing

Re: [PATCH ] staging: vt6656: Fix calling conditions of vnt_set_bss_mode

2020-04-18 Thread Malcolm Priestley
Sorry this was sent twice gmail reported the first one failed. Regards Maloclm ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH ] staging: vt6656: Fix calling conditions of vnt_set_bss_mode

2020-04-18 Thread Malcolm Priestley
("staging: vt6656: Only call vnt_set_bss_mode on basic rates change.") Cc: stable Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/main_usb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/stag

[PATCH ] staging: vt6656: Fix calling conditions of vnt_set_bss_mode

2020-04-18 Thread Malcolm Priestley
("staging: vt6656: Only call vnt_set_bss_mode on basic rates change.") Cc: stable Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/main_usb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/stag

[PATCH] staging: vt6656: Fix drivers TBTT timing counter.

2020-04-18 Thread Malcolm Priestley
The drivers TBTT counter is not synchronized with mac80211 timestamp. Reorder the functions and use vnt_update_next_tbtt to do the final synchronize. Fixes: c15158797df6 ("staging: vt6656: implement TSF counter") Cc: stable Signed-off-by: Malcolm Priestley --- drivers/stag

[PATCH] staging: vt6656: Don't set RCR_MULTICAST or RCR_BROADCAST by default.

2020-04-18 Thread Malcolm Priestley
Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/main_usb.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 3c76d3cb5bbe..b2729d5eadfb 100644 --- a/drivers/staging/vt6656/main_u

[PATCH] staging: vt6656: Power save stop wake_up_count wrap around.

2020-04-14 Thread Malcolm Priestley
") Cc: stable Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/usbpipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index eae211e5860f..91b62c3dff7b 100644 --- a/drivers/staging/vt6656

Re: [PATCH] staging: vt6656: formulate rspinf values into tables

2020-04-12 Thread Malcolm Priestley
Drop this patch v2 sent Regards Malcolm ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH v2] staging: vt6656: formulate rspinf values into tables

2020-04-12 Thread Malcolm Priestley
-by: Malcolm Priestley --- v1 has error in vnt_rspinf_a_table. drivers/staging/vt6656/card.c | 196 +++--- 1 file changed, 40 insertions(+), 156 deletions(-) diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 82c775bd20d2..dedb343f3ef3 100644

[PATCH] staging: vt6656: formulate rspinf values into tables

2020-04-11 Thread Malcolm Priestley
-by: Malcolm Priestley --- drivers/staging/vt6656/card.c | 196 +++--- 1 file changed, 40 insertions(+), 156 deletions(-) diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 82c775bd20d2..dedb343f3ef3 100644 --- a/drivers/staging/vt6656/card.c +++ b

Re: [PATCH 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-10 Thread Malcolm Priestley
On 10/04/2020 16:59, Oscar Carter wrote: On Fri, Apr 10, 2020 at 04:37:59PM +0100, Malcolm Priestley wrote: On 10/04/2020 12:28, Oscar Carter wrote: Create a constant array with the values of the "phy->signal" for every rate. Remove all "phy->signal" ass

Re: [PATCH 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-10 Thread Malcolm Priestley
On 10/04/2020 12:28, Oscar Carter wrote: Create a constant array with the values of the "phy->signal" for every rate. Remove all "phy->signal" assignments inside the switch statement and replace these with a single reading from the new vnt_phy_signal array. Signed-off-by: Oscar Carter ---

[PATCH 2/2 v2] staging: vt6656: rxtx remove rate change and current_rate.

2020-04-06 Thread Malcolm Priestley
There is no longer any need to change power in vnt_tx_packet. Remove current_rate in vnt_tx_packet and struct vnt_private as it is no longer used elsewhere. Signed-off-by: Malcolm Priestley --- v2 Patch 1 had wrong array. drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/rxtx.c

[PATCH 1/2 v2] staging: vt6556: vnt_rf_setpower convert to use ieee80211_channel.

2020-04-06 Thread Malcolm Priestley
ieee80211_channel contains all the necessary information to change power according to tx mode required. vnt_rf_setpower is moved and so that vnt_rf_set_txpower the only caller becomes static. Signed-off-by: Malcolm Priestley --- v2 ARRAY_SIZE(priv->ofdm_pwr_tbl) pointing to wrong ar

Re: [PATCH 1/2] staging: vt6556: vnt_rf_setpower convert to use ieee80211_channel.

2020-04-06 Thread Malcolm Priestley
Drop these patches I have just noticed a mistake. Regards Malcolm ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 2/2] staging: vt6656: rxtx remove rate change and current_rate.

2020-04-06 Thread Malcolm Priestley
There is no longer any need to change power in vnt_tx_packet. Remove current_rate in vnt_tx_packet and struct vnt_private as it is no longer used elsewhere. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/rxtx.c | 15 --- 2

[PATCH 1/2] staging: vt6556: vnt_rf_setpower convert to use ieee80211_channel.

2020-04-06 Thread Malcolm Priestley
ieee80211_channel contains all the necessary information to change power according to tx mode required. vnt_rf_setpower is moved and so that vnt_rf_set_txpower the only caller becomes static. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/main_usb.c | 16 ++- drivers/staging

[PATCH 2/2] staging: vt6656: set all cck rates to default.

2020-04-02 Thread Malcolm Priestley
mac80211 rate control decides which cck rates to use so all of them should be set enabled at the appropriate bit rate. This means vnt_get_cck_rate is no longer required. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/card.c | 38 --- 1 file changed

[PATCH 1/2] staging: vt6656: set all ofdm rates to default

2020-04-02 Thread Malcolm Priestley
mac80211 rate control decides which odfm rates to use so all of them should be set enabled at the appropriate bit rate. This means vnt_get_ofdm_rate is no longer required. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/card.c | 54 +++ 1 file

[PATCH] staging: vt6656: replace al2230_power_table array with formula.

2020-04-02 Thread Malcolm Priestley
The power table can replaced with calculation 0x0404090 | (power << 12) removing array and length macro. variable power never goes beyond the maximum setting. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rf.c | 79 ++--- 1 file chan

Re: [PATCH] staging: vt6656: Use defines in vnt_mac_reg_bits_* functions

2020-04-02 Thread Malcolm Priestley
On 02/04/2020 10:19, Quentin Deslandes wrote: On 04/01/20 18:55:38, Oscar Carter wrote: On Tue, Mar 31, 2020 at 01:29:06PM +0300, Dan Carpenter wrote: On Sat, Mar 28, 2020 at 10:54:33AM +0100, Oscar Carter wrote: Define the necessary bits in the CHANNEL, PAPEDELAY and GPIOCTL0 registers to

Re: [Outreachy kernel] [PATCH v4] staging: vt6656: add error code handling to unused variable

2020-03-30 Thread Malcolm Priestley
is not known to fail with the hardware I have used. No problems with hardware with this patch. Tested-by: Malcolm Priestley ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: vt6656: Use BIT_ULL() macro instead of bit shift operation

2020-03-08 Thread Malcolm Priestley
>>> */ >>> #undef __NO_VERSION__ >>> >>> +#include >>> #include >>> #include >>> #include "device.h" >>> @@ -802,8 +803,7 @@ static u64 vnt_prepare_multicast(struct ieee80211_hw >>> *hw, >>> >>> netdev_hw_addr_list_for_each(ha, mc_list) { >>> bit_nr = ether_crc(ETH_ALEN,

[PATCH 2/2] staging: vt6656: struct vnt_rcb remove unused in_use.

2020-03-04 Thread Malcolm Priestley
The variable merely toggles true to false and is unused. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/main_usb.c | 3 --- drivers/staging/vt6656/usbpipe.c | 16 +++- 3 files changed, 3 insertions(+), 17 deletions(-) diff

[PATCH 1/2] staging: vt6656: Remove vnt_interrupt_buffer in_use flag.

2020-03-04 Thread Malcolm Priestley
mac80211 is the only user of in_use to start it and should not be true when so. So internal toggling of this variable is not relevant. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/usbpipe.c | 28 +++- 2 files

[PATCH] staging: vt6656: Move vnt_rx_data to usbpipe.c

2020-03-03 Thread Malcolm Priestley
vnt_rx_data is a USB function and vnt_submit_rx_urb_complete is the only caller therefore removing dpc.c/h files and becoming static. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/Makefile | 1 - drivers/staging/vt6656/dpc.c | 124 -- drivers

[PATCH 3/3] staging: vt6656: Delete int.c/h file and move functions to usbpipe

2020-03-02 Thread Malcolm Priestley
Move functions vnt_int_process_data and vnt_int_report_rate to usbpipe.c and vnt_interrupt_data to usbpipe.h These form part of the USB structure. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/Makefile | 3 +- drivers/staging/vt6656/int.c | 110

PATCH 2/3] staging: vt6656: Remove function vnt_int_process_data.

2020-03-02 Thread Malcolm Priestley
call vnt_start_interrupt_urb directly from vnt_start. Move debug message to vnt_start_interrupt_urb. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/int.c | 11 --- drivers/staging/vt6656/int.h | 1 - drivers/staging/vt6656/main_usb.c | 2 +- drivers/staging

[PATCH 1/3] staging: vt6656: vnt_int_start_interrupt remove spin lock.

2020-03-02 Thread Malcolm Priestley
This formed part of the legacy driver and potentially multi users. The driver now has only one user mac80211 remove this lock. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/int.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/vt6656/int.c b/drivers

[PATCH 2/2] staging: vt6656: vnt_vt3184_init remove stack copy to array.

2020-02-29 Thread Malcolm Priestley
use u8 pointer addr directly and remove stack array. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/baseband.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index 48a624bf00c0

[PATCH 1/2] staging: vt6656: use vnt_vt3184_agc array directly

2020-02-29 Thread Malcolm Priestley
vnt_vt3184_agc is always the same regardless of rf type so use the array directly removing from stack buffer. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/baseband.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/staging/vt6656

[PATCH] staging: vt6656: Remove STATUS enums from TX path

2020-02-29 Thread Malcolm Priestley
Returning standard error code or status variable. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 9 - drivers/staging/vt6656/rxtx.c| 4 ++-- drivers/staging/vt6656/usbpipe.c | 5 ++--- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers

[PATCH] staging: vt6656: Use mac80211 duration for tx headers

2020-02-27 Thread Malcolm Priestley
mac80211 already provides the correct duration simply copy it to the tx headers removing the need for driver to find it with vnt_get_duration_le. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/rxtx.c | 57 +-- 1 file changed, 8 insertions(+), 49

Re: [PATCH 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.

2020-02-04 Thread Malcolm Priestley
On 03/02/2020 09:42, Dan Carpenter wrote: > On Sun, Feb 02, 2020 at 12:27:25PM +0000, Malcolm Priestley wrote: >> bb_pre_ed_rssi is an u8 rx_dm always returns negative signed >> values add minus operator to always yield positive. >> >> fixes issue where rx sensitivi

[PATCH v2 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.

2020-02-04 Thread Malcolm Priestley
reate rx function.") Cc: stable Signed-off-by: Malcolm Priestley --- Added fixes tag drivers/staging/vt6656/dpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 821aae8ca402..a0b60e7d1086 100644 ---

[PATCH 2/2] staging: vt6656: Remove fall back functions and headers.

2020-02-02 Thread Malcolm Priestley
Fall back is no longer used in driver so remove all functions and headers. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/rxtx.c | 206 drivers/staging/vt6656/rxtx.h | 60 -- 3 files changed, 267

[PATCH 1/2] staging: vt6656: Disable and remove fall back rates from driver.

2020-02-02 Thread Malcolm Priestley
The fall back rates are not properly implemented in driver and form part of the legacy driver. mac80211 has no indication that this is happening and it does appear the driver does function considerably better without them so remove them. Signed-off-by: Malcolm Priestley --- drivers/staging

[PATCH 2/2] staging: vt6656: Fix return for unsupported cipher modes.

2020-02-02 Thread Malcolm Priestley
mac80211 expect to see -EOPNOTSUPP on unsupported ciphers so these can be done on stack. correct all the returns to do this. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/key.c | 5 - drivers/staging/vt6656/main_usb.c | 4 +--- 2 files changed, 5 insertions(+), 4

[PATCH 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.

2020-02-02 Thread Malcolm Priestley
bb_pre_ed_rssi is an u8 rx_dm always returns negative signed values add minus operator to always yield positive. fixes issue where rx sensitivity is always set to maximum because the unsigned numbers were always greater then 100. Cc: stable Signed-off-by: Malcolm Priestley --- drivers/staging

[PATCH 4/5] staging: vt6656: Just check NEWRSR_DECRYPTOK for RX_FLAG_DECRYPTED.

2020-01-19 Thread Malcolm Priestley
At present the driver does a number of checks for RX_FLAG_DECRYPTED. Remove all these and just pass check NEWRSR_DECRYPTOK mac80211 will handle the processing of the sk_buff and dispose of it. This means that mac80211 can do unsupported encryption modes on stack. Signed-off-by: Malcolm

[PATCH 5/5] staging: vt6656: Remove memory buffer from vnt_download_firmware.

2020-01-19 Thread Malcolm Priestley
The memory buffer is being done twice here as vnt_control_out passes it straight to kmemdup. Remove buffer and add const to the variable in vnt_control_out to pass the pointer to it. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/firmware.c | 14 ++ drivers/staging

[PATCH 3/5] staging: vt6656: Use vnt_rx_tail struct for tail variables.

2020-01-19 Thread Malcolm Priestley
Place tsf_time, sq, new_rsr, rssi, rsr and sq3 packed in the structure. Unused variables are removed along with skb_data and structure is placed beyond vnt_rx_header + pay_load_with_padding on skb->data. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h |

[PATCH 2/5] staging: vt6656: create vnt rx header for sk_buff.

2020-01-19 Thread Malcolm Priestley
vnt_rx_header contains the structure of the original variables wbk_status, rx_sts, rx_rate and pay_load_len packed. Replace all the old variables for the ones in this. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 7 +++ drivers/staging/vt6656/dpc.c| 29

[PATCH 1/5] staging: vt6656: Simplify RX finding bit rates

2020-01-19 Thread Malcolm Priestley
The bit rate can be found by multiplying the rate value by 5. Use rx_bitrate to compared to sband bitrates removing the need to find it by hw_value. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/dpc.c| 21 ++--- 2 files

Re: [PATCH 1/5] staging: vt6656: Fix non zero logical return of, usb_control_msg

2020-01-08 Thread Malcolm Priestley
On 06/01/2020 21:45, Quentin Deslandes wrote: > On 01/03/20 13:58:08, Dan Carpenter wrote: >> On Fri, Dec 20, 2019 at 09:14:59PM +, Malcolm Priestley wrote: >>> Starting with commit 59608cb1de1856 >>> ("staging: vt6656: clean function's error path in usbpipe.c

[PATCH 3/4] staging: vt6656: Fix false Tx excessive retries reporting.

2020-01-08 Thread Malcolm Priestley
The driver reporting IEEE80211_TX_STAT_ACK is not being handled correctly. The driver should only report on TSR_TMO flag is not set indicating no transmission errors and when not IEEE80211_TX_CTL_NO_ACK is being requested. Cc: stable Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656

[PATCH 2/4] staging: vt6656: use NULLFUCTION stack on mac80211

2020-01-08 Thread Malcolm Priestley
-by: Malcolm Priestley --- drivers/staging/vt6656/main_usb.c | 1 + drivers/staging/vt6656/rxtx.c | 14 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 9cb924c54571..5e48b3ddb94c 100644

[PATCH 4/4] staging: vt6656: Move ieee80211_rx_status off stack.

2020-01-08 Thread Malcolm Priestley
ieee80211_rx_status off stack to IEEE80211_SKB_RXCB (skb->cb) removing the need to copy on to it. skb->cb is always present as a clean buffer so simply fill it in. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/dpc.c | 21 ++--- 1 file changed, 10 inse

[PATCH 1/4] staging: vt6656: correct packet types for CTS protect, mode.

2020-01-08 Thread Malcolm Priestley
otherwise transmit packets as PK_TYPE_11A. Cc: stable Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 2 ++ drivers/staging/vt6656/rxtx.c | 12 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6656/device.h b/drivers/staging

[PATCH 5/5] staging: vt6656: set usb_set_intfdata on driver fail.

2019-12-20 Thread Malcolm Priestley
intfdata will contain stale pointer when the device is detached after failed initialization when referenced in vt6656_disconnect Provide driver access to it here and NULL it. Cc: stable Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 + drivers/staging/vt6656

[PATCH 4/5] staging: vt6656: remove bool from vnt_radio_power_on ret

2019-12-20 Thread Malcolm Priestley
The driver uses logical only error checking a bool true would flag error. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 56cd77fd9ea0

[PATCH 3/5] staging: vt6656: limit reg output to block size

2019-12-20 Thread Malcolm Priestley
+ Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/baseband.c | 4 ++-- drivers/staging/vt6656/usbpipe.c | 17 + drivers/staging/vt6656/usbpipe.h | 5 + 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6656/baseband.c b/drivers

[PATCH 2/5] staging: vt6656: correct return of vnt_init_registers.

2019-12-20 Thread Malcolm Priestley
The driver standard error returns remove bool false conditions. Cc: stable # v5.3+ Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/main_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c

[PATCH 1/5] staging: vt6656: Fix non zero logical return of, usb_control_msg

2019-12-20 Thread Malcolm Priestley
operation causes errors. Correct the return function so only return zero when transfer is successful. Cc: stable # v5.3+ Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/usbpipe.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6656/u

[PATCH] staging: vt6655: Remove vif check from vnt_interrupt

2019-03-27 Thread Malcolm Priestley
A check for vif is made in vnt_interrupt_work. There is a small chance of leaving interrupt disabled while vif is NULL and the work hasn't been scheduled. Signed-off-by: Malcolm Priestley CC: sta...@vger.kernel.org # v4.2+ --- drivers/staging/vt6655/device_main.c | 3 +-- 1 file changed, 1

  1   2   >