From patchwork Mon Jan 9 14:25:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 90463 Delivered-To: patches@linaro.org Received: by 10.140.20.99 with SMTP id 90csp105756qgi; Mon, 9 Jan 2017 06:26:01 -0800 (PST) X-Received: by 10.194.120.226 with SMTP id lf2mr65889286wjb.130.1483971961604; Mon, 09 Jan 2017 06:26:01 -0800 (PST) Return-Path: Received: from mail-wj0-x22d.google.com (mail-wj0-x22d.google.com. [2a00:1450:400c:c01::22d]) by mx.google.com with ESMTPS id h10si16637506wjf.235.2017.01.09.06.26.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2017 06:26:01 -0800 (PST) Received-SPF: pass (google.com: domain of jorge.ramirez-ortiz@linaro.org designates 2a00:1450:400c:c01::22d as permitted sender) client-ip=2a00:1450:400c:c01::22d; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of jorge.ramirez-ortiz@linaro.org designates 2a00:1450:400c:c01::22d as permitted sender) smtp.mailfrom=jorge.ramirez-ortiz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-wj0-x22d.google.com with SMTP id ew7so52356467wjc.3 for ; Mon, 09 Jan 2017 06:26:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=tswusr1lKJzU7y4135SwMqLLgE+XBvHqgOR8s/7bmLE=; b=kHF/utTcDYvUeW2qkZ1ZNMIyTY5P/bRTpEC0j7AVhjZNvqDUOdJ2+wL1QAFBegKCUK HMofEcCWnXOCQOY24RaY9v8SHILS75ppurnpUgJaIaHwcydDZ9zLRGrgIPJrGUl4TpW+ fVrHm0KahB71Jfx61zHk51MFjO9mm9L/fRZzs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tswusr1lKJzU7y4135SwMqLLgE+XBvHqgOR8s/7bmLE=; b=Rpt6fJT0cGHN2Ykhn11/LzSGtGHQV4FIfhaWuJoqsupEbFQnuk3P+uhbBDCJPG9P3V 8QEVLXPWOPZPlwQVbSbf8/VTqQkYsoVNOfCiMk+A7LavrMaQKQDbPas1D5JTqfW86YLo iA758PqHTOoNWZ8Efg4SELME5tJl3ndcWV4OvpsUhdC9+BuN9RgfWfKkKRRUCw8eCzGE Z5Bvm3M44dCicbnAYCExLnQq1R8wfHhY0vWMqjIvCBtfaRDtY9H3vAFmEA0SKnCx88d5 ZQkR8Nk25zJXH5okPVov9H94k/y4RDWp0cZJHWarOcGgAGyKaz9WGIZEMlIW9RkwFESP oWWw== X-Gm-Message-State: AIkVDXI5d48gJhxLiHWOgjlLSx1wTk1P2eEtVzPaIq+4HGf9mLCKIQzNDeEDdbI08UZfEs6Z8kE= X-Received: by 10.194.46.132 with SMTP id v4mr4634183wjm.98.1483971961169; Mon, 09 Jan 2017 06:26:01 -0800 (PST) Return-Path: Received: from localhost.localdomain (74.red-81-38-250.dynamicip.rima-tde.net. [81.38.250.74]) by smtp.gmail.com with ESMTPSA id jm6sm123822765wjb.27.2017.01.09.06.25.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Jan 2017 06:26:00 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, daniel.lezcano@linaro.org, daniel.thompson@linaro.org Subject: [PATCH] cfg80211: wext does not need to set monitor channel in managed mode Date: Mon, 9 Jan 2017 15:25:49 +0100 Message-Id: <1483971949-10014-1-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 There is not a valid reason to attempt setting the monitor channel while in managed mode. Since this code path only deals with this mode, remove the code block. Signed-off-by: Jorge Ramirez-Ortiz --- net/wireless/wext-sme.c | 23 ----------------------- 1 file changed, 23 deletions(-) -- 2.7.4 diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c index 9951638..c434f19 100644 --- a/net/wireless/wext-sme.c +++ b/net/wireless/wext-sme.c @@ -105,30 +105,7 @@ int cfg80211_mgd_wext_siwfreq(struct net_device *dev, goto out; } - wdev->wext.connect.channel = chan; - - /* - * SSID is not set, we just want to switch monitor channel, - * this is really just backward compatibility, if the SSID - * is set then we use the channel to select the BSS to use - * to connect to instead. If we were connected on another - * channel we disconnected above and reconnect below. - */ - if (chan && !wdev->wext.connect.ssid_len) { - struct cfg80211_chan_def chandef = { - .width = NL80211_CHAN_WIDTH_20_NOHT, - .center_freq1 = freq, - }; - - chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq); - if (chandef.chan) - err = cfg80211_set_monitor_channel(rdev, &chandef); - else - err = -EINVAL; - goto out; - } - err = cfg80211_mgd_wext_connect(rdev, wdev); out: wdev_unlock(wdev);