1 From 87e4a5405f087427fbf8b437d2796283dce2b38f Mon Sep 17 00:00:00 2001
2 From: Young Xiao <YangX92@hotmail.com>
3 Date: Tue, 27 Nov 2018 09:12:20 +0000
4 Subject: Revert commit ef9209b642f "staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c"
6 From: Young Xiao <YangX92@hotmail.com>
8 commit 87e4a5405f087427fbf8b437d2796283dce2b38f upstream.
10 pstapriv->max_num_sta is always <= NUM_STA, since max_num_sta is either
11 set in _rtw_init_sta_priv() or rtw_set_beacon().
13 Fixes: ef9209b642f1 ("staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c")
14 Signed-off-by: Young Xiao <YangX92@hotmail.com>
15 Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
16 Cc: stable <stable@vger.kernel.org>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
23 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
24 +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
25 @@ -1566,7 +1566,7 @@ unsigned int OnAssocReq(struct adapter *
27 DBG_871X(" old AID %d\n", pstat->aid);
29 - for (pstat->aid = 1; pstat->aid < NUM_STA; pstat->aid++)
30 + for (pstat->aid = 1; pstat->aid <= NUM_STA; pstat->aid++)
31 if (pstapriv->sta_aid[pstat->aid - 1] == NULL)