diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-06-23 12:09:25 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-06-23 12:09:25 -0700 |
| commit | 6f56b2a9c8e2ce69e2a98e52d5f1342b25cae44e (patch) | |
| tree | 3c8c4a7990ec0425ee283af7e1a9e7dc21da32d1 /drivers | |
| parent | 7e03e0f79ac2829d9dbe971bfeb9f6d8f402e71b (diff) | |
| parent | 1e56d5504052c25f0b664514bb24c5af2d496c18 (diff) | |
Merge "ath10k: Add change interface handler"
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 0acbe81eb6ce..24485466704b 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -5230,6 +5230,26 @@ static void ath10k_remove_interface(struct ieee80211_hw *hw, mutex_unlock(&ar->conf_mutex); } +static int ath10k_change_interface(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + enum nl80211_iftype new_type, bool p2p) +{ + struct ath10k *ar = hw->priv; + int ret = 0; + + ath10k_dbg(ar, ATH10K_DBG_MAC, + "change_interface new: %d (%d), old: %d (%d)\n", new_type, + p2p, vif->type, vif->p2p); + + if (new_type != vif->type || vif->p2p != p2p) { + ath10k_remove_interface(hw, vif); + vif->type = new_type; + vif->p2p = p2p; + ret = ath10k_add_interface(hw, vif); + } + return ret; +} + /* * FIXME: Has to be verified. */ @@ -7471,6 +7491,7 @@ static const struct ieee80211_ops ath10k_ops = { .stop = ath10k_stop, .config = ath10k_config, .add_interface = ath10k_add_interface, + .change_interface = ath10k_change_interface, .remove_interface = ath10k_remove_interface, .configure_filter = ath10k_configure_filter, .bss_info_changed = ath10k_bss_info_changed, |
