Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:36418 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbdLDOwX (ORCPT ); Mon, 4 Dec 2017 09:52:23 -0500 From: Kalle Valo To: Sergey Matyukevich Cc: linux-wireless@vger.kernel.org, Igor Mitsyanko , Avinash Patil , Vasily Ulyanov Subject: Re: [PATCH 03/10] qtnfmac: add support for radar detection and CAC References: <20171113102815.11254-1-sergey.matyukevich.os@quantenna.com> <20171113102815.11254-4-sergey.matyukevich.os@quantenna.com> <87a7yylf9e.fsf@purkki.adurom.net> Date: Mon, 04 Dec 2017 16:52:19 +0200 In-Reply-To: <87a7yylf9e.fsf@purkki.adurom.net> (Kalle Valo's message of "Mon, 04 Dec 2017 16:49:33 +0200") Message-ID: <87609mlf4s.fsf@purkki.adurom.net> (sfid-20171204_155228_850051_F44747F5) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-wireless-owner@vger.kernel.org List-ID: Kalle Valo writes: > Sergey Matyukevich writes: > >> From: Igor Mitsyanko >> >> Implement two parts of radar handling logic: >> - cfg80211 .start_radar_detect callback to allow nl80211 to initiate CAC >> - radar event to allow wlan device to advertize CAC and radar events >> >> Signed-off-by: Igor Mitsyanko > > [...] > >> +int qtnf_cmd_start_cac(const struct qtnf_vif *vif, >> + const struct cfg80211_chan_def *chdef, >> + u32 cac_time_ms) >> +{ >> + struct qtnf_bus *bus = vif->mac->bus; >> + struct sk_buff *cmd_skb; >> + struct qlink_cmd_start_cac *cmd; >> + int ret; >> + u16 res_code; >> + >> + cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, >> + QLINK_CMD_START_CAC, >> + sizeof(*cmd)); >> + if (unlikely(!cmd_skb)) >> + return -ENOMEM; > > The unlikely() looks pretty useless here. likely() and unlikely() are > supposed to be used in cases where it matters and the improvment can be > measured, I doubt that's the case here. But no need to resend just because of this. -- Kalle Valo