Search Linux Wireless

Re: [PATCH 17/40] wl12xx: add ROC/CROC commands

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

 



On Tue, 2011-08-09 at 12:13 +0300, Eliad Peller wrote: 
> +static int wl1271_cmd_roc(struct wl1271 *wl, u8 role_id)
> +{
> +	struct wl1271_cmd_roc *cmd;
> +	int ret = 0;
> +
> +	wl1271_debug(DEBUG_CMD, "cmd roc %d (%d)", wl->channel, wl->band);
> +
> +	if (WARN_ON(role_id == WL1271_INVALID_ROLE_ID))
> +		return -EINVAL;
> +
> +	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
> +	if (!cmd) {
> +		ret = -ENOMEM;
> +		goto out;
> +	}
> +
> +	cmd->role_id = role_id;
> +	cmd->channel = wl->channel;
> +	switch (wl->band) {
> +	case IEEE80211_BAND_2GHZ:
> +		cmd->band = RADIO_BAND_2_4GHZ;
> +		break;
> +	case IEEE80211_BAND_5GHZ:
> +		cmd->band = RADIO_BAND_5GHZ;
> +		break;
> +	default:
> +		wl1271_warning("roc - unknown band: %d", (int)wl->band);
> +		cmd->band = RADIO_BAND_2_4GHZ;
> +		break;

Are you sure it's better to choose 2.4GHz here instead of bailing out?


-- 
Cheers,
Luca.

--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux