1
0
Fork 0
Commit Graph

93 Commits (8c182ae20791d638c07ff499709c4a1d4697bd7c)

Author SHA1 Message Date
Malcolm Priestley 9196124442 staging: vt6655: card.c rename pDevice with priv
Removing camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17 09:04:27 -07:00
Malcolm Priestley bc667b99cc staging: vt6655: rename pOpts and sOpts to opts.
bring pointers and members into line.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17 09:04:27 -07:00
Malcolm Priestley bed02d93a1 staging: vt6655: replace typedef struct __device_opt
with struct vnt_options and members
rx_descs0 for nRxDescs0
rx_descs1 for nRxDescs1
tx_descs for nTxDescs
int_works
short_retry
long_retry
bbp_type
flags

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17 09:04:27 -07:00
Amitoj Kaur Chawla a8a211c481 staging: vt6655: Prefer using BIT Macro
Replace bit shifting on 1 with the BIT(x) Macro

The semantic patch used to find this is:
@@ int g; @@

-(1 << g)
+BIT(g)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:05:17 -07:00
Luis de Bethencourt 17accc46ec staging: vt6655: Remove boolean comparisons
Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:05:17 -07:00
Amitoj Kaur Chawla 5309c5b8f0 staging: vt6655: Remove useless initialisation
Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:05:17 -07:00
Amitoj Kaur Chawla 137e37d0ed staging: vt6655: Remove true comparison
Remove comparison to true in if statement. Problem found using
checkpatch.pl
CHECK: Using comparison to true is error prone

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:25:32 +01:00
Malcolm Priestley 9cb693f6f3 staging: vt6655: replace typedef struct tagSRxDesc
with struct vnt_rx_desc and all members the same.

volatile is removed from pointers as this generates warning
message.

Only the first four members of vnt_rx_desc need to be volatile.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:26 -07:00
Malcolm Priestley 9fc7091cc2 staging: vt6655: replace typedef struct tagRDES1
with struct vnt_rdes1 and members
wReqCount -> req_count
wReserved -> reserved

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:26 -07:00
Malcolm Priestley de1c1862ca staging: vt6655: replace typedef struct tagRDES0
with struct vnt_rdes0 replacing members as follows
wResCount -> res_count
f15Reserved -> f15_reserved
f1Owner -> owner

big endian
f8Reserved1 -> f8_reserved1
f7Reserved -> f7_reserved

Narrowing endian differences to inside structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:26 -07:00
Malcolm Priestley e235727173 staging: vt6655: Replace typedef struct tagSTxDesc
Replace with struct vnt_tx_desc with all members the same.

volatile is removed from pointers as this generates warning
message.

Only the first four members of vnt_tx_desc need to be volatile.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:31:11 -07:00
Malcolm Priestley 5235ff6a1d staging: vt6655: desc.h replace typedef struct tagTDES0
create struct vnt_tdes0 replacing used members
byTSR0 -> tsr0
byTSR1 -> tsr1
f1Owner -> owner

Narrowing endian differences to inside structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:31:10 -07:00
Malcolm Priestley 7135d9a76f staging: vt6655: Fix wReqCount to __le16
Should be __le16 and do and correct endian conversion.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:51:39 -07:00
Malcolm Priestley 217ed3abf1 staging: vt6655: Remove ununsed macro ASSERT
VIAWET_DEBUG is not defined so macro is empty.

Remove the macro.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:51:37 -07:00
Malcolm Priestley 032ed34a84 staging: vt6655: CARDbUpdateTSF bss timestamp correct tsf counter value.
The TSF counter is not set correctly.

Use sync_tsf for last beacon value and get tsf local value.

Remove qwLocalTSF variable and call CARDbGetCurrentTSF.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 14:35:22 +02:00
Mariam Mohamed Fawzy 1167ff91da staging: vt6655: fix that open brace { should be on the previous line
This patch fixes the following checkpatch.pl error:
fix that open brace { should be on the previous line

Signed-off-by: Mariam Mohamed Fawzy <maryammohamed61@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28 11:22:21 -08:00
Malcolm Priestley 95775d1221 staging: vt6655: [BUG] Protect MACvSelectPage1 with lock.
The device must not flip to page 1 while in interrupt lock causing
loss of connection or dead lock.

Protect from changes to page by adding lock where user can
change the page in CARDvSetRSPINF, vnt_configure and set_channel

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12 19:45:35 -08:00
Malcolm Priestley 738487ffc5 staging: vt6655: card.c move __iomem into functions.
Removing dereferencing from callers

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:37:24 -08:00
Malcolm Priestley 6d35b1fcaa staging: vt6655: card Remove function vUpdateIFS
vUpdateIFS does the same operations of CARDbSetPhyParameter there
is not need to call this function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:37:24 -08:00
Malcolm Priestley bfb6c86376 staging: vt6655: CARDbSetPhyParameter remove unused parameters
wCapInfo
byERPField,
*pvSupportRateIEs
*pvExtSupportRateIEs

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley d1ab52011c staging: vt6655: s_vCalculateOFDMRParameter use bb_type for CARD_PHY_TYPE
using u8 for bb_type and replacing PHY_TYPE_11A with BB_TYPE_11A

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley 6e1d14a56b staging: vt6655: CARDvSetRSPINF us bb_type for CARD_PHY_TYPE
Using u8 for bb_type

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley a558e3dcc3 staging: vt6655: CARDbSetPhyParameter change CARD_PHY_TYPE to bb_type
using u8 for bb_type

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley b930eb56e3 staging: vt6655: dead code remove CARDbAddBasicRate
we nonlonger set rates in the driver

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley 3008dd9d9b staging: vt6655: CARDvUpdateBasicTopRate use basic_rates to find top rate
basic_rates should now be used to find it.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley 61b90995d3 staging: vt6655: Fix issue of byPacketType is not set at all.
set by calling CARDbyGetPktType.

change CARDbIsOFDMinBasicRate to check basic_rates.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:23:29 -08:00
Malcolm Priestley 8e8a9f5133 staging: vt6655: BBbReadEmbedded replace __iomem with vnt_private
Changing callers to point to private

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:23:29 -08:00
Malcolm Priestley 377f5bc00f staging: vt6655: BBbWriteEmbedded replace __iomem with vnt_private for callers
Referencing dwIoBase inside function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:23:28 -08:00
Malcolm Priestley a5f0eef38b staging: vt6655: baseband replace __iomem where caller is priv dereferenced.
Replace with stucture vnt_private *priv

in functions
BBvSoftwareReset
BBvSetTxAntennaMode
BBvSetRxAntennaMode
BBvSetDeepSleep
BBvExitDeepSleep

__iomem *dwIoBase will be moved into BBbWriteEmbedded and BBbReadEmbedded
later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:23:28 -08:00
Malcolm Priestley b1c4133657 staging: vt6655: remove fragmentation from driver
fragmentation is now handled by mac80211.

Remove functions
device_alloc_frag_buf
device_init_defrag_cb
device_free_frag_buf

Removing
typedef struct tagSDeFragControlBlock
frag_thresh
sRxDFCB
cbDFCB;
cbFreeDFCB;
uCurrentDFCBIdx;

macros
FRAG_THRESH_MIN
FRAG_THRESH_MAX

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:13 -08:00
Malcolm Priestley dd1c689cec staging: vt6655: card.c/h remove dead functions
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:37 -07:00
Malcolm Priestley 3fbbb75f55 staging: vt6655: CARDbSetPhyParameter replace s_vSetRSPINF with CARDvSetRSPINF
Removing s_vSetRSPINF

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley c01ef29e38 staging: vt6655: mac80211 conversion: card.c use basic_rates
Use basic_rates to find cck and ofdm rates.

wBasicRate will be removed later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley 0614a0e84d staging: vt6655: mac80211 conversion: changes to CARDbSetPhyParameter
CARDbSetPhyParameter appears to use two different strutures to find supported
rates.

Remove PWLAN_IE_SUPP_RATES and use basic_rates to find rates supported.

mac80211 now sets bShortSlotTime, bBarkerPreambleMd and byPreambleType remove
these.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Veronika Kabatova 77b6a6a3f5 staging: vt6655: card.c: Comments fixes
Replace C99 "//" comments by "/* */", remove not needed
comments (year of adding code, commented code)

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:09:28 +08:00
Aya Mahfouz e1499e8149 staging: vt6655: card.c: replace memcpy() by ether_addr_copy() using coccinelle
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)

The changes were applied using the following coccinelle rule:

@@ 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.

Here is the output of pahole for the relevant datastructures:

struct pmkid_candidate {
        NDIS_802_11_MAC_ADDRESS    BSSID;                /*     0     6 */

        /* XXX 2 bytes hole, try to pack */

        long unsigned int          Flags;                /*     8     4 */

        /* size: 12, cachelines: 1, members: 2 */
        /* sum members: 10, holes: 1, sum holes: 2 */
        /* last cacheline: 12 bytes */
};

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:15 +08:00
Malcolm Priestley a987367348 staging: vt6655: Replace typedef enum _CARD_OP_MODE eOPMode with enum nl80211_iftype op_mode.
Using the nl80211 header.

Using enum changes
OP_MODE_ADHOC -> NL80211_IFTYPE_ADHOC
OP_MODE_AP ->  NL80211_IFTYPE_AP
OP_MODE_INFRASTRUCTURE -> NL80211_IFTYPE_STATION
OP_MODE_UNKNOWN -> NL80211_IFTYPE_UNSPECIFIED

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:17 -07:00
Malcolm Priestley 864a5a37aa staging: vt6655: card.c change BBvCalculateParameter to vnt_get_phy_field
Using vnt_get_phy_field means the values are not in the
correct write order the lower word and the upper word need
to be swapped over for an u32 write out.

Rather create another data variable to manipulate this structure.
Create a new union vnt_phy_field_swap with struct vnt_phy_field,
the u16 word swap and the u32 write out.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:48:19 -07:00
Joe Perches 48caf5a060 staging: vt6655: Convert DBG_PRT to pr_<level>
DBG_PRT uses are unnecessarily complex.

Convert DBG_PRT msglevel to pr_<level>.
This changes the KERN_<level> type of several uses.
It also enables dynamic_debug for the pr_debug conversions.

This patch can be a prelude to converting these pr_<level>
uses to dev_<level> as appropriate.

Other changes:

Realign arguments of these conversions.
Remove now unused static int msglevel declarations.
Remove now unused DBG_PRT #define.

Compile tested only.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:43:50 -07:00
Malcolm Priestley d052270b43 staging: vt6655: card change PSDevice to struct vnt_private
Repacing void *pDeviceHandler

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley 4a5f718409 staging: vt6655: CARDbSetBeaconPeriod call CARDbGetCurrentTSF to get TBTT
There is already a function to get next TBTT.

Replace code with CARDqGetNextTBTT.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley 989ae8601b staging: vt6655: CARDqGetNextTBTT calculate qwTSF using do_div
Use do_div to compute equation as shown replacing existing code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley 0fc2a76eef staging: vt6655: Replace and remove typedef QWORD/ DQWORD
Replace the variables with u64/__le64.

The endian variant is needed in some places endian correction is
needed.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Guillaume Clement a1613423cd staging: vt6655: break single line if statements
This fixes the "trailing statements should be on next line" checkpatch
warning.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:28 -07:00
Guillaume Clement 941ead9adf staging: vt6655: Use pr_* functions instead of printk
Lots of printk are used in vt6655, replace them with the pr_*
equivalent.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:28 -07:00
Guillaume Clement bfd7a28190 staging: vt6655: Remove spaces before quoted newlines
This fixes several spaces added just before a newline in debug
strings, reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
Guillaume Clement 6b7112719f staging: vt6655: Add missing blank lines after declarations
This patch fixes the missing blank lines after declarations in vt6655
reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
Guillaume Clement fe802546ce staging: vt6655: remove useless return statements
Many return statements in void function were present at the end of
functions, with no effect. They now are removed.

This fixes a bunch of checkpatch warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
Guillaume Clement 9e4c5c2837 staging: vt6655: statify some variables
Some variables are used only in the context of their .c file, which
gives warnings with sparse.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:03:13 -07:00
Guillaume Clement 1683440595 staging: vt6655: change type of PortOffset to void __iomem *
PortOffset was an unsigned long, but used as an pointer to io
memory. Sometimes it was not properly cast before use, which caused
many warning by sparse.

By updating its type to void __iomem *, and reflecting the changes
where it is needed, this removes most of those warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:02:08 -07:00