mac80211: dont use interface indices in drivers
[deliverable/linux.git] / drivers / net / wireless / rt2x00 / rt2x00mac.c
index 1ab2fb6c38da5a6a572e7499a045028d3bf73045..1d67bcd46bcb7e3fe895060c41b04b150e6b1334 100644 (file)
@@ -139,41 +139,11 @@ EXPORT_SYMBOL_GPL(rt2x00mac_tx);
 int rt2x00mac_start(struct ieee80211_hw *hw)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
-       int status;
 
-       if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags) ||
-           test_bit(DEVICE_STARTED, &rt2x00dev->flags))
+       if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags))
                return 0;
 
-       /*
-        * If this is the first interface which is added,
-        * we should load the firmware now.
-        */
-       if (test_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags)) {
-               status = rt2x00lib_load_firmware(rt2x00dev);
-               if (status)
-                       return status;
-       }
-
-       /*
-        * Initialize the device.
-        */
-       status = rt2x00lib_initialize(rt2x00dev);
-       if (status)
-               return status;
-
-       /*
-        * Enable radio.
-        */
-       status = rt2x00lib_enable_radio(rt2x00dev);
-       if (status) {
-               rt2x00lib_uninitialize(rt2x00dev);
-               return status;
-       }
-
-       __set_bit(DEVICE_STARTED, &rt2x00dev->flags);
-
-       return 0;
+       return rt2x00lib_start(rt2x00dev);
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_start);
 
@@ -184,13 +154,7 @@ void rt2x00mac_stop(struct ieee80211_hw *hw)
        if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags))
                return;
 
-       /*
-        * Perhaps we can add something smarter here,
-        * but for now just disabling the radio should do.
-        */
-       rt2x00lib_disable_radio(rt2x00dev);
-
-       __clear_bit(DEVICE_STARTED, &rt2x00dev->flags);
+       rt2x00lib_stop(rt2x00dev);
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_stop);
 
@@ -217,7 +181,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
            is_interface_present(intf))
                return -ENOBUFS;
 
-       intf->id = conf->if_id;
+       intf->id = conf->vif;
        intf->type = conf->type;
        if (conf->type == IEEE80211_IF_TYPE_AP)
                memcpy(&intf->bssid, conf->mac_addr, ETH_ALEN);
@@ -301,7 +265,8 @@ int rt2x00mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_config);
 
-int rt2x00mac_config_interface(struct ieee80211_hw *hw, int if_id,
+int rt2x00mac_config_interface(struct ieee80211_hw *hw,
+                              struct ieee80211_vif *vif,
                               struct ieee80211_if_conf *conf)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
This page took 0.026578 seconds and 5 git commands to generate.