Return-path: Received: from s3.sipsolutions.net ([5.9.151.49]:37986 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751998AbaFEMdM (ORCPT ); Thu, 5 Jun 2014 08:33:12 -0400 Message-ID: <1401971576.4168.3.camel@jlt4.sipsolutions.net> (sfid-20140605_143317_893264_44102B74) Subject: Re: [RFC] mac80211: at76x50x_usb driver broken by commit 3afc216.. and RX path involved in scan From: Johannes Berg To: andrea.merello@gmail.com Cc: emmanuel.grumbach@intel.com, Linux Wireless List , joerg.albert@gmx.de, Alex Stewart , n0_5p4m_p13453@hotmail.com, Pavel Roskin , agx@sigxcpu.org, Kalle Valo , sesmo@gmx.net, John Linville Date: Thu, 05 Jun 2014 14:32:56 +0200 In-Reply-To: (sfid-20140604_230243_516417_A2A8F6A0) References: <1400509775.4273.8.camel@jlt4.sipsolutions.net> <1400510950.4273.9.camel@jlt4.sipsolutions.net> <1400515344.4273.19.camel@jlt4.sipsolutions.net> <1401285737.8146.21.camel@jlt4.sipsolutions.net> <1401825462.4157.42.camel@jlt4.sipsolutions.net> (sfid-20140604_230243_516417_A2A8F6A0) Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: > So this is the updated patch. > If you agree, we could push it for merge :) Yeah, looks fine. Minor code style comments below: > +static inline int at76_guess_freq(struct at76_priv *priv) > +{ > + size_t el_off; should have tabs for indentation > + const u8 *el; > + int channel = priv->channel; > + int len = priv->rx_skb->len; > + struct ieee80211_hdr *hdr = (void *)priv->rx_skb->data; > + > + if (!priv->scanning) > + goto exit; > + > + if (len < 24) > + goto exit; > + > + if (ieee80211_is_probe_resp(hdr->frame_control)) { > + el_off = offsetof(struct ieee80211_mgmt, u.probe_resp.variable); > + el = ((struct ieee80211_mgmt *)hdr)->u.probe_resp.variable; > + } else if (ieee80211_is_beacon(hdr->frame_control)) { > + el_off = offsetof(struct ieee80211_mgmt, u.beacon.variable); > + el = ((struct ieee80211_mgmt *)hdr)->u.beacon.variable; > + } else > + goto exit; should have braces around all branches johannes