TDLS: Add channel-switch capability flag
Propagate a driver TDLS channel-switch support bit from nl80211 to TDLS code. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
This commit is contained in:
parent
ca16586afe
commit
4daa572925
6 changed files with 24 additions and 5 deletions
|
@ -2742,7 +2742,8 @@ int wpa_tdls_init(struct wpa_sm *sm)
|
|||
* are assumed to perform everything internally
|
||||
*/
|
||||
if (wpa_sm_tdls_get_capa(sm, &sm->tdls_supported,
|
||||
&sm->tdls_external_setup) < 0) {
|
||||
&sm->tdls_external_setup,
|
||||
&sm->tdls_chan_switch) < 0) {
|
||||
sm->tdls_supported = 1;
|
||||
sm->tdls_external_setup = 0;
|
||||
}
|
||||
|
@ -2751,6 +2752,8 @@ int wpa_tdls_init(struct wpa_sm *sm)
|
|||
"driver", sm->tdls_supported ? "" : " not");
|
||||
wpa_printf(MSG_DEBUG, "TDLS: Driver uses %s link setup",
|
||||
sm->tdls_external_setup ? "external" : "internal");
|
||||
wpa_printf(MSG_DEBUG, "TDLS: Driver %s TDLS channel switching",
|
||||
sm->tdls_chan_switch ? "supports" : "does not support");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ struct wpa_sm_ctx {
|
|||
int (*mark_authenticated)(void *ctx, const u8 *target_ap);
|
||||
#ifdef CONFIG_TDLS
|
||||
int (*tdls_get_capa)(void *ctx, int *tdls_supported,
|
||||
int *tdls_ext_setup);
|
||||
int *tdls_ext_setup, int *tdls_chan_switch);
|
||||
int (*send_tdls_mgmt)(void *ctx, const u8 *dst,
|
||||
u8 action_code, u8 dialog_token,
|
||||
u16 status_code, u32 peer_capab,
|
||||
|
|
|
@ -102,6 +102,9 @@ struct wpa_sm {
|
|||
* to it via tdls_mgmt.
|
||||
*/
|
||||
int tdls_external_setup;
|
||||
|
||||
/* The driver supports TDLS channel switching */
|
||||
int tdls_chan_switch;
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
#ifdef CONFIG_IEEE80211R
|
||||
|
@ -257,11 +260,12 @@ static inline void wpa_sm_set_rekey_offload(struct wpa_sm *sm)
|
|||
#ifdef CONFIG_TDLS
|
||||
static inline int wpa_sm_tdls_get_capa(struct wpa_sm *sm,
|
||||
int *tdls_supported,
|
||||
int *tdls_ext_setup)
|
||||
int *tdls_ext_setup,
|
||||
int *tdls_chan_switch)
|
||||
{
|
||||
if (sm->ctx->tdls_get_capa)
|
||||
return sm->ctx->tdls_get_capa(sm->ctx->ctx, tdls_supported,
|
||||
tdls_ext_setup);
|
||||
tdls_ext_setup, tdls_chan_switch);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue