cfg80211: remove channel_switch combination check
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 25 Jun 2014 10:35:10 +0000 (12:35 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 25 Jun 2014 16:06:20 +0000 (18:06 +0200)
Driver is now responsible for veryfing if the
switch is possible.

Since this is inherently tricky driver may decide
to disconnect an interface later with
cfg80211_stop_iface().

This doesn't mean driver can accept everything. It
should do it's best to verify requests and reject
them as soon as possible.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/nl80211.c

index b9eeae3990cf3106b311797d41e2bc2cb3ad8c9b..0a080c4de2754d0b9fc64ecf54e8dc4bcb477cf3 100644 (file)
@@ -2301,7 +2301,12 @@ struct cfg80211_qos_map {
  *     reliability. This operation can not fail.
  * @set_coalesce: Set coalesce parameters.
  *
- * @channel_switch: initiate channel-switch procedure (with CSA)
+ * @channel_switch: initiate channel-switch procedure (with CSA). Driver is
+ *     responsible for veryfing if the switch is possible. Since this is
+ *     inherently tricky driver may decide to disconnect an interface later
+ *     with cfg80211_stop_iface(). This doesn't mean driver can accept
+ *     everything. It should do it's best to verify requests and reject them
+ *     as soon as possible.
  *
  * @set_qos_map: Set QoS mapping information to the driver
  *
index 8f46b8ffbcf607e458acf34f1a12a5ba24366eee..c10295138eb5c64fca5c6321ada8e0e1195b3530 100644 (file)
@@ -6013,17 +6013,6 @@ skip_beacons:
                params.radar_required = true;
        }
 
-       /* TODO: I left this here for now.  With channel switch, the
-        * verification is a bit more complicated, because we only do
-        * it later when the channel switch really happens.
-        */
-       err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,
-                                          params.chandef.chan,
-                                          CHAN_MODE_SHARED,
-                                          radar_detect_width);
-       if (err)
-               return err;
-
        if (info->attrs[NL80211_ATTR_CH_SWITCH_BLOCK_TX])
                params.block_tx = true;