mac80211: update brcmsmac ap patches
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 872-brcmsmac-deactivate-ucode-sending-probe-responses.patch
1 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
2 +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
3 @@ -554,6 +554,12 @@ brcms_ops_bss_info_changed(struct ieee80
4 /* Beaconing should be enabled/disabled (beaconing modes) */
5 brcms_err(core, "%s: Beacon enabled: %s\n", __func__,
6 info->enable_beacon ? "true" : "false");
7 + if (info->enable_beacon &&
8 + hw->wiphy->flags & WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD) {
9 + brcms_c_enable_probe_resp(wl->wlc, true);
10 + } else {
11 + brcms_c_enable_probe_resp(wl->wlc, false);
12 + }
13 }
14
15 if (changed & BSS_CHANGED_CQM) {
16 @@ -1048,7 +1054,12 @@ static int ieee_hw_init(struct ieee80211
17 hw->channel_change_time = 7 * 1000;
18 hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
19
20 - hw->wiphy->flags |= WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;
21 + /*
22 + * deactivate sending probe responses by ucude, because this will
23 + * cause problems when WPS is used.
24 + *
25 + * hw->wiphy->flags |= WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;
26 + */
27
28 hw->rate_control_algorithm = "minstrel_ht";
29
30 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
31 +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
32 @@ -7484,6 +7484,17 @@ void brcms_c_set_new_probe_resp(struct b
33 brcms_c_update_probe_resp(wlc, false);
34 }
35
36 +void brcms_c_enable_probe_resp(struct brcms_c_info *wlc, bool enable)
37 +{
38 + /*
39 + * prevent ucode from sending probe responses by setting the timeout
40 + * to 1, it can not send it in that time frame.
41 + */
42 + wlc->prb_resp_timeout = enable ? BRCMS_PRB_RESP_TIMEOUT : 1;
43 + brcms_b_write_shm(wlc->hw, M_PRS_MAXTIME, wlc->prb_resp_timeout);
44 + /* TODO: if (enable) => also deactivate receiving of probe request */
45 +}
46 +
47 /* Write ssid into shared memory */
48 static void
49 brcms_c_shm_ssid_upd(struct brcms_c_info *wlc, struct brcms_bss_cfg *cfg)
50 --- a/drivers/net/wireless/brcm80211/brcmsmac/pub.h
51 +++ b/drivers/net/wireless/brcm80211/brcmsmac/pub.h
52 @@ -338,6 +338,7 @@ extern void brcms_c_set_new_beacon(struc
53 u16 dtim_period);
54 extern void brcms_c_set_new_probe_resp(struct brcms_c_info *wlc,
55 struct sk_buff *probe_resp);
56 +extern void brcms_c_enable_probe_resp(struct brcms_c_info *wlc, bool enable);
57 extern void brcms_c_set_ssid(struct brcms_c_info *wlc, u8 *ssid,
58 size_t ssid_len);
59