Commit ec0dc6be authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

staging: rtl8192e: Fix sparse (non-endian) messages - Part I

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ac50ddaa
......@@ -20,7 +20,7 @@
#include "rtl819x_BA.h"
#include "rtl_core.h"
void ActivateBAEntry(struct rtllib_device *ieee, struct ba_record *pBA,
static void ActivateBAEntry(struct rtllib_device *ieee, struct ba_record *pBA,
u16 Time)
{
pBA->bValid = true;
......@@ -28,13 +28,13 @@ void ActivateBAEntry(struct rtllib_device *ieee, struct ba_record *pBA,
mod_timer(&pBA->Timer, jiffies + MSECS(Time));
}
void DeActivateBAEntry(struct rtllib_device *ieee, struct ba_record *pBA)
static void DeActivateBAEntry(struct rtllib_device *ieee, struct ba_record *pBA)
{
pBA->bValid = false;
del_timer_sync(&pBA->Timer);
}
u8 TxTsDeleteBA(struct rtllib_device *ieee, struct tx_ts_record *pTxTs)
static u8 TxTsDeleteBA(struct rtllib_device *ieee, struct tx_ts_record *pTxTs)
{
struct ba_record *pAdmittedBa = &pTxTs->TxAdmittedBARecord;
struct ba_record *pPendingBa = &pTxTs->TxPendingBARecord;
......@@ -52,7 +52,7 @@ u8 TxTsDeleteBA(struct rtllib_device *ieee, struct tx_ts_record *pTxTs)
return bSendDELBA;
}
u8 RxTsDeleteBA(struct rtllib_device *ieee, struct rx_ts_record *pRxTs)
static u8 RxTsDeleteBA(struct rtllib_device *ieee, struct rx_ts_record *pRxTs)
{
struct ba_record *pBa = &pRxTs->RxAdmittedBARecord;
u8 bSendDELBA = false;
......@@ -193,7 +193,7 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
return skb;
}
void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst,
static void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst,
struct ba_record *pBA)
{
struct sk_buff *skb = NULL;
......@@ -209,7 +209,7 @@ void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst,
return;
}
void rtllib_send_ADDBARsp(struct rtllib_device *ieee, u8 *dst,
static void rtllib_send_ADDBARsp(struct rtllib_device *ieee, u8 *dst,
struct ba_record *pBA, u16 StatusCode)
{
struct sk_buff *skb = NULL;
......@@ -222,7 +222,7 @@ void rtllib_send_ADDBARsp(struct rtllib_device *ieee, u8 *dst,
return;
}
void rtllib_send_DELBA(struct rtllib_device *ieee, u8 *dst,
static void rtllib_send_DELBA(struct rtllib_device *ieee, u8 *dst,
struct ba_record *pBA, enum tr_select TxRxSelect,
u16 ReasonCode)
{
......
......@@ -214,7 +214,7 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)
return;
}
bool IsHTHalfNmode40Bandwidth(struct rtllib_device *ieee)
static bool IsHTHalfNmode40Bandwidth(struct rtllib_device *ieee)
{
bool retValue = false;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
......@@ -233,7 +233,7 @@ bool IsHTHalfNmode40Bandwidth(struct rtllib_device *ieee)
return retValue;
}
bool IsHTHalfNmodeSGI(struct rtllib_device *ieee, bool is40MHz)
static bool IsHTHalfNmodeSGI(struct rtllib_device *ieee, bool is40MHz)
{
bool retValue = false;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
......@@ -336,7 +336,7 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
return retValue;
}
void HTIOTPeerDetermine(struct rtllib_device *ieee)
static void HTIOTPeerDetermine(struct rtllib_device *ieee)
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
struct rtllib_network *net = &ieee->current_network;
......@@ -378,39 +378,30 @@ void HTIOTPeerDetermine(struct rtllib_device *ieee)
pHTInfo->IOTPeer);
}
u8 HTIOTActIsDisableMCS14(struct rtllib_device *ieee, u8 *PeerMacAddr)
static u8 HTIOTActIsDisableMCS14(struct rtllib_device *ieee, u8 *PeerMacAddr)
{
return 0;
}
bool HTIOTActIsDisableMCS15(struct rtllib_device *ieee)
static bool HTIOTActIsDisableMCS15(struct rtllib_device *ieee)
{
bool retValue = false;
return retValue;
}
bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device *ieee)
static bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device *ieee)
{
return false;
}
u8 HTIOTActIsDisableEDCATurbo(struct rtllib_device *ieee, u8 *PeerMacAddr)
static u8 HTIOTActIsDisableEDCATurbo(struct rtllib_device *ieee, u8 *PeerMacAddr)
{
return false;
}
bool HTIOTActIsEnableBETxOPLimit(struct rtllib_device *ieee)
{
bool retValue = false;
return retValue;
}
u8 HTIOTActIsMgntUseCCK6M(struct rtllib_device *ieee,
static u8 HTIOTActIsMgntUseCCK6M(struct rtllib_device *ieee,
struct rtllib_network *network)
{
u8 retValue = 0;
......@@ -422,60 +413,7 @@ u8 HTIOTActIsMgntUseCCK6M(struct rtllib_device *ieee,
return retValue;
}
u8 HTIOTActWAIOTBroadcom(struct rtllib_device *ieee)
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8 retValue = false;
u8 boundary = 59;
pHTInfo->bWAIotBroadcom = false;
if (ieee->pHTInfo->IOTPeer == HT_IOT_PEER_BROADCOM) {
if (ieee->current_network.bssht.bdBandWidth ==
HT_CHANNEL_WIDTH_20_40) {
if (!(pHTInfo->bRegBW40MHz)) {
if (ieee->current_network.mode !=
WIRELESS_MODE_B) {
pHTInfo->bWAIotBroadcom = true;
if (ieee->b_customer_lenovo_id)
boundary = 30;
if (ieee->current_network.RSSI >=
boundary)
retValue = true;
}
}
}
}
return retValue;
}
u8 HTIOTActIsForcedCTS2Self(struct rtllib_device *ieee,
struct rtllib_network *network)
{
u8 retValue = 0;
if (ieee->pHTInfo->IOTPeer == HT_IOT_PEER_MARVELL)
retValue = 1;
return retValue;
}
u8 HTIOTActIsForcedRTSCTS(struct rtllib_device *ieee,
struct rtllib_network *network)
{
u8 retValue = 0;
return retValue;
}
u8 HTIOTActIsForcedAMSDU8K(struct rtllib_device *ieee,
struct rtllib_network *network)
{
u8 retValue = 0;
return retValue;
}
u8 HTIOTActIsCCDFsync(struct rtllib_device *ieee)
static u8 HTIOTActIsCCDFsync(struct rtllib_device *ieee)
{
u8 retValue = 0;
......@@ -484,42 +422,7 @@ u8 HTIOTActIsCCDFsync(struct rtllib_device *ieee)
return retValue;
}
u8 HTIOCActRejcectADDBARequest(struct rtllib_network *network)
{
u8 retValue = 0;
return retValue;
}
u8 HTIOTActIsEDCABiasRx(struct rtllib_device *ieee,
struct rtllib_network *network)
{
u8 retValue = 0;
return retValue;
}
u8 HTIOTActDisableShortGI(struct rtllib_device *ieee,
struct rtllib_network *network)
{
u8 retValue = 0;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
if (pHTInfo->IOTPeer == HT_IOT_PEER_RALINK)
retValue = 1;
return retValue;
}
u8 HTIOTActDisableHighPower(struct rtllib_device *ieee,
struct rtllib_network *network)
{
u8 retValue = 0;
return retValue;
}
void HTIOTActDetermineRaFunc(struct rtllib_device *ieee, bool bPeerRx2ss)
static void HTIOTActDetermineRaFunc(struct rtllib_device *ieee, bool bPeerRx2ss)
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
pHTInfo->IOTRaFunc &= HT_IOT_RAFUNC_DISABLE_ALL;
......@@ -532,52 +435,6 @@ void HTIOTActDetermineRaFunc(struct rtllib_device *ieee, bool bPeerRx2ss)
}
u8 HTIOTActIsDisableTx40MHz(struct rtllib_device *ieee,
struct rtllib_network *network)
{
u8 retValue = 0;
return retValue;
}
u8 HTIOTActIsTxNoAggregation(struct rtllib_device *ieee,
struct rtllib_network *network)
{
u8 retValue = 0;
return retValue;
}
u8 HTIOTActIsDisableTx2SS(struct rtllib_device *ieee,
struct rtllib_network *network)
{
u8 retValue = 0;
return retValue;
}
bool HTIOCActIsDisableCckRate(struct rtllib_device *ieee,
struct rtllib_network *network)
{
bool retValue = false;
return retValue;
}
bool HTIOCActAllowPeerAggOnePacket(struct rtllib_device *ieee,
struct rtllib_network *network)
{
bool retValue = false;
return retValue;
}
bool HTIOTActIsNullDataPowerSaving(struct rtllib_device *ieee,
struct rtllib_network *network)
{
bool retValue = false;
return retValue;
}
void HTResetIOTSetting(struct rt_hi_throughput *pHTInfo)
{
pHTInfo->IOTAction = 0;
......@@ -735,7 +592,7 @@ void HTConstructRT2RTAggElement(struct rtllib_device *ieee, u8 *posRT2RTAgg,
return;
}
u8 HT_PickMCSRate(struct rtllib_device *ieee, u8 *pOperateMCS)
static u8 HT_PickMCSRate(struct rtllib_device *ieee, u8 *pOperateMCS)
{
u8 i;
if (pOperateMCS == NULL) {
......@@ -1148,7 +1005,7 @@ u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame)
return false;
}
void HTSetConnectBwModeCallback(struct rtllib_device *ieee)
static void HTSetConnectBwModeCallback(struct rtllib_device *ieee)
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
......
......@@ -20,15 +20,15 @@
#include <linux/etherdevice.h>
#include "rtl819x_TS.h"
void TsSetupTimeOut(unsigned long data)
static void TsSetupTimeOut(unsigned long data)
{
}
void TsInactTimeout(unsigned long data)
static void TsInactTimeout(unsigned long data)
{
}
void RxPktPendingTimeout(unsigned long data)
static void RxPktPendingTimeout(unsigned long data)
{
struct rx_ts_record *pRxTs = (struct rx_ts_record *)data;
struct rtllib_device *ieee = container_of(pRxTs, struct rtllib_device,
......@@ -97,7 +97,7 @@ void RxPktPendingTimeout(unsigned long data)
spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
}
void TsAddBaProcess(unsigned long data)
static void TsAddBaProcess(unsigned long data)
{
struct tx_ts_record *pTxTs = (struct tx_ts_record *)data;
u8 num = pTxTs->num;
......@@ -109,7 +109,7 @@ void TsAddBaProcess(unsigned long data)
"started!!\n");
}
void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo)
static void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo)
{
memset(pTsCommonInfo->Addr, 0, 6);
memset(&pTsCommonInfo->TSpec, 0, sizeof(union tspec_body));
......@@ -118,7 +118,7 @@ void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo)
pTsCommonInfo->TClasNum = 0;
}
void ResetTxTsEntry(struct tx_ts_record *pTS)
static void ResetTxTsEntry(struct tx_ts_record *pTS)
{
ResetTsCommonInfo(&pTS->TsCommonInfo);
pTS->TxCurSeq = 0;
......@@ -130,7 +130,7 @@ void ResetTxTsEntry(struct tx_ts_record *pTS)
ResetBaEntry(&pTS->TxPendingBARecord);
}
void ResetRxTsEntry(struct rx_ts_record *pTS)
static void ResetRxTsEntry(struct rx_ts_record *pTS)
{
ResetTsCommonInfo(&pTS->TsCommonInfo);
pTS->RxIndicateSeq = 0xffff;
......@@ -215,8 +215,8 @@ void TSInitialize(struct rtllib_device *ieee)
}
void AdmitTS(struct rtllib_device *ieee, struct ts_common_info *pTsCommonInfo,
u32 InactTime)
static void AdmitTS(struct rtllib_device *ieee,
struct ts_common_info *pTsCommonInfo, u32 InactTime)
{
del_timer_sync(&pTsCommonInfo->SetupTimer);
del_timer_sync(&pTsCommonInfo->InactTimer);
......@@ -226,11 +226,12 @@ void AdmitTS(struct rtllib_device *ieee, struct ts_common_info *pTsCommonInfo,
MSECS(InactTime));
}
struct ts_common_info *SearchAdmitTRStream(struct rtllib_device *ieee, u8 *Addr,
u8 TID, enum tr_select TxRxSelect)
static struct ts_common_info *SearchAdmitTRStream(struct rtllib_device *ieee,
u8 *Addr, u8 TID,
enum tr_select TxRxSelect)
{
u8 dir;
bool search_dir[4] = {0, 0, 0, 0};
bool search_dir[4] = {0};
struct list_head *psearch_list;
struct ts_common_info *pRet = NULL;
if (ieee->iw_mode == IW_MODE_MASTER) {
......@@ -283,7 +284,7 @@ struct ts_common_info *SearchAdmitTRStream(struct rtllib_device *ieee, u8 *Addr,
return NULL;
}
void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,
static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,
union tspec_body *pTSPEC, union qos_tclas *pTCLAS,
u8 TCLAS_Num, u8 TCLAS_Proc)
{
......@@ -418,7 +419,7 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
}
}
void RemoveTsEntry(struct rtllib_device *ieee, struct ts_common_info *pTs,
static void RemoveTsEntry(struct rtllib_device *ieee, struct ts_common_info *pTs,
enum tr_select TxRxSelect)
{
del_timer_sync(&pTs->SetupTimer);
......
......@@ -53,7 +53,7 @@ struct rtllib_ccmp_data {
u8 rx_b0[AES_BLOCK_LEN], rx_b[AES_BLOCK_LEN], rx_a[AES_BLOCK_LEN];
};
void rtllib_ccmp_aes_encrypt(struct crypto_tfm *tfm,
static void rtllib_ccmp_aes_encrypt(struct crypto_tfm *tfm,
const u8 pt[16], u8 ct[16])
{
crypto_cipher_encrypt_one((void *)tfm, ct, pt);
......
......@@ -68,7 +68,7 @@ static inline int rtllib_networks_allocate(struct rtllib_device *ieee)
if (ieee->networks)
return 0;
ieee->networks = kmalloc(
ieee->networks = kzalloc(
MAX_NETWORK_COUNT * sizeof(struct rtllib_network),
GFP_KERNEL);
if (!ieee->networks) {
......@@ -77,9 +77,6 @@ static inline int rtllib_networks_allocate(struct rtllib_device *ieee)
return -ENOMEM;
}
memset(ieee->networks, 0,
MAX_NETWORK_COUNT * sizeof(struct rtllib_network));
return 0;
}
......@@ -223,7 +220,7 @@ u32 rtllib_debug_level;
static int debug = \
RTLLIB_DL_ERR
;
struct proc_dir_entry *rtllib_proc;
static struct proc_dir_entry *rtllib_proc;
static int show_debug_level(char *page, char **start, off_t offset,
int count, int *eof, void *data)
......@@ -231,7 +228,7 @@ static int show_debug_level(char *page, char **start, off_t offset,
return snprintf(page, count, "0x%08X\n", rtllib_debug_level);
}
static int store_debug_level(struct file *file, const char *buffer,
static int store_debug_level(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
char buf[] = "0x00000000";
......
This diff is collapsed.
......@@ -220,8 +220,8 @@ void rtllib_txb_free(struct rtllib_txb *txb)
kfree(txb);
}
struct rtllib_txb *rtllib_alloc_txb(int nr_frags, int txb_size,
int gfp_mask)
static struct rtllib_txb *rtllib_alloc_txb(int nr_frags, int txb_size,
gfp_t gfp_mask)
{
struct rtllib_txb *txb;
int i;
......@@ -251,8 +251,7 @@ struct rtllib_txb *rtllib_alloc_txb(int nr_frags, int txb_size,
return txb;
}
int
rtllib_classify(struct sk_buff *skb, u8 bIsAmsdu)
static int rtllib_classify(struct sk_buff *skb, u8 bIsAmsdu)
{
struct ethhdr *eth;
struct iphdr *ip;
......@@ -283,7 +282,8 @@ rtllib_classify(struct sk_buff *skb, u8 bIsAmsdu)
}
}
void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, struct sk_buff *skb,
static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
struct sk_buff *skb,
struct cb_desc *tcb_desc)
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
......@@ -358,7 +358,7 @@ void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, struct sk_buff *skb,
return;
}
extern void rtllib_qurey_ShortPreambleMode(struct rtllib_device *ieee,
static void rtllib_qurey_ShortPreambleMode(struct rtllib_device *ieee,
struct cb_desc *tcb_desc)
{
tcb_desc->bUseShortPreamble = false;
......@@ -370,7 +370,7 @@ extern void rtllib_qurey_ShortPreambleMode(struct rtllib_device *ieee,
return;
}
extern void rtllib_query_HTCapShortGI(struct rtllib_device *ieee,
static void rtllib_query_HTCapShortGI(struct rtllib_device *ieee,
struct cb_desc *tcb_desc)
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
......@@ -391,7 +391,7 @@ extern void rtllib_query_HTCapShortGI(struct rtllib_device *ieee,
tcb_desc->bUseShortGI = true;
}
void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
struct cb_desc *tcb_desc)
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
......@@ -412,8 +412,9 @@ void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
return;
}
void rtllib_query_protectionmode(struct rtllib_device *ieee,
struct cb_desc *tcb_desc, struct sk_buff *skb)
static void rtllib_query_protectionmode(struct rtllib_device *ieee,
struct cb_desc *tcb_desc,
struct sk_buff *skb)
{
tcb_desc->bRTSSTBC = false;
tcb_desc->bRTSUseShortGI = false;
......@@ -494,7 +495,7 @@ void rtllib_query_protectionmode(struct rtllib_device *ieee,
}
void rtllib_txrate_selectmode(struct rtllib_device *ieee,
static void rtllib_txrate_selectmode(struct rtllib_device *ieee,
struct cb_desc *tcb_desc)
{
if (ieee->bTxDisableRateFallBack)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment