Commit a7b82d47 authored by Hante Meuleman's avatar Hante Meuleman Committed by Kalle Valo

brcmfmac: Make TDLS a detectable feature

Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 6c404f34
...@@ -5983,8 +5983,9 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp) ...@@ -5983,8 +5983,9 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp)
wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites); wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT | wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT |
WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_OFFCHAN_TX |
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL | WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
WIPHY_FLAG_SUPPORTS_TDLS; if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_TDLS))
wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS;
if (!brcmf_roamoff) if (!brcmf_roamoff)
wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM; wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM;
wiphy->mgmt_stypes = brcmf_txrx_stypes; wiphy->mgmt_stypes = brcmf_txrx_stypes;
...@@ -6376,6 +6377,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, ...@@ -6376,6 +6377,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,
goto wiphy_unreg_out; goto wiphy_unreg_out;
} }
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_TDLS)) {
err = brcmf_fil_iovar_int_set(ifp, "tdls_enable", 1); err = brcmf_fil_iovar_int_set(ifp, "tdls_enable", 1);
if (err) { if (err) {
brcmf_dbg(INFO, "TDLS not enabled (%d)\n", err); brcmf_dbg(INFO, "TDLS not enabled (%d)\n", err);
...@@ -6384,6 +6386,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, ...@@ -6384,6 +6386,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,
brcmf_fweh_register(cfg->pub, BRCMF_E_TDLS_PEER_EVENT, brcmf_fweh_register(cfg->pub, BRCMF_E_TDLS_PEER_EVENT,
brcmf_notify_tdls_peer_event); brcmf_notify_tdls_peer_event);
} }
}
/* (re-) activate FWEH event handling */ /* (re-) activate FWEH event handling */
err = brcmf_fweh_activate_events(ifp); err = brcmf_fweh_activate_events(ifp);
......
...@@ -138,6 +138,7 @@ void brcmf_feat_attach(struct brcmf_pub *drvr) ...@@ -138,6 +138,7 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
brcmf_feat_iovar_int_set(ifp, BRCMF_FEAT_MBSS, "mbss", 0); brcmf_feat_iovar_int_set(ifp, BRCMF_FEAT_MBSS, "mbss", 0);
brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_P2P, "p2p"); brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_P2P, "p2p");
brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_RSDB, "rsdb_mode"); brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_RSDB, "rsdb_mode");
brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_TDLS, "tdls_enable");
if (brcmf_feature_disable) { if (brcmf_feature_disable) {
brcmf_dbg(INFO, "Features: 0x%02x, disable: 0x%02x\n", brcmf_dbg(INFO, "Features: 0x%02x, disable: 0x%02x\n",
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* WOWL: Wake-On-WLAN. * WOWL: Wake-On-WLAN.
* P2P: peer-to-peer * P2P: peer-to-peer
* RSDB: Real Simultaneous Dual Band * RSDB: Real Simultaneous Dual Band
* TDLS: Tunneled Direct Link Setup
*/ */
#define BRCMF_FEAT_LIST \ #define BRCMF_FEAT_LIST \
BRCMF_FEAT_DEF(MBSS) \ BRCMF_FEAT_DEF(MBSS) \
...@@ -32,7 +33,8 @@ ...@@ -32,7 +33,8 @@
BRCMF_FEAT_DEF(PNO) \ BRCMF_FEAT_DEF(PNO) \
BRCMF_FEAT_DEF(WOWL) \ BRCMF_FEAT_DEF(WOWL) \
BRCMF_FEAT_DEF(P2P) \ BRCMF_FEAT_DEF(P2P) \
BRCMF_FEAT_DEF(RSDB) BRCMF_FEAT_DEF(RSDB) \
BRCMF_FEAT_DEF(TDLS)
/* /*
* Quirks: * Quirks:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment