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) ? > > 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* Regards, -- Antonio Quartulli ..each of us alone is worth nothing.. Ernesto "Che" Guevara
Attachment:
signature.asc
Description: Digital signature