aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/rxtx.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-07-11staging: vt6655: remove some redundant variablesColin Ian King1-4/+1
Variables rx_sts, sq, frame and is_pspoll are being assigned but are never used hence they are redundant and can be removed. Cleans up clang warnings: warning: variable 'sq' set but not used [-Wunused-but-set-variable] warning: variable 'rx_sts' set but not used [-Wunused-but-set-variable] warning: variable 'frame' set but not used [-Wunused-but-set-variable] warning: variable 'is_pspoll' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28staging: vt6656: Remove redundant license textGreg Kroah-Hartman1-11/+0
Now that the SPDX tag is in all vt6656 files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28staging: vt6656: add SPDX identifiers to all vt6656 driver filesGreg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the vt6656 driver files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Forest Bond <forest@alittletooquiet.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18staging: vt6656: remove unnecesary blank linesJuan Manuel Torres Palma1-4/+0
Fix style in rxtx.c, removing extra empty blank lines. Signed-off-by: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18staging: vt6656: remove multiple assignmentsJuan Manuel Torres Palma1-6/+14
Fix style in rxtx.c, breaking all multiple assignments in different lines. Signed-off-by: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: vt6656: rtxt.c Fix PARENTHESIS_ALIGNMENT type errorsSalvatore Benedetto1-33/+37
Fix all PARENTHESIS_ALIGNMENT type errors reported by checkpatch in rtxt.c Signed-off-by: Salvatore Benedetto <salvatore.benedetto@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: vt6656: use tabs instead of spacesJuan Antonio Pedreira Martos1-16/+16
Fix a checkpatch error: CODE_INDENT (code indent should use tabs where possible). Signed-off-by: Juan Antonio Pedreira Martos <juanpm1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16staging: vt6656: rxtx.c Removed multiple dereferencingMichael S. Hansen1-2/+2
Fixes checkpatch warning: Avoid multiple line dereference Signed-off-by: Michael S. Hansen <michael.schacht.hansen@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16staging: vt6656: Alignment match open parenthesisArushi Singhal1-27/+27
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis" Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12cfg80211: remove enum ieee80211_bandJohannes Berg1-1/+1
This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-03-01Merge tag 'mac80211-next-for-davem-2016-02-26' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-nextDavid S. Miller1-4/+8
Johannes Berg says: ==================== Here's another round of updates for -next: * big A-MSDU RX performance improvement (avoid linearize of paged RX) * rfkill changes: cleanups, documentation, platform properties * basic PBSS support in cfg80211 * MU-MIMO action frame processing support * BlockAck reordering & duplicate detection offload support * various cleanups & little fixes ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24mac80211: remove ieee80211_get_key_tx_seq/ieee80211_set_key_tx_seqEliad Peller1-4/+8
Since the PNs of all the tx keys are now tracked in the public part of the key struct (with atomic counter), we no longer need these functions. dvm and vt665{5,6} are currently the only users of these functions, so update them accordingly. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-19staging: vt6656: remove address from GPL textOthmar Pasteka1-3/+0
Cleanup errors from checkpatch.pl. Signed-off-by: Othmar Pasteka <pasteka@kabsi.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: vt6656: don't stop TX queue unless buffer full.Malcolm Priestley1-1/+4
Presently the TX buffer stops while filling the buffer and urb. However, this does not make use of the available buffer space, it also lags the speed of the TX troughtput. Only stop the queue when the buffer becomes full. The URB complete will start the queue again when a buffer and URB is available. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging: vt6656: Fixed two lines over 80 characters longArjun Krishna Babu1-2/+5
The presence of comments originally caused the two lines to be over 80 characters long. The issue is fixed by moving the comments into a separate line. Signed-off-by: Arjun Krishna Babu <arjunkrishnababu96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: vt6656: Boolean tests don't need comparisons.Abdul Hussain1-1/+1
This patch remove true and false from boolean tests. Signed-off-by: Abdul Hussain <habdul@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: vt6656: use ieee80211_tx_info to select packet type.Malcolm Priestley1-3/+11
Information for packet type is in ieee80211_tx_info band IEEE80211_BAND_5GHZ for PK_TYPE_11A. IEEE80211_TX_RC_USE_CTS_PROTECT via tx_rate flags selects PK_TYPE_11GB This ensures that the packet is always the right type. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> # v3.17+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26Staging: vt6656: replace memcpy() by ether_addr_copy() using coccinelle and pack variableaybuke ozdemir1-4/+4
This patch focuses on fixing the following warning generated by checkpatch.pl for the file rxtx.c Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) @@ expression e1, e2; @@ - memcpy(e1, e2, ETH_ALEN); + ether_addr_copy(e1, e2); According to ether_addr_copy() description and functionality, all Ethernet addresses should align to the u16 datatype. The changes were applied using the following coccinelle rule: Here is the output of pahole for the relevant datastructures: struct vnt_usb_send_context { void * priv; /* 0 8*/ struct sk_buff * skb; /* 8 8*/ struct urb * urb; /* 16 8*/ struct ieee80211_hdr * hdr; /* 24 8*/ unsigned int buf_len; /* 32 4*/ u32 frame_len; /* 36 4*/ u16 tx_hdr_size; /* 40 2*/ u16 tx_rate; /* 42 2*/ u8 type; /* 44 1*/ u8 pkt_no; /* 45 1*/ u8 pkt_type; /* 46 1*/ u8 need_ack; /* 47 1*/ u8 fb_option; /* 48 1*/ bool in_use; /* 49 1*/ unsigned char data[2900]; /* 50 2900*/ /* --- cacheline 46 boundary (2944 bytes) was 6 bytes ago --- */ /* size: 2952, cachelines: 47, members: 15 */ /* padding: 2 */ /* last cacheline: 8 bytes */ }; struct ieee80211_key_conf { u32 cipher; /* 0 4*/ u8 icv_len; /* 4 1*/ u8 iv_len; /* 5 1*/ u8 hw_key_idx; /* 6 1*/ u8 flags; /* 7 1*/ s8 keyidx; /* 8 1*/ u8 keylen; /* 9 1*/ u8 key[0]; /* 10 0*/ /* size: 12, cachelines: 1, members: 8 */ /* padding: 2 */ /* last cacheline: 12 bytes */ }; struct vnt_mic_hdr { u8 id; /* 0 1*/ u8 tx_priority; /* 1 1*/ u8 mic_addr2[6]; /* 2 6*/ u8 ccmp_pn[6]; /* 8 6*/ __be16 payload_len; /* 14 2*/ __be16 hlen; /* 16 2*/ __le16 frame_control; /* 18 2*/ u8 addr1[6]; /* 20 6*/ u8 addr2[6]; /* 26 6*/ u8 addr3[6]; /* 32 6*/ __le16 seq_ctrl; /* 38 2*/ u8 addr4[6]; /* 40 6*/ u16 packing; /* 46 2*/ /* size: 48, cachelines: 1, members: 13 */ /* last cacheline: 48 bytes */ }; Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: vt6656: parse cts fall back out of vnt_fill_cts_headMalcolm Priestley1-45/+54
Creating new function vnt_fill_cts_fb_head for the fall back rates. The check for fb_option is now done in vnt_rxtx_cts. This fixes checkpatch warning WARNING: else is not generally useful after a break or return 559: FILE: drivers/staging/vt6656/rxtx.c:559: Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: vt6656: vnt_fill_cts_head remove unneeded NULL check.Malcolm Priestley1-3/+0
union vnt_tx_data_head is nolonger detached from main vnt_tx_buffer structure so this check is unnecessary. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: vt6656: fix Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)Heba Aamer1-1/+1
This patch fixes the following checkpatch.pl warning: fix Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) Pahole showed that the 2 structs are aligned to u16 struct vnt_mic_hdr { u8 id; /* 0 1 */ u8 tx_priority; /* 1 1 */ u8 mic_addr2[6]; /* 2 6 */ u8 ccmp_pn[6]; /* 8 6 */ __be16 payload_len; /* 14 2 */ __be16 hlen; /* 16 2 */ __le16 frame_control; /* 18 2 */ u8 addr1[6]; /* 20 6 */ u8 addr2[6]; /* 26 6 */ u8 addr3[6]; /* 32 6 */ __le16 seq_ctrl; /* 38 2 */ u8 addr4[6]; /* 40 6 */ u16 packing; /* 46 2 */ /* size: 48, cachelines: 1, members: 13 */ /* last cacheline: 48 bytes */ }; struct ieee80211_hdr { __le16 frame_control; /* 0 2 */ __le16 duration_id; /* 2 2 */ u8 addr1[6]; /* 4 6 */ u8 addr2[6]; /* 10 6 */ u8 addr3[6]; /* 16 6 */ __le16 seq_ctrl; /* 22 2 */ u8 addr4[6]; /* 24 6 */ /* size: 30, cachelines: 1, members: 7 */ /* last cacheline: 30 bytes */ }; Signed-off-by: Heba Aamer <heba93aamer@gmail.com> Reviewed-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12Staging: vt6656: Checkpatch fix: else after break or returnEmrys Bayliss1-2/+0
This patch fixes the following checkpatch.pl error: rxtx.c:588: WARNING: else is not generally useful after a break or return Signed-off-by: Emrys Bayliss <emrys@paradise.net.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12staging: vt6656: whitespace checkpatch warning fix.Krzysztof Adamski1-1/+1
This fixes following checkpatch.pl error: ERROR: space prohibited before that ',' (ctx:WxW) Signed-off-by: Krzysztof Adamski <k@japko.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12staging: vt6656: Use ether_addr_copy() on vnt_private members.Krzysztof Adamski1-2/+2
This patch fixes checkpatch.pl warning: WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) current_net_addr and permanent_net_addr members of vnt_private alignment is changed to at last 16 bits so that ether_addr_copy can be safely used on them. buf->data is of type ieee80211_cts which is already properly aligned. Signed-off-by: Krzysztof Adamski <k@japko.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12staging: vt6656: Use ether_addr_copy() in vnt_fill_ieee80211_rts.Krzysztof Adamski1-2/+3
Both struct ieee80211_rts and struct ieee80211_hdr defined in linux/ieee80211.h are declared as __aligned(2) so it is safe to use ether_addr_copy() instead of memcpy(). Signed-off-by: Krzysztof Adamski <k@japko.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23Staging: vt6656: Merges two lines of code and also removes unused variableMahati Chamarthy1-5/+1
This patch merges an assignment with an immediately following return of the assigned variable. The following Coccinelle semantic patch was used to make this transformation: @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; A variable that became unused due to this transformation was also removed. Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16staging: vt6656: add blank line after declarationRagnar B. Johannsson1-0/+1
Adds a blank line after declaration to comply with coding style. Signed-off-by: Ragnar B. Johannsson <ragnar@igo.is> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16staging: vt6656: fix incorrect indentationRagnar B. Johannsson1-1/+1
Use tabs, not spaces. Signed-off-by: Ragnar B. Johannsson <ragnar@igo.is> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22staging: vt6656: struct vnt_tx_short_buf_head change base type of fifo_ctl to __le16Malcolm Priestley1-1/+1
Base type is always little endian. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22staging: vt6656: struct vnt_tx_fifo_head fifo_ctl change base type to __le16Malcolm Priestley1-12/+14
Endian is always little add correction in vnt_tx_packet. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22staging: vt6656: struct vnt_beacon_buffer replace byType with typeMalcolm Priestley1-1/+1
Removing camel case Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22staging: vt6656: vnt_tx_buffer replace byType with typeMalcolm Priestley1-1/+1
Removing camel case Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22staging: vt6656: struct vnt_beacon_buffer replace byPKTNO with pkt_noMalcolm Priestley1-1/+1
removing camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22staging: vt6656: struct vnt_tx_buffer replace byPKTNO with pkt_noMalcolm Priestley1-1/+1
Replacing camel case Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22staging: vt6656: vnt_tx_fifo_head rename wFIFOCtl to fifo_ctlMalcolm Priestley1-12/+12
Removing prefix and camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_usb_send_context context into vnt_get_duration_leMalcolm Priestley1-54/+68
Removing priv, frame_length and need_ack Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging; vt6656: rxtx add current_rate into vnt_usb_send_context as tx_rateMalcolm Priestley1-47/+44
Create u8 tx_rate and remove current_rate from function declarations Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: rxtx move frame_len/size into vnt_usb_send_context as frame_lenMalcolm Priestley1-58/+57
Removing frame_len and frame_size from function declarations Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: move need_ack into into vnt_usb_send_contextMalcolm Priestley1-38/+51
Fixing need_ack to u8 and removing from function declarations. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: rxtx move pkt_type into vnt_usb_send_contextMalcolm Priestley1-100/+108
Removing pkt_type from functions Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: vnt_get_duration_le fix typo piv to privMalcolm Priestley1-6/+6
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace byAutoFBCtrl with auto_fb_ctrlMalcolm Priestley1-2/+2
Removing type prefix and camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace wSeqCounter with seq_counterMalcolm Priestley1-5/+5
Removing type prefix and camel case Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace wCurrentRate with current_rateMalcolm Priestley1-2/+2
Removing type prefix and camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace byPreambleType with preamble_typeMalcolm Priestley1-20/+20
Removing type prefix and camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace byTopCCKBasicRate with top_cck_basic_rateMalcolm Priestley1-20/+20
Removing type prefix and camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace byTopOFDMBasicRate with top_ofdm_basic_rateMalcolm Priestley1-11/+11
Removing type prefix and camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace byPacketType with packet_typeMalcolm Priestley1-1/+1
Removing type prefix and camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace byBBType with bb_typeMalcolm Priestley1-1/+1
Removing type prefix and camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private remove camel case IFS namesMalcolm Priestley1-7/+7
Camel case changes uSIFS -> sifs uDIFS -> difs uEIFS -> eifs uSlot -> slot Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>