Commit 09dde54c authored by Masakazu Mokuno's avatar Masakazu Mokuno Committed by Jeff Garzik

PS3: gelic: Add wireless support for PS3

Signed-off-by: default avatarMasakazu Mokuno <mokuno@sm.sony.co.jp>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Acked-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 589866f9
...@@ -2352,6 +2352,16 @@ config GELIC_NET ...@@ -2352,6 +2352,16 @@ config GELIC_NET
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called ps3_gelic. module will be called ps3_gelic.
config GELIC_WIRELESS
bool "PS3 Wireless support"
depends on GELIC_NET
help
This option adds the support for the wireless feature of PS3.
If you have the wireless-less model of PS3 or have no plan to
use wireless feature, disabling this option saves memory. As
the driver automatically distinguishes the models, you can
safely enable this option even if you have a wireless-less model.
config GIANFAR config GIANFAR
tristate "Gianfar Ethernet" tristate "Gianfar Ethernet"
depends on FSL_SOC depends on FSL_SOC
......
...@@ -70,7 +70,8 @@ obj-$(CONFIG_BNX2X) += bnx2x.o ...@@ -70,7 +70,8 @@ obj-$(CONFIG_BNX2X) += bnx2x.o
spidernet-y += spider_net.o spider_net_ethtool.o spidernet-y += spider_net.o spider_net_ethtool.o
obj-$(CONFIG_SPIDER_NET) += spidernet.o sungem_phy.o obj-$(CONFIG_SPIDER_NET) += spidernet.o sungem_phy.o
obj-$(CONFIG_GELIC_NET) += ps3_gelic.o obj-$(CONFIG_GELIC_NET) += ps3_gelic.o
ps3_gelic-objs += ps3_gelic_net.o gelic_wireless-$(CONFIG_GELIC_WIRELESS) += ps3_gelic_wireless.o
ps3_gelic-objs += ps3_gelic_net.o $(gelic_wireless-y)
obj-$(CONFIG_TC35815) += tc35815.o obj-$(CONFIG_TC35815) += tc35815.o
obj-$(CONFIG_SKGE) += skge.o obj-$(CONFIG_SKGE) += skge.o
obj-$(CONFIG_SKY2) += sky2.o obj-$(CONFIG_SKY2) += sky2.o
......
...@@ -46,9 +46,10 @@ ...@@ -46,9 +46,10 @@
#include <asm/lv1call.h> #include <asm/lv1call.h>
#include "ps3_gelic_net.h" #include "ps3_gelic_net.h"
#include "ps3_gelic_wireless.h"
#define DRV_NAME "Gelic Network Driver" #define DRV_NAME "Gelic Network Driver"
#define DRV_VERSION "1.1" #define DRV_VERSION "2.0"
MODULE_AUTHOR("SCE Inc."); MODULE_AUTHOR("SCE Inc.");
MODULE_DESCRIPTION("Gelic Network driver"); MODULE_DESCRIPTION("Gelic Network driver");
...@@ -1154,6 +1155,12 @@ static irqreturn_t gelic_card_interrupt(int irq, void *ptr) ...@@ -1154,6 +1155,12 @@ static irqreturn_t gelic_card_interrupt(int irq, void *ptr)
if (status & GELIC_CARD_PORT_STATUS_CHANGED) if (status & GELIC_CARD_PORT_STATUS_CHANGED)
gelic_card_get_ether_port_status(card, 1); gelic_card_get_ether_port_status(card, 1);
#ifdef CONFIG_GELIC_WIRELESS
if (status & (GELIC_CARD_WLAN_EVENT_RECEIVED |
GELIC_CARD_WLAN_COMMAND_COMPLETED))
gelic_wl_interrupt(card->netdev[GELIC_PORT_WIRELESS], status);
#endif
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -1635,6 +1642,12 @@ static int ps3_gelic_driver_probe(struct ps3_system_bus_device *dev) ...@@ -1635,6 +1642,12 @@ static int ps3_gelic_driver_probe(struct ps3_system_bus_device *dev)
goto fail_setup_netdev; goto fail_setup_netdev;
} }
#ifdef CONFIG_GELIC_WIRELESS
if (gelic_wl_driver_probe(card)) {
dev_dbg(&dev->core, "%s: WL init failed\n", __func__);
goto fail_setup_netdev;
}
#endif
pr_debug("%s: done\n", __func__); pr_debug("%s: done\n", __func__);
return 0; return 0;
...@@ -1674,6 +1687,9 @@ static int ps3_gelic_driver_remove(struct ps3_system_bus_device *dev) ...@@ -1674,6 +1687,9 @@ static int ps3_gelic_driver_remove(struct ps3_system_bus_device *dev)
struct net_device *netdev0; struct net_device *netdev0;
pr_debug("%s: called\n", __func__); pr_debug("%s: called\n", __func__);
#ifdef CONFIG_GELIC_WIRELESS
gelic_wl_driver_remove(card);
#endif
/* stop interrupt */ /* stop interrupt */
gelic_card_set_irq_mask(card, 0); gelic_card_set_irq_mask(card, 0);
......
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
#define GELIC_CARD_RX_PROTECTION_ERR 0x0000000004000000L #define GELIC_CARD_RX_PROTECTION_ERR 0x0000000004000000L
#define GELIC_CARD_TX_TCP_UDP_CHECKSUM_ERR 0x0000000008000000L #define GELIC_CARD_TX_TCP_UDP_CHECKSUM_ERR 0x0000000008000000L
#define GELIC_CARD_PORT_STATUS_CHANGED 0x0000000020000000L #define GELIC_CARD_PORT_STATUS_CHANGED 0x0000000020000000L
#define GELIC_CARD_WLAN_EVENT_RECEIVED 0x0000000040000000L
#define GELIC_CARD_WLAN_COMMAND_COMPLETED 0x0000000080000000L
/* INT 0 */ /* INT 0 */
#define GELIC_CARD_TX_FLAGGED_DESCR 0x0004000000000000L #define GELIC_CARD_TX_FLAGGED_DESCR 0x0004000000000000L
#define GELIC_CARD_RX_FLAGGED_DESCR 0x0040000000000000L #define GELIC_CARD_RX_FLAGGED_DESCR 0x0040000000000000L
...@@ -180,6 +182,10 @@ enum gelic_lv1_net_control_code { ...@@ -180,6 +182,10 @@ enum gelic_lv1_net_control_code {
GELIC_LV1_GET_ETH_PORT_STATUS = 2, GELIC_LV1_GET_ETH_PORT_STATUS = 2,
GELIC_LV1_SET_NEGOTIATION_MODE = 3, GELIC_LV1_SET_NEGOTIATION_MODE = 3,
GELIC_LV1_GET_VLAN_ID = 4, GELIC_LV1_GET_VLAN_ID = 4,
GELIC_LV1_GET_CHANNEL = 6,
GELIC_LV1_POST_WLAN_CMD = 9,
GELIC_LV1_GET_WLAN_CMD_RESULT = 10,
GELIC_LV1_GET_WLAN_EVENT = 11
}; };
/* status returened from GET_ETH_PORT_STATUS */ /* status returened from GET_ETH_PORT_STATUS */
......
This diff is collapsed.
This diff is collapsed.
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