diff options
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/Makefile | 3 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 18 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/r8192U.h | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 84 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_dm.c | 6 |
8 files changed, 39 insertions, 88 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/Makefile b/drivers/staging/rtl8192u/ieee80211/Makefile index b5d0c2eb045b..9e3f432e5355 100644 --- a/drivers/staging/rtl8192u/ieee80211/Makefile +++ b/drivers/staging/rtl8192u/ieee80211/Makefile @@ -1,7 +1,6 @@ NIC_SELECT = RTL8192U -ccflags-y := -I$(TOPDIR)/drivers/net/wireless -ccflags-y += -O2 +ccflags-y := -O2 ccflags-y += -DJACKSON_NEW_8187 -DJACKSON_NEW_RX ieee80211-rsl-objs := ieee80211_rx.o \ diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 09e9499b7f9d..077ea13eb1e7 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -746,7 +746,7 @@ struct ieee80211_rx_stats { bool bisrxaggrsubframe; bool bPacketBeacon; //cosa add for rssi bool bToSelfBA; //cosa add for rssi - char cck_adc_pwdb[4]; //cosa add for rx path selection + s8 cck_adc_pwdb[4]; //cosa add for rx path selection u16 Seq_Num; }; @@ -1814,7 +1814,7 @@ struct ieee80211_device { u32 wpax_type_notify; //{added by David, 2006.9.26} /* QoS related flag */ - char init_wmmparam_flag; + s8 init_wmmparam_flag; /* set on initialization */ u8 qos_support; diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c index 051c2be842d0..89cbc077a48d 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c @@ -1027,7 +1027,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, ieee, (PTS_COMMON_INFO *) &pRxTS, hdr->addr2, - (u8)Frame_QoSTID((u8 *)(skb->data)), + Frame_QoSTID((u8 *)(skb->data)), RX_DIR, true)) { diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 49db1b75cd05..d7d85b3f19c4 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -284,7 +284,8 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee } } -inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee) +static inline void +softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee) { short single = ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE; @@ -320,7 +321,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *i //dev_kfree_skb_any(skb);//edit by thomas } -inline struct sk_buff *ieee80211_probe_req(struct ieee80211_device *ieee) +static inline struct sk_buff *ieee80211_probe_req(struct ieee80211_device *ieee) { unsigned int len, rate_len; u8 *tag; @@ -640,8 +641,9 @@ void ieee80211_start_scan_syncro(struct ieee80211_device *ieee) } EXPORT_SYMBOL(ieee80211_start_scan_syncro); -inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *beacon, - struct ieee80211_device *ieee, int challengelen) +static inline struct sk_buff * +ieee80211_authentication_req(struct ieee80211_network *beacon, + struct ieee80211_device *ieee, int challengelen) { struct sk_buff *skb; struct ieee80211_authentication *auth; @@ -806,7 +808,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d *(tag++) = 2; put_unaligned_le16(ieee->current_network.atim_window, - (u8 *)tag); + tag); tag+=2; } @@ -978,7 +980,9 @@ static void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest) } -inline struct sk_buff *ieee80211_association_req(struct ieee80211_network *beacon,struct ieee80211_device *ieee) +static inline struct sk_buff * +ieee80211_association_req(struct ieee80211_network *beacon, + struct ieee80211_device *ieee) { struct sk_buff *skb; //unsigned long flags; @@ -3091,7 +3095,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee, return ret; } -inline struct sk_buff *ieee80211_disassociate_skb( +static inline struct sk_buff *ieee80211_disassociate_skb( struct ieee80211_network *beacon, struct ieee80211_device *ieee, u8 asRsn) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 28737ec65186..98fbb6ef484d 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -354,7 +354,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) req = (struct rtl_80211_hdr_3addr *) skb->data; tag = (u8 *)req; - dst = (u8 *)(&req->addr2[0]); + dst = &req->addr2[0]; tag += sizeof(struct rtl_80211_hdr_3addr); pDialogToken = tag + 2; //category+action pBaParamSet = (PBA_PARAM_SET)(tag + 3); //+DialogToken @@ -452,7 +452,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) } rsp = (struct rtl_80211_hdr_3addr *)skb->data; tag = (u8 *)rsp; - dst = (u8 *)(&rsp->addr2[0]); + dst = &rsp->addr2[0]; tag += sizeof(struct rtl_80211_hdr_3addr); pDialogToken = tag + 2; pStatusCode = (u16 *)(tag + 3); @@ -590,7 +590,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb) IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_BA, skb->data, skb->len); delba = (struct rtl_80211_hdr_3addr *)skb->data; - dst = (u8 *)(&delba->addr2[0]); + dst = &delba->addr2[0]; pDelBaParamSet = (PDELBA_PARAM_SET)&delba->payload[2]; if(pDelBaParamSet->field.Initiator == 1) diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 821afc0ddac5..0b7b04ea0910 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -533,7 +533,7 @@ typedef struct _rt_9x_tx_rate_history { u32 ht_mcs[4][16]; } rt_tx_rahis_t, *prt_tx_rahis_t; typedef struct _RT_SMOOTH_DATA_4RF { - char elements[4][100]; /* array to store values */ + s8 elements[4][100]; /* array to store values */ u32 index; /* index to current array to store */ u32 TotalNum; /* num of valid elements */ u32 TotalVal[4]; /* sum of valid elements */ @@ -1031,7 +1031,7 @@ typedef struct r8192_priv { s8 cck_present_attentuation; u8 cck_present_attentuation_20Mdefault; u8 cck_present_attentuation_40Mdefault; - char cck_present_attentuation_difference; + s8 cck_present_attentuation_difference; bool btxpower_tracking; bool bcck_in_ch14; bool btxpowerdata_readfromEEPORM; diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index dd0970facdf5..457eeb5f5239 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -114,9 +114,9 @@ static int channels = 0x3fff; -module_param(ifname, charp, S_IRUGO | S_IWUSR); -module_param(hwwep, int, S_IRUGO | S_IWUSR); -module_param(channels, int, S_IRUGO | S_IWUSR); +module_param(ifname, charp, 0644); +module_param(hwwep, int, 0644); +module_param(channels, int, 0644); MODULE_PARM_DESC(ifname, " Net interface name, wlan%d=default"); MODULE_PARM_DESC(hwwep, " Try to use hardware security support. "); @@ -922,47 +922,6 @@ void rtl8192_rtx_disable(struct net_device *dev) skb_queue_purge(&priv->skb_queue); } -inline u16 ieeerate2rtlrate(int rate) -{ - switch (rate) { - case 10: - return 0; - case 20: - return 1; - case 55: - return 2; - case 110: - return 3; - case 60: - return 4; - case 90: - return 5; - case 120: - return 6; - case 180: - return 7; - case 240: - return 8; - case 360: - return 9; - case 480: - return 10; - case 540: - return 11; - default: - return 3; - } -} - -static u16 rtl_rate[] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540}; -inline u16 rtl8192_rate2rate(short rate) -{ - if (rate > 11) - return 0; - return rtl_rate[rate]; -} - - /* The prototype of rx_isr has changed since one version of Linux Kernel */ static void rtl8192_rx_isr(struct urb *urb) { @@ -1319,14 +1278,6 @@ void rtl819xusb_beacon_tx(struct net_device *dev, u16 tx_rate) } -inline u8 rtl8192_IsWirelessBMode(u16 rate) -{ - if (((rate <= 110) && (rate != 60) && (rate != 90)) || (rate == 220)) - return 1; - else - return 0; -} - short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb) { struct r8192_priv *priv = ieee80211_priv(dev); @@ -1702,11 +1653,8 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) } if (bSend0Byte) { tx_urb_zero = usb_alloc_urb(0, GFP_ATOMIC); - if (!tx_urb_zero) { - RT_TRACE(COMP_ERR, - "can't alloc urb for zero byte\n"); + if (!tx_urb_zero) return -ENOMEM; - } usb_fill_bulk_urb(tx_urb_zero, udev, usb_sndbulkpipe(udev, idx_pipe), &zero, 0, tx_zero_isr, dev); @@ -4209,7 +4157,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, * * Return: 0-100 percentage *---------------------------------------------------------------------------*/ -static u8 rtl819x_query_rxpwrpercentage(char antpower) +static u8 rtl819x_query_rxpwrpercentage(s8 antpower) { if ((antpower <= -100) || (antpower >= 20)) return 0; @@ -4220,9 +4168,9 @@ static u8 rtl819x_query_rxpwrpercentage(char antpower) } /* QueryRxPwrPercentage */ -static u8 rtl819x_evm_dbtopercentage(char value) +static u8 rtl819x_evm_dbtopercentage(s8 value) { - char ret_val; + s8 ret_val; ret_val = value; @@ -4297,8 +4245,8 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv, phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc; u8 *prxpkt; u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg; - char rx_pwr[4], rx_pwr_all = 0; - char rx_snrX, rx_evmX; + s8 rx_pwr[4], rx_pwr_all = 0; + s8 rx_snrX, rx_evmX; u8 evm, pwdb_all; u32 RSSI, total_rssi = 0; u8 is_cck_rate = 0; @@ -4423,7 +4371,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv, /* Get Rx snr value in DB */ tmp_rxsnr = pofdm_buf->rxsnr_X[i]; - rx_snrX = (char)(tmp_rxsnr); + rx_snrX = (s8)(tmp_rxsnr); rx_snrX /= 2; priv->stats.rxSNRdB[i] = (long)rx_snrX; @@ -4457,7 +4405,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv, for (i = 0; i < max_spatial_stream; i++) { tmp_rxevm = pofdm_buf->rxevm_X[i]; - rx_evmX = (char)(tmp_rxevm); + rx_evmX = (s8)(tmp_rxevm); /* Do not use shift operation like "rx_evmX >>= 1" * because the compiler of free build environment will @@ -4475,10 +4423,10 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv, */ pstats->SignalQuality = precord_stats->SignalQuality = - (u8)(evm & 0xff); + evm & 0xff; pstats->RxMIMOSignalQuality[i] = precord_stats->RxMIMOSignalQuality[i] = - (u8)(evm & 0xff); + evm & 0xff; } @@ -5013,8 +4961,7 @@ static int rtl8192_usb_probe(struct usb_interface *intf, dev->netdev_ops = &rtl8192_netdev_ops; - dev->wireless_handlers = - (struct iw_handler_def *)&r8192_wx_handlers_def; + dev->wireless_handlers = &r8192_wx_handlers_def; dev->type = ARPHRD_ETHER; @@ -5222,7 +5169,8 @@ void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType, } else { /* Key Material */ if (KeyContent) { - write_nic_dword(dev, WCAMI, (u32)(*(KeyContent + i - 2))); + write_nic_dword(dev, WCAMI, + *(KeyContent + i - 2)); write_nic_dword(dev, RWCAM, TargetCommand); } } diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c index 1e0e53c9c314..9209aad0515e 100644 --- a/drivers/staging/rtl8192u/r8192U_dm.c +++ b/drivers/staging/rtl8192u/r8192U_dm.c @@ -150,7 +150,7 @@ void deinit_hal_dm(struct net_device *dev) #ifdef USB_RX_AGGREGATION_SUPPORT void dm_CheckRxAggregation(struct net_device *dev) { - struct r8192_priv *priv = ieee80211_priv((struct net_device *)dev); + struct r8192_priv *priv = ieee80211_priv(dev); PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo; static unsigned long lastTxOkCnt; static unsigned long lastRxOkCnt; @@ -2346,7 +2346,7 @@ dm_CheckEdcaTurbo_EXIT: static void dm_init_ctstoself(struct net_device *dev) { - struct r8192_priv *priv = ieee80211_priv((struct net_device *)dev); + struct r8192_priv *priv = ieee80211_priv(dev); priv->ieee80211->bCTSToSelfEnable = true; priv->ieee80211->CTSToSelfTH = CTSToSelfTHVal; @@ -2354,7 +2354,7 @@ static void dm_init_ctstoself(struct net_device *dev) static void dm_ctstoself(struct net_device *dev) { - struct r8192_priv *priv = ieee80211_priv((struct net_device *)dev); + struct r8192_priv *priv = ieee80211_priv(dev); PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo; static unsigned long lastTxOkCnt; static unsigned long lastRxOkCnt; |