Commit f0799895 authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville

brcmfmac: remove obsolete i-scan and clean up related code.

e-scan has become the default scanning method. This patch removes
the i-scan related code and cleans up e-scan related code to be
always enabled.
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 avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3082b9be
...@@ -55,14 +55,6 @@ config BRCMFMAC_USB ...@@ -55,14 +55,6 @@ 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
......
...@@ -100,19 +100,6 @@ ...@@ -100,19 +100,6 @@
#define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff #define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff
#define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16 #define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16
#define BRCMF_SCAN_ACTION_START 1
#define BRCMF_SCAN_ACTION_CONTINUE 2
#define WL_SCAN_ACTION_ABORT 3
#define BRCMF_ISCAN_REQ_VERSION 1
/* brcmf_iscan_results status values */
#define BRCMF_SCAN_RESULTS_SUCCESS 0
#define BRCMF_SCAN_RESULTS_PARTIAL 1
#define BRCMF_SCAN_RESULTS_PENDING 2
#define BRCMF_SCAN_RESULTS_ABORTED 3
#define BRCMF_SCAN_RESULTS_NO_MEM 4
/* Indicates this key is using soft encrypt */ /* Indicates this key is using soft encrypt */
#define WL_SOFT_KEY (1 << 0) #define WL_SOFT_KEY (1 << 0)
/* primary (ie tx) key */ /* primary (ie tx) key */
...@@ -452,14 +439,6 @@ struct brcmf_scan_params_le { ...@@ -452,14 +439,6 @@ struct brcmf_scan_params_le {
__le16 channel_list[1]; /* list of chanspecs */ __le16 channel_list[1]; /* list of chanspecs */
}; };
/* incremental scan struct */
struct brcmf_iscan_params_le {
__le32 version;
__le16 action;
__le16 scan_duration;
struct brcmf_scan_params_le params_le;
};
struct brcmf_scan_results { struct brcmf_scan_results {
u32 buflen; u32 buflen;
u32 version; u32 version;
...@@ -467,12 +446,6 @@ struct brcmf_scan_results { ...@@ -467,12 +446,6 @@ struct brcmf_scan_results {
struct brcmf_bss_info_le bss_info_le[]; struct brcmf_bss_info_le bss_info_le[];
}; };
struct brcmf_scan_results_le {
__le32 buflen;
__le32 version;
__le32 count;
};
struct brcmf_escan_params_le { struct brcmf_escan_params_le {
__le32 version; __le32 version;
__le16 action; __le16 action;
...@@ -508,23 +481,6 @@ struct brcmf_join_params { ...@@ -508,23 +481,6 @@ struct brcmf_join_params {
struct brcmf_assoc_params_le params_le; struct brcmf_assoc_params_le params_le;
}; };
/* incremental scan results struct */
struct brcmf_iscan_results {
union {
u32 status;
__le32 status_le;
};
union {
struct brcmf_scan_results results;
struct brcmf_scan_results_le results_le;
};
};
/* size of brcmf_iscan_results not including variable length array */
#define BRCMF_ISCAN_RESULTS_FIXED_SIZE \
(sizeof(struct brcmf_scan_results) + \
offsetof(struct brcmf_iscan_results, results))
struct brcmf_wsec_key { struct brcmf_wsec_key {
u32 index; /* key index */ u32 index; /* key index */
u32 len; /* key length */ u32 len; /* key length */
......
...@@ -27,11 +27,10 @@ ...@@ -27,11 +27,10 @@
#define BRCMF_HDRS_VAL 0x0040 #define BRCMF_HDRS_VAL 0x0040
#define BRCMF_BYTES_VAL 0x0080 #define BRCMF_BYTES_VAL 0x0080
#define BRCMF_INTR_VAL 0x0100 #define BRCMF_INTR_VAL 0x0100
#define BRCMF_GLOM_VAL 0x0400 #define BRCMF_GLOM_VAL 0x0200
#define BRCMF_EVENT_VAL 0x0800 #define BRCMF_EVENT_VAL 0x0400
#define BRCMF_BTA_VAL 0x1000 #define BRCMF_BTA_VAL 0x0800
#define BRCMF_ISCAN_VAL 0x2000 #define BRCMF_FIL_VAL 0x1000
#define BRCMF_FIL_VAL 0x4000
#if defined(DEBUG) #if defined(DEBUG)
......
...@@ -84,31 +84,12 @@ do { \ ...@@ -84,31 +84,12 @@ do { \
#define WL_CONN(fmt, args...) #define WL_CONN(fmt, args...)
#endif /* (defined DEBUG) */ #endif /* (defined DEBUG) */
#define WL_NUM_SCAN_MAX 1 #define WL_NUM_SCAN_MAX 10
#define WL_NUM_PMKIDS_MAX MAXPMKID /* will be used #define WL_NUM_PMKIDS_MAX MAXPMKID
* for 2.6.33 kernel
* or later
*/
#define WL_SCAN_BUF_MAX (1024 * 8)
#define WL_TLV_INFO_MAX 1024 #define WL_TLV_INFO_MAX 1024
#define WL_BSS_INFO_MAX 2048 #define WL_BSS_INFO_MAX 2048
#define WL_ASSOC_INFO_MAX 512 /* #define WL_ASSOC_INFO_MAX 512 /* assoc related fil max buf */
* needs to grab assoc info from dongle to
* report it to cfg80211 through "connect"
* event
*/
#define WL_DCMD_LEN_MAX 1024
#define WL_EXTRA_BUF_MAX 2048 #define WL_EXTRA_BUF_MAX 2048
#define WL_ISCAN_BUF_MAX 2048 /*
* the buf length can be BRCMF_DCMD_MAXLEN
* to reduce iteration
*/
#define WL_ISCAN_TIMER_INTERVAL_MS 3000
#define WL_SCAN_ERSULTS_LAST (BRCMF_SCAN_RESULTS_NO_MEM+1)
#define WL_AP_MAX 256 /* virtually unlimitted as long
* as kernel memory allows
*/
#define WL_ROAM_TRIGGER_LEVEL -75 #define WL_ROAM_TRIGGER_LEVEL -75
#define WL_ROAM_DELTA 20 #define WL_ROAM_DELTA 20
#define WL_BEACON_TIMEOUT 3 #define WL_BEACON_TIMEOUT 3
...@@ -145,12 +126,6 @@ enum wl_mode { ...@@ -145,12 +126,6 @@ enum wl_mode {
WL_MODE_AP WL_MODE_AP
}; };
/* dongle iscan state */
enum wl_iscan_state {
WL_ISCAN_STATE_IDLE,
WL_ISCAN_STATE_SCANING
};
/* dongle configuration */ /* dongle configuration */
struct brcmf_cfg80211_conf { struct brcmf_cfg80211_conf {
u32 mode; /* adhoc , infrastructure or ap */ u32 mode; /* adhoc , infrastructure or ap */
...@@ -270,26 +245,6 @@ struct brcmf_cfg80211_vif { ...@@ -270,26 +245,6 @@ struct brcmf_cfg80211_vif {
struct list_head list; struct list_head list;
}; };
/* dongle iscan event loop */
struct brcmf_cfg80211_iscan_eloop {
s32 (*handler[WL_SCAN_ERSULTS_LAST])
(struct brcmf_cfg80211_info *cfg);
};
/* dongle iscan controller */
struct brcmf_cfg80211_iscan_ctrl {
struct net_device *ndev;
struct timer_list timer;
u32 timer_ms;
u32 timer_on;
s32 state;
struct work_struct work;
struct brcmf_cfg80211_iscan_eloop el;
void *data;
s8 dcmd_buf[BRCMF_DCMD_SMLEN];
s8 scan_buf[WL_ISCAN_BUF_MAX];
};
/* association inform */ /* association inform */
struct brcmf_cfg80211_connect_info { struct brcmf_cfg80211_connect_info {
u8 *req_ie; u8 *req_ie;
...@@ -415,19 +370,15 @@ struct brcmf_pno_scanresults_le { ...@@ -415,19 +370,15 @@ struct brcmf_pno_scanresults_le {
* @evt_q_lock: for event queue synchronization. * @evt_q_lock: for event queue synchronization.
* @usr_sync: mainly for dongle up/down synchronization. * @usr_sync: mainly for dongle up/down synchronization.
* @bss_list: bss_list holding scanned ap information. * @bss_list: bss_list holding scanned ap information.
* @scan_results: results of the last scan.
* @scan_req_int: internal scan request object. * @scan_req_int: internal scan request object.
* @bss_info: bss information for cfg80211 layer. * @bss_info: bss information for cfg80211 layer.
* @ie: information element object for internal purpose. * @ie: information element object for internal purpose.
* @iscan: iscan controller information.
* @conn_info: association info. * @conn_info: association info.
* @pmk_list: wpa2 pmk list. * @pmk_list: wpa2 pmk list.
* @event_work: event handler work struct. * @event_work: event handler work struct.
* @scan_status: scan activity on the dongle. * @scan_status: scan activity on the dongle.
* @pub: common driver information. * @pub: common driver information.
* @channel: current channel. * @channel: current channel.
* @iscan_on: iscan on/off switch.
* @iscan_kickstart: indicate iscan already started.
* @active_scan: current scan mode. * @active_scan: current scan mode.
* @sched_escan: e-scan for scheduled scan support running. * @sched_escan: e-scan for scheduled scan support running.
* @ibss_starter: indicates this sta is ibss starter. * @ibss_starter: indicates this sta is ibss starter.
...@@ -439,7 +390,6 @@ struct brcmf_pno_scanresults_le { ...@@ -439,7 +390,6 @@ struct brcmf_pno_scanresults_le {
* @dcmd_buf: dcmd buffer. * @dcmd_buf: dcmd buffer.
* @extra_buf: mainly to grab assoc information. * @extra_buf: mainly to grab assoc information.
* @debugfsdir: debugfs folder for this device. * @debugfsdir: debugfs folder for this device.
* @escan_on: escan on/off switch.
* @escan_info: escan information. * @escan_info: escan information.
* @escan_timeout: Timer for catch scan timeout. * @escan_timeout: Timer for catch scan timeout.
* @escan_timeout_work: scan timeout worker. * @escan_timeout_work: scan timeout worker.
...@@ -456,19 +406,15 @@ struct brcmf_cfg80211_info { ...@@ -456,19 +406,15 @@ struct brcmf_cfg80211_info {
spinlock_t evt_q_lock; spinlock_t evt_q_lock;
struct mutex usr_sync; struct mutex usr_sync;
struct brcmf_scan_results *bss_list; struct brcmf_scan_results *bss_list;
struct brcmf_scan_results *scan_results; struct brcmf_cfg80211_scan_req scan_req_int;
struct brcmf_cfg80211_scan_req *scan_req_int;
struct wl_cfg80211_bss_info *bss_info; struct wl_cfg80211_bss_info *bss_info;
struct brcmf_cfg80211_ie ie; struct brcmf_cfg80211_ie ie;
struct brcmf_cfg80211_iscan_ctrl *iscan;
struct brcmf_cfg80211_connect_info conn_info; struct brcmf_cfg80211_connect_info conn_info;
struct brcmf_cfg80211_pmk_list *pmk_list; struct brcmf_cfg80211_pmk_list *pmk_list;
struct work_struct event_work; struct work_struct event_work;
unsigned long scan_status; unsigned long scan_status;
struct brcmf_pub *pub; struct brcmf_pub *pub;
u32 channel; u32 channel;
bool iscan_on;
bool iscan_kickstart;
bool active_scan; bool active_scan;
bool sched_escan; bool sched_escan;
bool ibss_starter; bool ibss_starter;
...@@ -480,7 +426,6 @@ struct brcmf_cfg80211_info { ...@@ -480,7 +426,6 @@ struct brcmf_cfg80211_info {
u8 *dcmd_buf; u8 *dcmd_buf;
u8 *extra_buf; u8 *extra_buf;
struct dentry *debugfsdir; struct dentry *debugfsdir;
bool escan_on;
struct escan_info escan_info; struct escan_info escan_info;
struct timer_list escan_timeout; struct timer_list escan_timeout;
struct work_struct escan_timeout_work; struct work_struct escan_timeout_work;
...@@ -523,9 +468,6 @@ static inline struct brcmf_cfg80211_profile *ndev_to_prof(struct net_device *nd) ...@@ -523,9 +468,6 @@ static inline struct brcmf_cfg80211_profile *ndev_to_prof(struct net_device *nd)
return &ifp->vif->profile; return &ifp->vif->profile;
} }
#define iscan_to_cfg(i) ((struct brcmf_cfg80211_info *)(i->data))
#define cfg_to_iscan(w) (w->iscan)
static inline struct static inline struct
brcmf_cfg80211_connect_info *cfg_to_conn(struct brcmf_cfg80211_info *cfg) brcmf_cfg80211_connect_info *cfg_to_conn(struct brcmf_cfg80211_info *cfg)
{ {
......
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