From f6150b40e9a4426aaa819ca0736f8db8af3c4a75 Mon Sep 17 00:00:00 2001 From: Xenia Ragiadakou Date: Sat, 21 Sep 2013 23:42:24 +0300 Subject: [PATCH] staging: rtl8192u: remove cmpk_message_handle_tx() The function cmpk_message_handle_tx() is called only in r8192U_dm.c in two places. The first call resides outside an #ifdef RTL8192U guard, and since RTL8192U is defined this call can be removed. At the other site this function is called, there is no check on its return value. Since cmpk_message_handle_tx() does not do anything else other than returning true, it can be safely removed. Signed-off-by: Xenia Ragiadakou Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192u/r8192U_dm.c | 8 ------- drivers/staging/rtl8192u/r819xU_cmdpkt.c | 27 ------------------------ drivers/staging/rtl8192u/r819xU_cmdpkt.h | 2 -- 3 files changed, 37 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c index a6e4c37d9c78..527513114822 100644 --- a/drivers/staging/rtl8192u/r8192U_dm.c +++ b/drivers/staging/rtl8192u/r8192U_dm.c @@ -620,16 +620,11 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev) tx_cmd.Op = TXCMD_SET_TX_PWR_TRACKING; tx_cmd.Length = 4; tx_cmd.Value = Value; -#ifdef RTL8192U rtStatus = SendTxCommandPacket(dev, &tx_cmd, 12); if (rtStatus == RT_STATUS_FAILURE) { RT_TRACE(COMP_POWER_TRACKING, "Set configuration with tx cmd queue fail!\n"); } -#else - cmpk_message_handle_tx(dev, (u8 *)&tx_cmd, - DESC_PACKET_TYPE_INIT, sizeof(DCMD_TXCMD_T)); -#endif mdelay(1); //DbgPrint("hi, vivi, strange\n"); for(i = 0;i <= 30; i++) @@ -3885,9 +3880,6 @@ static void dm_send_rssi_tofw(struct net_device *dev) tx_cmd.Op = TXCMD_SET_RX_RSSI; tx_cmd.Length = 4; tx_cmd.Value = priv->undecorated_smoothed_pwdb; - - cmpk_message_handle_tx(dev, (u8 *)&tx_cmd, - DESC_PACKET_TYPE_INIT, sizeof(DCMD_TXCMD_T)); } /*---------------------------Define function prototype------------------------*/ diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c index f7b9d20bec62..e8b479a5ea21 100644 --- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c +++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c @@ -59,33 +59,6 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen) return rtStatus; } -/*----------------------------------------------------------------------------- - * Function: cmpk_message_handle_tx() - * - * Overview: Driver internal module can call the API to send message to - * firmware side. For example, you can send a debug command packet. - * Or you can send a request for FW to modify RLX4181 LBUS HW bank. - * Otherwise, you can change MAC/PHT/RF register by firmware at - * run time. We do not support message more than one segment now. - * - * Input: NONE - * - * Output: NONE - * - * Return: NONE - * - * Revised History: - * When Who Remark - * 05/06/2008 amy porting from windows code. - * - *---------------------------------------------------------------------------*/ -extern rt_status cmpk_message_handle_tx(struct net_device *dev, - u8 *codevirtualaddress, - u32 packettype, u32 buffer_len) -{ - return true; -} - /*----------------------------------------------------------------------------- * Function: cmpk_counttxstatistic() * diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h index ebe403270a5b..c79878af7021 100644 --- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h +++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h @@ -192,8 +192,6 @@ typedef enum _rt_status{ RT_STATUS_RESOURCE }rt_status,*prt_status; -extern rt_status cmpk_message_handle_tx(struct net_device *dev, u8 *codevirtualaddress, u32 packettype, u32 buffer_len); - extern u32 cmpk_message_handle_rx(struct net_device *dev, struct ieee80211_rx_stats *pstats); extern rt_status SendTxCommandPacket( struct net_device *dev, void *pData, u32 DataLen); -- 2.20.1