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; Just like Arend, I want to be sure that we don't submit value 0 to the firmware. -- 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