diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 23:26:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 23:26:34 -0700 |
commit | 138051659902da7e6a09d379fee5dade2a80fcfd (patch) | |
tree | e0a90e27451b1fcd812675092d30c1059369cb87 /drivers/staging/bcm | |
parent | d5ef642355bdd9b383ff5c18cbc6102a06eecbaf (diff) | |
parent | e1703b329f7c7ea82ea181dc4c50020f25061a2c (diff) | |
download | linux-138051659902da7e6a09d379fee5dade2a80fcfd.tar.gz linux-138051659902da7e6a09d379fee5dade2a80fcfd.tar.bz2 linux-138051659902da7e6a09d379fee5dade2a80fcfd.zip |
Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (741 commits)
staging:iio:meter:ade7753 should be 16 bit read not 8 bit for mode register.
staging:iio:kfifo_buf fix double initialization of the ring device structure.
staging:iio:accel:lis3l02dq: fix incorrect pointer passed to spi_set_drvdata.
staging:iio:imu fix missing register table index for some channels
spectra: enable device before poking it
staging: rts_pstor: Fix a miswriting
staging/lirc_bt829: Return -ENODEV when no hardware is found.
staging/lirc_parallel: remove pointless prototypes.
staging/lirc_parallel: fix panic on rmmod
staging:iio:adc:ad7476: Incorrect pointer into spi_set_drvdata.
Staging: zram: Fix kunmapping order
Revert "gma500: Fix dependencies"
gma500: Add medfield header
gma500: wire up the mrst i2c bus from chip_info
gma500: Fix DPU build
gma500: Clean up the DPU config and make it runtime
gma500: resync with Medfield progress
gma500: Use the mrst helpers and power control for mode commit
gma500@ Fix backlight range error
gma500: More Moorestown muddle meddling means MM maybe might modeset
...
Fix up fairly trivial conflicts all over, mostly due to header file
cleanup conflicts, but some deleted files and some just context changes:
- Documentation/feature-removal-schedule.txt
- drivers/staging/bcm/headers.h
- drivers/staging/brcm80211/brcmfmac/dhd_linux.c
- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
- drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
- drivers/staging/brcm80211/brcmfmac/wl_iw.c
- drivers/staging/et131x/et131x_netdev.c
- drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
- drivers/staging/rtl8192e/r8192E.h
- drivers/staging/usbip/userspace/src/utils.h
Diffstat (limited to 'drivers/staging/bcm')
-rw-r--r-- | drivers/staging/bcm/Debug.h | 2 | ||||
-rw-r--r-- | drivers/staging/bcm/InterfaceRx.c | 4 | ||||
-rw-r--r-- | drivers/staging/bcm/Macros.h | 4 | ||||
-rw-r--r-- | drivers/staging/bcm/Misc.c | 10 | ||||
-rw-r--r-- | drivers/staging/bcm/PHSModule.c | 24 | ||||
-rw-r--r-- | drivers/staging/bcm/PHSModule.h | 2 | ||||
-rw-r--r-- | drivers/staging/bcm/headers.h | 1 | ||||
-rw-r--r-- | drivers/staging/bcm/sort.c | 77 |
8 files changed, 53 insertions, 71 deletions
diff --git a/drivers/staging/bcm/Debug.h b/drivers/staging/bcm/Debug.h index 3138729cf34f..420382d1cacf 100644 --- a/drivers/staging/bcm/Debug.h +++ b/drivers/staging/bcm/Debug.h @@ -131,7 +131,7 @@ DriverEntry.c, bcmfwup.c, ChipDetectTask.c, HaltnReset.c, InterfaceDDR.c */ // TODO - put PHS_SEND in Tx PHS_RECEIVE in Rx path ? #define PHS_SEND (OTHERS<<16) -#define PHS_RECIEVE (OTHERS<<17) +#define PHS_RECEIVE (OTHERS<<17) #define PHS_MODULE (OTHERS<<18) #define INTF_INIT (OTHERS<<19) diff --git a/drivers/staging/bcm/InterfaceRx.c b/drivers/staging/bcm/InterfaceRx.c index 806ef5d18522..d495828a731f 100644 --- a/drivers/staging/bcm/InterfaceRx.c +++ b/drivers/staging/bcm/InterfaceRx.c @@ -157,7 +157,7 @@ static void read_bulk_callback(struct urb *urb) { /* Moving ahead by ETH_HLEN to the data ptr as received from FW */ skb_pull(skb, ETH_HLEN); - PHSRecieve(Adapter, pLeader->Vcid, skb, &skb->len, + PHSReceive(Adapter, pLeader->Vcid, skb, &skb->len, NULL,bHeaderSupressionEnabled); if(!Adapter->PackInfo[QueueIndex].bEthCSSupport) @@ -229,7 +229,7 @@ static int ReceiveRcb(PS_INTERFACE_ADAPTER psIntfAdapter, PUSB_RCB pRcb) /* Function: InterfaceRx -Description: This is the hardware specific Function for Recieveing +Description: This is the hardware specific Function for Receiving data packet/control packets from the device. Input parameters: IN PMINI_ADAPTER Adapter - Miniport Adapter Context diff --git a/drivers/staging/bcm/Macros.h b/drivers/staging/bcm/Macros.h index feb351578c8b..916bebb7ed50 100644 --- a/drivers/staging/bcm/Macros.h +++ b/drivers/staging/bcm/Macros.h @@ -176,8 +176,8 @@ enum enLinkStatus { PHY_SYNC_ACHIVED = 2, LINKUP_IN_PROGRESS = 3, LINKUP_DONE = 4, - DREG_RECIEVED = 5, - LINK_STATUS_RESET_RECIEVED = 6, + DREG_RECEIVED = 5, + LINK_STATUS_RESET_RECEIVED = 6, PERIODIC_WAKE_UP_NOTIFICATION_FRM_FW = 7, LINK_SHUTDOWN_REQ_FROM_FIRMWARE = 8, COMPLETE_WAKE_UP_NOTIFICATION_FRM_FW =9 diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index c5003b62234c..c5b3a3666bc7 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c @@ -1447,16 +1447,10 @@ static void convertEndian(B_UINT8 rwFlag, PUINT puiBuffer, UINT uiByteCount) int rdm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize) { - INT uiRetVal =0; - - uiRetVal = Adapter->interface_rdm(Adapter->pvInterfaceAdapter, + return Adapter->interface_rdm(Adapter->pvInterfaceAdapter, uiAddress, pucBuff, sSize); - - if(uiRetVal < 0) - return uiRetVal; - - return uiRetVal; } + int wrm(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize) { int iRetVal; diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c index d1ca1912a74b..4aa2b71a40eb 100644 --- a/drivers/staging/bcm/PHSModule.c +++ b/drivers/staging/bcm/PHSModule.c @@ -209,7 +209,7 @@ int PHSTransmit(PMINI_ADAPTER Adapter, return STATUS_SUCCESS; } -int PHSRecieve(PMINI_ADAPTER Adapter, +int PHSReceive(PMINI_ADAPTER Adapter, USHORT usVcid, struct sk_buff *packet, UINT *punPacketLen, @@ -223,7 +223,7 @@ int PHSRecieve(PMINI_ADAPTER Adapter, UINT TotalBytesAdded = 0; if(!bHeaderSuppressionEnabled) { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"\nPhs Disabled for incoming packet"); + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"\nPhs Disabled for incoming packet"); return ulPhsStatus; } @@ -238,7 +238,7 @@ int PHSRecieve(PMINI_ADAPTER Adapter, &nTotalsupressedPktHdrBytes, &nStandardPktHdrLen); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"\nSupressed PktHdrLen : 0x%x Restored PktHdrLen : 0x%x", + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"\nSupressed PktHdrLen : 0x%x Restored PktHdrLen : 0x%x", nTotalsupressedPktHdrBytes,nStandardPktHdrLen); if(ulPhsStatus != STATUS_PHS_COMPRESSED) @@ -786,14 +786,14 @@ ULONG PhsDeCompress(IN void* pvContext, if(pDeviceExtension == NULL) { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"Invalid Device Extension\n"); + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"Invalid Device Extension\n"); return ERR_PHS_INVALID_DEVICE_EXETENSION; } - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"Restoring header \n"); + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"Restoring header\n"); phsi = *((unsigned char *)(pvInputBuffer)); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"PHSI To Be Used For restore : %x \n",phsi); + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"PHSI To Be Used For restore : %x\n",phsi); if(phsi == UNCOMPRESSED_PACKET ) { return STATUS_PHS_NOCOMPRESSION; @@ -804,7 +804,7 @@ ULONG PhsDeCompress(IN void* pvContext, uiVcid,&pstServiceFlowEntry); if(nSFIndex == PHS_INVALID_TABLE_INDEX) { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"SFID Match Failed During Lookup\n"); + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"SFID Match Failed During Lookup\n"); return ERR_SF_MATCH_FAIL; } @@ -1417,7 +1417,7 @@ int phs_decompress(unsigned char *in_buf,unsigned char *out_buf, int in_buf_len = *header_size-1; PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); in_buf++; - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"====>\n"); + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"====>\n"); *header_size = 0; if((decomp_phs_rules == NULL )) @@ -1425,7 +1425,7 @@ int phs_decompress(unsigned char *in_buf,unsigned char *out_buf, tmp_memb = decomp_phs_rules; - //BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"\nDECOMP:In phs_decompress PHSI 1 %d",phsi)); + //BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"\nDECOMP:In phs_decompress PHSI 1 %d",phsi)); //*header_size = tmp_memb->u8PHSFLength; phss = tmp_memb->u8PHSS; phsf = tmp_memb->u8PHSF; @@ -1433,7 +1433,7 @@ int phs_decompress(unsigned char *in_buf,unsigned char *out_buf, if(phss > MAX_PHS_LENGTHS) phss = MAX_PHS_LENGTHS; - //BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"\nDECOMP:In phs_decompress PHSI %d phss %d index %d",phsi,phss,index)); + //BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"\nDECOMP:In phs_decompress PHSI %d phss %d index %d",phsi,phss,index)); while((phss > 0) && (size < in_buf_len)) { bit = ((*phsm << i)& SUPPRESS); @@ -1441,13 +1441,13 @@ int phs_decompress(unsigned char *in_buf,unsigned char *out_buf, if(bit == SUPPRESS) { *out_buf = *phsf; - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"\nDECOMP:In phss %d phsf %d ouput %d", + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"\nDECOMP:In phss %d phsf %d ouput %d", phss,*phsf,*out_buf); } else { *out_buf = *in_buf; - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECIEVE,DBG_LVL_ALL,"\nDECOMP:In phss %d input %d ouput %d", + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_RECEIVE,DBG_LVL_ALL,"\nDECOMP:In phss %d input %d ouput %d", phss,*in_buf,*out_buf); in_buf++; size++; diff --git a/drivers/staging/bcm/PHSModule.h b/drivers/staging/bcm/PHSModule.h index 0dd05a7c55d9..c629585d0a8c 100644 --- a/drivers/staging/bcm/PHSModule.h +++ b/drivers/staging/bcm/PHSModule.h @@ -9,7 +9,7 @@ int PHSTransmit(PMINI_ADAPTER Adapter, PUINT PacketLen, UCHAR bEthCSSupport); -int PHSRecieve(PMINI_ADAPTER Adapter, +int PHSReceive(PMINI_ADAPTER Adapter, USHORT usVcid, struct sk_buff *packet, UINT *punPacketLen, diff --git a/drivers/staging/bcm/headers.h b/drivers/staging/bcm/headers.h index 8fe8d2b1f627..947d06325681 100644 --- a/drivers/staging/bcm/headers.h +++ b/drivers/staging/bcm/headers.h @@ -23,7 +23,6 @@ #include <linux/wait.h> #include <linux/proc_fs.h> #include <linux/interrupt.h> -#include <linux/version.h> #include <linux/stddef.h> #include <linux/stat.h> #include <linux/fcntl.h> diff --git a/drivers/staging/bcm/sort.c b/drivers/staging/bcm/sort.c index fc5d07aec3d2..63c966a02546 100644 --- a/drivers/staging/bcm/sort.c +++ b/drivers/staging/bcm/sort.c @@ -1,4 +1,5 @@ #include "headers.h" +#include <linux/sort.h> /* * File Name: sort.c @@ -10,54 +11,42 @@ * Copyright (c) 2007 Beceem Communications Pvt. Ltd */ +static int compare_packet_info(void const *a, void const *b) +{ + PacketInfo const *pa = a; + PacketInfo const *pb = b; + + if (!pa->bValid || !pb->bValid) + return 0; + + return pa->u8TrafficPriority - pb->u8TrafficPriority; +} + VOID SortPackInfo(PMINI_ADAPTER Adapter) { - UINT nIndex1; - UINT nIndex2; - - BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "<======="); - - for(nIndex1 = 0; nIndex1 < NO_OF_QUEUES -2 ; nIndex1++) - { - for(nIndex2 = nIndex1 + 1 ; nIndex2 < NO_OF_QUEUES -1 ; nIndex2++) - { - if(Adapter->PackInfo[nIndex1].bValid && Adapter->PackInfo[nIndex2].bValid) - { - if(Adapter->PackInfo[nIndex2].u8TrafficPriority < - Adapter->PackInfo[nIndex1].u8TrafficPriority) - { - PacketInfo stTemppackInfo = Adapter->PackInfo[nIndex2]; - Adapter->PackInfo[nIndex2] = Adapter->PackInfo[nIndex1]; - Adapter->PackInfo[nIndex1] = stTemppackInfo; - - } - } - } - } + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, + DBG_LVL_ALL, "<======="); + + sort(Adapter->PackInfo, NO_OF_QUEUES, sizeof(PacketInfo), + compare_packet_info, NULL); +} + +static int compare_classifiers(void const *a, void const *b) +{ + S_CLASSIFIER_RULE const *pa = a; + S_CLASSIFIER_RULE const *pb = b; + + if (!pa->bUsed || !pb->bUsed) + return 0; + + return pa->u8ClassifierRulePriority - pb->u8ClassifierRulePriority; } VOID SortClassifiers(PMINI_ADAPTER Adapter) { - UINT nIndex1; - UINT nIndex2; - - BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "<======="); - - for(nIndex1 = 0; nIndex1 < MAX_CLASSIFIERS -1 ; nIndex1++) - { - for(nIndex2 = nIndex1 + 1 ; nIndex2 < MAX_CLASSIFIERS ; nIndex2++) - { - if(Adapter->astClassifierTable[nIndex1].bUsed && Adapter->astClassifierTable[nIndex2].bUsed) - { - if(Adapter->astClassifierTable[nIndex2].u8ClassifierRulePriority < - Adapter->astClassifierTable[nIndex1].u8ClassifierRulePriority) - { - S_CLASSIFIER_RULE stTempClassifierRule = Adapter->astClassifierTable[nIndex2]; - Adapter->astClassifierTable[nIndex2] = Adapter->astClassifierTable[nIndex1]; - Adapter->astClassifierTable[nIndex1] = stTempClassifierRule; - - } - } - } - } + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, + DBG_LVL_ALL, "<======="); + + sort(Adapter->astClassifierTable, MAX_CLASSIFIERS, + sizeof(S_CLASSIFIER_RULE), compare_classifiers, NULL); } |