[PATCH 1/4] beeceem: Fix several whitespace issues in InterfaceTx.c
This patch takes care of the following issues: - missing spaces at variable assignments - missing spaces between function arguments - spaces at the beginning of a line where tabs should be - prohibited spaces before a (semi)colon Signed-off-by: Ralph Mueck Signed-off-by: Matthias Oefelein --- drivers/staging/bcm/InterfaceTx.c | 64 ++--- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/drivers/staging/bcm/InterfaceTx.c b/drivers/staging/bcm/InterfaceTx.c index b9c2784..f76de85 100644 --- a/drivers/staging/bcm/InterfaceTx.c +++ b/drivers/staging/bcm/InterfaceTx.c @@ -3,26 +3,26 @@ /*this is transmit call-back(BULK OUT)*/ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) { - struct bcm_usb_tcb *pTcb= (struct bcm_usb_tcb *)urb->context; + struct bcm_usb_tcb *pTcb = (struct bcm_usb_tcb *)urb->context; struct bcm_interface_adapter *psIntfAdapter = pTcb->psIntfAdapter; struct bcm_link_request *pControlMsg = (struct bcm_link_request *)urb->transfer_buffer; - struct bcm_mini_adapter *psAdapter = psIntfAdapter->psAdapter ; - bool bpowerDownMsg = false ; + struct bcm_mini_adapter *psAdapter = psIntfAdapter->psAdapter; + bool bpowerDownMsg = false; struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); -if (unlikely(netif_msg_tx_done(Adapter))) - pr_info(PFX "%s: transmit status %d\n", Adapter->dev->name, urb->status); + if (unlikely(netif_msg_tx_done(Adapter))) + pr_info(PFX "%s: transmit status %d\n", Adapter->dev->name, urb->status); if(urb->status != STATUS_SUCCESS) { if(urb->status == -EPIPE) { - psIntfAdapter->psAdapter->bEndPointHalted = TRUE ; + psIntfAdapter->psAdapter->bEndPointHalted = TRUE; wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); } else { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Tx URB has got cancelled. status :%d", urb->status); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Tx URB has got cancelled. status :%d", urb->status); } } @@ -38,12 +38,12 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) (pControlMsg->szData[1] == TARGET_CAN_GO_TO_IDLE_MODE))) { - bpowerDownMsg = TRUE ; + bpowerDownMsg = TRUE; //This covers the bus err while Idle Request msg sent down. if(urb->status != STATUS_SUCCESS) { - psAdapter->bPreparingForLowPowerMode = false ; - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Idle Mode Request msg failed to reach to Modem"); + psAdapter->bPreparingForLowPowerMode = false; + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Idle Mode Request msg failed to reach to Modem"); //Signalling the cntrl pkt path in Ioctl wake_up(&psAdapter->lowpower_mode_wait_queue); StartInterruptUrb(psIntfAdapter); @@ -54,9 +54,9 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) { psAdapter->IdleMode = TRUE; //since going in Idle mode completed hence making this var false; - psAdapter->bPreparingForLowPowerMode = false ; + psAdapter->bPreparingForLowPowerMode = false; - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Host Entered in Idle Mode State..."); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Host Entered in Idle Mode State..."); //Signalling the cntrl pkt path in Ioctl wake_up(&psAdapter->lowpower_mode_wait_queue); } @@ -70,21 +70,21 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) //This covers the bus err while shutdown Request msg sent down. if(urb->status != STATUS_SUCCESS) { - psAdapter->bPreparingForLowPowerMode = false ; - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Shutdown Request Msg failed to reach to Modem"); + psAdapter->bPreparingForLowPowerMode = false; + BCM_
[PATCH 2/4] beeceem: Add spaces before opening parentheses in if-conditionals in InterfaceTx.c
This patch adds spaces before the opening parentheses of if-conditionals to comply with offical code styling guidelines. Signed-off-by: Ralph Mueck Signed-off-by: Matthias Oefelein --- drivers/staging/bcm/InterfaceTx.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/bcm/InterfaceTx.c b/drivers/staging/bcm/InterfaceTx.c index f76de85..10774d9 100644 --- a/drivers/staging/bcm/InterfaceTx.c +++ b/drivers/staging/bcm/InterfaceTx.c @@ -13,9 +13,9 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) if (unlikely(netif_msg_tx_done(Adapter))) pr_info(PFX "%s: transmit status %d\n", Adapter->dev->name, urb->status); - if(urb->status != STATUS_SUCCESS) + if (urb->status != STATUS_SUCCESS) { - if(urb->status == -EPIPE) + if (urb->status == -EPIPE) { psIntfAdapter->psAdapter->bEndPointHalted = TRUE; wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); @@ -31,16 +31,16 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) - if(TRUE == psAdapter->bPreparingForLowPowerMode) + if (TRUE == psAdapter->bPreparingForLowPowerMode) { - if(((pControlMsg->szData[0] == GO_TO_IDLE_MODE_PAYLOAD) && + if (((pControlMsg->szData[0] == GO_TO_IDLE_MODE_PAYLOAD) && (pControlMsg->szData[1] == TARGET_CAN_GO_TO_IDLE_MODE))) { bpowerDownMsg = TRUE; //This covers the bus err while Idle Request msg sent down. - if(urb->status != STATUS_SUCCESS) + if (urb->status != STATUS_SUCCESS) { psAdapter->bPreparingForLowPowerMode = false; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Idle Mode Request msg failed to reach to Modem"); @@ -50,7 +50,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) goto err_exit; } - if(psAdapter->bDoSuspend == false) + if (psAdapter->bDoSuspend == false) { psAdapter->IdleMode = TRUE; //since going in Idle mode completed hence making this var false; @@ -62,13 +62,13 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) } } - else if((pControlMsg->Leader.Status == LINK_UP_CONTROL_REQ) && + else if ((pControlMsg->Leader.Status == LINK_UP_CONTROL_REQ) && (pControlMsg->szData[0] == LINK_UP_ACK) && (pControlMsg->szData[1] == LINK_SHUTDOWN_REQ_FROM_FIRMWARE) && (pControlMsg->szData[2] == SHUTDOWN_ACK_FROM_DRIVER)) { //This covers the bus err while shutdown Request msg sent down. - if(urb->status != STATUS_SUCCESS) + if (urb->status != STATUS_SUCCESS) { psAdapter->bPreparingForLowPowerMode = false; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Shutdown Request Msg failed to reach to Modem"); @@ -79,7 +79,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) } bpowerDownMsg = TRUE; - if(psAdapter->bDoSuspend == false) + if (psAdapter->bDoSuspend == false) { psAdapter->bShutStatus = TRUE; //since going in shutdown mode completed hence making this var false; @@ -90,7 +90,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) } } - if(psAdapter->bDoSuspend && bpowerDownMsg) + if (psAdapter->bDoSuspend && bpowerDownMsg) { //issuing bus suspend request BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Issuing the Bus suspend request to USB stack"); @@ -112,7 +112,7 @@ static struct bcm_usb_tcb *GetBulkOutTcb(struct bcm_interface_adapter *psIntfAda struct bcm_usb_tcb *pTcb = NULL; UINT index = 0; - if((atomic_read(&psIntfAdapter->uNumTcbUsed) < MAXIMUM_USB_TCB) && + if ((atomic_read(&psIntfAdapter->uNumTcbUsed) < MAXIMUM_USB_TCB) && (psIntfAdapter->psAdapter->StopAllXaction == false)) { index = atomic_read(&psIntfAdapter->uCurrTcb); @@ -146,7 +146,7 @@ static int
[PATCH 4/4] beeceem: Replace C99-style comments with C89 pendants in InterfaceTx.c
Checkpatch complains about the use of //-comments, thus they are replaced by C89-style comments. Signed-off-by: Ralph Mueck Signed-off-by: Matthias Oefelein --- drivers/staging/bcm/InterfaceTx.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/bcm/InterfaceTx.c b/drivers/staging/bcm/InterfaceTx.c index 682dfa4..ea7707b 100644 --- a/drivers/staging/bcm/InterfaceTx.c +++ b/drivers/staging/bcm/InterfaceTx.c @@ -32,11 +32,11 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) if (((pControlMsg->szData[0] == GO_TO_IDLE_MODE_PAYLOAD) && (pControlMsg->szData[1] == TARGET_CAN_GO_TO_IDLE_MODE))) { bpowerDownMsg = TRUE; - //This covers the bus err while Idle Request msg sent down. + /* This covers the bus err while Idle Request msg sent down. */ if (urb->status != STATUS_SUCCESS) { psAdapter->bPreparingForLowPowerMode = false; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Idle Mode Request msg failed to reach to Modem"); - //Signalling the cntrl pkt path in Ioctl + /* Signalling the cntrl pkt path in Ioctl */ wake_up(&psAdapter->lowpower_mode_wait_queue); StartInterruptUrb(psIntfAdapter); goto err_exit; @@ -44,11 +44,11 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) if (psAdapter->bDoSuspend == false) { psAdapter->IdleMode = TRUE; - //since going in Idle mode completed hence making this var false; + /* since going in Idle mode completed hence making this var false */ psAdapter->bPreparingForLowPowerMode = false; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Host Entered in Idle Mode State..."); - //Signalling the cntrl pkt path in Ioctl + /* Signalling the cntrl pkt path in Ioctl*/ wake_up(&psAdapter->lowpower_mode_wait_queue); } @@ -56,11 +56,11 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) (pControlMsg->szData[0] == LINK_UP_ACK) && (pControlMsg->szData[1] == LINK_SHUTDOWN_REQ_FROM_FIRMWARE) && (pControlMsg->szData[2] == SHUTDOWN_ACK_FROM_DRIVER)) { - //This covers the bus err while shutdown Request msg sent down. + /* This covers the bus err while shutdown Request msg sent down. */ if (urb->status != STATUS_SUCCESS) { psAdapter->bPreparingForLowPowerMode = false; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Shutdown Request Msg failed to reach to Modem"); - //Signalling the cntrl pkt path in Ioctl + /* Signalling the cntrl pkt path in Ioctl */ wake_up(&psAdapter->lowpower_mode_wait_queue); StartInterruptUrb(psIntfAdapter); goto err_exit; @@ -69,16 +69,16 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) bpowerDownMsg = TRUE; if (psAdapter->bDoSuspend == false) { psAdapter->bShutStatus = TRUE; - //since going in shutdown mode completed hence making this var false; + /* since going in shutdown mode completed hence making this var false */ psAdapter->bPreparingForLowPowerMode = false; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Host Entered in shutdown Mode State..."); - //Signalling the cntrl pkt path in Ioctl + /* Signalling the cntrl pkt path in Ioctl */ wake_up(&psAdapter->lowpower_mode_wait_queue); } } if (psAdapter->bDoSuspend && bpowerDownMsg) { - //issuing bus suspend request + /* issuing bus suspend request */ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Issuing the Bus suspend request to USB stack"); psIntfAdapter->bPreparingForBusSuspend = TRUE; schedule_work(&psI
[PATCH 3/4] beeceem: Fix position of braces in conditional statements in InterfaceTx.c
This corrects the position of (opening) braces in if-conditionals to make checkpatch shut up. Signed-off-by: Ralph Mueck Signed-off-by: Matthias Oefelein --- drivers/staging/bcm/InterfaceTx.c | 63 - 1 file changed, 20 insertions(+), 43 deletions(-) diff --git a/drivers/staging/bcm/InterfaceTx.c b/drivers/staging/bcm/InterfaceTx.c index 10774d9..682dfa4 100644 --- a/drivers/staging/bcm/InterfaceTx.c +++ b/drivers/staging/bcm/InterfaceTx.c @@ -13,15 +13,11 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) if (unlikely(netif_msg_tx_done(Adapter))) pr_info(PFX "%s: transmit status %d\n", Adapter->dev->name, urb->status); - if (urb->status != STATUS_SUCCESS) - { - if (urb->status == -EPIPE) - { + if (urb->status != STATUS_SUCCESS) { + if (urb->status == -EPIPE) { psIntfAdapter->psAdapter->bEndPointHalted = TRUE; wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); - } - else - { + } else { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Tx URB has got cancelled. status :%d", urb->status); } } @@ -31,17 +27,13 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) - if (TRUE == psAdapter->bPreparingForLowPowerMode) - { + if (TRUE == psAdapter->bPreparingForLowPowerMode) { if (((pControlMsg->szData[0] == GO_TO_IDLE_MODE_PAYLOAD) && - (pControlMsg->szData[1] == TARGET_CAN_GO_TO_IDLE_MODE))) - - { + (pControlMsg->szData[1] == TARGET_CAN_GO_TO_IDLE_MODE))) { bpowerDownMsg = TRUE; //This covers the bus err while Idle Request msg sent down. - if (urb->status != STATUS_SUCCESS) - { + if (urb->status != STATUS_SUCCESS) { psAdapter->bPreparingForLowPowerMode = false; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Idle Mode Request msg failed to reach to Modem"); //Signalling the cntrl pkt path in Ioctl @@ -50,8 +42,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) goto err_exit; } - if (psAdapter->bDoSuspend == false) - { + if (psAdapter->bDoSuspend == false) { psAdapter->IdleMode = TRUE; //since going in Idle mode completed hence making this var false; psAdapter->bPreparingForLowPowerMode = false; @@ -61,15 +52,12 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) wake_up(&psAdapter->lowpower_mode_wait_queue); } - } - else if ((pControlMsg->Leader.Status == LINK_UP_CONTROL_REQ) && + } else if ((pControlMsg->Leader.Status == LINK_UP_CONTROL_REQ) && (pControlMsg->szData[0] == LINK_UP_ACK) && (pControlMsg->szData[1] == LINK_SHUTDOWN_REQ_FROM_FIRMWARE) && - (pControlMsg->szData[2] == SHUTDOWN_ACK_FROM_DRIVER)) - { + (pControlMsg->szData[2] == SHUTDOWN_ACK_FROM_DRIVER)) { //This covers the bus err while shutdown Request msg sent down. - if (urb->status != STATUS_SUCCESS) - { + if (urb->status != STATUS_SUCCESS) { psAdapter->bPreparingForLowPowerMode = false; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Shutdown Request Msg failed to reach to Modem"); //Signalling the cntrl pkt path in Ioctl @@ -79,8 +67,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) } bpowerDownMsg = TRUE; - if (psAdapter->bDoSuspend == false) - { + if (psAdapter->bDoSuspend == false) { psAdapter->bShutStatus = TRUE; //since going in shutdown mode completed hence making this var false; psAdapter->bPreparingForLowPowerMode = false; @@ -90,8 +77,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) } } - if (psAdapter->bDoSuspend && bpowerDownMsg) - { +
[PATCH 0/4] beeceem: Several checkpatch cleanups in InterfaceTx.c
This patch series fixes some checkpatch issues in InterfaceTx.c which is part of the beeceem driver. The following errors/warnings have been fixed: - prohibited spaces before a (semi)colon - missing space before a variable assignment - missing spaces between function arguments - missing spaces before opening parentheses of if-conditionals - unwanted opening braces of if-conditionals in an extra line - spaces at the beginning of a line instead of tabs - C99-style comments However, over-80-chars warnings still remain. This series applies no functional changes to the code whatsoever. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: bcm: Fixed excessive line lengths cleaned up some code
This is a patch to the Adapter.h file that fixes up excesssive line length warnings found by the checkpatch.pl tool Signed off by: Arthur Schwalbenberg --- drivers/staging/bcm/Adapter.h | 228 -- 1 file changed, 133 insertions(+), 95 deletions(-) diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h index 9cd5987..d131bc7 100644 --- a/drivers/staging/bcm/Adapter.h +++ b/drivers/staging/bcm/Adapter.h @@ -37,12 +37,18 @@ struct bcm_link_request { union u_ip_address { struct { - ULONG ulIpv4Addr[MAX_IP_RANGE_LENGTH]; /* Source Ip Address Range */ - ULONG ulIpv4Mask[MAX_IP_RANGE_LENGTH]; /* Source Ip Mask Address Range */ + /* Source Ip Address Range */ + ULONG ulIpv4Addr[MAX_IP_RANGE_LENGTH]; + + /* Source Ip Mask Address Range */ + ULONG ulIpv4Mask[MAX_IP_RANGE_LENGTH]; }; struct { - ULONG ulIpv6Addr[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Address Range */ - ULONG ulIpv6Mask[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Mask Address Range */ + /* Source Ip Address Range */ + ULONG ulIpv6Addr[MAX_IP_RANGE_LENGTH * 4]; + + /* Source Ip Mask Address Range */ + ULONG ulIpv6Mask[MAX_IP_RANGE_LENGTH * 4]; }; struct { UCHAR ucIpv4Address[MAX_IP_RANGE_LENGTH * IP_LENGTH_OF_ADDRESS]; @@ -55,41 +61,48 @@ union u_ip_address { }; struct bcm_hdr_suppression_contextinfo { - UCHAR ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS]; /* Intermediate buffer to accumulate pkt Header for PHS */ - UCHAR ucaHdrSuppressionOutBuf[MAX_PHS_LENGTHS + PHSI_LEN]; /* Intermediate buffer containing pkt Header after PHS */ + /* Intermediate buffer to accumulate pkt Header for PHS */ + UCHAR ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS]; + + /* Intermediate buffer containing pkt Header after PHS */ + UCHAR ucaHdrSuppressionOutBuf[MAX_PHS_LENGTHS + PHSI_LEN]; }; struct bcm_classifier_rule { - ULONG ulSFID; - UCHAR ucReserved[2]; - B_UINT16uiClassifierRuleIndex; - boolbUsed; - USHORT usVCID_Value; - B_UINT8 u8ClassifierRulePriority; /* This field detemines the Classifier Priority */ - union u_ip_address stSrcIpAddress; - UCHAR ucIPSourceAddressLength; /* Ip Source Address Length */ - - union u_ip_address stDestIpAddress; - UCHAR ucIPDestinationAddressLength; /* Ip Destination Address Length */ - UCHAR ucIPTypeOfServiceLength; /* Type of service Length */ - UCHAR ucTosLow; /* Tos Low */ - UCHAR ucTosHigh; /* Tos High */ - UCHAR ucTosMask; /* Tos Mask */ - - UCHAR ucProtocolLength; /* protocol Length */ - UCHAR ucProtocol[MAX_PROTOCOL_LENGTH]; /* protocol Length */ - USHORT usSrcPortRangeLo[MAX_PORT_RANGE]; - USHORT usSrcPortRangeHi[MAX_PORT_RANGE]; - UCHAR ucSrcPortRangeLength; - - USHORT usDestPortRangeLo[MAX_PORT_RANGE]; - USHORT usDestPortRangeHi[MAX_PORT_RANGE]; - UCHAR ucDestPortRangeLength; + ULONGulSFID; + UCHARucReserved[2]; + B_UINT16 uiClassifierRuleIndex; + bool bUsed; + USHORT usVCID_Value; - boolbProtocolValid; - boolbTOSValid; - boolbDestIpValid; - boolbSrcIpValid; + /* This field detemines the Classifier Priority */ + B_UINT8 u8ClassifierRulePriority; + union u_ip_address stSrcIpAddress; + + UCHAR ucIPSourceAddressLength; /* Ip Source Address Length */ + union u_ip_address stDestIpAddress; + + + UCHAR ucIPDestinationAddressLength; /* Ip Destination Address Length */ + UCHAR ucIPTypeOfServiceLength; /* Type of service Length */ + UCHAR ucTosLow; /* Tos Low */ + UCHAR ucTosHigh;/* Tos High */ + UCHAR ucTosMask;/* Tos Mask */ + + UCHAR ucProtocolLength;/* protocol Length */ + UCHAR ucProtocol[MAX_PROTOCOL_LENGTH]; /* protocol Length */ + USHORT usSrcPortRangeLo[MAX_PORT_RANGE]; + USHORT usSrcPortRangeHi[MAX_PORT_RANGE]; + UCHAR ucSrcPortRangeLength; + + USHORT usDestPortRangeLo[MAX_PORT_RANGE]; + USHORT usDestPortRangeHi[MAX_PORT_RANGE]; + UCHAR ucDestPortRangeLength; + + bool bProtocolValid; + bool bTOSValid; + bool bDestIpValid; + bool bSrcIpValid; /* For IPv6 Addressing */ UCHAR ucDirection; @@ -122,42 +135,47 @@ struct bcm_fragmented_packet_info { struct bcm_packet_info { /* classification e
[PATCH 2/7] vt6655: Fix most of checkpatch.pl errors in wroute
wroute.h: Fixed all line-over-80-character errors. No errors remain. wroute.c: Fixed line-over-80-character errors, bracing errors and C99-comments. Three warnings remain, fixing them would deteriorate readability. One warning on a memory barrier without comment in line 189 will be fixed in a later commit because it's purpose is not yet known. Signed-off-by: Michael Gunselmann Signed-off-by: Martin Hofmann --- drivers/staging/vt6655/wroute.c | 71 - drivers/staging/vt6655/wroute.h | 3 +- 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c index 85302c5..f8899b6 100644 --- a/drivers/staging/vt6655/wroute.c +++ b/drivers/staging/vt6655/wroute.c @@ -44,7 +44,7 @@ /*- Static Variables --*/ static int msglevel = MSG_LEVEL_INFO; -//static int msglevel=MSG_LEVEL_DEBUG; +/* static int msglevel=MSG_LEVEL_DEBUG; */ /*- Static Functions --*/ /*- Export Variables --*/ @@ -63,7 +63,8 @@ static int msglevel = MSG_LEVEL_INFO; * Return Value: true if packet duplicate; otherwise false * */ -bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDataLen, unsigned int uNodeIndex) +bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, +unsigned int uDataLen, unsigned int uNodeIndex) { PSMgmtObjectpMgmt = pDevice->pMgmt; PSTxDescpHeadTD, pLastTD; @@ -78,7 +79,8 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData unsigned char *pbyBSSID; if (AVAIL_TD(pDevice, TYPE_AC0DMA) <= 0) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Relay can't allocate TD1..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + "Relay can't allocate TD1..\n"); return false; } @@ -86,22 +88,25 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData pHeadTD->m_td1TD1.byTCR = (TCR_EDP | TCR_STP); - memcpy(pDevice->sTxEthHeader.abyDstAddr, (unsigned char *)pbySkbData, ETH_HLEN); + memcpy(pDevice->sTxEthHeader.abyDstAddr, + (unsigned char *)pbySkbData, ETH_HLEN); cbFrameBodySize = uDataLen - ETH_HLEN; - if (ntohs(pDevice->sTxEthHeader.wType) > ETH_DATA_LEN) { + if (ntohs(pDevice->sTxEthHeader.wType) > ETH_DATA_LEN) cbFrameBodySize += 8; - } if (pDevice->bEncryptionEnable == true) { bNeedEncryption = true; - // get group key + /* get group key */ pbyBSSID = pDevice->abyBroadcastAddr; - if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == false) { + if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, + GROUP_KEY, &pTransmitKey) == false) { pTransmitKey = NULL; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG "KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG + "KEY is NULL. [%d]\n", + pDevice->pMgmt->eCurrMode); } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG "Get GTK.\n"); } @@ -110,11 +115,16 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData if (pDevice->bEnableHostWEP) { if (uNodeIndex < MAX_NODE_NUM + 1) { pTransmitKey = &STempKey; - pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite; - pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex; - pTransmitKey->uKeyLength = pMgmt->sNodeDBTable[uNodeIndex].uWepKeyLength; - pTransmitKey->dwTSC47_16 = pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16; - pTransmitKey->wTSC15_0 = pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0; + pTransmitKey->byCipherSuite = + pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite; + pTransmitKey->dwKeyIndex = + pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex; + pTransmitKey->uKeyLength = + pMgmt->sNodeDBTable[uNodeIndex].uWepKeyLength; + pTransmitKey->dwTSC47_16 = + pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16; + pTransmitKey->wTSC15_0 = + pMgmt->sNodeDBTable[uNodeIndex].wTSC15_0;
[PATCH 6/7] vt6655: Remove typedefs in 80211hdr.h
From: Martin Hofmann The file 80211hdr.h contained typedefs for 5 types. To satisfy checkpatch, this commit removes them. In 10 other files, every occurence of a now deleted type has been substituted with the correct struct ... syntax. Signed-off-by: Martin Hofmann Signed-off-by: Michael Gunselmann --- drivers/staging/vt6655/80211hdr.h | 31 - drivers/staging/vt6655/80211mgr.c | 48 +++ drivers/staging/vt6655/80211mgr.h | 26 ++--- drivers/staging/vt6655/IEEE11h.c | 14 ++-- drivers/staging/vt6655/dpc.c | 2 +- drivers/staging/vt6655/mib.c | 4 ++-- drivers/staging/vt6655/power.c| 4 ++-- drivers/staging/vt6655/rxtx.c | 7 +++--- drivers/staging/vt6655/wcmd.c | 2 +- drivers/staging/vt6655/wmgr.c | 24 ++-- drivers/staging/vt6655/wmgr.h | 6 ++--- 11 files changed, 83 insertions(+), 85 deletions(-) diff --git a/drivers/staging/vt6655/80211hdr.h b/drivers/staging/vt6655/80211hdr.h index cacf137..067274c 100644 --- a/drivers/staging/vt6655/80211hdr.h +++ b/drivers/staging/vt6655/80211hdr.h @@ -266,31 +266,29 @@ #define IEEE_ADDR_UNIVERSAL 0x02 #define IEEE_ADDR_GROUP 0x01 -typedef struct { +struct IEEE_ADDR { unsigned char abyAddr[6]; -} IEEE_ADDR, *PIEEE_ADDR; +}; /* 802.11 Header Format */ -typedef struct tagWLAN_80211HDR_A2 { +struct WLAN_80211HDR_A2 { unsigned short wFrameCtl; unsigned short wDurationID; unsigned char abyAddr1[WLAN_ADDR_LEN]; unsigned char abyAddr2[WLAN_ADDR_LEN]; -} __attribute__ ((__packed__)) -WLAN_80211HDR_A2, *PWLAN_80211HDR_A2; +} __attribute__((__packed__)); -typedef struct tagWLAN_80211HDR_A3 { +struct WLAN_80211HDR_A3 { unsigned short wFrameCtl; unsigned short wDurationID; unsigned char abyAddr1[WLAN_ADDR_LEN]; unsigned char abyAddr2[WLAN_ADDR_LEN]; unsigned char abyAddr3[WLAN_ADDR_LEN]; unsigned short wSeqCtl; -} __attribute__ ((__packed__)) -WLAN_80211HDR_A3, *PWLAN_80211HDR_A3; +} __attribute__((__packed__)); -typedef struct tagWLAN_80211HDR_A4 { +struct WLAN_80211HDR_A4 { unsigned short wFrameCtl; unsigned short wDurationID; unsigned char abyAddr1[WLAN_ADDR_LEN]; @@ -298,14 +296,13 @@ typedef struct tagWLAN_80211HDR_A4 { unsigned char abyAddr3[WLAN_ADDR_LEN]; unsigned short wSeqCtl; unsigned char abyAddr4[WLAN_ADDR_LEN]; -} __attribute__ ((__packed__)) -WLAN_80211HDR_A4, *PWLAN_80211HDR_A4; - -typedef union tagUWLAN_80211HDR { - WLAN_80211HDR_A2sA2; - WLAN_80211HDR_A3sA3; - WLAN_80211HDR_A4sA4; -} UWLAN_80211HDR, *PUWLAN_80211HDR; +} __attribute__((__packed__)); + +union UWLAN_80211HDR { + struct WLAN_80211HDR_A2 sA2; + struct WLAN_80211HDR_A3 sA3; + struct WLAN_80211HDR_A4 sA4; +}; /*- Export Classes */ diff --git a/drivers/staging/vt6655/80211mgr.c b/drivers/staging/vt6655/80211mgr.c index 7949d58..e586e51 100644 --- a/drivers/staging/vt6655/80211mgr.c +++ b/drivers/staging/vt6655/80211mgr.c @@ -88,7 +88,7 @@ vMgrEncodeBeacon( PWLAN_FR_BEACON pFrame ) { - pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; + pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf; /* Fixed Fields */ pFrame->pqwTimestamp = (PQWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) @@ -121,7 +121,7 @@ vMgrDecodeBeacon( { PWLAN_IEpItem; - pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; + pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf; /* Fixed Fields */ pFrame->pqwTimestamp = (PQWORD)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) @@ -236,7 +236,7 @@ vMgrEncodeIBSSATIM( PWLAN_FR_IBSSATIM pFrame ) { - pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; + pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf; pFrame->len = WLAN_HDR_ADDR3_LEN; return; @@ -258,7 +258,7 @@ vMgrDecodeIBSSATIM( PWLAN_FR_IBSSATIM pFrame ) { - pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; + pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf; return; } @@ -279,7 +279,7 @@ vMgrEncodeDisassociation( PWLAN_FR_DISASSOC pFrame ) { - pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; + pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf; /* Fixed Fields */ pFrame->pwReason = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) @@ -305,7 +305,7 @@ vMgrDecodeDisassociation( PWLAN_FR_DISASSOC pFrame ) { - pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; + pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf; /* Fixed Fields */ pFrame->pwReason = (unsigned short *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) @@ -330,7 +330,7 @@ vMgrEncodeAssocRequest( PWLAN_FR_ASSOCREQ pFrame
[PATCH 4/7] vt6655: Fixed most of the checkpatch warnings in wpa2
wpa2.h: Checkpatch does no longer complain about anything wpa2.c: Checkpatch complains about some lines that are longer than 80 characters. Breaking them would deteriorate the readability so these lines were not touched. vntwifi.c: Fixing style problems in wpa2.h made it necessary to adjust variable declarations that depended on typedefs in wpa2.h. The checkpatch cleanup of this file still remains. Signed-off-by: Michael Gunselmann Signed-off-by: Martin Hofmann --- drivers/staging/vt6655/vntwifi.c | 4 +- drivers/staging/vt6655/wpa2.c| 186 ++- drivers/staging/vt6655/wpa2.h| 12 +-- 3 files changed, 114 insertions(+), 88 deletions(-) diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c index e78aedf..d6f63d0 100644 --- a/drivers/staging/vt6655/vntwifi.c +++ b/drivers/staging/vt6655/vntwifi.c @@ -644,7 +644,7 @@ VNTWIFIbSetPMKIDCache( return false; } pMgmt->gsPMKIDCache.BSSIDInfoCount = ulCount; - memcpy(pMgmt->gsPMKIDCache.BSSIDInfo, pPMKIDInfo, (ulCount*sizeof(PMKIDInfo))); + memcpy(pMgmt->gsPMKIDCache.BSSIDInfo, pPMKIDInfo, (ulCount*sizeof(struct PMKIDInfo))); return true; } @@ -695,7 +695,7 @@ VNTWIFIbMeasureReport( //spin_lock_irq(&pDevice->lock); if ((pvMeasureEID != NULL) && - (pMgmt->uLengthOfRepEIDs < (WLAN_A3FR_MAXLEN - sizeof(MEASEURE_REP) - sizeof(WLAN_80211HDR_A3) - 3)) + (pMgmt->uLengthOfRepEIDs < (WLAN_A3FR_MAXLEN - sizeof(MEASEURE_REP) - sizeof(struct WLAN_80211HDR_A3) - 3)) ) { pMgmt->pCurrMeasureEIDRep->byElementID = WLAN_EID_MEASURE_REP; pMgmt->pCurrMeasureEIDRep->len = 3; diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c index 2013122..3443556 100644 --- a/drivers/staging/vt6655/wpa2.c +++ b/drivers/staging/vt6655/wpa2.c @@ -37,7 +37,7 @@ /*- Static Definitions -*/ static int msglevel = MSG_LEVEL_INFO; -//static int msglevel=MSG_LEVEL_DEBUG; +/* static int msglevel=MSG_LEVEL_DEBUG; */ /*- Static Classes */ /*- Static Variables --*/ @@ -121,19 +121,19 @@ WPA2vParseRSN( WPA2_ClearRSN(pBSSNode); - if (pRSN->len == 2) { // ver(2) - if ((pRSN->byElementID == WLAN_EID_RSN) && (pRSN->wVersion == 1)) { + if (pRSN->len == 2) { /* ver(2) */ + if ((pRSN->byElementID == WLAN_EID_RSN) + && (pRSN->wVersion == 1)) pBSSNode->bWPA2Valid = true; - } return; } - if (pRSN->len < 6) { // ver(2) + GK(4) - // invalid CSS, P802.11i/D10.0, p31 + if (pRSN->len < 6) { /* ver(2) + GK(4) */ + /* invalid CSS, P802.11i/D10.0, p31 */ return; } - // information element header makes sense + /* information element header makes sense */ if ((pRSN->byElementID == WLAN_EID_RSN) && (pRSN->wVersion == 1)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Legal 802.11i RSN\n"); @@ -148,97 +148,121 @@ WPA2vParseRSN( else if (!memcmp(pbyOUI, abyOUIWEP104, 4)) pBSSNode->byCSSGK = WLAN_11i_CSS_WEP104; else if (!memcmp(pbyOUI, abyOUIGK, 4)) { - // invalid CSS, P802.11i/D10.0, p32 + /* invalid CSS, P802.11i/D10.0, p32 */ return; } else - // any vendor checks here + /* any vendor checks here */ pBSSNode->byCSSGK = WLAN_11i_CSS_UNKNOWN; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "802.11i CSS: %X\n", pBSSNode->byCSSGK); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + "802.11i CSS: %X\n", pBSSNode->byCSSGK); if (pRSN->len == 6) { pBSSNode->bWPA2Valid = true; return; } - if (pRSN->len >= 8) { // ver(2) + GK(4) + PK count(2) - pBSSNode->wCSSPKCount = *((unsigned short *)&(pRSN->abyRSN[4])); + if (pRSN->len >= 8) { /* ver(2) + GK(4) + PK count(2) */ + pBSSNode->wCSSPKCount = + *((unsigned short *)&(pRSN->abyRSN[4])); j = 0; pbyOUI = &(pRSN->abyRSN[6]); - for (i = 0; (i < pBSSNode->wCSSPKCount) && (j < sizeof(pBSSNode->abyCSSPK)/sizeof(unsigned char)); i++) { - if (pRSN->len >= 8+i*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*i) + for (i = 0; (i < pBSSNode->wCSSPKCount) +
[PATCH 5/7] vt6655: Fixed most of the checkpatch warnings in wpa
wpa.h: Checkpatch does no longer complain about anything. wpactl.c: Some long-line-warnings still remain but fixing them would deteriorate code readability. Signed-off-by: Michael Gunselmann Signed-off-by: Martin Hofmann --- drivers/staging/vt6655/wpa.c | 156 --- drivers/staging/vt6655/wpa.h | 2 +- 2 files changed, 102 insertions(+), 56 deletions(-) diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c index 990ea0f..fdd2722 100644 --- a/drivers/staging/vt6655/wpa.c +++ b/drivers/staging/vt6655/wpa.c @@ -116,14 +116,17 @@ WPA_ParseRSN( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WPA_ParseRSN: [%d]\n", pRSN->len); - // information element header makes sense - if ((pRSN->len >= 6) // oui1(4)+ver(2) - && (pRSN->byElementID == WLAN_EID_RSN_WPA) && !memcmp(pRSN->abyOUI, abyOUI01, 4) + /* information element header makes sense */ + if ((pRSN->len >= 6) /* oui1(4)+ver(2) */ + && (pRSN->byElementID == WLAN_EID_RSN_WPA) + && !memcmp(pRSN->abyOUI, abyOUI01, 4) && (pRSN->wVersion == 1)) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Legal RSN\n"); - // update each variable if pRSN is long enough to contain the variable - if (pRSN->len >= 10) //oui1(4)+ver(2)+GKSuite(4) - { + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + "Legal RSN\n"); + /* update each variable if pRSN is +* long enough to contain the variable +*/ + if (pRSN->len >= 10) { /* oui1(4)+ver(2)+GKSuite(4) */ if (!memcmp(pRSN->abyMulticast, abyOUI01, 4)) pBSSList->byGKType = WPA_WEP40; else if (!memcmp(pRSN->abyMulticast, abyOUI02, 4)) @@ -135,80 +138,117 @@ WPA_ParseRSN( else if (!memcmp(pRSN->abyMulticast, abyOUI05, 4)) pBSSList->byGKType = WPA_WEP104; else - // any vendor checks here + /* any vendor checks here */ pBSSList->byGKType = WPA_NONE; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "byGKType: %x\n", pBSSList->byGKType); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + "byGKType: %x\n", pBSSList->byGKType); } - if (pRSN->len >= 12) //oui1(4)+ver(2)+GKS(4)+PKSCnt(2) - { + if (pRSN->len >= 12) { /* oui1(4)+ver(2)+GKS(4)+PKSCnt(2) */ j = 0; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wPKCount: %d, sizeof(pBSSList->abyPKType): %zu\n", pRSN->wPKCount, sizeof(pBSSList->abyPKType)); - for (i = 0; (i < pRSN->wPKCount) && (j < ARRAY_SIZE(pBSSList->abyPKType)); i++) { - if (pRSN->len >= 12+i*4+4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*i) - if (!memcmp(pRSN->PKSList[i].abyOUI, abyOUI00, 4)) - pBSSList->abyPKType[j++] = WPA_NONE; - else if (!memcmp(pRSN->PKSList[i].abyOUI, abyOUI02, 4)) - pBSSList->abyPKType[j++] = WPA_TKIP; - else if (!memcmp(pRSN->PKSList[i].abyOUI, abyOUI03, 4)) - pBSSList->abyPKType[j++] = WPA_AESWRAP; - else if (!memcmp(pRSN->PKSList[i].abyOUI, abyOUI04, 4)) - pBSSList->abyPKType[j++] = WPA_AESCCMP; + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + "wPKCount: %d, sizeof(pBSSList->abyPKType): %zu\n", + pRSN->wPKCount, sizeof(pBSSList->abyPKType)); + for (i = 0; (i < pRSN->wPKCount) +&& (j < ARRAY_SIZE(pBSSList->abyPKType)); i++) { + /* oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*i) */ + if (pRSN->len >= 12+i*4+4) { + if (!memcmp(pRSN->PKSList[i].abyOUI, + abyOUI00, 4)) + pBSSList->abyPKType[j++] = + WPA_NONE; + else if (!memcmp(pRSN->PKSList[i].abyOUI, +abyOUI02, 4)) + pBSSList->abyPKType[j++] = + WPA_TKIP; + else if (!memcmp(pRSN->PKSList[i].abyOUI, +
[PATCH 0/7] vt6655: Cleanup of checkpatch errors
This patch series cleans up all checkpatch errors and some warnings in some files of the vt6655 driver in staging. The reference git tree is linux-next. Some checkpatch warnings were not fixed, they are commented in the particular patches. Not all files of the driver were cleaned up in this patch series. The patches should not incorporate functional changes. -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/7] vt6655: Fixed most of the checkpatch warnings in wpactl
wpactl.h: Checkpatch does no longer complain about anything wpactl.c: The following errors and warnings remain: ERROR: need consistens spacing around '&' in line 364, 372 and 411 This is okay, 'cause we need pointers to the corresponding variables. WARNING: Prefer netdev_err [...] to printk This is also okay, 'cause we check if kmalloc failed or not. This is not a device-related error. hostap.c and iwctl.c: wpactl.h used the typedef statement, which was removed while fixing checkpatch-errors. For this to work one statement in hostap.c was adjusted. The ckecpatch cleanup of these two files still remains. Signed-off-by: Michael Gunselmann Signed-off-by: Martin Hofmann --- drivers/staging/vt6655/hostap.c | 2 +- drivers/staging/vt6655/iwctl.c | 2 +- drivers/staging/vt6655/wpactl.c | 300 drivers/staging/vt6655/wpactl.h | 16 +-- 4 files changed, 190 insertions(+), 130 deletions(-) diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index ca54b79..6eecd53 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -454,7 +454,7 @@ static int hostap_set_encryption(PSDevice pDevice, unsigned long dwKeyIndex = 0; unsigned char abyKey[MAX_KEY_LEN]; unsigned char abySeq[MAX_KEY_LEN]; - NDIS_802_11_KEY_RSC KeyRSC; + unsigned long long KeyRSC; unsigned char byKeyDecMode = KEY_CTL_WEP; int ret = 0; int iNodeIndex = -1; diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index 2db4bc8..ac3fc16 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -1827,7 +1827,7 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; struct viawget_wpa_param *param = NULL; //original member - wpa_alg alg_name; + enum wpa_alg alg_name; u8 addr[6]; int key_idx, set_tx = 0; u8 seq[IW_ENCODE_SEQ_MAX_SIZE]; diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index ee83704..41e9933 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -51,7 +51,7 @@ static const int frequency_list[] = { /*- Static Classes */ /*- Static Variables --*/ -//static int msglevel=MSG_LEVEL_DEBUG; +/* static int msglevel=MSG_LEVEL_DEBUG; */ static int msglevel = MSG_LEVEL_INFO; /*- Static Functions --*/ @@ -90,7 +90,8 @@ static int wpa_init_wpadev(PSDevice pDevice) struct net_device *dev = pDevice->dev; int ret = 0; - pDevice->wpadev = alloc_netdev(sizeof(PSDevice), "vntwpa", wpadev_setup); + pDevice->wpadev = + alloc_netdev(sizeof(PSDevice), "vntwpa", wpadev_setup); if (pDevice->wpadev == NULL) return -ENOMEM; @@ -103,7 +104,8 @@ static int wpa_init_wpadev(PSDevice pDevice) pDevice->wpadev->mem_end = dev->mem_end; ret = register_netdev(pDevice->wpadev); if (ret) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: register_netdev(WPA) failed!\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + "%s: register_netdev(WPA) failed!\n", dev->name); free_netdev(pDevice->wpadev); return -1; @@ -115,7 +117,8 @@ static int wpa_init_wpadev(PSDevice pDevice) return -ENOMEM; } - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Registered netdev %s for WPA management\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + "%s: Registered netdev %s for WPA management\n", dev->name, pDevice->wpadev->name); return 0; @@ -142,7 +145,8 @@ static int wpa_release_wpadev(PSDevice pDevice) } if (pDevice->wpadev) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO + "%s: Netdevice %s unregistered\n", pDevice->dev->name, pDevice->wpadev->name); unregister_netdev(pDevice->wpadev); free_netdev(pDevice->wpadev); @@ -196,7 +200,7 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, bool fcpfkernel) unsigned char abyKey[MAX_KEY_LEN]; unsigned char abySeq[MAX_KEY_LEN]; QWORD KeyRSC; -//NDIS_802_11_KEY_RSC KeyRSC; +/*NDIS_802_11_KEY_RSC KeyRSC; */ unsigned char byKeyDecMode = KEY_CTL_WEP; int ret = 0; int uu, ii; @@
[PATCH 1/7] vt6655: Remove unused macros in 80211hdr.h
From: Martin Hofmann The file 80211hdr.h contained 4 macros (in both little and big endain fashion) that were not used in the driver. Thus, this patch removes them. Signed-off-by: Martin Hofmann Signed-off-by: Michael Gunselmann --- drivers/staging/vt6655/80211hdr.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/vt6655/80211hdr.h b/drivers/staging/vt6655/80211hdr.h index ba53340..cacf137 100644 --- a/drivers/staging/vt6655/80211hdr.h +++ b/drivers/staging/vt6655/80211hdr.h @@ -155,17 +155,13 @@ #ifdef __BIG_ENDIAN /* GET & SET Frame Control bit */ -#define WLAN_GET_FC_PRVER(n)unsigned short)(n) >> 8) & (BIT0 | BIT1)) #define WLAN_GET_FC_FTYPE(n)unsigned short)(n) >> 8) & (BIT2 | BIT3)) >> 2) #define WLAN_GET_FC_FSTYPE(n) unsigned short)(n) >> 8) & (BIT4|BIT5|BIT6|BIT7)) >> 4) #define WLAN_GET_FC_TODS(n) unsigned short)(n) << 8) & (BIT8)) >> 8) #define WLAN_GET_FC_FROMDS(n) unsigned short)(n) << 8) & (BIT9)) >> 9) #define WLAN_GET_FC_MOREFRAG(n) unsigned short)(n) << 8) & (BIT10)) >> 10) -#define WLAN_GET_FC_RETRY(n)unsigned short)(n) << 8) & (BIT11)) >> 11) #define WLAN_GET_FC_PWRMGT(n) unsigned short)(n) << 8) & (BIT12)) >> 12) -#define WLAN_GET_FC_MOREDATA(n) unsigned short)(n) << 8) & (BIT13)) >> 13) #define WLAN_GET_FC_ISWEP(n)unsigned short)(n) << 8) & (BIT14)) >> 14) -#define WLAN_GET_FC_ORDER(n)unsigned short)(n) << 8) & (BIT15)) >> 15) /* Sequence Field bit */ #define WLAN_GET_SEQ_FRGNUM(n) (((unsigned short)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3)) @@ -188,17 +184,13 @@ #else /* GET & SET Frame Control bit */ -#define WLAN_GET_FC_PRVER(n)(((unsigned short)(n)) & (BIT0 | BIT1)) #define WLAN_GET_FC_FTYPE(n)unsigned short)(n)) & (BIT2 | BIT3)) >> 2) #define WLAN_GET_FC_FSTYPE(n) unsigned short)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4) #define WLAN_GET_FC_TODS(n) unsigned short)(n)) & (BIT8)) >> 8) #define WLAN_GET_FC_FROMDS(n) unsigned short)(n)) & (BIT9)) >> 9) #define WLAN_GET_FC_MOREFRAG(n) unsigned short)(n)) & (BIT10)) >> 10) -#define WLAN_GET_FC_RETRY(n)unsigned short)(n)) & (BIT11)) >> 11) #define WLAN_GET_FC_PWRMGT(n) unsigned short)(n)) & (BIT12)) >> 12) -#define WLAN_GET_FC_MOREDATA(n) unsigned short)(n)) & (BIT13)) >> 13) #define WLAN_GET_FC_ISWEP(n)unsigned short)(n)) & (BIT14)) >> 14) -#define WLAN_GET_FC_ORDER(n)unsigned short)(n)) & (BIT15)) >> 15) /* Sequence Field bit */ #define WLAN_GET_SEQ_FRGNUM(n) (((unsigned short)(n)) & (BIT0|BIT1|BIT2|BIT3)) -- 1.8.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] staging: xillybus: Changed Open Firmware "compatible" property
The previous "compatible" string was poorly chosen, but remains in the match list to support existing DTBs. There is no risk for a naming clash. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_of.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_of.c b/drivers/staging/xillybus/xillybus_of.c index 3b25b0e..be12440 100644 --- a/drivers/staging/xillybus/xillybus_of.c +++ b/drivers/staging/xillybus/xillybus_of.c @@ -31,7 +31,8 @@ static const char xillyname[] = "xillybus_of"; /* Match table for of_platform binding */ static struct of_device_id xillybus_of_match[] = { - { .compatible = "xlnx,xillybus-1.00.a", }, + { .compatible = "xillybus,xillybus-1.00.a", }, + { .compatible = "xlnx,xillybus-1.00.a", }, /* Deprecated */ {} }; -- 1.7.2.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] staging: xillybus: Open Firmware driver supporting coherent DMA
If the "dma-coherent" property is present in the device tree, the driver will not perform cache invalidations. This feature significantly improves data throughput and reduces CPU load. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_of.c | 21 - 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_of.c b/drivers/staging/xillybus/xillybus_of.c index be12440..23a609b 100644 --- a/drivers/staging/xillybus/xillybus_of.c +++ b/drivers/staging/xillybus/xillybus_of.c @@ -54,6 +54,13 @@ static void xilly_dma_sync_single_for_device_of(struct xilly_endpoint *ep, dma_sync_single_for_device(ep->dev, dma_handle, size, direction); } +static void xilly_dma_sync_single_nop(struct xilly_endpoint *ep, + dma_addr_t dma_handle, + size_t size, + int direction) +{ +} + static dma_addr_t xilly_map_single_of(struct xilly_cleanup *mem, struct xilly_endpoint *ep, void *ptr, @@ -102,14 +109,26 @@ static struct xilly_endpoint_hardware of_hw = { .unmap_single = xilly_unmap_single_of }; +static struct xilly_endpoint_hardware of_hw_coherent = { + .owner = THIS_MODULE, + .hw_sync_sgl_for_cpu = xilly_dma_sync_single_nop, + .hw_sync_sgl_for_device = xilly_dma_sync_single_nop, + .map_single = xilly_map_single_of, + .unmap_single = xilly_unmap_single_of +}; + static int xilly_drv_probe(struct platform_device *op) { struct device *dev = &op->dev; struct xilly_endpoint *endpoint; int rc = 0; int irq; + struct xilly_endpoint_hardware *ephw = &of_hw; + + if (of_property_read_bool(dev->of_node, "dma-coherent")) + ephw = &of_hw_coherent; - endpoint = xillybus_init_endpoint(NULL, dev, &of_hw); + endpoint = xillybus_init_endpoint(NULL, dev, ephw); if (!endpoint) return -ENOMEM; -- 1.7.2.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3] staging: xillybus: Added documentation on device tree bindings
Signed-off-by: Eli Billauer --- .../devicetree/bindings/staging/xillybus.txt | 20 1 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/staging/xillybus.txt diff --git a/Documentation/devicetree/bindings/staging/xillybus.txt b/Documentation/devicetree/bindings/staging/xillybus.txt new file mode 100644 index 000..9e316dc --- /dev/null +++ b/Documentation/devicetree/bindings/staging/xillybus.txt @@ -0,0 +1,20 @@ +* Xillybus driver for generic FPGA interface + +Required properties: +- compatible: Should be "xillybus,xillybus-1.00.a" +- reg: Address and length of the register set for the device +- interrupts: Contains one interrupt node, typically consisting of three cells. +- interrupt-parent: the phandle for the interrupt controller that +services interrupts for this device. + +Optional properties: +- dma-coherent: Present if DMA operations are coherent + +Example: + + xillybus@ff200400 { + compatible = "xillybus,xillybus-1.00.a"; + reg = < 0xff200400 0x0080 >; + interrupts = < 0 40 1 >; + interrupt-parent = <&intc>; + } ; -- 1.7.2.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] comedi: Humusoft MF634 and MF624 DAQ cards driver
This patch adds Comedi driver for Humusoft MF634 (PCIe) and MF624 (PCI) data acquisition cards. The legacy card Humusoft MF614 is not supported. More info about the cards may be found at http://humusoft.cz/produkty/datacq/ The driver was tested with both cards. Everything seems to work properly. Just the basic functionality of the card (DIO, ADC, DAC) is supported by this driver. I hope I will be able to add some more functionality soon. Rostislav Lisovy (1): comedi: Humusoft MF634 and MF624 DAQ cards driver drivers/staging/comedi/Kconfig | 6 + drivers/staging/comedi/drivers/Makefile | 1 + drivers/staging/comedi/drivers/mf6x4.c | 368 3 files changed, 375 insertions(+) create mode 100644 drivers/staging/comedi/drivers/mf6x4.c -- 1.8.3.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] comedi: Humusoft MF634 and MF624 DAQ cards driver
create mode 100644 drivers/staging/comedi/drivers/mf6x4.c diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index bfa27e7..89e25b4 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig @@ -884,6 +884,12 @@ config COMEDI_GSC_HPDI To compile this driver as a module, choose M here: the module will be called gsc_hpdi. +config COMEDI_MF6X4 + tristate "Humusoft MF634 and MF624 DAQ Card support" + ---help--- + This driver supports both Humusoft MF634 and MF624 Data acquisition + cards. The legacy Humusoft MF614 card is not supported. + config COMEDI_ICP_MULTI tristate "Inova ICP_MULTI support" ---help--- diff --git a/drivers/staging/comedi/drivers/Makefile b/drivers/staging/comedi/drivers/Makefile index 94cbd26..9e979a9 100644 --- a/drivers/staging/comedi/drivers/Makefile +++ b/drivers/staging/comedi/drivers/Makefile @@ -110,6 +110,7 @@ obj-$(CONFIG_COMEDI_NI_PCIMIO) += ni_pcimio.o obj-$(CONFIG_COMEDI_RTD520)+= rtd520.o obj-$(CONFIG_COMEDI_S626) += s626.o obj-$(CONFIG_COMEDI_SSV_DNP) += ssv_dnp.o +obj-$(CONFIG_COMEDI_MF6X4) += mf6x4.o # Comedi PCMCIA drivers obj-$(CONFIG_COMEDI_CB_DAS16_CS) += cb_das16_cs.o diff --git a/drivers/staging/comedi/drivers/mf6x4.c b/drivers/staging/comedi/drivers/mf6x4.c new file mode 100644 index 000..46c7ce5 --- /dev/null +++ b/drivers/staging/comedi/drivers/mf6x4.c @@ -0,0 +1,368 @@ +/* + * comedi/drivers/mf6x4.c + * Driver for Humusoft MF634 and MF624 Data acquisition cards + * + * COMEDI - Linux Control and Measurement Device Interface + * Copyright (C) 2000 David A. Schleef + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +/* + * Driver: mf6x4 + * Description: Humusoft MF634 and MF624 Data acquisition card driver + * Devices: Humusoft MF634, Humusoft MF624 + * Author: Rostislav Lisovy + * Status: works + * Updated: + * Configuration Options: none + */ + +#include +#include +#include "../comedidev.h" + +/* PCI Vendor ID, Device ID */ +#define PCI_VENDOR_ID_HUMUSOFT 0x186c +#define PCI_DEVICE_ID_MF6240x0624 +#define PCI_DEVICE_ID_MF6340x0634 + +/* Registers present in BAR0 memory region */ +#define MF624_GPIOC_reg0x54 + +#define MF6X4_GPIOC_EOLC /* End Of Last Conversion */ (1 << 17) +#define MF6X4_GPIOC_LDAC /* Load DACs */ (1 << 23) +#define MF6X4_GPIOC_DACEN (1 << 26) + +/* BAR1 registers */ +#define MF6X4_DIN_reg 0x10 +#define MF6X4_DIN_mask 0xff +#define MF6X4_DOUT_reg 0x10 +#define MF6X4_DOUT_mask0xff + +#define MF6X4_ADSTART_reg 0x20 +#define MF6X4_ADDATA_reg 0x00 +#define MF6X4_ADDATA_mask 0x3fff +#define MF6X4_ADCTRL_reg 0x00 +#define MF6X4_ADCTRL_mask 0xff + +#define MF6X4_DA0_reg 0x20 +#define MF6X4_DA1_reg 0x22 +#define MF6X4_DA2_reg 0x24 +#define MF6X4_DA3_reg 0x26 +#define MF6X4_DA4_reg 0x28 +#define MF6X4_DA5_reg 0x2a +#define MF6X4_DA6_reg 0x2c +#define MF6X4_DA7_reg 0x2e +#define MF6X4_DA_mask 0x3fff +#define MF6X4_DAC_CHANN_CNT8 + +/* BAR2 registers */ +#define MF634_GPIOC_reg0x68 + +/* Make a fault-tolerant mapping from DAC cahnnel id obtained as +an int to real HW-dependent offset value */ +static unsigned int mf6x4_dac_channels[MF6X4_DAC_CHANN_CNT] = { + [0] = MF6X4_DA0_reg, + [1] = MF6X4_DA1_reg, + [2] = MF6X4_DA2_reg, + [3] = MF6X4_DA3_reg, + [4] = MF6X4_DA4_reg, + [5] = MF6X4_DA5_reg, + [6] = MF6X4_DA6_reg, + [7] = MF6X4_DA7_reg, +}; + +enum mf6x4_boardid { + BOARD_MF634, + BOARD_MF624, +}; + +struct mf6x4_board { + const char *name; + unsigned int bar_nums[3]; /* We need to keep track of the +
Re: [PATCH] comedi: Humusoft MF634 and MF624 DAQ cards driver
These days comedi drivers are looking really nice. :) You will need to resend because it's missing a change log and a Signed-off-by line. Wait for Ian or Hartley to comment before resending. I had a few minor style nits mentioned inline below. Run the patch through `scripts/checkpatch.pl --strict`. On Tue, Dec 31, 2013 at 02:36:36AM +0100, Rostislav Lisovy wrote: > > create mode 100644 drivers/staging/comedi/drivers/mf6x4.c > > diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig > index bfa27e7..89e25b4 100644 > --- a/drivers/staging/comedi/Kconfig > +++ b/drivers/staging/comedi/Kconfig > @@ -884,6 +884,12 @@ config COMEDI_GSC_HPDI > To compile this driver as a module, choose M here: the module will be > called gsc_hpdi. > > +config COMEDI_MF6X4 > + tristate "Humusoft MF634 and MF624 DAQ Card support" > + ---help--- > + This driver supports both Humusoft MF634 and MF624 Data acquisition > + cards. The legacy Humusoft MF614 card is not supported. > + > config COMEDI_ICP_MULTI > tristate "Inova ICP_MULTI support" > ---help--- > diff --git a/drivers/staging/comedi/drivers/Makefile > b/drivers/staging/comedi/drivers/Makefile > index 94cbd26..9e979a9 100644 > --- a/drivers/staging/comedi/drivers/Makefile > +++ b/drivers/staging/comedi/drivers/Makefile > @@ -110,6 +110,7 @@ obj-$(CONFIG_COMEDI_NI_PCIMIO)+= ni_pcimio.o > obj-$(CONFIG_COMEDI_RTD520) += rtd520.o > obj-$(CONFIG_COMEDI_S626)+= s626.o > obj-$(CONFIG_COMEDI_SSV_DNP) += ssv_dnp.o > +obj-$(CONFIG_COMEDI_MF6X4) += mf6x4.o > > # Comedi PCMCIA drivers > obj-$(CONFIG_COMEDI_CB_DAS16_CS) += cb_das16_cs.o > diff --git a/drivers/staging/comedi/drivers/mf6x4.c > b/drivers/staging/comedi/drivers/mf6x4.c > new file mode 100644 > index 000..46c7ce5 > --- /dev/null > +++ b/drivers/staging/comedi/drivers/mf6x4.c > @@ -0,0 +1,368 @@ > +/* > + * comedi/drivers/mf6x4.c > + * Driver for Humusoft MF634 and MF624 Data acquisition cards > + * > + * COMEDI - Linux Control and Measurement Device Interface > + * Copyright (C) 2000 David A. Schleef > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > +/* > + * Driver: mf6x4 > + * Description: Humusoft MF634 and MF624 Data acquisition card driver > + * Devices: Humusoft MF634, Humusoft MF624 > + * Author: Rostislav Lisovy > + * Status: works > + * Updated: > + * Configuration Options: none > + */ > + > +#include > +#include > +#include "../comedidev.h" > + > +/* PCI Vendor ID, Device ID */ > +#define PCI_VENDOR_ID_HUMUSOFT 0x186c > +#define PCI_DEVICE_ID_MF624 0x0624 > +#define PCI_DEVICE_ID_MF634 0x0634 > + > +/* Registers present in BAR0 memory region */ > +#define MF624_GPIOC_reg 0x54 > + > +#define MF6X4_GPIOC_EOLC /* End Of Last Conversion */(1 << 17) > +#define MF6X4_GPIOC_LDAC /* Load DACs */ (1 << 23) > +#define MF6X4_GPIOC_DACEN(1 << 26) > + > +/* BAR1 registers */ > +#define MF6X4_DIN_reg0x10 > +#define MF6X4_DIN_mask 0xff > +#define MF6X4_DOUT_reg 0x10 > +#define MF6X4_DOUT_mask 0xff > + > +#define MF6X4_ADSTART_reg0x20 > +#define MF6X4_ADDATA_reg 0x00 > +#define MF6X4_ADDATA_mask0x3fff > +#define MF6X4_ADCTRL_reg 0x00 > +#define MF6X4_ADCTRL_mask0xff > + > +#define MF6X4_DA0_reg0x20 > +#define MF6X4_DA1_reg0x22 > +#define MF6X4_DA2_reg0x24 > +#define MF6X4_DA3_reg0x26 > +#define MF6X4_DA4_reg0x28 > +#define MF6X4_DA5_reg0x2a > +#define MF6X4_DA6_reg0x2c > +#define MF6X4_DA7_reg0x2e > +#define MF6X4_DA_mask0x3fff > +#define MF6X4_DAC_CHANN_CNT 8 > + > +/* BAR2 registers */ > +#define MF634_GPIOC_reg 0x68 > + > +/* Ma
[PATCH] Staging: rtl8188eu: Fixed coding style issues
Fixed required and prohibited spaces to make rtw_io.h checkpatch.pl clean Signed-off-by: Tim Jester-Pfadt --- drivers/staging/rtl8188eu/include/rtw_io.h | 36 +++--- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_io.h b/drivers/staging/rtl8188eu/include/rtw_io.h index eb6f0e5..3d1dfcc 100644 --- a/drivers/staging/rtl8188eu/include/rtw_io.h +++ b/drivers/staging/rtl8188eu/include/rtw_io.h @@ -123,7 +123,7 @@ struct _io_ops { u8 *pmem); u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); - u32 (*_write_scsi)(struct intf_hdl *pintfhdl,u32 cnt, u8 *pmem); + u32 (*_write_scsi)(struct intf_hdl *pintfhdl, u32 cnt, u8 *pmem); void (*_read_port_cancel)(struct intf_hdl *pintfhdl); void (*_write_port_cancel)(struct intf_hdl *pintfhdl); }; @@ -213,7 +213,7 @@ struct reg_protocol_wt { u32 Value; #else /* DW1 */ - u32 Reserved1 :4; + u32 Reserved1:4; u32 NumOfTrans:4; u32 Reserved2:24; /* DW2 */ @@ -254,7 +254,7 @@ struct io_priv { }; uint ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue); -void sync_ioreq_enqueue(struct io_req *preq,struct io_queue *ioqueue); +void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue); uint sync_ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue); uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue); struct io_req *alloc_ioreq(struct io_queue *pio_q); @@ -368,20 +368,20 @@ void free_io_queue(struct adapter *adapter); void async_bus_io(struct io_queue *pio_q); void bus_sync_io(struct io_queue *pio_q); u32 _ioreq2rwmem(struct io_queue *pio_q); -void dev_power_down(struct adapter * Adapter, u8 bpwrup); - -#define PlatformEFIOWrite1Byte(_a,_b,_c) \ - rtw_write8(_a,_b,_c) -#define PlatformEFIOWrite2Byte(_a,_b,_c) \ - rtw_write16(_a,_b,_c) -#define PlatformEFIOWrite4Byte(_a,_b,_c) \ - rtw_write32(_a,_b,_c) - -#define PlatformEFIORead1Byte(_a,_b) \ - rtw_read8(_a,_b) -#define PlatformEFIORead2Byte(_a,_b) \ - rtw_read16(_a,_b) -#define PlatformEFIORead4Byte(_a,_b) \ - rtw_read32(_a,_b) +void dev_power_down(struct adapter *Adapter, u8 bpwrup); + +#define PlatformEFIOWrite1Byte(_a, _b, _c) \ + rtw_write8(_a, _b, _c) +#define PlatformEFIOWrite2Byte(_a, _b, _c) \ + rtw_write16(_a, _b, _c) +#define PlatformEFIOWrite4Byte(_a, _b, _c) \ + rtw_write32(_a, _b, _c) + +#define PlatformEFIORead1Byte(_a, _b) \ + rtw_read8(_a, _b) +#define PlatformEFIORead2Byte(_a, _b) \ + rtw_read16(_a, _b) +#define PlatformEFIORead4Byte(_a, _b) \ + rtw_read32(_a, _b) #endif /* _RTL8711_IO_H_ */ -- 1.8.5.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rtl8188eu: Fixed coding style issues
On 12/30/2013 08:53 PM, Tim Jester-Pfadt wrote: Fixed required and prohibited spaces to make rtw_io.h checkpatch.pl clean Signed-off-by: Tim Jester-Pfadt --- drivers/staging/rtl8188eu/include/rtw_io.h | 36 +++--- 1 file changed, 18 insertions(+), 18 deletions(-) Acked-by: Larry Finger Larry diff --git a/drivers/staging/rtl8188eu/include/rtw_io.h b/drivers/staging/rtl8188eu/include/rtw_io.h index eb6f0e5..3d1dfcc 100644 --- a/drivers/staging/rtl8188eu/include/rtw_io.h +++ b/drivers/staging/rtl8188eu/include/rtw_io.h @@ -123,7 +123,7 @@ struct _io_ops { u8 *pmem); u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); - u32 (*_write_scsi)(struct intf_hdl *pintfhdl,u32 cnt, u8 *pmem); + u32 (*_write_scsi)(struct intf_hdl *pintfhdl, u32 cnt, u8 *pmem); void (*_read_port_cancel)(struct intf_hdl *pintfhdl); void (*_write_port_cancel)(struct intf_hdl *pintfhdl); }; @@ -213,7 +213,7 @@ struct reg_protocol_wt { u32 Value; #else /* DW1 */ - u32 Reserved1 :4; + u32 Reserved1:4; u32 NumOfTrans:4; u32 Reserved2:24; /* DW2 */ @@ -254,7 +254,7 @@ struct io_priv { }; uint ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue); -void sync_ioreq_enqueue(struct io_req *preq,struct io_queue *ioqueue); +void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue); uint sync_ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue); uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue); struct io_req *alloc_ioreq(struct io_queue *pio_q); @@ -368,20 +368,20 @@ void free_io_queue(struct adapter *adapter); void async_bus_io(struct io_queue *pio_q); void bus_sync_io(struct io_queue *pio_q); u32 _ioreq2rwmem(struct io_queue *pio_q); -void dev_power_down(struct adapter * Adapter, u8 bpwrup); - -#define PlatformEFIOWrite1Byte(_a,_b,_c) \ - rtw_write8(_a,_b,_c) -#define PlatformEFIOWrite2Byte(_a,_b,_c) \ - rtw_write16(_a,_b,_c) -#define PlatformEFIOWrite4Byte(_a,_b,_c) \ - rtw_write32(_a,_b,_c) - -#define PlatformEFIORead1Byte(_a,_b) \ - rtw_read8(_a,_b) -#define PlatformEFIORead2Byte(_a,_b) \ - rtw_read16(_a,_b) -#define PlatformEFIORead4Byte(_a,_b) \ - rtw_read32(_a,_b) +void dev_power_down(struct adapter *Adapter, u8 bpwrup); + +#define PlatformEFIOWrite1Byte(_a, _b, _c) \ + rtw_write8(_a, _b, _c) +#define PlatformEFIOWrite2Byte(_a, _b, _c) \ + rtw_write16(_a, _b, _c) +#define PlatformEFIOWrite4Byte(_a, _b, _c) \ + rtw_write32(_a, _b, _c) + +#define PlatformEFIORead1Byte(_a, _b) \ + rtw_read8(_a, _b) +#define PlatformEFIORead2Byte(_a, _b) \ + rtw_read16(_a, _b) +#define PlatformEFIORead4Byte(_a, _b) \ + rtw_read32(_a, _b) #endif/* _RTL8711_IO_H_ */ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: randconfig build error with 3.13-rc6, in drivers/staging/lustre/lustre/lmv/lproc_lmv.c
>-Original Message- >From: Jim Davis [mailto:jim.ep...@gmail.com] >Sent: Tuesday, December 31, 2013 1:02 AM >To: linux-ker...@vger.kernel.org; Greg Kroah-Hartman; >andreas.dil...@intel.com; Peng, Tao; sachin.ka...@linaro.org; >de...@driverdev.osuosl.org >Subject: randconfig build error with 3.13-rc6, in >drivers/staging/lustre/lustre/lmv/lproc_lmv.c > >Building with the attached random configuration file, > >drivers/staging/lustre/lustre/lmv/lproc_lmv.c: In function >‘lprocfs_lmv_init_vars’: >drivers/staging/lustre/lustre/lmv/lproc_lmv.c:232:26: error: >‘lprocfs_lmv_module _vars’ undeclared (first use in this function) > lvars->module_vars= lprocfs_lmv_module_vars; > ^ This is the !CONFIG_PROC_FS error and has been fixed in Greg's staging tree by commit 2c185ffa2 and 9d2834dd. Thanks, Tao ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel