]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/mwl8k.c
b43: add hardware tkip
[karo-tx-linux.git] / drivers / net / wireless / mwl8k.c
index 8a6d3afe41227741a1c61af92777a53466972767..c32e93c8c41057ce139c05855c373cff00a24ef8 100644 (file)
@@ -3031,13 +3031,6 @@ static int mwl8k_config_wt(struct work_struct *wt)
        struct mwl8k_priv *priv = hw->priv;
        int rc = 0;
 
-       if (!conf->radio_enabled) {
-               mwl8k_cmd_802_11_radio_control(hw, MWL8K_RADIO_DISABLE);
-               priv->current_channel = NULL;
-               rc = 0;
-               goto mwl8k_config_exit;
-       }
-
        if (mwl8k_cmd_802_11_radio_control(hw, MWL8K_RADIO_ENABLE)) {
                rc = -EINVAL;
                goto mwl8k_config_exit;
@@ -3251,31 +3244,50 @@ mwl8k_configure_filter_exit:
        return rc;
 }
 
+static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw,
+                                  int mc_count, struct dev_addr_list *mclist)
+{
+       struct mwl8k_configure_filter_worker *worker;
+
+       worker = kzalloc(sizeof(*worker), GFP_ATOMIC);
+
+       if (!worker)
+               return 0;
+
+       /*
+        * XXX: This is _HORRIBLY_ broken!!
+        *
+        *      No locking, the mclist pointer might be invalid as soon as this
+        *      function returns, something in the list might be invalidated
+        *      once we get to the worker, etc...
+        */
+       worker->mc_count = mc_count;
+       worker->mclist = mclist;
+
+       return (u64)worker;
+}
+
 static void mwl8k_configure_filter(struct ieee80211_hw *hw,
                                   unsigned int changed_flags,
                                   unsigned int *total_flags,
-                                  int mc_count,
-                                  struct dev_addr_list *mclist)
+                                  u64 multicast)
 {
 
-       struct mwl8k_configure_filter_worker *worker;
+       struct mwl8k_configure_filter_worker *worker = (void *)multicast;
        struct mwl8k_priv *priv = hw->priv;
 
        /* Clear unsupported feature flags */
        *total_flags &= MWL8K_SUPPORTED_IF_FLAGS;
 
-       if (!(changed_flags & MWL8K_SUPPORTED_IF_FLAGS) && !mc_count)
+       if (!(changed_flags & MWL8K_SUPPORTED_IF_FLAGS))
                return;
 
-       worker = kzalloc(sizeof(*worker), GFP_ATOMIC);
        if (worker == NULL)
                return;
 
        worker->header.options = MWL8K_WQ_QUEUE_ONLY | MWL8K_WQ_TX_WAIT_EMPTY;
        worker->changed_flags = changed_flags;
        worker->total_flags = total_flags;
-       worker->mc_count = mc_count;
-       worker->mclist = mclist;
 
        mwl8k_queue_work(hw, &worker->header, priv->config_wq,
                         mwl8k_configure_filter_wt);
@@ -3441,6 +3453,7 @@ static const struct ieee80211_ops mwl8k_ops = {
        .remove_interface       = mwl8k_remove_interface,
        .config                 = mwl8k_config,
        .bss_info_changed       = mwl8k_bss_info_changed,
+       .prepare_multicast      = mwl8k_prepare_multicast,
        .configure_filter       = mwl8k_configure_filter,
        .set_rts_threshold      = mwl8k_set_rts_threshold,
        .conf_tx                = mwl8k_conf_tx,