From patchwork Sun Aug 2 11:34:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 6924861 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B299EC05AC for ; Sun, 2 Aug 2015 11:35:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA33C2052A for ; Sun, 2 Aug 2015 11:35:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E782E20480 for ; Sun, 2 Aug 2015 11:35:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751214AbbHBLfF (ORCPT ); Sun, 2 Aug 2015 07:35:05 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:38012 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751031AbbHBLfE (ORCPT ); Sun, 2 Aug 2015 07:35:04 -0400 Received: by wibxm9 with SMTP id xm9so81407129wib.1; Sun, 02 Aug 2015 04:35:03 -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=BDcdKbJY6bABCG6HMKHotEsZ1LZc1gkVISXWxSBYpLk=; b=rpacqZENjPzTNW6FnIkKNsWrSECL9hia0QaN18i1N7UcYNGGRMFrHWl8RlyWlOP+/l KIZz0+OZxUomr9tgDsZHp3sqxOBTFgPFVdACt2NA9SD+dsbHBT6kWFyC+z1keV2+saTJ g29RFcelCH46Ee0eLL2vAiX9SpOBveBWi+KYdU8AXqSQrzJr6JQpOYUSbygeCMCuCQ9h GMueTXyXWYO73Esf5b8hF6k2UV6Y7LuZ1D+ujpLbgnTDvAvTyrM9V4YQW5GnqVG8W8z8 n5c4Nfl/FB+u7u9gL2lEo1gknbZjKJxQBd06gjEZg826iRrKDISO49h5JSWcWGwph02K 9vhA== X-Received: by 10.194.121.163 with SMTP id ll3mr25122186wjb.142.1438515302971; Sun, 02 Aug 2015 04:35:02 -0700 (PDT) Received: from tipsey.3.home (188.30.144.161.threembb.co.uk. [188.30.144.161]) by smtp.gmail.com with ESMTPSA id fs8sm17142486wjb.7.2015.08.02.04.35.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Aug 2015 04:35:02 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley , Subject: [PATCH] staging: vt6655: vnt_bss_info_changed check conf->beacon_rate is not NULL Date: Sun, 2 Aug 2015 12:34:46 +0100 Message-Id: <1438515286-3316-1-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.5.0 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.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 conf->beacon_rate can be NULL on association. So check conf->beacon_rate BSS_CHANGED_BEACON_INFO needs to flagged in changed as the beacon_rate will appear later. Signed-off-by: Malcolm Priestley Cc: # v3.19+ --- drivers/staging/vt6655/device_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index c97353b..b74af8d 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1456,8 +1456,9 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, } } - if (changed & BSS_CHANGED_ASSOC && priv->op_mode != NL80211_IFTYPE_AP) { - if (conf->assoc) { + if (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_BEACON_INFO) && + priv->op_mode != NL80211_IFTYPE_AP) { + if (conf->assoc && conf->beacon_rate) { CARDbUpdateTSF(priv, conf->beacon_rate->hw_value, conf->sync_tsf);