diff options
author | Ben Greear <greearb@candelatech.com> | 2014-10-22 15:23:01 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-10-27 03:48:31 -0400 |
commit | ad28757eef268e609677d0e3d8c0bdadde52a711 (patch) | |
tree | 984c07ef1b79cc56fd0d0628db5759cefa87b45e /net | |
parent | 1998d90ad424c1ff12ea24816ce158d5262e06a5 (diff) |
mac80211: allow creating wiphy devices with suggested name
Support creating wiphy devices with an optional name.
This will be used by hwsim to have better automated control
over virtual radio creation/deletion.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 9e322dce64ec..b189122d4b20 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -478,8 +478,9 @@ static const struct ieee80211_vht_cap mac80211_vht_capa_mod_mask = { | |||
478 | }, | 478 | }, |
479 | }; | 479 | }; |
480 | 480 | ||
481 | struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | 481 | struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, |
482 | const struct ieee80211_ops *ops) | 482 | const struct ieee80211_ops *ops, |
483 | const char *requested_name) | ||
483 | { | 484 | { |
484 | struct ieee80211_local *local; | 485 | struct ieee80211_local *local; |
485 | int priv_size, i; | 486 | int priv_size, i; |
@@ -519,7 +520,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
519 | */ | 520 | */ |
520 | priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len; | 521 | priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len; |
521 | 522 | ||
522 | wiphy = wiphy_new(&mac80211_config_ops, priv_size); | 523 | wiphy = wiphy_new_nm(&mac80211_config_ops, priv_size, requested_name); |
523 | 524 | ||
524 | if (!wiphy) | 525 | if (!wiphy) |
525 | return NULL; | 526 | return NULL; |
@@ -649,7 +650,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
649 | 650 | ||
650 | return &local->hw; | 651 | return &local->hw; |
651 | } | 652 | } |
652 | EXPORT_SYMBOL(ieee80211_alloc_hw); | 653 | EXPORT_SYMBOL(ieee80211_alloc_hw_nm); |
653 | 654 | ||
654 | static int ieee80211_init_cipher_suites(struct ieee80211_local *local) | 655 | static int ieee80211_init_cipher_suites(struct ieee80211_local *local) |
655 | { | 656 | { |