mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
staging: r8188eu: remove rtw_acl_add_sta()
Function rtw_acl_add_sta() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210919153659.20826-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
08fd549c22
commit
398fd0f396
2 changed files with 0 additions and 66 deletions
|
@ -995,71 +995,6 @@ void rtw_set_macaddr_acl(struct adapter *padapter, int mode)
|
|||
pacl_list->mode = mode;
|
||||
}
|
||||
|
||||
int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
||||
{
|
||||
struct list_head *plist, *phead;
|
||||
u8 added = false;
|
||||
int i, ret = 0;
|
||||
struct rtw_wlan_acl_node *paclnode;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||
struct __queue *pacl_node_q = &pacl_list->acl_node_q;
|
||||
|
||||
DBG_88E("%s(acl_num =%d) =%pM\n", __func__, pacl_list->num, (addr));
|
||||
|
||||
if ((NUM_ACL - 1) < pacl_list->num)
|
||||
return -1;
|
||||
|
||||
spin_lock_bh(&pacl_node_q->lock);
|
||||
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = phead->next;
|
||||
|
||||
while (phead != plist) {
|
||||
paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
|
||||
plist = plist->next;
|
||||
|
||||
if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
|
||||
if (paclnode->valid) {
|
||||
added = true;
|
||||
DBG_88E("%s, sta has been added\n", __func__);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pacl_node_q->lock);
|
||||
|
||||
if (added)
|
||||
return ret;
|
||||
|
||||
spin_lock_bh(&pacl_node_q->lock);
|
||||
|
||||
for (i = 0; i < NUM_ACL; i++) {
|
||||
paclnode = &pacl_list->aclnode[i];
|
||||
|
||||
if (!paclnode->valid) {
|
||||
INIT_LIST_HEAD(&paclnode->list);
|
||||
|
||||
memcpy(paclnode->addr, addr, ETH_ALEN);
|
||||
|
||||
paclnode->valid = true;
|
||||
|
||||
list_add_tail(&paclnode->list, get_list_head(pacl_node_q));
|
||||
|
||||
pacl_list->num++;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DBG_88E("%s, acl_num =%d\n", __func__, pacl_list->num);
|
||||
|
||||
spin_unlock_bh(&pacl_node_q->lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
|
||||
{
|
||||
struct list_head *plist, *phead;
|
||||
|
|
|
@ -23,7 +23,6 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta);
|
|||
int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len);
|
||||
void rtw_ap_restore_network(struct adapter *padapter);
|
||||
void rtw_set_macaddr_acl(struct adapter *padapter, int mode);
|
||||
int rtw_acl_add_sta(struct adapter *padapter, u8 *addr);
|
||||
int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr);
|
||||
|
||||
void associated_clients_update(struct adapter *padapter, u8 updated);
|
||||
|
|
Loading…
Reference in a new issue