2014-11-29 00:02:37

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 1/6] staging: vt6655: remove duplicate MACvSetPacketFilter

Packet filtering is already done in vnt_configure.

A call to MACvSetPacketFilter is not necessary in MACvInitialize as
this will be done by vnt_configure when interface is up.

Also remove macros associated with this function.

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6655/mac.c | 66 --------------------------------------------
drivers/staging/vt6655/mac.h | 13 ---------
2 files changed, 79 deletions(-)

diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index af96606..8f0d652 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -33,7 +33,6 @@
* MACvGetShortRetryLimit - Get 802.11 Short Retry limit
* MACvSetLongRetryLimit - Set 802.11 Long Retry limit
* MACvSetLoopbackMode - Set MAC Loopback Mode
- * MACvSetPacketFilter - Set MAC Address Filter
* MACvSaveContext - Save Context of MAC Registers
* MACvRestoreContext - Restore Context of MAC Registers
* MACbSoftwareReset - Software Reset MAC
@@ -215,66 +214,6 @@ void MACvSetLoopbackMode(void __iomem *dwIoBase, unsigned char byLoopbackMode)

/*
* Description:
- * Set MAC Address filter
- *
- * Parameters:
- * In:
- * dwIoBase - Base Address for MAC
- * wFilterType - Filter Type
- * Out:
- * none
- *
- * Return Value: none
- *
- */
-void MACvSetPacketFilter(void __iomem *dwIoBase, unsigned short wFilterType)
-{
- unsigned char byOldRCR;
- unsigned char byNewRCR = 0;
-
- // if only in DIRECTED mode, multicast-address will set to zero,
- // but if other mode exist (e.g. PROMISCUOUS), multicast-address
- // will be open
- if (wFilterType & PKT_TYPE_DIRECTED) {
- // set multicast address to accept none
- MACvSelectPage1(dwIoBase);
- VNSvOutPortD(dwIoBase + MAC_REG_MAR0, 0L);
- VNSvOutPortD(dwIoBase + MAC_REG_MAR0 + sizeof(unsigned long), 0L);
- MACvSelectPage0(dwIoBase);
- }
-
- if (wFilterType & (PKT_TYPE_PROMISCUOUS | PKT_TYPE_ALL_MULTICAST)) {
- // set multicast address to accept all
- MACvSelectPage1(dwIoBase);
- VNSvOutPortD(dwIoBase + MAC_REG_MAR0, 0xFFFFFFFFL);
- VNSvOutPortD(dwIoBase + MAC_REG_MAR0 + sizeof(unsigned long), 0xFFFFFFFFL);
- MACvSelectPage0(dwIoBase);
- }
-
- if (wFilterType & PKT_TYPE_PROMISCUOUS) {
- byNewRCR |= (RCR_RXALLTYPE | RCR_UNICAST | RCR_MULTICAST | RCR_BROADCAST);
-
- byNewRCR &= ~RCR_BSSID;
- }
-
- if (wFilterType & (PKT_TYPE_ALL_MULTICAST | PKT_TYPE_MULTICAST))
- byNewRCR |= RCR_MULTICAST;
-
- if (wFilterType & PKT_TYPE_BROADCAST)
- byNewRCR |= RCR_BROADCAST;
-
- if (wFilterType & PKT_TYPE_ERROR_CRC)
- byNewRCR |= RCR_ERRCRC;
-
- VNSvInPortB(dwIoBase + MAC_REG_RCR, &byOldRCR);
- if (byNewRCR != byOldRCR) {
- // Modify the Receive Command Register
- VNSvOutPortB(dwIoBase + MAC_REG_RCR, byNewRCR);
- }
-}
-
-/*
- * Description:
* Save MAC registers to context buffer
*
* Parameters:
@@ -629,11 +568,6 @@ void MACvInitialize(void __iomem *dwIoBase)
VNSvOutPortB(dwIoBase + MAC_REG_TFTCTL, TFTCTL_TSFCNTRST);
// enable TSF counter
VNSvOutPortB(dwIoBase + MAC_REG_TFTCTL, TFTCTL_TSFCNTREN);
-
- // set packet filter
- // receive directed and broadcast address
-
- MACvSetPacketFilter(dwIoBase, PKT_TYPE_DIRECTED | PKT_TYPE_BROADCAST);
}

/*
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index 7d39a7f..e1e7e10 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -574,17 +574,6 @@
#define MAC_LB_INTERNAL 0x01 //
#define MAC_LB_NONE 0x00 //

-// Ethernet address filter type
-#define PKT_TYPE_NONE 0x00 // turn off receiver
-#define PKT_TYPE_ALL_MULTICAST 0x80
-#define PKT_TYPE_PROMISCUOUS 0x40
-#define PKT_TYPE_DIRECTED 0x20 // obsolete, directed address is always accepted
-#define PKT_TYPE_BROADCAST 0x10
-#define PKT_TYPE_MULTICAST 0x08
-#define PKT_TYPE_ERROR_WPA 0x04
-#define PKT_TYPE_ERROR_CRC 0x02
-#define PKT_TYPE_BSSID 0x01
-
#define Default_BI 0x200

// MiscFIFO Offset
@@ -976,8 +965,6 @@ void MACvGetLongRetryLimit(void __iomem *dwIoBase, unsigned char *pbyRetryLimit)

void MACvSetLoopbackMode(void __iomem *dwIoBase, unsigned char byLoopbackMode);

-void MACvSetPacketFilter(void __iomem *dwIoBase, unsigned short wFilterType);
-
void MACvSaveContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);
void MACvRestoreContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);

--
2.1.0



2014-11-29 00:02:42

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 5/6] staging: vt6655: s_cbFillTxBufHead remove parameter *pPacket

skb->data is available locally so use that instead.

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6655/rxtx.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index f1dacf9..9d16916 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -131,7 +131,7 @@ static unsigned int
s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
unsigned char *pbyTxBufferAddr, unsigned int cbFrameBodySize,
unsigned int uDMAIdx, PSTxDesc pHeadTD,
- unsigned char *pPacket, unsigned int uNodeIndex);
+ unsigned int uNodeIndex);

static
__le16
@@ -1032,7 +1032,7 @@ static unsigned int
s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
unsigned char *pbyTxBufferAddr, unsigned int cbFrameBodySize,
unsigned int uDMAIdx, PSTxDesc pHeadTD,
- unsigned char *pPacket, unsigned int is_pspoll)
+ unsigned int is_pspoll)
{
PDEVICE_TD_INFO td_info = pHeadTD->pTDInfo;
struct sk_buff *skb = td_info->skb;
@@ -1200,7 +1200,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
uLength = cbHeaderLength + uPadding;

/* Copy the Packet into a tx Buffer */
- memcpy((pbyBuffer + uLength), pPacket, cbFrameBodySize);
+ memcpy((pbyBuffer + uLength), skb->data, cbFrameBodySize);

ptdCurr = (PSTxDesc)pHeadTD;

@@ -1399,8 +1399,7 @@ int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx,
tx_buffer_head->frag_ctl |= cpu_to_le16(FRAGCTL_NONFRAG);

s_cbFillTxBufHead(priv, pkt_type, (u8 *)tx_buffer_head, skb->len,
- dma_idx, head_td, (u8 *)skb->data,
- is_pspoll);
+ dma_idx, head_td, is_pspoll);

if (info->control.hw_key) {
tx_key = info->control.hw_key;
--
2.1.0


2014-11-29 00:02:44

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 6/6] staging: vt6655: s_cbFillTxBufHead remove parameter cbFrameBodySize

skb->len is available locally use that instead.

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6655/rxtx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 9d16916..61c39dd 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -129,7 +129,7 @@ s_vGenerateTxParameter(

static unsigned int
s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
- unsigned char *pbyTxBufferAddr, unsigned int cbFrameBodySize,
+ unsigned char *pbyTxBufferAddr,
unsigned int uDMAIdx, PSTxDesc pHeadTD,
unsigned int uNodeIndex);

@@ -1030,7 +1030,7 @@ s_vGenerateTxParameter(

static unsigned int
s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
- unsigned char *pbyTxBufferAddr, unsigned int cbFrameBodySize,
+ unsigned char *pbyTxBufferAddr,
unsigned int uDMAIdx, PSTxDesc pHeadTD,
unsigned int is_pspoll)
{
@@ -1195,12 +1195,12 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,

hdr->duration_id = uDuration;

- cbReqCount = cbHeaderLength + uPadding + cbFrameBodySize;
+ cbReqCount = cbHeaderLength + uPadding + skb->len;
pbyBuffer = (unsigned char *)pHeadTD->pTDInfo->buf;
uLength = cbHeaderLength + uPadding;

/* Copy the Packet into a tx Buffer */
- memcpy((pbyBuffer + uLength), skb->data, cbFrameBodySize);
+ memcpy((pbyBuffer + uLength), skb->data, skb->len);

ptdCurr = (PSTxDesc)pHeadTD;

@@ -1398,7 +1398,7 @@ int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx,

tx_buffer_head->frag_ctl |= cpu_to_le16(FRAGCTL_NONFRAG);

- s_cbFillTxBufHead(priv, pkt_type, (u8 *)tx_buffer_head, skb->len,
+ s_cbFillTxBufHead(priv, pkt_type, (u8 *)tx_buffer_head,
dma_idx, head_td, is_pspoll);

if (info->control.hw_key) {
--
2.1.0


2014-11-29 00:02:40

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 3/6] staging: vt6655: remove unused typedef struct tagSSromReg

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6655/srom.h | 34 ----------------------------------
1 file changed, 34 deletions(-)

diff --git a/drivers/staging/vt6655/srom.h b/drivers/staging/vt6655/srom.h
index cab638b..7d3e3ef 100644
--- a/drivers/staging/vt6655/srom.h
+++ b/drivers/staging/vt6655/srom.h
@@ -89,40 +89,6 @@

/*--------------------- Export Types ------------------------------*/

-// AT24C02 eeprom contents
-// 2048 bits = 256 bytes = 128 words
-//
-typedef struct tagSSromReg {
- unsigned char abyPAR[6]; // 0x00 (unsigned short)
-
- unsigned short wSUB_VID; // 0x03 (unsigned short)
- unsigned short wSUB_SID;
-
- unsigned char byBCFG0; // 0x05 (unsigned short)
- unsigned char byBCFG1;
-
- unsigned char byFCR0; // 0x06 (unsigned short)
- unsigned char byFCR1;
- unsigned char byPMC0; // 0x07 (unsigned short)
- unsigned char byPMC1;
- unsigned char byMAXLAT; // 0x08 (unsigned short)
- unsigned char byMINGNT;
- unsigned char byCFG0; // 0x09 (unsigned short)
- unsigned char byCFG1;
- unsigned short wCISPTR; // 0x0A (unsigned short)
- unsigned short wRsv0; // 0x0B (unsigned short)
- unsigned short wRsv1; // 0x0C (unsigned short)
- unsigned char byBBPAIR; // 0x0D (unsigned short)
- unsigned char byRFTYPE;
- unsigned char byMinChannel; // 0x0E (unsigned short)
- unsigned char byMaxChannel;
- unsigned char bySignature; // 0x0F (unsigned short)
- unsigned char byCheckSum;
-
- unsigned char abyReserved0[96]; // 0x10 (unsigned short)
- unsigned char abyCIS[128]; // 0x80 (unsigned short)
-} SSromReg, *PSSromReg;
-
/*--------------------- Export Macros ------------------------------*/

/*--------------------- Export Classes ----------------------------*/
--
2.1.0


2014-11-29 00:02:38

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 2/6] staging: vt6655: srom remove dead functions

Remove these unused functions
SROMbWriteEmbedded
SROMvRegBitsOn
SROMvRegBitsOff
SROMbIsRegBitsOn
SROMbIsRegBitsOff
SROMvWriteAllContents
SROMvWriteEtherAddress
SROMvReadSubSysVenId
SROMbAutoLoad

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6655/srom.c | 251 ------------------------------------------
drivers/staging/vt6655/srom.h | 13 ---
2 files changed, 264 deletions(-)

diff --git a/drivers/staging/vt6655/srom.c b/drivers/staging/vt6655/srom.c
index 1ac60fb..9ec49e6 100644
--- a/drivers/staging/vt6655/srom.c
+++ b/drivers/staging/vt6655/srom.c
@@ -107,144 +107,6 @@ unsigned char SROMbyReadEmbedded(void __iomem *dwIoBase, unsigned char byContntO
}

/*
- * Description: Write a byte to EEPROM, by MAC I2C
- *
- * Parameters:
- * In:
- * dwIoBase - I/O base address
- * byContntOffset - address of EEPROM
- * wData - data to write
- * Out:
- * none
- *
- * Return Value: true if succeeded; false if failed.
- *
- */
-bool SROMbWriteEmbedded(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byData)
-{
- unsigned short wDelay, wNoACK;
- unsigned char byWait;
-
- unsigned char byOrg;
-
- VNSvInPortB(dwIoBase + MAC_REG_I2MCFG, &byOrg);
- /* turn off hardware retry for getting NACK */
- VNSvOutPortB(dwIoBase + MAC_REG_I2MCFG, (byOrg & (~I2MCFG_NORETRY)));
- for (wNoACK = 0; wNoACK < W_MAX_I2CRETRY; wNoACK++) {
- VNSvOutPortB(dwIoBase + MAC_REG_I2MTGID, EEP_I2C_DEV_ID);
- VNSvOutPortB(dwIoBase + MAC_REG_I2MTGAD, byContntOffset);
- VNSvOutPortB(dwIoBase + MAC_REG_I2MDOPT, byData);
-
- /* issue write command */
- VNSvOutPortB(dwIoBase + MAC_REG_I2MCSR, I2MCSR_EEMW);
- /* wait DONE be set */
- for (wDelay = 0; wDelay < W_MAX_TIMEOUT; wDelay++) {
- VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &byWait);
- if (byWait & (I2MCSR_DONE | I2MCSR_NACK))
- break;
- PCAvDelayByIO(CB_DELAY_LOOP_WAIT);
- }
-
- if ((wDelay < W_MAX_TIMEOUT) &&
- (!(byWait & I2MCSR_NACK))) {
- break;
- }
- }
- if (wNoACK == W_MAX_I2CRETRY) {
- VNSvOutPortB(dwIoBase + MAC_REG_I2MCFG, byOrg);
- return false;
- }
- VNSvOutPortB(dwIoBase + MAC_REG_I2MCFG, byOrg);
- return true;
-}
-
-/*
- * Description: Turn bits on in eeprom
- *
- * Parameters:
- * In:
- * dwIoBase - I/O base address
- * byContntOffset - address of EEPROM
- * byBits - bits to turn on
- * Out:
- * none
- *
- * Return Value: none
- *
- */
-void SROMvRegBitsOn(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byBits)
-{
- unsigned char byOrgData;
-
- byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset);
- SROMbWriteEmbedded(dwIoBase, byContntOffset, (unsigned char)(byOrgData | byBits));
-}
-
-/*
- * Description: Turn bits off in eeprom
- *
- * Parameters:
- * In:
- * dwIoBase - I/O base address
- * byContntOffset - address of EEPROM
- * byBits - bits to turn off
- * Out:
- * none
- *
- */
-void SROMvRegBitsOff(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byBits)
-{
- unsigned char byOrgData;
-
- byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset);
- SROMbWriteEmbedded(dwIoBase, byContntOffset, (unsigned char)(byOrgData & (~byBits)));
-}
-
-/*
- * Description: Test if bits on in eeprom
- *
- * Parameters:
- * In:
- * dwIoBase - I/O base address
- * byContntOffset - address of EEPROM
- * byTestBits - bits to test
- * Out:
- * none
- *
- * Return Value: true if all test bits on; otherwise false
- *
- */
-bool SROMbIsRegBitsOn(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
-{
- unsigned char byOrgData;
-
- byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset);
- return (byOrgData & byTestBits) == byTestBits;
-}
-
-/*
- * Description: Test if bits off in eeprom
- *
- * Parameters:
- * In:
- * dwIoBase - I/O base address
- * byContntOffset - address of EEPROM
- * byTestBits - bits to test
- * Out:
- * none
- *
- * Return Value: true if all test bits off; otherwise false
- *
- */
-bool SROMbIsRegBitsOff(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
-{
- unsigned char byOrgData;
-
- byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset);
- return !(byOrgData & byTestBits);
-}
-
-/*
* Description: Read all contents of eeprom to buffer
*
* Parameters:
@@ -268,30 +130,6 @@ void SROMvReadAllContents(void __iomem *dwIoBase, unsigned char *pbyEepromRegs)
}

/*
- * Description: Write all contents of buffer to eeprom
- *
- * Parameters:
- * In:
- * dwIoBase - I/O base address
- * pbyEepromRegs - EEPROM content Buffer
- * Out:
- * none
- *
- * Return Value: none
- *
- */
-void SROMvWriteAllContents(void __iomem *dwIoBase, unsigned char *pbyEepromRegs)
-{
- int ii;
-
- /* ii = Rom Address */
- for (ii = 0; ii < EEP_MAX_CONTEXT_SIZE; ii++) {
- SROMbWriteEmbedded(dwIoBase, (unsigned char)ii, *pbyEepromRegs);
- pbyEepromRegs++;
- }
-}
-
-/*
* Description: Read Ethernet Address from eeprom to buffer
*
* Parameters:
@@ -313,92 +151,3 @@ void SROMvReadEtherAddress(void __iomem *dwIoBase, unsigned char *pbyEtherAddres
pbyEtherAddress++;
}
}
-
-/*
- * Description: Write Ethernet Address from buffer to eeprom
- *
- * Parameters:
- * In:
- * dwIoBase - I/O base address
- * pbyEtherAddress - Ethernet Address buffer
- * Out:
- * none
- *
- * Return Value: none
- *
- */
-void SROMvWriteEtherAddress(void __iomem *dwIoBase, unsigned char *pbyEtherAddress)
-{
- unsigned char ii;
-
- /* ii = Rom Address */
- for (ii = 0; ii < ETH_ALEN; ii++) {
- SROMbWriteEmbedded(dwIoBase, ii, *pbyEtherAddress);
- pbyEtherAddress++;
- }
-}
-
-/*
- * Description: Read Sub_VID and Sub_SysId from eeprom to buffer
- *
- * Parameters:
- * In:
- * dwIoBase - I/O base address
- * Out:
- * pdwSubSysVenId - Sub_VID and Sub_SysId read
- *
- * Return Value: none
- *
- */
-void SROMvReadSubSysVenId(void __iomem *dwIoBase, unsigned long *pdwSubSysVenId)
-{
- unsigned char *pbyData;
-
- pbyData = (unsigned char *)pdwSubSysVenId;
- /* sub vendor */
- *pbyData = SROMbyReadEmbedded(dwIoBase, 6);
- *(pbyData+1) = SROMbyReadEmbedded(dwIoBase, 7);
- /* sub system */
- *(pbyData+2) = SROMbyReadEmbedded(dwIoBase, 8);
- *(pbyData+3) = SROMbyReadEmbedded(dwIoBase, 9);
-}
-
-/*
- * Description: Auto Load EEPROM to MAC register
- *
- * Parameters:
- * In:
- * dwIoBase - I/O base address
- * Out:
- * none
- *
- * Return Value: true if success; otherwise false
- *
- */
-bool SROMbAutoLoad(void __iomem *dwIoBase)
-{
- unsigned char byWait;
- int ii;
-
- unsigned char byOrg;
-
- VNSvInPortB(dwIoBase + MAC_REG_I2MCFG, &byOrg);
- /* turn on hardware retry */
- VNSvOutPortB(dwIoBase + MAC_REG_I2MCFG, (byOrg | I2MCFG_NORETRY));
-
- MACvRegBitsOn(dwIoBase, MAC_REG_I2MCSR, I2MCSR_AUTOLD);
-
- /* ii = Rom Address */
- for (ii = 0; ii < EEP_MAX_CONTEXT_SIZE; ii++) {
- MACvTimer0MicroSDelay(dwIoBase, CB_EEPROM_READBYTE_WAIT);
- VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &byWait);
- if (!(byWait & I2MCSR_AUTOLD))
- break;
- }
-
- VNSvOutPortB(dwIoBase + MAC_REG_I2MCFG, byOrg);
-
- if (ii == EEP_MAX_CONTEXT_SIZE)
- return false;
- return true;
-}
diff --git a/drivers/staging/vt6655/srom.h b/drivers/staging/vt6655/srom.h
index 9f309c4..cab638b 100644
--- a/drivers/staging/vt6655/srom.h
+++ b/drivers/staging/vt6655/srom.h
@@ -132,22 +132,9 @@ typedef struct tagSSromReg {
/*--------------------- Export Functions --------------------------*/

unsigned char SROMbyReadEmbedded(void __iomem *dwIoBase, unsigned char byContntOffset);
-bool SROMbWriteEmbedded(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byData);
-
-void SROMvRegBitsOn(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byBits);
-void SROMvRegBitsOff(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byBits);
-
-bool SROMbIsRegBitsOn(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byTestBits);
-bool SROMbIsRegBitsOff(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byTestBits);

void SROMvReadAllContents(void __iomem *dwIoBase, unsigned char *pbyEepromRegs);
-void SROMvWriteAllContents(void __iomem *dwIoBase, unsigned char *pbyEepromRegs);

void SROMvReadEtherAddress(void __iomem *dwIoBase, unsigned char *pbyEtherAddress);
-void SROMvWriteEtherAddress(void __iomem *dwIoBase, unsigned char *pbyEtherAddress);
-
-void SROMvReadSubSysVenId(void __iomem *dwIoBase, unsigned long *pdwSubSysVenId);
-
-bool SROMbAutoLoad(void __iomem *dwIoBase);

#endif // __EEPROM_H__
--
2.1.0


2014-11-29 00:02:41

by Malcolm Priestley

[permalink] [raw]
Subject: [PATCH 4/6] staging: vt6655: s_cbFillTxBufHead remove unused parameter *puMACfragNum

*puMACfragNum was part of old legacy functions.

Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6655/rxtx.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 4189405..f1dacf9 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -131,8 +131,7 @@ static unsigned int
s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
unsigned char *pbyTxBufferAddr, unsigned int cbFrameBodySize,
unsigned int uDMAIdx, PSTxDesc pHeadTD,
- unsigned char *pPacket, unsigned int uNodeIndex,
- unsigned int *puMACfragNum);
+ unsigned char *pPacket, unsigned int uNodeIndex);

static
__le16
@@ -1033,8 +1032,7 @@ static unsigned int
s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
unsigned char *pbyTxBufferAddr, unsigned int cbFrameBodySize,
unsigned int uDMAIdx, PSTxDesc pHeadTD,
- unsigned char *pPacket, unsigned int is_pspoll,
- unsigned int *puMACfragNum)
+ unsigned char *pPacket, unsigned int is_pspoll)
{
PDEVICE_TD_INFO td_info = pHeadTD->pTDInfo;
struct sk_buff *skb = td_info->skb;
@@ -1214,8 +1212,6 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
ptdCurr->m_td1TD1.byTCR |= (TCR_STP | TCR_EDP | EDMSDU);
ptdCurr->m_td1TD1.wReqCount = cpu_to_le16((unsigned short)(cbReqCount));

- *puMACfragNum = uMACfragNum;
-
return cbHeaderLength;
}

@@ -1297,7 +1293,6 @@ int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx,
struct ieee80211_hdr *hdr;
struct vnt_tx_fifo_head *tx_buffer_head =
(struct vnt_tx_fifo_head *)td_info->buf;
- u32 frag;
u16 tx_body_size = skb->len, current_rate;
u8 pkt_type;
bool is_pspoll = false;
@@ -1405,7 +1400,7 @@ int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx,

s_cbFillTxBufHead(priv, pkt_type, (u8 *)tx_buffer_head, skb->len,
dma_idx, head_td, (u8 *)skb->data,
- is_pspoll, &frag);
+ is_pspoll);

if (info->control.hw_key) {
tx_key = info->control.hw_key;
--
2.1.0