Search Linux Wireless

Re: SIOCSIFFLAGS: operation not supported error message when tryinging to bring up an interface in adhoc mode

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

 



On Thu, 2012-07-05 at 16:44 +0200, Philippe Agostini wrote:

> /* Supported channel */
> static struct ieee80211_channel channels = {
> 	.band = IEEE80211_BAND_2GHZ,
> 	.center_freq = 2437,
> 	.hw_value = 0,
> 	.flags = 0,
> 	.max_antenna_gain = 3,
> 	.max_power = 20,
> 	.max_reg_power = 20,
> 	.beacon_found = FALSE,
> 	.orig_flags = 0,
> 	.orig_mag = 0,
> 	.orig_mpwr = 0,
> };/* struct ieee80211_channel */

FWIW, you don't need to set zero values explicitly, like beacon_found.
"FALSE" also isn't valid in the kernel, it should be lower case?



> 	/* Configuration and hardware information for an 802.11 PHY */	
> 	struct ieee80211_hw *hw = priv->hw;

So you're using mac80211,

> 	/* Number of available hardware queues */
> 	hw->queues = IEEE80211P_NUM_TXQ;

That constant seems a bit too generic, but we're just debugging your
driver now. I just don't think you should use "ieee80211p" as your
driver name/tag.

> 	//wiphy->signal_type = CFG80211p_SIGNAL_TYPE_NONE;

that is set by mac80211

> 	//wiphy->cipher_suites = NULL;
> 	//wiphy->n_cipher_suites = 0;

so is this unless you override it

> 	//wiphy->retry_short = 1;
> 	//wiphy->retry_long = 1;
> 	//wiphy->frag_threshold = -1;
> 	//wiphy->rts_threshold = -1;
> 	//wiphy_net_set(&hw->wiphy,NULL);

Heh, no, don't set any of these

> 	//SET_IEEE80211_DEV(hw,NULL);

That you should do

> 	//wiphy->wext = NULL;

don't touch :)

> 	/* Describes the frequency bands a wiphy is able to operate in */
> 	for (i = 0;i<IEEE80211_NUM_BANDS;i++) {
> 		wiphy->bands[i] = NULL;
> 	}

again, no need to 0-initialize anything, it just makes your code
needlessly large


Anyway, you've not shown the most important part, the driver ops that it
registers with mac80211.

johannes

--
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