results->version = dtoh32(results->version);
*scan_count = results->count = dtoh32(results->count);
status = dtoh32(list_buf->status);
- DHD_ISCAN(("%s: Got %d resuls\n", __FUNCTION__, results->count));
+ DHD_ISCAN(("%s: Got %d resuls status = (%x)\n", __FUNCTION__, results->count, status));
dhd_iscan_unlock();
DHD_ERROR(("%s failed error=%d\n", __FUNCTION__, err));
return err;
}
+ memset(iovbuf, 0, sizeof(iovbuf));
memset(&pfn_param, 0, sizeof(pfn_param));
memset(&pfn_element, 0, sizeof(pfn_element));
/* check and set extra pno params */
if ((pno_repeat != 0) || (pno_freq_expo_max != 0)) {
pfn_param.flags |= htod16(ENABLE << ENABLE_ADAPTSCAN_BIT);
- pfn_param.repeat = htod32(pno_repeat);
- pfn_param.exp = htod32(pno_freq_expo_max);
+ pfn_param.repeat = (uchar) (pno_repeat);
+ pfn_param.exp = (uchar) (pno_freq_expo_max);
}
/* set up pno scan fr */
if (scan_fr != 0)
DHD_ERROR(("%s pno freq less %d sec\n", __FUNCTION__, PNO_SCAN_MIN_FW_SEC));
return err;
}
+
len = bcm_mkiovar("pfn_set", (char *)&pfn_param, sizeof(pfn_param), iovbuf, sizeof(iovbuf));
- dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, len, TRUE, 0);
+ if ((err = dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, len, TRUE, 0)) < 0) {
+ DHD_ERROR(("%s pfn_set failed for error=%d\n",
+ __FUNCTION__, err));
+ return err;
+ }
/* set all pfn ssid */
for (i = 0; i < nssid; i++) {
#define EPI_RC_NUMBER 125
-#define EPI_INCREMENTAL_NUMBER 33
+#define EPI_INCREMENTAL_NUMBER 48
#define EPI_BUILD_NUMBER 0
-#define EPI_VERSION 5, 90, 125, 33
+#define EPI_VERSION 5, 90, 125, 48
-#define EPI_VERSION_NUM 0x055a7d21
+#define EPI_VERSION_NUM 0x055a7d30
#define EPI_VERSION_DEV 5.90.125
-#define EPI_VERSION_STR "5.90.125.33"
+#define EPI_VERSION_STR "5.90.125.48"
#endif
#define WL_CHAN_FREQ_RANGE_5GMH_VER2 7
#define WL_CHAN_FREQ_RANGE_5GH_VER2 8
+#define WL_CHAN_FREQ_RANGE_5GLL_5BAND 4
+#define WL_CHAN_FREQ_RANGE_5GLH_5BAND 5
+#define WL_CHAN_FREQ_RANGE_5GML_5BAND 6
+#define WL_CHAN_FREQ_RANGE_5GMH_5BAND 7
+#define WL_CHAN_FREQ_RANGE_5GH_5BAND 8
+
#define WLC_PHY_TYPE_A 0
#define WLC_PHY_TYPE_B 1
enum {
OFF_ADAPT,
SMART_ADAPT,
- STRICT_ADAPT
+ STRICT_ADAPT,
+ SLOW_ADAPT
};
#define SORT_CRITERIA_BIT 0
#define AUTO_CONNECT_BIT 4
#define ENABLE_BD_SCAN_BIT 5
#define ENABLE_ADAPTSCAN_BIT 6
+#define IMMEDIATE_EVENT_BIT 8
-#define SORT_CRITERIA_MASK 0x01
-#define AUTO_NET_SWITCH_MASK 0x02
-#define ENABLE_BKGRD_SCAN_MASK 0x04
-#define IMMEDIATE_SCAN_MASK 0x08
-#define AUTO_CONNECT_MASK 0x10
-#define ENABLE_BD_SCAN_MASK 0x20
-#define ENABLE_ADAPTSCAN_MASK 0xc0
+#define SORT_CRITERIA_MASK 0x0001
+#define AUTO_NET_SWITCH_MASK 0x0002
+#define ENABLE_BKGRD_SCAN_MASK 0x0004
+#define IMMEDIATE_SCAN_MASK 0x0008
+#define AUTO_CONNECT_MASK 0x0010
+#define ENABLE_BD_SCAN_MASK 0x0020
+#define ENABLE_ADAPTSCAN_MASK 0x00c0
+#define IMMEDIATE_EVENT_MASK 0x0100
#define PFN_VERSION 2
#define PFN_SCANRESULT_VERSION 1
uint8 mscan;
uint8 repeat;
uint8 exp;
+ int32 slow_freq;
} wl_pfn_param_t;
typedef struct wl_pfn_bssid {
static struct ctl_table_header *wl_sysctl_hdr;
#endif /* CONFIG_SYSCTL */
+/* This is to override regulatory domains defined in cfg80211 module (reg.c)
+ * By default world regulatory domain defined in reg.c puts the flags NL80211_RRF_PASSIVE_SCAN
+ * and NL80211_RRF_NO_IBSS for 5GHz channels (for 36..48 and 149..165).
+ * With respect to these flags, wpa_supplicant doesn't start p2p operations on 5GHz channels.
+ * All the chnages in world regulatory domain are to be done here.
+ */
+static const struct ieee80211_regdomain brcm_regdom = {
+ .n_reg_rules = 5,
+ .alpha2 = "99",
+ .reg_rules = {
+ /* IEEE 802.11b/g, channels 1..11 */
+ REG_RULE(2412-10, 2462+10, 40, 6, 20, 0),
+ /* IEEE 802.11b/g, channels 12..13. No HT40
+ * channel fits here. */
+ REG_RULE(2467-10, 2472+10, 20, 6, 20,
+ NL80211_RRF_PASSIVE_SCAN |
+ NL80211_RRF_NO_IBSS),
+ /* IEEE 802.11 channel 14 - Only JP enables
+ * this and for 802.11b only */
+ REG_RULE(2484-10, 2484+10, 20, 6, 20,
+ NL80211_RRF_PASSIVE_SCAN |
+ NL80211_RRF_NO_IBSS |
+ NL80211_RRF_NO_OFDM),
+ /* IEEE 802.11a, channel 36..48 */
+ REG_RULE(5180-10, 5240+10, 40, 6, 20, 0
+ /*NL80211_RRF_PASSIVE_SCAN |
+ NL80211_RRF_NO_IBSS*/),
+
+ /* NB: 5260 MHz - 5700 MHz requies DFS */
+
+ /* IEEE 802.11a, channel 149..165 */
+ REG_RULE(5745-10, 5825+10, 40, 6, 20, 0
+ /*NL80211_RRF_PASSIVE_SCAN |
+ NL80211_RRF_NO_IBSS*/),
+ }
+};
+
+
/* Data Element Definitions */
#define WPS_ID_CONFIG_METHODS 0x1008
#define WPS_ID_REQ_TYPE 0x103A
}
} else {
- WL_ERR(("No P2PIE in beacon \n"));
+ WL_INFO(("No P2PIE in beacon \n"));
}
if (unlikely(!sme->ssid)) {
WL_DBG(("join_param_size %d\n", join_params_size));
if (join_params.ssid.SSID_len < IEEE80211_MAX_SSID_LEN) {
- WL_ERR(("ssid \"%s\", len (%d)\n", join_params.ssid.SSID,
+ WL_INFO(("ssid \"%s\", len (%d)\n", join_params.ssid.SSID,
join_params.ssid.SSID_len));
}
err = wldev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size, false);
WL_ERR(("Can not find the bssidx for dev( %p )\n", dev));
return -ENODEV;
}
- if (p2p_on(wl)) {
+ if (wl->p2p_supported && p2p_on(wl)) {
wl_cfgp2p_generate_bss_mac(&dhd->mac, &wl->p2p->dev_addr, &wl->p2p->int_addr);
/* Suspend P2P discovery search-listen to prevent it from changing the
* channel.
WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS |
#endif
WIPHY_FLAG_4ADDR_STATION;
+
+ WL_DBG(("Registering custom regulatory)\n"));
+ wdev->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
+ wiphy_apply_custom_regulatory(wdev->wiphy, &brcm_regdom);
+ /* Now we can register wiphy with cfg80211 module */
err = wiphy_register(wdev->wiphy);
if (unlikely(err < 0)) {
WL_ERR(("Couldn not register wiphy device (%d)\n", err));