mwl8787: add new driver

Boilerplate for registering a new sdio/possibly usb driver.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: add a test probe function

Just for testing, this gets the ball rolling until we can test
on hardware.  And rmmod crashes of course.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: set phy parent before ieee80211_register_hw

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: cleanup the class on unregister

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: initial sdio junk

Copy a large amount of constants, sdio code, and firmware
download code from mwifiex. The firmware status registers
return the correct value when the firmware was booted by
another driver.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
mwl8787: fix firmware path

We can call and place it wherever we want, but let's keep
it what people expect for now.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
mwl8787: save a dev pointer on card probe

So we can potentially use dev_dbg() instead of printk.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
mwl8787: swap calls to printk with dev_dbg

Not sure why, but I already wrote the patch and everyone
else is doing it...

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
mwl8787: copy fw downloader

+ a lot more sdio init / functions.

Firmware successfully downloaded on card insertion &&
modprobe && ip link <iface> up
mwl8787_sdio: round up to correct txlen
mwl8787: sdio interrupt handler and read_data_sync
mwl8787: add sdio send_cmd

Used to send firmware commands to the hardware.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: add initial fw commands framework

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: drop fake bus driver

It crashes immediately due to missing bus_ops, and everyone
has hardware now.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: rename cmds.c -> cmd.c

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: CMD_RESET is id 5

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
mwl8787: rewrite cmd handling for hw specific header

We need to be able to prepend a hardware-specific header
for certain busses (sdio) so allocate with some headroom.
Still need to do something about block size needed for sdio
transfers, but this gets closer to avoiding a copy in the
send_cmd.

Also simplify the structures a bit and change some defines
to enums.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: fix pointer addition

cast-to-void needed since offset is in bytes.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: move send_cmd to cmd.c

Also rename {alloc,free}_cmd to cmd_X.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
mwl8787: drop id param from send_cmd()

It's not actually used, except by testmode, which is broken
already.

Signed-off-by: Bob Copeland <me@bobcopeland.com>