cfg80211: split wext compatibility to separate header

A lot of drivers erroneously use wext constants
and don't notice since cfg80211.h includes them.
Make this more split up so drivers needing wext
compatibility from cfg80211 need to explicitly
include that from cfg80211-wext.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit 262eb9b2237ecee047451a636e799ea1572b685a)
cfg80211: remove unused wext handler exports

A lot of code is dedicated to giving drivers the
ability to use cfg80211's wext handlers without
completely converting. However, only orinoco is
currently using this, and it is only partially
using it.

We reduce the size of both the source and binary
by removing those that nobody needs. If a driver
shows up that needs it during conversion, we can
add back those that are needed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit 04b0c5c6995103eef56391c163e970ab1f03b59f)
lib80211: remove exports for functions not called by other modules

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit 9d630c77960bcd7ae36815a985039b78f24c8ba2)
cfg80211: print bandwidth in chan_reg_rule_print_dbg()

Two spaces and the second "KHz" suggest that the code author meant to
print the bandwidth but forgot it.  The code appears in commit e702d3cf
already with two spaces and "KHz" in place of the bandwidth.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit 56e6786e59cba2c714091ed53deffa6001a32841)
cfg80211: hold reg_mutex when updating regulatory

The function wiphy_update_regulatory() uses the static variable
last_request and thus needs to be called with reg_mutex held.
This is the case for all users in reg.c, but the function was
exported for use by wiphy_register(), from where it is called
without the lock being held.

Fix this by making wiphy_update_regulatory() private and introducing
regulatory_update() as a wrapper that acquires and holds the lock.

Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: linux-wireless@vger.kernel.org
Acked-by:  Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit eac03e381957a05f3842ceb8de987a1025966ecf)
cfg80211: reorder code to obsolete forward declaration

Reorder functions to remove the need for a forward declaration
introduced by the last commit.

Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: linux-wireless@vger.kernel.org
Acked-by:  Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit d7549cbb9ab0674ef44ea15bd9f9ea1c685adfa6)