]> err.no Git - linux-2.6/blobdiff - net/mac80211/ieee80211.c
ocfs2: Unlock mutex in local alloc failure case
[linux-2.6] / net / mac80211 / ieee80211.c
index 2ddf4ef4065e7713604f814616b7d50fa47fd907..ff2172ffd8611758ba00efa2abc349892ca11015 100644 (file)
@@ -1650,6 +1650,7 @@ static int ieee80211_master_start_xmit(struct sk_buff *skb,
        if (skb_headroom(skb) < headroom) {
                if (pskb_expand_head(skb, headroom, 0, GFP_ATOMIC)) {
                        dev_kfree_skb(skb);
+                       dev_put(odev);
                        return 0;
                }
        }
@@ -4677,7 +4678,6 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb,
                        memset(skb->cb, 0, sizeof(skb->cb));
                        netif_rx(skb);
                        skb = skb2;
-                       break;
                }
        }
  out:
@@ -4986,8 +4986,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
         * and we need some headroom for passing the frame to monitor
         * interfaces, but never both at the same time.
         */
-       local->tx_headroom = max(local->hw.extra_tx_headroom,
-                                sizeof(struct ieee80211_tx_status_rtap_hdr));
+       local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
+                                  sizeof(struct ieee80211_tx_status_rtap_hdr));
 
        debugfs_hw_add(local);
 
@@ -5095,7 +5095,7 @@ int ieee80211_register_hwmode(struct ieee80211_hw *hw,
        }
 
        if (!(hw->flags & IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED))
-               ieee80211_init_client(local->mdev);
+               ieee80211_set_default_regdomain(mode);
 
        return 0;
 }
@@ -5246,6 +5246,7 @@ static int __init ieee80211_init(void)
        }
 
        ieee80211_debugfs_netdev_init();
+       ieee80211_regdomain_init();
 
        return 0;
 }
@@ -5258,7 +5259,7 @@ static void __exit ieee80211_exit(void)
 }
 
 
-module_init(ieee80211_init);
+subsys_initcall(ieee80211_init);
 module_exit(ieee80211_exit);
 
 MODULE_DESCRIPTION("IEEE 802.11 subsystem");