You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
brcmfmac: add e-scan support.
This patch adds e-scan support (currently i-scan is in use). E-scan is a more powerful and memory efficient method for scanning. E-scan will be the default scan method and eventually, i-scan support will be removed. The scan methods do not make any difference to the end-user. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
d74a0b514d
commit
e756af5b30
@@ -55,6 +55,14 @@ config BRCMFMAC_USB
|
|||||||
IEEE802.11n embedded FullMAC WLAN driver. Say Y if you want to
|
IEEE802.11n embedded FullMAC WLAN driver. Say Y if you want to
|
||||||
use the driver for an USB wireless card.
|
use the driver for an USB wireless card.
|
||||||
|
|
||||||
|
config BRCMISCAN
|
||||||
|
bool "Broadcom I-Scan (OBSOLETE)"
|
||||||
|
depends on BRCMFMAC
|
||||||
|
---help---
|
||||||
|
This option enables the I-Scan method. By default fullmac uses the
|
||||||
|
new E-Scan method which uses less memory in firmware and gives no
|
||||||
|
limitation on the number of scan results.
|
||||||
|
|
||||||
config BRCMDBG
|
config BRCMDBG
|
||||||
bool "Broadcom driver debug functions"
|
bool "Broadcom driver debug functions"
|
||||||
depends on BRCMSMAC || BRCMFMAC
|
depends on BRCMSMAC || BRCMFMAC
|
||||||
|
|||||||
@@ -130,6 +130,10 @@
|
|||||||
#define BRCMF_EVENT_MSG_FLUSHTXQ 0x02
|
#define BRCMF_EVENT_MSG_FLUSHTXQ 0x02
|
||||||
#define BRCMF_EVENT_MSG_GROUP 0x04
|
#define BRCMF_EVENT_MSG_GROUP 0x04
|
||||||
|
|
||||||
|
#define BRCMF_ESCAN_REQ_VERSION 1
|
||||||
|
|
||||||
|
#define WLC_BSS_RSSI_ON_CHANNEL 0x0002
|
||||||
|
|
||||||
struct brcmf_event_msg {
|
struct brcmf_event_msg {
|
||||||
__be16 version;
|
__be16 version;
|
||||||
__be16 flags;
|
__be16 flags;
|
||||||
@@ -456,6 +460,24 @@ struct brcmf_scan_results_le {
|
|||||||
__le32 count;
|
__le32 count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct brcmf_escan_params_le {
|
||||||
|
__le32 version;
|
||||||
|
__le16 action;
|
||||||
|
__le16 sync_id;
|
||||||
|
struct brcmf_scan_params_le params_le;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct brcmf_escan_result_le {
|
||||||
|
__le32 buflen;
|
||||||
|
__le32 version;
|
||||||
|
__le16 sync_id;
|
||||||
|
__le16 bss_count;
|
||||||
|
struct brcmf_bss_info_le bss_info_le;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(struct brcmf_escan_result_le) - \
|
||||||
|
sizeof(struct brcmf_bss_info_le))
|
||||||
|
|
||||||
/* used for association with a specific BSSID and chanspec list */
|
/* used for association with a specific BSSID and chanspec list */
|
||||||
struct brcmf_assoc_params_le {
|
struct brcmf_assoc_params_le {
|
||||||
/* 00:00:00:00:00:00: broadcast scan */
|
/* 00:00:00:00:00:00: broadcast scan */
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
|
|||||||
BRCMF_E_ACTION_FRAME_COMPLETE, "ACTION FRAME TX COMPLETE"}, {
|
BRCMF_E_ACTION_FRAME_COMPLETE, "ACTION FRAME TX COMPLETE"}, {
|
||||||
BRCMF_E_IF, "IF"}, {
|
BRCMF_E_IF, "IF"}, {
|
||||||
BRCMF_E_RSSI, "RSSI"}, {
|
BRCMF_E_RSSI, "RSSI"}, {
|
||||||
BRCMF_E_PFN_SCAN_COMPLETE, "SCAN_COMPLETE"}
|
BRCMF_E_PFN_SCAN_COMPLETE, "SCAN_COMPLETE"}, {
|
||||||
|
BRCMF_E_ESCAN_RESULT, "ESCAN_RESULT"}
|
||||||
};
|
};
|
||||||
uint event_type, flags, auth_type, datalen;
|
uint event_type, flags, auth_type, datalen;
|
||||||
static u32 seqnum_prev;
|
static u32 seqnum_prev;
|
||||||
@@ -350,6 +351,11 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
|
|||||||
brcmf_dbg(EVENT, "MACEVENT: %s\n", event_name);
|
brcmf_dbg(EVENT, "MACEVENT: %s\n", event_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case BRCMF_E_ESCAN_RESULT:
|
||||||
|
brcmf_dbg(EVENT, "MACEVENT: %s\n", event_name);
|
||||||
|
datalen = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
case BRCMF_E_PFN_NET_FOUND:
|
case BRCMF_E_PFN_NET_FOUND:
|
||||||
case BRCMF_E_PFN_NET_LOST:
|
case BRCMF_E_PFN_NET_LOST:
|
||||||
case BRCMF_E_PFN_SCAN_COMPLETE:
|
case BRCMF_E_PFN_SCAN_COMPLETE:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -123,6 +123,13 @@ do { \
|
|||||||
#define WL_SCAN_UNASSOC_TIME 40
|
#define WL_SCAN_UNASSOC_TIME 40
|
||||||
#define WL_SCAN_PASSIVE_TIME 120
|
#define WL_SCAN_PASSIVE_TIME 120
|
||||||
|
|
||||||
|
#define WL_ESCAN_BUF_SIZE (1024 * 64)
|
||||||
|
#define WL_ESCAN_TIMER_INTERVAL_MS 8000 /* E-Scan timeout */
|
||||||
|
|
||||||
|
#define WL_ESCAN_ACTION_START 1
|
||||||
|
#define WL_ESCAN_ACTION_CONTINUE 2
|
||||||
|
#define WL_ESCAN_ACTION_ABORT 3
|
||||||
|
|
||||||
/* dongle status */
|
/* dongle status */
|
||||||
enum wl_status {
|
enum wl_status {
|
||||||
WL_STATUS_READY,
|
WL_STATUS_READY,
|
||||||
@@ -275,6 +282,19 @@ struct brcmf_cfg80211_pmk_list {
|
|||||||
struct pmkid foo[MAXPMKID - 1];
|
struct pmkid foo[MAXPMKID - 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* dongle escan state */
|
||||||
|
enum wl_escan_state {
|
||||||
|
WL_ESCAN_STATE_IDLE,
|
||||||
|
WL_ESCAN_STATE_SCANNING
|
||||||
|
};
|
||||||
|
|
||||||
|
struct escan_info {
|
||||||
|
u32 escan_state;
|
||||||
|
u8 escan_buf[WL_ESCAN_BUF_SIZE];
|
||||||
|
struct wiphy *wiphy;
|
||||||
|
struct net_device *ndev;
|
||||||
|
};
|
||||||
|
|
||||||
/* dongle private data of cfg80211 interface */
|
/* dongle private data of cfg80211 interface */
|
||||||
struct brcmf_cfg80211_priv {
|
struct brcmf_cfg80211_priv {
|
||||||
struct wireless_dev *wdev; /* representing wl cfg80211 device */
|
struct wireless_dev *wdev; /* representing wl cfg80211 device */
|
||||||
@@ -315,6 +335,11 @@ struct brcmf_cfg80211_priv {
|
|||||||
u8 *dcmd_buf; /* dcmd buffer */
|
u8 *dcmd_buf; /* dcmd buffer */
|
||||||
u8 *extra_buf; /* maily to grab assoc information */
|
u8 *extra_buf; /* maily to grab assoc information */
|
||||||
struct dentry *debugfsdir;
|
struct dentry *debugfsdir;
|
||||||
|
bool escan_on; /* escan on/off switch */
|
||||||
|
struct escan_info escan_info; /* escan information */
|
||||||
|
struct timer_list escan_timeout; /* Timer for catch scan timeout */
|
||||||
|
struct work_struct escan_timeout_work; /* scan timeout worker */
|
||||||
|
u8 *escan_ioctl_buf;
|
||||||
u8 ci[0] __aligned(NETDEV_ALIGN);
|
u8 ci[0] __aligned(NETDEV_ALIGN);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user