diff options
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index fcd9027c6699..5e577bd0e6aa 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -365,7 +365,12 @@ static int sta_info_insert_drv_state(struct ieee80211_local *local, | |||
365 | } | 365 | } |
366 | 366 | ||
367 | if (!err) { | 367 | if (!err) { |
368 | sta->uploaded = true; | 368 | /* |
369 | * Drivers using legacy sta_add/sta_remove callbacks only | ||
370 | * get uploaded set to true after sta_add is called. | ||
371 | */ | ||
372 | if (!local->ops->sta_add) | ||
373 | sta->uploaded = true; | ||
369 | return 0; | 374 | return 0; |
370 | } | 375 | } |
371 | 376 | ||
@@ -417,18 +422,9 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU) | |||
417 | 422 | ||
418 | if (!sta->dummy || dummy_reinsert) { | 423 | if (!sta->dummy || dummy_reinsert) { |
419 | /* notify driver */ | 424 | /* notify driver */ |
420 | err = drv_sta_add(local, sdata, &sta->sta); | 425 | err = sta_info_insert_drv_state(local, sdata, sta); |
421 | if (err) { | 426 | if (err) |
422 | if (sdata->vif.type != NL80211_IFTYPE_ADHOC) | 427 | goto out_err; |
423 | goto out_err; | ||
424 | printk(KERN_DEBUG "%s: failed to add IBSS STA %pM to " | ||
425 | "driver (%d) - keeping it anyway.\n", | ||
426 | sdata->name, sta->sta.addr, err); | ||
427 | } else { | ||
428 | err = sta_info_insert_drv_state(local, sdata, sta); | ||
429 | if (err) | ||
430 | goto out_err; | ||
431 | } | ||
432 | } | 428 | } |
433 | 429 | ||
434 | if (!dummy_reinsert) { | 430 | if (!dummy_reinsert) { |
@@ -802,7 +798,6 @@ int __must_check __sta_info_destroy(struct sta_info *sta) | |||
802 | } | 798 | } |
803 | 799 | ||
804 | if (sta->uploaded) { | 800 | if (sta->uploaded) { |
805 | drv_sta_remove(local, sdata, &sta->sta); | ||
806 | ret = drv_sta_state(local, sdata, sta, IEEE80211_STA_NONE, | 801 | ret = drv_sta_state(local, sdata, sta, IEEE80211_STA_NONE, |
807 | IEEE80211_STA_NOTEXIST); | 802 | IEEE80211_STA_NOTEXIST); |
808 | WARN_ON_ONCE(ret != 0); | 803 | WARN_ON_ONCE(ret != 0); |