From patchwork Wed Nov 7 11:52:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1710371 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BE27D3FC8F for ; Wed, 7 Nov 2012 11:53:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754280Ab2KGLxG (ORCPT ); Wed, 7 Nov 2012 06:53:06 -0500 Received: from contumacia.investici.org ([178.255.144.35]:59973 "EHLO contumacia.investici.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738Ab2KGLxE (ORCPT ); Wed, 7 Nov 2012 06:53:04 -0500 Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id EDBD9E8B98; Wed, 7 Nov 2012 11:53:02 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org EDBD9E8B98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1352289183; bh=rzAMJi7Gd2FJ0Wk7UErJC2ypKmsWJkIq+YoapEozxqQ=; h=From:To:Cc:Subject:Date:Message-Id; b=u5GItkTbu7FqxEf5Mj4e/NS5Q+2oNFA+CJBITtVqLFi45fw1hgkFXwga3k51wcHDN seHEgooPKtEPzLzjAdiBHlz6JnK7eSnZAdMGBSpZ4ZX2ondf+0LliAmH924SvFduMY ISNkmjXgx2NgG5r58u2wigsY0EdfkF6uHWZlMGRw= From: Antonio Quartulli To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Antonio Quartulli Subject: [PATCH 1/2] cfg80211: store the ssid into wirless_dev in AP mode Date: Wed, 7 Nov 2012 12:52:19 +0100 Message-Id: <1352289140-20515-1-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.8.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Store the configured ssid in wdev->ssid when starting an AP Signed-off-by: Antonio Quartulli --- net/wireless/ap.c | 1 + net/wireless/nl80211.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/net/wireless/ap.c b/net/wireless/ap.c index e143505..324e8d8 100644 --- a/net/wireless/ap.c +++ b/net/wireless/ap.c @@ -28,6 +28,7 @@ static int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev, if (!err) { wdev->beacon_interval = 0; wdev->channel = NULL; + wdev->ssid_len = 0; } return err; diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ba44f98..e521ca0 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -2649,6 +2649,8 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) wdev->preset_chantype = params.channel_type; wdev->beacon_interval = params.beacon_interval; wdev->channel = params.channel; + wdev->ssid_len = params.ssid_len; + memcpy(wdev->ssid, params.ssid, wdev->ssid_len); } return err; }