Pass the link id through to the get_beacon and return
the beacon for a specific link id.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Split the bss_info_changed method to vif_cfg_changed and
link_info_changed, with the latter getting a link ID.
Also change the 'changed' parameter to u64 already, we
know we need that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
We'll use bss_conf for per-link configuration later, so
move out all the non-link-specific data out into a new
struct ieee80211_vif_cfg used in the vif.
Some adjustments were done with the following spatch:
@@
expression sdata;
struct ieee80211_vif *vifp;
identifier var = { assoc, ibss_joined, aid, arp_addr_list, arp_addr_cnt, ssid, ssid_len, s1g, ibss_creator };
@@
(
-sdata->vif.bss_conf.var
+sdata->vif.cfg.var
|
-vifp->bss_conf.var
+vifp->cfg.var
)
@bss_conf@
struct ieee80211_bss_conf *bss_conf;
identifier var = { assoc, ibss_joined, aid, arp_addr_list, arp_addr_cnt, ssid, ssid_len, s1g, ibss_creator };
@@
-bss_conf->var
+vif_cfg->var
(though more manual fixups were needed, e.g. replacing
"vif_cfg->" by "vif->cfg." in many files.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This patch fixes the checkpatch.pl warning like:
- CHECK: Macro argument reuse 'uVar' - possible side-effects?
Moved the only twice used function to the file where it is used.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/fa37dde640cfe5093ff23ca0881aba4673751a49.1645477326.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
checkpatch.pl warning: It's generally not useful to have the filename in
the file
Remove the filenames.
Signed-off-by: Aldas Taraškevičius <aldas60@gmail.com>
Link: https://lore.kernel.org/r/20210827163203.4100-1-aldas60@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The vt6655 and vt6656 drivers have an unused CONFIG_PATH define floating
around in the code, but it is never used. Remove it as drivers should
never be reading from config files anyway, even if these were valid
files.
Reported-by: Joe Perches <joe@perches.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20210729095812.1693061-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Align function arguments to fix checkpatch.pl CHECK message and rewrap
to match the file's style.
Signed-off-by: Florian Ziegler <florian.ziegler@posteo.de>
Link: https://lore.kernel.org/r/20210218232215.17508-1-florian.ziegler@posteo.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This change fixes a checkpatch CHECK style issue for "Alignment should
match open parenthesis".
Signed-off-by: Pritthijit Nath <pritthijit.nath@icloud.com>
Link: https://lore.kernel.org/r/20210211213715.7386-1-pritthijit.nath@icloud.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
multiple structures contains a ieee80211_rts structure, which is required to
have at least two byte alignment, but are annotated with a __packed attribute
to force single-byte alignment:
staging/vt6656/rxtx.h:98:1: warning: alignment 1 of 'struct vnt_rts_g' is less than 2 [-Wpacked-not-aligned]
staging/vt6656/rxtx.h:106:1: warning: alignment 1 of 'struct vnt_rts_ab' is less than 2 [-Wpacked-not-aligned]
staging/vt6656/rxtx.h:116:1: warning: alignment 1 of 'struct vnt_cts' is less than 2 [-Wpacked-not-aligned]
I see no reason why the structure itself would be misaligned, and all members
have at least two-byte alignment within the structure, so use the same
constraint on the sturcture itself.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210204162731.3132069-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In commit 61bb798767
("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 <lkp@intel.com>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/5096f399-03e7-77e1-b334-947aabc44d14@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Move the USB element out of vnt_tx_packet and vnt_beacon_xmit to
vnt_tx_context with sk_buff passed in parameters with the data now
between skb->data and skb->len.
The vnt_tx_usb header is moved from vnt_tx_buffer to usbpipe.h with the
size added to extra_tx_headroom the largest possible size.
The CONTEXT enums types are aligned with usb ones and CONTEXT_MGMT_PACKET
is removed and is never be used.
The skb_push in vnt_tx_packet is now only ever used with
vnt_get_hdr_size with variables tx_bytes and tx_header_size removed.
buf_len in vnt_usb_send_context is no longer used and replaced with
urb->actual_length in vnt_tx_context_complete.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/aa6257eb-1758-4e75-ab39-2a15ff6ffa7c@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The sk_buff needs to preserved for copying to various parts
of context and passing back to mac80211
clone sk_buff in context so to continue to writing to orginal
sk_buff data area to send in vnt_tx_context.
dev_kfree_skb the context on error or dev_kfree_skb the
orignal when done. The error 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 <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/b87e8cc1-f584-989d-830b-609d712f08c7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/rxtx.c:729 vnt_beacon_xmit()
warn: struct type mismatch 'vnt_beacon_buffer vs vnt_tx_usb_header'
Since the only part of vnt_beacon_buffer is used remove and
replace it with vnt_tx_usb_header.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/9818e564-81f6-a683-caa0-69423fded401@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/bb91b159-387a-005b-f614-c541de128c40@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/f08a6f07-a77e-0b8e-cb05-505a1f995683@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/1b21b3db-b9ef-c167-8f88-b32646ba5a19@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/e8969f47-ffc7-6eb6-9f3c-72b06970c1b8@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/6420a6ae-82eb-f794-fa7c-bac419222ad6@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use usb_anchor to track tx submitted urbs and initialize the
urb as needed in vnt_tx_context.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/077f42f8-4f7f-adc4-5a14-955165cef9f1@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/5f00d319-9242-65b2-d100-dcfe9b0e32be@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mac80211 can provide space for the driver to put a tx header on
the skb buffer instead coping the entire frame on to a local
buffer with the header.
To use this extra_tx_headroom must be set in mac80211 with the largest
possible header which is struct vnt_tx_buffer.
The driver has 8 possible combinations of tx header size which
are found in vnt_get_hdr_size replacing vnt_mac_hdr_pos.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/7b967bfc-1d4b-4b45-efab-d54f16cca226@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch is removing definition of CFLAGS in Makefile of vt6656 and
vt6655, as those are defining macros that are not used. This will remove
undef of one macro from vt6655/device_main.c, as it is only undef and it is
not used anywhere else, so it is safe to remove it.
Macros are removed from vt665x/Makefile and vt6655/device_main.c.
Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz>
Link: https://lore.kernel.org/r/1589397351-24655-2-git-send-email-mdujava@kocurkovo.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In the start of the "vnt_rf_set_txpower" function the "power" variable
is set at most to VNT_RF_MAX_POWER (hex = 0x3f, dec = 63). Then, in the
switch statement there are four comparisons with the "power" variable
against AL7230_PWR_IDX_LEN (dec = 64), VT3226_PWR_IDX_LEN (dec = 64),
VT3342_PWR_IDX_LEN (dec = 64). Due to all the commented comparisons are
to check if the "power" variable is "greater than or equal" to 64, this
never happens. So, remove the logically dead code.
Also, remove all the defines that are no longer required.
Addresses-Coverity-ID: 1230228 ("Logically dead code")
Fixes: f53d9f12c5 ("staging: vt6656: rf.c additional power.")
Signed-off-by: Oscar Carter <oscar.carter@gmx.com>
Link: https://lore.kernel.org/r/20200510090950.7633-1-oscar.carter@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rsvtime is the time needed in firmware to process the received
frame time in firmware so they can be the same as vnt_get_rts_duration
or vnt_get_cts_duration where appropriate.
The rts_rrv_time are now all the same timing in vnt_rxtx_rts.
So vnt_get_rtscts_rsvtime_le and and vnt_get_frame_time are no longer
required.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/4c0fe356-7e08-bf66-58b7-5ab683ba9536@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/d2983161-7935-48ce-c0ca-a26ebafa3997@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/acff7fcc-0add-652b-7d07-22001b641257@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>