From patchwork Tue Oct 7 09:42:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karl Beldan X-Patchwork-Id: 5044401 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2C67C9F30B for ; Tue, 7 Oct 2014 09:42:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2BB93201B9 for ; Tue, 7 Oct 2014 09:42:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E32FC2015E for ; Tue, 7 Oct 2014 09:42:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753180AbaJGJmk (ORCPT ); Tue, 7 Oct 2014 05:42:40 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:37608 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753194AbaJGJmk (ORCPT ); Tue, 7 Oct 2014 05:42:40 -0400 Received: by mail-wi0-f179.google.com with SMTP id d1so7251410wiv.12 for ; Tue, 07 Oct 2014 02:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=4CrCDelrXKFMowFVtUJImkQsFMDkc87/VO/3mblnUdU=; b=QMTh9YGMeuoPn8178aCFB+J1USd/9UsbfdqABx47yOteoLm4heMGJSveOz7W/1JoIh JNdhu4YX19KHpAhBoCFnp80LGu31nS/e94qrEs50ZsgOlBRF3EvVhZyt4vfq4ZZpSs1N 3ZxAKdxbq6K531aQERlUSF9TOVS6ospaqLoz7FLSsPUVrgo0r00aiJkdUe+3RRpzPTPk S3uU6sEt9r21Pa8Cim3wOtrm/uFdoCOuGKh34iI+YhQNZ3eH48hyQgqnbWp+yeqZTRkc A3b6HM1KwaPvdTYuZ3dggjdG7U6LGwtfuLOHxJf7D+aCvtmLvC/LsYD2FKPLfJRjQnuM U0gw== X-Received: by 10.180.198.203 with SMTP id je11mr25991498wic.69.1412674958831; Tue, 07 Oct 2014 02:42:38 -0700 (PDT) Received: from magnum.frso.rivierawaves.com (vpn.rivierawaves.com. [91.151.119.162]) by mx.google.com with ESMTPSA id f10sm14039630wiz.11.2014.10.07.02.42.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Oct 2014 02:42:38 -0700 (PDT) From: Karl Beldan To: Johannes Berg Cc: linux-wireless , Karl Beldan , Karl Beldan Subject: [PATCH] cfg80211: set the rates mask in connection probes over specified freq Date: Tue, 7 Oct 2014 11:42:18 +0200 Message-Id: <1412674938-13071-1-git-send-email-karl.beldan@gmail.com> X-Mailer: git-send-email 2.0.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Karl Beldan ATM, specifying the frequency when connecting sends a void 'supported rates' EID. Signed-off-by: Karl Beldan --- net/wireless/sme.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 8bbeeb3..2ebc54b 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -80,9 +80,16 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) if (!request) return -ENOMEM; - if (wdev->conn->params.channel) + if (wdev->conn->params.channel) { + enum ieee80211_band band = wdev->conn->params.channel->band; + struct ieee80211_supported_band *sband = + wdev->wiphy->bands[band]; + + if (!sband) + return -EINVAL; request->channels[0] = wdev->conn->params.channel; - else { + request->rates[band] = (1 << sband->n_bitrates) - 1; + } else { int i = 0, j; enum ieee80211_band band; struct ieee80211_supported_band *bands;