net: spread __net_init, __net_exit
[safe/jmp/linux-2.6] / drivers / net / ps3_gelic_wireless.c
index 708ae06..227b141 100644 (file)
@@ -2101,6 +2101,9 @@ static int gelic_wl_associate_bss(struct gelic_wl_info *wl,
        if (ret) {
                pr_debug("%s: WEP/WPA setup failed %d\n", __func__,
                         ret);
+               ret = -EPERM;
+               gelic_wl_send_iwap_event(wl, NULL);
+               goto out;
        }
 
        /* start association */
@@ -2168,7 +2171,7 @@ static void gelic_wl_connected_event(struct gelic_wl_info *wl,
                complete(&wl->assoc_done);
                netif_carrier_on(port_to_netdev(wl_port(wl)));
        } else
-               pr_debug("%s: event %#lx under wpa\n",
+               pr_debug("%s: event %#llx under wpa\n",
                                 __func__, event);
 }
 
@@ -2439,7 +2442,7 @@ static const struct iw_handler_def gelic_wl_wext_handler_def = {
 #endif
 };
 
-static struct net_device *gelic_wl_alloc(struct gelic_card *card)
+static struct net_device * __devinit gelic_wl_alloc(struct gelic_card *card)
 {
        struct net_device *netdev;
        struct gelic_port *port;
@@ -2704,13 +2707,14 @@ static const struct net_device_ops gelic_wl_netdevice_ops = {
        .ndo_set_multicast_list = gelic_net_set_multi,
        .ndo_change_mtu = gelic_net_change_mtu,
        .ndo_tx_timeout = gelic_net_tx_timeout,
+       .ndo_set_mac_address = eth_mac_addr,
        .ndo_validate_addr = eth_validate_addr,
 #ifdef CONFIG_NET_POLL_CONTROLLER
        .ndo_poll_controller = gelic_net_poll_controller,
 #endif
 };
 
-static struct ethtool_ops gelic_wl_ethtool_ops = {
+static const struct ethtool_ops gelic_wl_ethtool_ops = {
        .get_drvinfo    = gelic_net_get_drvinfo,
        .get_link       = gelic_wl_get_link,
        .get_tx_csum    = ethtool_op_get_tx_csum,
@@ -2719,7 +2723,7 @@ static struct ethtool_ops gelic_wl_ethtool_ops = {
        .set_rx_csum    = gelic_net_set_rx_csum,
 };
 
-static void gelic_wl_setup_netdev_ops(struct net_device *netdev)
+static void __devinit gelic_wl_setup_netdev_ops(struct net_device *netdev)
 {
        struct gelic_wl_info *wl;
        wl = port_wl(netdev_priv(netdev));
@@ -2735,7 +2739,7 @@ static void gelic_wl_setup_netdev_ops(struct net_device *netdev)
 /*
  * driver probe/remove
  */
-int gelic_wl_driver_probe(struct gelic_card *card)
+int __devinit gelic_wl_driver_probe(struct gelic_card *card)
 {
        int ret;
        struct net_device *netdev;