Skip to content

Commit

Permalink
Revert commit ef9209b "staging: rtl8723bs: Fix indenting errors and a…
Browse files Browse the repository at this point in the history
…n off-by-one mistake in core/rtw_mlme_ext.c"

pstapriv->max_num_sta is always <= NUM_STA, since max_num_sta is either
set in _rtw_init_sta_priv() or rtw_set_beacon().

Fixes: ef9209b ("staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c")
Signed-off-by: Young Xiao <YangX92@hotmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Young Xiao authored and Greg Kroah-Hartman committed Dec 5, 2018
1 parent 300cd66 commit 87e4a54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
if (pstat->aid > 0) {
DBG_871X(" old AID %d\n", pstat->aid);
} else {
for (pstat->aid = 1; pstat->aid < NUM_STA; pstat->aid++)
for (pstat->aid = 1; pstat->aid <= NUM_STA; pstat->aid++)
if (pstapriv->sta_aid[pstat->aid - 1] == NULL)
break;

Expand Down

0 comments on commit 87e4a54

Please sign in to comment.