Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #2326 (new defect)

Opened 12 years ago

Setting channel at startup using iwconfig fails

Reported by: mattias.guhl@crlsweden.com Assigned to:
Priority: minor Milestone:
Component: madwifi: other Version: trunk
Keywords: Cc:
Patch is attached: 0 Pending: 0

Description

Setup

  • MadWifi-r4067
  • Gateworks Cambria/Avila platform ixp4xx (BIG ENDIAN)
  • Compex a/b/g (AR5413A) WLAN cards
  • Linux kernel 2.6.27.6
  • startup script:
wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
iwconfig ath0 channel 120 essid TEST enc off           
ifconfig ath0 up

Issue

The problem is that channel 120 hasn't been set:

Current Frequency:5.22 GHz (Channel 44)

However, the driver thinks so...

Because the driver believes channel 120 is set, it can't be set again thanks to:

if ((vap->iv_state == IEEE80211_S_RUN) && (c == vap->iv_des_chan)){
    return 0;                       /* no change, return */
}

The initial problem - as far as I can see - is caused by the fact that the interface is in state IEEE80211_S_SCAN when iwconfig tries to set the channel.

Shouldn't the driver remember that I've tried to set channel and then change when in state IEEE80211_S_RUN?