Skip to content

Commit

Permalink
wlcore: split 18xx and 12xx scan mechanism
Browse files Browse the repository at this point in the history
The scan APIs of 12xx and 18xx are totally different.
Use some common functions as much as possible (e.g.
for setting scan channels), but split scan.c into
chip-specific scan.c files, each implementing its
own scan mechanism.

(in other words - move most of the current wlcore's
scan.c into wl12xx, and implement a similar mechanism
in 18xx, according to the new api)

New wlcore ops are introduced in order to call the
chip-specific scan functions.

The template indices used for each scan (regular/scheduled)
are also different between the chips, so set the correct
indices used for each scan type after identifying the chip.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Nov 27, 2012
1 parent e9b9d45 commit 78e2806
Show file tree
Hide file tree
Showing 17 changed files with 1,209 additions and 598 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wl12xx/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
wl12xx-objs = main.o cmd.o acx.o debugfs.o
wl12xx-objs = main.o cmd.o acx.o debugfs.o scan.o

obj-$(CONFIG_WL12XX) += wl12xx.o
11 changes: 11 additions & 0 deletions drivers/net/wireless/ti/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "reg.h"
#include "cmd.h"
#include "acx.h"
#include "scan.h"
#include "debugfs.h"

static char *fref_param;
Expand Down Expand Up @@ -698,6 +699,11 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
goto out;
}

/* common settings */
wl->scan_templ_id_2_4 = CMD_TEMPL_APP_PROBE_REQ_2_4_LEGACY;
wl->scan_templ_id_5 = CMD_TEMPL_APP_PROBE_REQ_5_LEGACY;
wl->sched_scan_templ_id_2_4 = CMD_TEMPL_CFG_PROBE_REQ_2_4;
wl->sched_scan_templ_id_5 = CMD_TEMPL_CFG_PROBE_REQ_5;
out:
return ret;
}
Expand Down Expand Up @@ -1618,6 +1624,11 @@ static struct wlcore_ops wl12xx_ops = {
.set_rx_csum = NULL,
.ap_get_mimo_wide_rate_mask = NULL,
.debugfs_init = wl12xx_debugfs_add_files,
.scan_start = wl12xx_scan_start,
.scan_stop = wl12xx_scan_stop,
.scan_completed = wl12xx_scan_completed,
.sched_scan_start = wl12xx_sched_scan_start,
.sched_scan_stop = wl12xx_scan_sched_scan_stop,
.get_spare_blocks = wl12xx_get_spare_blocks,
.set_key = wl12xx_set_key,
.pre_pkt_send = NULL,
Expand Down
Loading

0 comments on commit 78e2806

Please sign in to comment.