Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46c3790e authored by Stephen Hemminger's avatar Stephen Hemminger
Browse files

beceem: convert to kernel coding style



Change indentation etc, to conform to acceptable kernel style

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
parent 5afb5145
Loading
Loading
Loading
Loading
+27 −30
Original line number Diff line number Diff line
#include "headers.h"

struct net_device *gblpnetdev;
/***************************************************************************************/
/* proto-type of lower function */

static INT bcm_open(struct net_device *dev)
{
@@ -10,6 +8,7 @@ static INT bcm_open(struct net_device *dev)

	if (Adapter->fw_download_done == FALSE)
		return -EINVAL;

	if (Adapter->LinkUpStatus == 1) {
		if (netif_queue_stopped(Adapter->dev)) {
			netif_carrier_on(Adapter->dev);
@@ -22,8 +21,6 @@ static INT bcm_open(struct net_device *dev)

static INT bcm_close(struct net_device *dev)
{
   PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);

	if (!netif_queue_stopped(dev)) {
		netif_carrier_off(dev);
		netif_stop_queue(dev);
@@ -55,7 +52,6 @@ static u16 bcm_select_queue(struct net_device *dev, struct sk_buff *skb)
	return ClassifyPacket(netdev_priv(dev), skb);
}


/*******************************************************************
* Function    -	bcm_transmit()
*
@@ -83,12 +79,15 @@ static netdev_tx_t bcm_transmit(struct sk_buff *skb, struct net_device *dev)
	if (INVALID_QUEUE_INDEX == qindex)
		goto drop;

	if (Adapter->PackInfo[qindex].uiCurrentPacketsOnHost >= SF_MAX_ALLOWED_PACKETS_TO_BACKUP)
	if (Adapter->PackInfo[qindex].uiCurrentPacketsOnHost >=
	    SF_MAX_ALLOWED_PACKETS_TO_BACKUP)
		return NETDEV_TX_BUSY;

	/* Now Enqueue the packet */
	BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,
			"bcm_transmit Enqueueing the Packet To Queue %d",qindex);
			"bcm_transmit Enqueueing the Packet To Queue %d",
			qindex);

	spin_lock(&Adapter->PackInfo[qindex].SFQueueLock);
	Adapter->PackInfo[qindex].uiCurrentBytesOnHost += skb->len;
	Adapter->PackInfo[qindex].uiCurrentPacketsOnHost++;
@@ -99,8 +98,6 @@ static netdev_tx_t bcm_transmit(struct sk_buff *skb, struct net_device *dev)
	atomic_inc(&Adapter->TotalPacketCount);
	spin_unlock(&Adapter->PackInfo[qindex].SFQueueLock);

	BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_OSAL_DBG, DBG_LVL_ALL,"ENQ: \n");

	/* FIXME - this is racy and incorrect, replace with work queue */
	if (!atomic_read(&Adapter->TxPktAvail)) {
		atomic_set(&Adapter->TxPktAvail, 1);