|
@@ -4930,16 +4930,27 @@ static void init_vif_event(struct brcmf_cfg80211_vif_event *event)
|
|
mutex_init(&event->vif_event_lock);
|
|
mutex_init(&event->vif_event_lock);
|
|
}
|
|
}
|
|
|
|
|
|
-static int brcmf_set_bwcap(struct brcmf_if *ifp, u32 band, u32 bw_cap)
|
|
|
|
|
|
+static int brcmf_enable_bw40_2g(struct brcmf_if *ifp)
|
|
{
|
|
{
|
|
struct brcmf_fil_bwcap_le band_bwcap;
|
|
struct brcmf_fil_bwcap_le band_bwcap;
|
|
|
|
+ u32 val;
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- band_bwcap.band = cpu_to_le32(band);
|
|
|
|
- band_bwcap.bw_cap = cpu_to_le32(bw_cap);
|
|
|
|
- err = brcmf_fil_iovar_data_set(ifp, "bw_cap", &band_bwcap,
|
|
|
|
- sizeof(band_bwcap));
|
|
|
|
|
|
+ /* verify support for bw_cap command */
|
|
|
|
+ val = WLC_BAND_5G;
|
|
|
|
+ err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &val);
|
|
|
|
|
|
|
|
+ if (!err) {
|
|
|
|
+ /* only set 2G bandwidth using bw_cap command */
|
|
|
|
+ band_bwcap.band = cpu_to_le32(WLC_BAND_2G);
|
|
|
|
+ band_bwcap.bw_cap = cpu_to_le32(WLC_BW_40MHZ_BIT);
|
|
|
|
+ err = brcmf_fil_iovar_data_set(ifp, "bw_cap", &band_bwcap,
|
|
|
|
+ sizeof(band_bwcap));
|
|
|
|
+ } else {
|
|
|
|
+ brcmf_dbg(INFO, "fallback to mimo_bw_cap\n");
|
|
|
|
+ val = WLC_N_BW_40ALL;
|
|
|
|
+ err = brcmf_fil_iovar_int_set(ifp, "mimo_bw_cap", val);
|
|
|
|
+ }
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -5005,11 +5016,10 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,
|
|
*/
|
|
*/
|
|
if (wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap.cap &
|
|
if (wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap.cap &
|
|
IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
|
|
IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
|
|
- err = brcmf_set_bwcap(ifp, WLC_BAND_2G, WLC_BW_CAP_40MHZ);
|
|
|
|
- if (!err) {
|
|
|
|
|
|
+ err = brcmf_enable_bw40_2g(ifp);
|
|
|
|
+ if (!err)
|
|
err = brcmf_fil_iovar_int_set(ifp, "obss_coex",
|
|
err = brcmf_fil_iovar_int_set(ifp, "obss_coex",
|
|
BRCMF_OBSS_COEX_AUTO);
|
|
BRCMF_OBSS_COEX_AUTO);
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
err = brcmf_fil_iovar_int_set(ifp, "tdls_enable", 1);
|
|
err = brcmf_fil_iovar_int_set(ifp, "tdls_enable", 1);
|