From e29d3ebcda3ebc0193fb98c53c6c3ca6fa2fc030 Mon Sep 17 00:00:00 2001 From: Sudip Mukherjee Date: Mon, 27 Oct 2014 17:42:25 +0530 Subject: staging: rtl8712: remove unused variables unused variables are removed. These variables were only assigned some values and after that they were never being used. So they are safe to be removed , and it has been build tested. I left a call to r8712_read32(padapter, TCR) and r8712_read8(padapter, SDIO_HCPWM) . r8712_read32() and r8712_read8() is ultimately calling usb_read32() and usb_read8() respectively. and they are again calling r8712_usbctrl_vendorreq(). this r8712_usbctrl_vendorreq() is communicating through the usb bus and is sending and receiving the control msg. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'drivers/staging/rtl8712/rtl871x_ioctl_linux.c') diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c index b4ffc0e3..73b7d86 100644 --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c @@ -170,7 +170,7 @@ static inline char *translate_scan(struct _adapter *padapter, s8 *p; u32 i = 0, ht_ielen = 0; u16 cap, ht_cap = false, mcs_rate; - u8 rssi, bw_40MHz = 0, short_GI = 0; + u8 rssi; if ((pnetwork->network.Configuration.DSConfig < 1) || (pnetwork->network.Configuration.DSConfig > 14)) { @@ -197,10 +197,6 @@ static inline char *translate_scan(struct _adapter *padapter, ht_cap = true; pht_capie = (struct ieee80211_ht_cap *)(p + 2); memcpy(&mcs_rate , pht_capie->supp_mcs_set, 2); - bw_40MHz = (pht_capie->cap_info&IEEE80211_HT_CAP_SUP_WIDTH) - ? 1 : 0; - short_GI = (pht_capie->cap_info&(IEEE80211_HT_CAP_SGI_20 | - IEEE80211_HT_CAP_SGI_40)) ? 1 : 0; } /* Add the protocol name */ iwe.cmd = SIOCGIWNAME; @@ -287,12 +283,10 @@ static inline char *translate_scan(struct _adapter *padapter, u8 wpa_ie[255], rsn_ie[255]; u16 wpa_len = 0, rsn_len = 0; int n; - sint out_len = 0; - out_len = r8712_get_sec_ie(pnetwork->network.IEs, - pnetwork->network. - IELength, rsn_ie, &rsn_len, - wpa_ie, &wpa_len); + r8712_get_sec_ie(pnetwork->network.IEs, + pnetwork->network.IELength, rsn_ie, &rsn_len, + wpa_ie, &wpa_len); if (wpa_len > 0) { memset(buf, 0, MAX_WPA_IE_LEN); n = sprintf(buf, "wpa_ie="); @@ -512,7 +506,7 @@ exit: static int r871x_set_wpa_ie(struct _adapter *padapter, char *pie, unsigned short ielen) { - u8 *buf = NULL, *pos = NULL; + u8 *buf = NULL; int group_cipher = 0, pairwise_cipher = 0; int ret = 0; @@ -522,7 +516,6 @@ static int r871x_set_wpa_ie(struct _adapter *padapter, char *pie, buf = kmemdup(pie, ielen, GFP_ATOMIC); if (buf == NULL) return -ENOMEM; - pos = buf; if (ielen < RSN_HEADER_LEN) { ret = -EINVAL; goto exit; @@ -1133,13 +1126,11 @@ static int r871x_wx_set_mlme(struct net_device *dev, union iwreq_data *wrqu, char *extra) { int ret = 0; - u16 reason; struct _adapter *padapter = (struct _adapter *)netdev_priv(dev); struct iw_mlme *mlme = (struct iw_mlme *) extra; if (mlme == NULL) return -1; - reason = cpu_to_le16(mlme->reason_code); switch (mlme->cmd) { case IW_MLME_DEAUTH: if (!r8712_set_802_11_disassociate(padapter)) -- cgit v1.1