Malcolm Priestley
1bdee70635
staging: vt6656: parse cts fall back out of vnt_fill_cts_head
...
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-07 17:16:59 +08:00
Malcolm Priestley
5c9b063a0a
staging: vt6656: vnt_fill_cts_head remove unneeded NULL check.
...
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-02-07 17:16:59 +08:00
Heba Aamer
48eaa7f596
staging: vt6656: fix Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
...
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-25 19:59:17 +08:00
Emrys Bayliss
09a7a6b5d8
Staging: vt6656: Checkpatch fix: else after break or return
...
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-12 19:48:25 -08:00
Krzysztof Adamski
73c4c6eee1
staging: vt6656: whitespace checkpatch warning fix.
...
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-12 19:39:44 -08:00
Krzysztof Adamski
e2382233ad
staging: vt6656: Use ether_addr_copy() on vnt_private members.
...
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-12 19:38:40 -08:00
Krzysztof Adamski
ccc103f564
staging: vt6656: Use ether_addr_copy() in vnt_fill_ieee80211_rts.
...
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>
2015-01-12 19:38:40 -08:00
Mahati Chamarthy
eab4e78d08
Staging: vt6656: Merges two lines of code and also removes unused variable
...
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-09-23 13:40:17 -07:00
Ragnar B. Johannsson
76be25ba31
staging: vt6656: add blank line after declaration
...
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-16 12:23:17 -07:00
Ragnar B. Johannsson
de657d59f2
staging: vt6656: fix incorrect indentation
...
Use tabs, not spaces.
Signed-off-by: Ragnar B. Johannsson <ragnar@igo.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley
14fb6ce8de
staging: vt6656: struct vnt_tx_short_buf_head change base type of fifo_ctl to __le16
...
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-22 16:19:36 -07:00
Malcolm Priestley
47e0889452
staging: vt6656: struct vnt_tx_fifo_head fifo_ctl change base type to __le16
...
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-22 16:19:35 -07:00
Malcolm Priestley
1e00b449fa
staging: vt6656: struct vnt_beacon_buffer replace byType with type
...
Removing camel case
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 16:19:35 -07:00
Malcolm Priestley
c8a3a4c0a2
staging: vt6656: vnt_tx_buffer replace byType with type
...
Removing camel case
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 16:19:35 -07:00
Malcolm Priestley
af90ab396c
staging: vt6656: struct vnt_beacon_buffer replace byPKTNO with pkt_no
...
removing camel case.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 16:19:35 -07:00
Malcolm Priestley
d0335a0363
staging: vt6656: struct vnt_tx_buffer replace byPKTNO with pkt_no
...
Replacing camel case
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 16:19:35 -07:00
Malcolm Priestley
f0ff3fde52
staging: vt6656: vnt_tx_fifo_head rename wFIFOCtl to fifo_ctl
...
Removing prefix and camel case.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 16:19:35 -07:00
Malcolm Priestley
cca48e3ce4
staging: vt6656: struct vnt_usb_send_context context into vnt_get_duration_le
...
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-21 12:16:30 -07:00
Malcolm Priestley
798f06011f
staging; vt6656: rxtx add current_rate into vnt_usb_send_context as tx_rate
...
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-21 12:16:30 -07:00
Malcolm Priestley
0f5567cb2f
staging: vt6656: rxtx move frame_len/size into vnt_usb_send_context as frame_len
...
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-21 12:16:29 -07:00
Malcolm Priestley
2eca8dbb4c
staging: vt6656: move need_ack into into vnt_usb_send_context
...
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-21 12:16:29 -07:00
Malcolm Priestley
e8c9875c77
staging: vt6656: rxtx move pkt_type into vnt_usb_send_context
...
Removing pkt_type from functions
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:16:29 -07:00
Malcolm Priestley
0871dc6926
staging: vt6656: vnt_get_duration_le fix typo piv to priv
...
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:16:29 -07:00
Malcolm Priestley
a6177aef3c
staging: vt6656: struct vnt_private replace byAutoFBCtrl with auto_fb_ctrl
...
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-21 12:16:29 -07:00
Malcolm Priestley
1b2bc0aa8d
staging: vt6656: struct vnt_private replace wSeqCounter with seq_counter
...
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-21 12:16:29 -07:00
Malcolm Priestley
8b84c1da02
staging: vt6656: struct vnt_private replace wCurrentRate with current_rate
...
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-21 12:16:28 -07:00
Malcolm Priestley
98e93fe5ba
staging: vt6656: struct vnt_private replace byPreambleType with preamble_type
...
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-21 12:16:28 -07:00
Malcolm Priestley
d80bf43c82
staging: vt6656: struct vnt_private replace byTopCCKBasicRate with top_cck_basic_rate
...
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-21 12:16:28 -07:00
Malcolm Priestley
3c8a5b2598
staging: vt6656: struct vnt_private replace byTopOFDMBasicRate with top_ofdm_basic_rate
...
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-21 12:16:28 -07:00
Malcolm Priestley
e12471db91
staging: vt6656: struct vnt_private replace byPacketType with packet_type
...
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-21 12:16:28 -07:00
Malcolm Priestley
65df77e2ca
staging: vt6656: struct vnt_private replace byBBType with bb_type
...
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-21 12:16:28 -07:00
Malcolm Priestley
ff5fee2229
staging: vt6656: struct vnt_private remove camel case IFS names
...
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>
2014-07-21 12:11:58 -07:00
Malcolm Priestley
ebf9b31238
staging: vt6656: remame abyCurrentNetAddr to current_net_addr
...
Removing prefix and camel case
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:11:57 -07:00
Malcolm Priestley
03b7e3548c
staging: vt6656: struct vnt_private rename cdTD to num_tx_context
...
number of tx_context
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 12:11:55 -07:00
Malcolm Priestley
f7e4a8f45c
staging: vt6656: struct vnt_private rename apTD to tx_context
...
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-18 16:06:23 -07:00
Malcolm Priestley
476e7d97aa
staging: vt6656: rename PIPEnsSendBulkOut to vnt_tx_context.
...
We are just tx the context
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 12:11:39 -07:00
Malcolm Priestley
57981a65fb
staging: vt6656: Drop u8 pointer and rename bScheduleCommand.
...
Rename to vnt_schedule_command removing unused u8 pointer.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:22:34 -07:00
Malcolm Priestley
604631ff0b
staging: vt6656: rxtx replace debug messages DBG_PRT
...
Replace with dev_dbg
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:27 -07:00
Malcolm Priestley
ed71f5e21d
staging: vt6656: rxtx remove unneeded comments
...
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:27 -07:00
Malcolm Priestley
1a9c1005cb
staging: vt6656: rxtx remove static declarations
...
all functions are in visibility order.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:27 -07:00
Malcolm Priestley
a032b16c27
staging: vt6656: rename s_vGetFreeContext to vnt_get_free_context
...
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:27 -07:00
Malcolm Priestley
2331ba42b5
staging: vt6656: clean up and rename wFB_Opt1 to vnt_fb_opt1
...
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:27 -07:00
Malcolm Priestley
e3f318744c
staging: vt6656: clean up and rename wFB_Opt0 to vnt_fb_opt0
...
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:27 -07:00
Malcolm Priestley
1a4d450927
staging: vt6656: rename and cleanup wTimeStampOff
...
Rename to vnt_time_stampoff
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:27 -07:00
Malcolm Priestley
3815a27bf4
staging: vt6656: rename s_uGetTxRsvTime to vnt_get_rsvtime
...
Drop tx from name
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:27 -07:00
Malcolm Priestley
aadf7d13a7
staging: vt6656: rename s_uGetRTSCTSRsvTime to vnt_get_rtscts_rsvtime_le
...
Function always returns little endian.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:27 -07:00
Malcolm Priestley
435ae3beec
staging: vt6656: rename s_uGetDataDuration to vnt_get_duration_le
...
Drop data and the function always returns little endian
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:27 -07:00
Malcolm Priestley
a4c2a8a4f3
staging: vt6656: s_uGetDataDuration remove camel case
...
camel case changes
pDevice -> priv
byPktType -> pkt_type
bNeedAck -> need_ack
uAckTime -> ack_time
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:26 -07:00
Malcolm Priestley
f2aabee607
staging: vt6656: rxtx rename s_uGetRTSCTSDuration to vnt_get_rtscts_duration_le
...
Function always returns little endian value.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:26 -07:00
Malcolm Priestley
7beae9a26a
staging: vt6656: s_uGetRTSCTSDuration remove camel case
...
camel case changes
pDevice -> priv
byDurType -> dur_type
cbFrameLength -> frame_length
byPktType -> pkt_type
wRate -> rate
bNeedAck -> need_ack
uCTSTime -> cts_time
uDurTime -> dur_time
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 17:34:26 -07:00