diff options
author | Ola Olsson <ola1olsson@gmail.com> | 2015-12-16 22:43:35 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-02-24 09:04:20 +0100 |
commit | de3bb771f471ba7c745a913b95eee70d5fb199b1 (patch) | |
tree | 7d8e0743bc37042664da6aa19e6553c2a3160858 /net/wireless | |
parent | 506bcfa8abebdbcebdc17b03e96e38dc0b8ce765 (diff) | |
download | linux-de3bb771f471ba7c745a913b95eee70d5fb199b1.tar.gz linux-de3bb771f471ba7c745a913b95eee70d5fb199b1.tar.bz2 linux-de3bb771f471ba7c745a913b95eee70d5fb199b1.zip |
cfg80211: add more warnings for inconsistent ops
Print a warning whenever an expected callback function
lacks implementation.
Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index b0915515640e..3a9c41bc849a 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -352,6 +352,16 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv, WARN_ON(ops->add_station && !ops->del_station); WARN_ON(ops->add_mpath && !ops->del_mpath); WARN_ON(ops->join_mesh && !ops->leave_mesh); + WARN_ON(ops->start_p2p_device && !ops->stop_p2p_device); + WARN_ON(ops->start_ap && !ops->stop_ap); + WARN_ON(ops->join_ocb && !ops->leave_ocb); + WARN_ON(ops->suspend && !ops->resume); + WARN_ON(ops->sched_scan_start && !ops->sched_scan_stop); + WARN_ON(ops->remain_on_channel && !ops->cancel_remain_on_channel); + WARN_ON(ops->tdls_channel_switch && !ops->tdls_cancel_channel_switch); + WARN_ON(ops->add_tx_ts && !ops->del_tx_ts); + WARN_ON(ops->set_tx_power && !ops->get_tx_power); + WARN_ON(ops->set_antenna && !ops->get_antenna); alloc_size = sizeof(*rdev) + sizeof_priv; |