Search Linux Wireless

Re: [PATCHv3 3/4] ath6kl: make mgmt_tx accept a NULL channel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Antonio Quartulli <antonio@xxxxxxxxxxxxx> writes:

> On Wed, Jun 05, 2013 at 07:48:15AM -0700, Kalle Valo wrote:
>> Antonio Quartulli <ordex@xxxxxxxxxxxxx> writes:
>> 
>> > From: Antonio Quartulli <antonio@xxxxxxxxxxxxx>
>> >
>> > cfg80211 passes a NULL channel to mgmt_tx if the frame has
>> > to be sent on the one currently in use by the device.
>> > Make the implementation of mgmt_tx correctly handle this
>> > case
>> >
>> > Cc: Kalle Valo <kvalo@xxxxxxxxxxxxxxxx>
>> > Cc: Nicolas Cavallari <Nicolas.Cavallari@xxxxxx>
>> > Signed-off-by: Antonio Quartulli <antonio@xxxxxxxxxxxxx>
>> 
>> [...]
>> 
>> > @@ -3175,10 +3175,17 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
>> >  {
>> >  	struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);
>> >  	struct ath6kl *ar = ath6kl_priv(vif->ndev);
>> > -	u32 id;
>> > +	u32 id, freq;
>> >  	const struct ieee80211_mgmt *mgmt;
>> >  	bool more_data, queued;
>> >  
>> > +	/* default to the current channel, but use the one specified as argument
>> > +	 * if any
>> > +	 */
>> > +	freq = vif->ch_hint;
>> > +	if (chan)
>> > +		freq = chan->center_freq;
>> 
>> Can you please add a check here:
>> 
>> if (WARN_ON(chan == 0))
>>    return -EINVAL;
>
> I think you meant (freq == 0) ?

Yes, thanks for catching that :)

>> Just like Arend, I want to be sure that we don't submit value 0 to the
>> firmware.
>
> Yeah ok. In ath6kl, are you aware of any "firmware command" to get the channel
> from the device like I did for brcmfmac ?
>
> I couldn't find any define matching *GET*CHAN*

I don't recall seeing anything like that.

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux