impelment station binding to wlanid
* add a kernel bash hash list to track station to radio and wlan id binding * enforce binding on recv * configure binding through netlink interface from WTP process
This commit is contained in:
@ -37,8 +37,10 @@ static void sc_capwap_fragment_free(struct sc_capwap_fragment* fragment)
|
||||
/* */
|
||||
static void sc_capwap_freesession(struct sc_capwap_session* session)
|
||||
{
|
||||
int i;
|
||||
struct sc_capwap_fragment* temp;
|
||||
struct sc_capwap_fragment* fragment;
|
||||
struct sc_station *sta;
|
||||
|
||||
TRACEKMOD("### sc_capwap_freesession\n");
|
||||
|
||||
@ -46,6 +48,13 @@ static void sc_capwap_freesession(struct sc_capwap_session* session)
|
||||
list_for_each_entry_safe(fragment, temp, &session->fragments.lru_list, lru_list) {
|
||||
sc_capwap_fragment_free(fragment);
|
||||
}
|
||||
|
||||
for (i = 0; i < STA_HASH_SIZE; i++) {
|
||||
hlist_for_each_entry_rcu(sta, &session->station_list[i], station_list) {
|
||||
hlist_del_rcu(&sta->station_list);
|
||||
kfree_rcu(sta, rcu_head);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* */
|
||||
@ -410,6 +419,8 @@ int sc_capwap_bind(struct sc_capwap_session *session, int protocol, struct socka
|
||||
if (ret < 0)
|
||||
goto err_close;
|
||||
|
||||
rcu_assign_sk_user_data(session->socket->sk, session);
|
||||
|
||||
/* Set callback */
|
||||
udp_sk(session->socket->sk)->encap_type = 1;
|
||||
udp_sk(session->socket->sk)->encap_rcv = sc_capwap_recvpacket;
|
||||
|
Reference in New Issue
Block a user