Skip to content

Commit

Permalink
wl12xx/wlcore: move wl1271 struct to wlcore and add ops
Browse files Browse the repository at this point in the history
In order to add chip-specific operations and prepare for future
elements that need to be set by the lower driver, move the wl1271
structure to the wlcore.h file and add an empty placeholder for the
operations structure.

Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Luciano Coelho committed Apr 12, 2012
1 parent ffeb501 commit c31be25
Show file tree
Hide file tree
Showing 22 changed files with 247 additions and 230 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/ti/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include "../wlcore/wlcore.h"
#include "../wlcore/debug.h"

static struct wlcore_ops wl12xx_ops = {
};

static int __devinit wl12xx_probe(struct platform_device *pdev)
{
struct wl1271 *wl;
Expand All @@ -39,6 +42,7 @@ static int __devinit wl12xx_probe(struct platform_device *pdev)
}

wl = hw->priv;
wl->ops = &wl12xx_ops;

return wlcore_probe(wl, pdev);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <linux/spi/spi.h>
#include <linux/slab.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "debug.h"
#include "wl12xx_80211.h"
#include "reg.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/acx.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef __ACX_H__
#define __ACX_H__

#include "wl12xx.h"
#include "wlcore.h"
#include "cmd.h"

/*************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef __BOOT_H__
#define __BOOT_H__

#include "wl12xx.h"
#include "wlcore.h"

int wl1271_boot(struct wl1271 *wl);
int wl1271_load_firmware(struct wl1271 *wl);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <linux/ieee80211.h>
#include <linux/slab.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "debug.h"
#include "reg.h"
#include "io.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef __CMD_H__
#define __CMD_H__

#include "wl12xx.h"
#include "wlcore.h"

struct acx_header;

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <linux/skbuff.h>
#include <linux/slab.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "debug.h"
#include "acx.h"
#include "ps.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/debugfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef __DEBUGFS_H__
#define __DEBUGFS_H__

#include "wl12xx.h"
#include "wlcore.h"

int wl1271_debugfs_init(struct wl1271 *wl);
void wl1271_debugfs_exit(struct wl1271 *wl);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
*/

#include "wl12xx.h"
#include "wlcore.h"
#include "debug.h"
#include "reg.h"
#include "io.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef __INIT_H__
#define __INIT_H__

#include "wl12xx.h"
#include "wlcore.h"

int wl1271_hw_init_power_auth(struct wl1271 *wl);
int wl1271_init_templates_config(struct wl1271 *wl);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <linux/spi/spi.h>
#include <linux/interrupt.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "debug.h"
#include "wl12xx_80211.h"
#include "io.h"
Expand Down
7 changes: 6 additions & 1 deletion drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <linux/sched.h>
#include <linux/interrupt.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "debug.h"
#include "wl12xx_80211.h"
#include "reg.h"
Expand Down Expand Up @@ -5485,6 +5485,11 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
unsigned long irqflags;
int ret;

if (!wl->ops) {
ret = -EINVAL;
goto out_free_hw;
}

wl->irq = platform_get_irq(pdev, 0);
wl->ref_clock = pdata->board_ref_clock;
wl->tcxo_clock = pdata->board_tcxo_clock;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/ps.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef __PS_H__
#define __PS_H__

#include "wl12xx.h"
#include "wlcore.h"
#include "acx.h"

int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <linux/gfp.h>
#include <linux/sched.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "debug.h"
#include "acx.h"
#include "reg.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <linux/ieee80211.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "debug.h"
#include "cmd.h"
#include "scan.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef __SCAN_H__
#define __SCAN_H__

#include "wl12xx.h"
#include "wlcore.h"

int wl1271_scan(struct wl1271 *wl, struct ieee80211_vif *vif,
const u8 *ssid, size_t ssid_len,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <linux/wl12xx.h>
#include <linux/pm_runtime.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "wl12xx_80211.h"
#include "io.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <linux/platform_device.h>
#include <linux/slab.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "wl12xx_80211.h"
#include "io.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/testmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/slab.h>
#include <net/genetlink.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "debug.h"
#include "acx.h"
#include "reg.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/module.h>
#include <linux/etherdevice.h>

#include "wl12xx.h"
#include "wlcore.h"
#include "debug.h"
#include "io.h"
#include "reg.h"
Expand Down
Loading

0 comments on commit c31be25

Please sign in to comment.