From patchwork Fri Feb 14 04:24:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Yeow Yeoh X-Patchwork-Id: 3649761 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 977379F334 for ; Fri, 14 Feb 2014 04:25:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD4E12020E for ; Fri, 14 Feb 2014 04:25:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA7A320204 for ; Fri, 14 Feb 2014 04:25:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751416AbaBNEZL (ORCPT ); Thu, 13 Feb 2014 23:25:11 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:55896 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbaBNEZK (ORCPT ); Thu, 13 Feb 2014 23:25:10 -0500 Received: by mail-pa0-f43.google.com with SMTP id rd3so11703872pab.16 for ; Thu, 13 Feb 2014 20:25:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=x7DxszYFshudK2xq6WDPJ6qDIgpRYHaXI12x8ZSYfV8=; b=bzhZRO1/A1OLxO3WwhRtHrfteheMFTnVfyr8G1+oDLNWbMrRfeTXnnunRNSu/3KWWJ thdBE3/p1wJFNkHvr2qvqC5JFIIzr3JuNUN9xXoqCjDDcRzduYAXZb0yneUYRipxm64Y 1QBzfJO7hcfdyUCcGZTHIuLZFzAnNgsF3ZPWwbcAfzay/ZbISGK7Vwph+aJNtnPnc0u5 uAXBHyxft1Ydx9LCnqMID+6WUjqepiB6lHicuyDbPQikWQld79y4g4UAusN2yJMQs1AJ ju0mEMBhknHLpsq4ymNU0iSAYFWA0yy4RW7QTR00QdbjJjs8i482tBw3bNPOiJlTQji2 nLgg== X-Received: by 10.68.218.65 with SMTP id pe1mr6307177pbc.1.1392351909304; Thu, 13 Feb 2014 20:25:09 -0800 (PST) Received: from localhost.localdomain ([58.26.233.145]) by mx.google.com with ESMTPSA id rb6sm12179594pbb.41.2014.02.13.20.25.06 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Feb 2014 20:25:08 -0800 (PST) From: Chun-Yeow Yeoh To: linux-wireless@vger.kernel.org Cc: ath10k@lists.infradead.org, kvalo@qca.qualcomm.com, Chun-Yeow Yeoh Subject: [PATCH v2] ath10k: implement drv_get_tsf for ibss merging Date: Fri, 14 Feb 2014 12:24:55 +0800 Message-Id: <1392351895-20495-1-git-send-email-yeohchunyeow@gmail.com> X-Mailer: git-send-email 1.7.9.5 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.4 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 Implement the get TSF by simply returning 0 so that IBSS merging is happening. Otherwise, IBSS nodes that have similar SSID naming won't merge. This is simply fooling the mac80211 that the TSF in the received beacon is higher than the local TSF. Signed-off-by: Chun-Yeow Yeoh --- v2: simplify without mutex (Kalle Valo) drivers/net/wireless/ath/ath10k/mac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index afa1226..f39d1b0 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4049,6 +4049,15 @@ static void ath10k_sta_rc_update(struct ieee80211_hw *hw, ieee80211_queue_work(hw, &arsta->update_wk); } +static u64 ath10k_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +{ + /* FIXME: Return 0 for time being. Need to figure out whether FW has + * the API to fetch 64-bit local TSF + */ + + return 0; +} + static const struct ieee80211_ops ath10k_ops = { .tx = ath10k_tx, .start = ath10k_start, @@ -4074,6 +4083,7 @@ static const struct ieee80211_ops ath10k_ops = { .set_bitrate_mask = ath10k_set_bitrate_mask, .channel_switch_beacon = ath10k_channel_switch_beacon, .sta_rc_update = ath10k_sta_rc_update, + .get_tsf = ath10k_get_tsf, #ifdef CONFIG_PM .suspend = ath10k_suspend, .resume = ath10k_resume,