1
0
Fork 0
Commit Graph

78 Commits (d65d2b25d2761153390df8026cca1a528d9b6c5a)

Author SHA1 Message Date
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
Igor Bezukh f9dc1a8a70 Staging: vt6655: fix missing blank line after variable declaration
Checkpatch fix - Add missing blank line after variable declaration

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16 13:30:32 -07:00
Martin Kepplinger ff87dbc906 staging: vt6655: remove unnecessary typedef struct.
Remove a totally unnecessary typedef and rename it to lowercase.
This is more readable now.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:37:01 -07:00
Guido Martínez bc5cf65635 staging: vt6655: fix checkpatch bracing issues
This patchs fixes tons of warnings such as:

  WARNING: braces {} are not necessary for single statement blocks
  #354: FILE: drivers/staging/vt6655/wmgr.c:354:
  +       for (ii = 0; ii < WLAN_BSSID_LEN; ii++) {
  +               pMgmt->abyDesireBSSID[ii] = 0xFF;
  +       }

Please note: this patch only fixes bracing issues (and there is still a
lot to do); so if you run checkpatch it _will_ throw a lot of errors.
Use --test-only=braces

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:26:37 -07:00
Guido Martínez 4e8a7e5fc2 staging: vt6655: remove dead code
Remove dead code in many places on this driver.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:25:58 -07:00
Guido Martínez 3248c07c7b staging: vt6655: remove mention of nonexistent function CARDbSetBasicRate
Comments mention a function CARDbSetBasicRate, but it never existed in
the source tree. Remove all mention of it.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:09:32 -07:00
Teodora Baluta 88cc85075d staging: vt6655: remove unneeded semicolon
This patch deletes any unneeded semicolons in driver vt6655 as detected
by coccinelle.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:15:08 -08:00
Teodora Baluta 1208f14a37 staging: vt6655: delete explicit comparison to bool
This patch fixes the following type of coccinelle detected warnings for
driver vt6655:

WARNING: Comparison to bool

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:15:08 -08:00
Joe Perches 96d69e201b staging: vt6655: Remove unnecessary blank lines
Remove a bunch of useless vertical whitespace.

Convert 3 or more consecutive newlines to 2.
Remove blank lines after open brace and before close brace.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:16:17 -07:00
Joe Perches a4ef27ad02 staging: vt6655: Remove unnecessary parentheses from returns
Returns aren't functions, remove the parentheses to be
more kernel style like.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:16:17 -07:00
Joe Perches 5e0cc8a231 staging: vt6655: Convert to kernel brace style
Move braces around to be more kernel like.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:16:16 -07:00
Joe Perches d4945f09dd staging:vt6655:card: Whitespace cleanups
Neatening only.
git diff -w shows no differences.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-18 17:21:34 -07:00
Justin P. Mattock 7664ec8640 staging: "vt6655" Typo change *Caculate to *Calculate.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:59:13 -07:00
Justin P. Mattock 623b2b39c9 staging: "vt6655" Typo change *Embeded to *Embedded.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:59:12 -07:00
Justin P. Mattock 789d1aef17 staging: "vt6655" Fix typos in comments.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:59:12 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00