wlcore/wl12xx: add hw op for vif init
authorArik Nemtsov <arik@wizery.com>
Tue, 13 Dec 2011 10:15:09 +0000 (12:15 +0200)
committerLuciano Coelho <coelho@ti.com>
Thu, 12 Apr 2012 05:44:01 +0000 (08:44 +0300)
Add an op for family-specific vif initialization.  Currently unused,
but will be needed when wl18xx support is implemented.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wl12xx/main.c
drivers/net/wireless/ti/wlcore/hw_ops.h
drivers/net/wireless/ti/wlcore/init.c
drivers/net/wireless/ti/wlcore/wlcore.h

index 9b2f40cd58d781b958d7cb0bdf313422473cccff..564ca914bfcf6bc7713da5bbfada29269980ebb0 100644 (file)
@@ -915,6 +915,7 @@ static struct wlcore_ops wl12xx_ops = {
        .tx_immediate_compl     = NULL,
        .tx_delayed_compl       = wl12xx_tx_delayed_compl,
        .hw_init                = wl12xx_hw_init,
+       .init_vif               = NULL,
        .get_pg_ver             = wl12xx_get_pg_ver,
        .get_mac                = wl12xx_get_mac,
 };
index 9fc64295293f4345b695702963a39379e2235b30..6fc71430e9639a93b0b096f4306e5b210e1adeca 100644 (file)
@@ -93,4 +93,13 @@ static inline void wlcore_hw_tx_immediate_compl(struct wl1271 *wl)
                wl->ops->tx_immediate_compl(wl);
 }
 
+static inline int
+wlcore_hw_init_vif(struct wl1271 *wl, struct wl12xx_vif *wlvif)
+{
+       if (wl->ops->init_vif)
+               return wl->ops->init_vif(wl, wlvif);
+
+       return 0;
+}
+
 #endif
index afe4f753f70681d4c6f1b43780a09f2a5376826d..9f89255eb6e616e6fd47c2544121584f32156e06 100644 (file)
@@ -32,6 +32,7 @@
 #include "cmd.h"
 #include "tx.h"
 #include "io.h"
+#include "hw_ops.h"
 
 int wl1271_init_templates_config(struct wl1271 *wl)
 {
@@ -638,6 +639,10 @@ int wl1271_init_vif_specific(struct wl1271 *wl, struct ieee80211_vif *vif)
        if (ret < 0)
                return ret;
 
+       ret = wlcore_hw_init_vif(wl, wlvif);
+       if (ret < 0)
+               return ret;
+
        return 0;
 }
 
index 91ccd1e36389c4ea95de9754a528d995143f9c7a..7e2881d38860cf92f82d43244a05f27926b46206 100644 (file)
@@ -54,6 +54,7 @@ struct wlcore_ops {
        void (*tx_delayed_compl)(struct wl1271 *wl);
        void (*tx_immediate_compl)(struct wl1271 *wl);
        int (*hw_init)(struct wl1271 *wl);
+       int (*init_vif)(struct wl1271 *wl, struct wl12xx_vif *wlvif);
        s8 (*get_pg_ver)(struct wl1271 *wl);
        void (*get_mac)(struct wl1271 *wl);
 };