Skip to content

Commit

Permalink
staging: rtl8723bs: core: remove set but not used 'listen_interval'
Browse files Browse the repository at this point in the history
Fix the following gcc warning:

drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1173:18: warning: variable
‘listen_interval’ set but not used [-Wunused-but-set-variable]
  u16 capab_info, listen_interval;
                  ^~~~~~~~~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20200427032342.27211-6-yanaijie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jason Yan authored and Greg Kroah-Hartman committed Apr 28, 2020
1 parent 3a0514a commit 47548aa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram

unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
{
u16 capab_info, listen_interval;
u16 capab_info;
struct rtw_ieee802_11_elems elems;
struct sta_info *pstat;
unsigned char reassoc, *p, *pos, *wpa_ie;
Expand Down Expand Up @@ -1215,8 +1215,6 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)

capab_info = RTW_GET_LE16(pframe + WLAN_HDR_A3_LEN);
/* capab_info = le16_to_cpu(*(unsigned short *)(pframe + WLAN_HDR_A3_LEN)); */
/* listen_interval = le16_to_cpu(*(unsigned short *)(pframe + WLAN_HDR_A3_LEN+2)); */
listen_interval = RTW_GET_LE16(pframe + WLAN_HDR_A3_LEN+2);

left = pkt_len - (sizeof(struct ieee80211_hdr_3addr) + ie_offset);
pos = pframe + (sizeof(struct ieee80211_hdr_3addr) + ie_offset);
Expand Down

0 comments on commit 47548aa

Please sign in to comment.