staging: brcm80211: removed log after kzalloc()/kmalloc() failure
[pandora-kernel.git] / drivers / staging / brcm80211 / brcmsmac / phy_shim.c
index 82ecdcd..e0c19b6 100644 (file)
  */
 
 /*
- * This is "two-way" interface, acting as the SHIM layer between WL and PHY layer.
- *   WL driver can optinally call this translation layer to do some preprocessing, then reach PHY.
- *   On the PHY->WL driver direction, all calls go through this layer since PHY doesn't have the
- *   access to wlc_hw pointer.
+ * This is "two-way" interface, acting as the SHIM layer between driver
+ * and PHY layer. The driver can optionally call this translation layer
+ * to do some preprocessing, then reach PHY. On the PHY->driver direction,
+ * all calls go through this layer since PHY doesn't have access to the
+ * driver's brcms_hardware pointer.
  */
 #include <linux/slab.h>
 #include <net/mac80211.h>
 
-#include "bmac.h"
 #include "main.h"
 #include "mac80211_if.h"
 #include "phy_shim.h"
 /* PHY SHIM module specific state */
 struct phy_shim_info {
        struct brcms_hardware *wlc_hw;  /* pointer to main wlc_hw structure */
-       void *wlc;              /* pointer to main wlc structure */
-       void *wl;               /* pointer to os-specific private state */
+       struct brcms_c_info *wlc;       /* pointer to main wlc structure */
+       struct brcms_info *wl; /* pointer to os-specific private state */
 };
 
 struct phy_shim_info *wlc_phy_shim_attach(struct brcms_hardware *wlc_hw,
-                                                      void *wl, void *wlc) {
+                                         struct brcms_info *wl,
+                                         struct brcms_c_info *wlc) {
        struct phy_shim_info *physhim = NULL;
 
        physhim = kzalloc(sizeof(struct phy_shim_info), GFP_ATOMIC);
-       if (!physhim) {
-               wiphy_err(wlc_hw->wlc->wiphy,
-                         "wl%d: wlc_phy_shim_attach: out of mem\n",
-                         wlc_hw->unit);
+       if (!physhim)
                return NULL;
-       }
+
        physhim->wlc_hw = wlc_hw;
        physhim->wlc = wlc;
        physhim->wl = wl;
@@ -59,11 +57,12 @@ void wlc_phy_shim_detach(struct phy_shim_info *physhim)
 }
 
 struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim,
-                                    void (*fn) (void *arg), void *arg,
-                                    const char *name)
+                                    void (*fn)(struct brcms_phy *pi),
+                                    void *arg, const char *name)
 {
        return (struct wlapi_timer *)
-                       brcms_init_timer(physhim->wl, fn, arg, name);
+                       brcms_init_timer(physhim->wl, (void (*)(void *))fn,
+                                        arg, name);
 }
 
 void wlapi_free_timer(struct phy_shim_info *physhim, struct wlapi_timer *t)