nl80211/mac80211: allow adding TDLS peers as stations
When adding a TDLS peer STA, mark it with a new flag in both nl80211 and mac80211. Before adding a peer, make sure the wiphy supports TDLS and our operating mode is appropriate (managed). In addition, make sure all peers are removed on disassociation. A TDLS peer is first added just before link setup is initiated. In later setup stages we have more info about peer supported rates, capabilities, etc. This info is reported via nl80211_set_station(). Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
dfe018bf99
commit
07ba55d7f1
@ -1137,8 +1137,9 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
|
||||
changed |= BSS_CHANGED_BSSID | BSS_CHANGED_HT;
|
||||
ieee80211_bss_info_change_notify(sdata, changed);
|
||||
|
||||
/* remove AP and TDLS peers */
|
||||
if (remove_sta)
|
||||
sta_info_destroy_addr(sdata, bssid);
|
||||
sta_info_flush(local, sdata);
|
||||
|
||||
del_timer_sync(&sdata->u.mgd.conn_mon_timer);
|
||||
del_timer_sync(&sdata->u.mgd.bcn_mon_timer);
|
||||
@ -2738,7 +2739,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
|
||||
req->reason_code, cookie,
|
||||
!req->local_state_change);
|
||||
if (assoc_bss)
|
||||
sta_info_destroy_addr(sdata, bssid);
|
||||
sta_info_flush(sdata->local, sdata);
|
||||
|
||||
mutex_lock(&sdata->local->mtx);
|
||||
ieee80211_recalc_idle(sdata->local);
|
||||
@ -2778,7 +2779,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
|
||||
ieee80211_send_deauth_disassoc(sdata, req->bss->bssid,
|
||||
IEEE80211_STYPE_DISASSOC, req->reason_code,
|
||||
cookie, !req->local_state_change);
|
||||
sta_info_destroy_addr(sdata, bssid);
|
||||
sta_info_flush(sdata->local, sdata);
|
||||
|
||||
mutex_lock(&sdata->local->mtx);
|
||||
ieee80211_recalc_idle(sdata->local);
|
||||
|
Reference in New Issue
Block a user