From patchwork Mon May 26 12:14:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Ha=C5=82asa?= X-Patchwork-Id: 4241991 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 680D1BF90B for ; Mon, 26 May 2014 12:19:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9FB30201ED for ; Mon, 26 May 2014 12:19:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10681201DE for ; Mon, 26 May 2014 12:19:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbaEZMTR (ORCPT ); Mon, 26 May 2014 08:19:17 -0400 Received: from ni.piap.pl ([195.187.100.4]:59417 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751624AbaEZMTR convert rfc822-to-8bit (ORCPT ); Mon, 26 May 2014 08:19:17 -0400 Received: from ni.piap.pl (localhost.localdomain [127.0.0.1]) by ni.piap.pl (Postfix) with ESMTP id B74E2440E93 for ; Mon, 26 May 2014 14:19:15 +0200 (CEST) Received: by ni.piap.pl (Postfix, from userid 1015) id B1F59440E94; Mon, 26 May 2014 14:19:15 +0200 (CEST) From: khalasa@piap.pl (Krzysztof =?utf-8?Q?Ha=C5=82asa?=) To: linux-wireless Date: Mon, 26 May 2014 14:14:46 +0200 MIME-Version: 1.0 Message-ID: Subject: [PATCH v3.15-rcX] Fix IBSS join by initializing last_scan_completed X-Anti-Virus: Kaspersky Anti-Virus for Linux Mail Server 5.6.44/RELEASE, bases: 20140401 #7726142, check: 20140526 clean Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Without this fix, freshly rebooted Linux creates a new IBSS, instead of joining existing one. Only when jiffies counter overflows after 5 minutes the IBSS can be successfully joined. Intel Wireless 7260 PCIe. Signed-off-by: Krzysztof Ha?asa --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -1648,6 +1648,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, sdata->u.ibss.control_port = params->control_port; sdata->u.ibss.userspace_handles_dfs = params->userspace_handles_dfs; sdata->u.ibss.basic_rates = params->basic_rates; + sdata->u.ibss.last_scan_completed = jiffies; /* fix basic_rates if channel does not support these rates */ rate_flags = ieee80211_chandef_rate_flags(¶ms->chandef);