mac80211: make CALL_TXH a statement
[safe/jmp/linux-2.6] / net / mac80211 / cfg.c
index 36f8f24..a0c7eb1 100644 (file)
@@ -57,19 +57,9 @@ static int ieee80211_add_iface(struct wiphy *wiphy, char *name,
        return 0;
 }
 
-static int ieee80211_del_iface(struct wiphy *wiphy, int ifindex)
+static int ieee80211_del_iface(struct wiphy *wiphy, struct net_device *dev)
 {
-       struct net_device *dev;
-       struct ieee80211_sub_if_data *sdata;
-
-       /* we're under RTNL */
-       dev = __dev_get_by_index(&init_net, ifindex);
-       if (!dev)
-               return -ENODEV;
-
-       sdata = IEEE80211_DEV_TO_SUB_IF(dev);
-
-       ieee80211_if_remove(sdata);
+       ieee80211_if_remove(IEEE80211_DEV_TO_SUB_IF(dev));
 
        return 0;
 }
@@ -333,6 +323,8 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
 {
        struct ieee80211_sub_if_data *sdata = sta->sdata;
 
+       sinfo->generation = sdata->local->sta_generation;
+
        sinfo->filled = STATION_INFO_INACTIVE_TIME |
                        STATION_INFO_RX_BYTES |
                        STATION_INFO_TX_BYTES |
@@ -746,13 +738,6 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
 
        err = sta_info_insert(sta);
        if (err) {
-               /* STA has been freed */
-               if (err == -EEXIST && layer2_update) {
-                       /* Need to update layer 2 devices on reassociation */
-                       sta = sta_info_get(local, mac);
-                       if (sta)
-                               ieee80211_send_layer2_update(sta);
-               }
                rcu_read_unlock();
                return err;
        }
@@ -919,6 +904,8 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop,
        else
                memset(next_hop, 0, ETH_ALEN);
 
+       pinfo->generation = mesh_paths_generation;
+
        pinfo->filled = MPATH_INFO_FRAME_QLEN |
                        MPATH_INFO_DSN |
                        MPATH_INFO_METRIC |
@@ -1293,7 +1280,7 @@ static void ieee80211_rfkill_poll(struct wiphy *wiphy)
 }
 
 #ifdef CONFIG_NL80211_TESTMODE
-int ieee80211_testmode_cmd(struct wiphy *wiphy, void *data, int len)
+static int ieee80211_testmode_cmd(struct wiphy *wiphy, void *data, int len)
 {
        struct ieee80211_local *local = wiphy_priv(wiphy);