static void OUT4500( struct airo_info *, u16 register, u16 value );
static unsigned short IN4500( struct airo_info *, u16 register );
static u16 setup_card(struct airo_info*, u8 *mac);
-static int enable_MAC( struct airo_info *ai, Resp *rsp );
-static void disable_MAC(struct airo_info *ai);
+static int enable_MAC( struct airo_info *ai, Resp *rsp, int lock );
+static void disable_MAC(struct airo_info *ai, int lock);
static void enable_interrupts(struct airo_info*);
static void disable_interrupts(struct airo_info*);
static u16 issuecommand(struct airo_info*, Cmd *pCmd, Resp *pRsp);
static int bap_write(struct airo_info*, const u16 *pu16Src, int bytelen,
int whichbap);
static int PC4500_accessrid(struct airo_info*, u16 rid, u16 accmd);
-static int PC4500_readrid(struct airo_info*, u16 rid, void *pBuf, int len);
+static int PC4500_readrid(struct airo_info*, u16 rid, void *pBuf, int len, int lock);
static int PC4500_writerid(struct airo_info*, u16 rid, const void
- *pBuf, int len);
+ *pBuf, int len, int lock);
static int do_writerid( struct airo_info*, u16 rid, const void *rid_data,
- int len );
+ int len, int dummy );
static u16 transmit_allocate(struct airo_info*, int lenPayload, int raw);
static int transmit_802_3_packet(struct airo_info*, int len, char *pPacket);
static int transmit_802_11_packet(struct airo_info*, int len, char *pPacket);
#define FLAG_PROMISC IFF_PROMISC /* 0x100 - include/linux/if.h */
#define FLAG_RADIO_OFF 0x02 /* User disabling of MAC */
#define FLAG_RADIO_DOWN 0x08 /* ifup/ifdown disabling of MAC */
-#define FLAG_LOCKED 2 /* 0x04 - use as a bit offset */
#define FLAG_FLASHING 0x10
#define FLAG_ADHOC 0x01 /* Needed by MIC */
#define FLAG_MIC_CAPABLE 0x20
ai->task = NULL;
}
rc = PC4500_readrid(ai, first ? RID_BSSLISTFIRST : RID_BSSLISTNEXT,
- list, sizeof(*list));
+ list, sizeof(*list), 1);
list->len = le16_to_cpu(list->len);
list->index = le16_to_cpu(list->index);
static int readWepKeyRid(struct airo_info*ai, WepKeyRid *wkr, int temp) {
int rc = PC4500_readrid(ai, temp ? RID_WEP_TEMP : RID_WEP_PERM,
- wkr, sizeof(*wkr));
+ wkr, sizeof(*wkr), 1);
wkr->len = le16_to_cpu(wkr->len);
wkr->kindex = le16_to_cpu(wkr->kindex);
}
/* In the writeXXXRid routines we copy the rids so that we don't screwup
* the originals when we endian them... */
-static int writeWepKeyRid(struct airo_info*ai, WepKeyRid *pwkr, int perm) {
+static int writeWepKeyRid(struct airo_info*ai, WepKeyRid *pwkr, int perm, int lock) {
int rc;
WepKeyRid wkr = *pwkr;
wkr.len = cpu_to_le16(wkr.len);
wkr.kindex = cpu_to_le16(wkr.kindex);
wkr.klen = cpu_to_le16(wkr.klen);
- rc = PC4500_writerid(ai, RID_WEP_TEMP, &wkr, sizeof(wkr));
+ rc = PC4500_writerid(ai, RID_WEP_TEMP, &wkr, sizeof(wkr), lock);
if (rc!=SUCCESS) printk(KERN_ERR "airo: WEP_TEMP set %x\n", rc);
if (perm) {
- rc = PC4500_writerid(ai, RID_WEP_PERM, &wkr, sizeof(wkr));
+ rc = PC4500_writerid(ai, RID_WEP_PERM, &wkr, sizeof(wkr), lock);
if (rc!=SUCCESS) {
printk(KERN_ERR "airo: WEP_PERM set %x\n", rc);
}
static int readSsidRid(struct airo_info*ai, SsidRid *ssidr) {
int i;
- int rc = PC4500_readrid(ai, RID_SSID, ssidr, sizeof(*ssidr));
+ int rc = PC4500_readrid(ai, RID_SSID, ssidr, sizeof(*ssidr), 1);
ssidr->len = le16_to_cpu(ssidr->len);
for(i = 0; i < 3; i++) {
for(i = 0; i < 3; i++) {
ssidr.ssids[i].len = cpu_to_le16(ssidr.ssids[i].len);
}
- rc = PC4500_writerid(ai, RID_SSID, &ssidr, sizeof(ssidr));
+ rc = PC4500_writerid(ai, RID_SSID, &ssidr, sizeof(ssidr), 1);
return rc;
}
-static int readConfigRid(struct airo_info*ai) {
+static int readConfigRid(struct airo_info*ai, int lock) {
int rc;
u16 *s;
ConfigRid cfg;
if (ai->config.len)
return SUCCESS;
- rc = PC4500_readrid(ai, RID_ACTUALCONFIG, &cfg, sizeof(cfg));
+ rc = PC4500_readrid(ai, RID_ACTUALCONFIG, &cfg, sizeof(cfg), lock);
if (rc != SUCCESS)
return rc;
}
}
}
-static int writeConfigRid(struct airo_info*ai) {
+static int writeConfigRid(struct airo_info*ai, int lock) {
u16 *s;
ConfigRid cfgr;
for(s = &cfgr.arlThreshold; s <= &cfgr.autoWake; s++)
*s = cpu_to_le16(*s);
- return PC4500_writerid( ai, RID_CONFIG, &cfgr, sizeof(cfgr));
+ return PC4500_writerid( ai, RID_CONFIG, &cfgr, sizeof(cfgr), lock);
}
static int readStatusRid(struct airo_info*ai, StatusRid *statr) {
- int rc = PC4500_readrid(ai, RID_STATUS, statr, sizeof(*statr));
+ int rc = PC4500_readrid(ai, RID_STATUS, statr, sizeof(*statr), 1);
u16 *s;
statr->len = le16_to_cpu(statr->len);
*s = le16_to_cpu(*s);
statr->load = le16_to_cpu(statr->load);
statr->assocStatus = le16_to_cpu(statr->assocStatus);
-
return rc;
}
static int readAPListRid(struct airo_info*ai, APListRid *aplr) {
- int rc = PC4500_readrid(ai, RID_APLIST, aplr, sizeof(*aplr));
+ int rc = PC4500_readrid(ai, RID_APLIST, aplr, sizeof(*aplr), 1);
aplr->len = le16_to_cpu(aplr->len);
return rc;
}
static int writeAPListRid(struct airo_info*ai, APListRid *aplr) {
int rc;
aplr->len = cpu_to_le16(aplr->len);
- rc = PC4500_writerid(ai, RID_APLIST, aplr, sizeof(*aplr));
+ rc = PC4500_writerid(ai, RID_APLIST, aplr, sizeof(*aplr), 1);
return rc;
}
static int readCapabilityRid(struct airo_info*ai, CapabilityRid *capr) {
- int rc = PC4500_readrid(ai, RID_CAPABILITIES, capr, sizeof(*capr));
+ int rc = PC4500_readrid(ai, RID_CAPABILITIES, capr, sizeof(*capr), 1);
u16 *s;
capr->len = le16_to_cpu(capr->len);
*s = le16_to_cpu(*s);
return rc;
}
-static int readStatsRid(struct airo_info*ai, StatsRid *sr, int rid) {
- int rc = PC4500_readrid(ai, rid, sr, sizeof(*sr));
+static int readStatsRid(struct airo_info*ai, StatsRid *sr, int rid, int lock) {
+ int rc = PC4500_readrid(ai, rid, sr, sizeof(*sr), lock);
u32 *i;
sr->len = le16_to_cpu(sr->len);
* is open (to pipeline changes and speed-up card setup). If
* those changes are not yet commited, do it now - Jean II */
if(info->need_commit) {
- disable_MAC(info);
- writeConfigRid(info);
+ disable_MAC(info, 1);
+ writeConfigRid(info, 1);
}
if (info->wifidev != dev) {
info->flags &= ~FLAG_RADIO_DOWN;
enable_interrupts(info);
}
- enable_MAC(info, &rsp);
+ enable_MAC(info, &rsp, 1);
netif_start_queue(dev);
return 0;
u32 *vals = stats_rid.vals;
/* Get stats out of the card */
- readStatsRid(local, &stats_rid, RID_STATS);
+ readStatsRid(local, &stats_rid, RID_STATS, 0);
local->stats.rx_packets = vals[43] + vals[44] + vals[45];
local->stats.tx_packets = vals[39] + vals[40] + vals[41];
memcpy (ai->config.macAddr, addr->sa_data, dev->addr_len);
ai->need_commit = 1;
- disable_MAC(ai);
- writeConfigRid (ai);
- enable_MAC(ai, &rsp);
+ disable_MAC(ai, 1);
+ writeConfigRid (ai, 1);
+ enable_MAC(ai, &rsp, 1);
memcpy (ai->dev->dev_addr, addr->sa_data, dev->addr_len);
if (ai->wifidev)
memcpy (ai->wifidev->dev_addr, addr->sa_data, dev->addr_len);
* stack (i.e. the network stack won't try to broadcast
* anything on the interface and routes are gone. Jean II */
ai->flags |= FLAG_RADIO_DOWN;
- disable_MAC(ai);
+ disable_MAC(ai, 1);
#endif
disable_interrupts( ai );
}
int i;
struct airo_info *ai = dev->priv;
+
+ if (down_interruptible(&ai->sem))
+ return -1;
waitbusy (ai);
OUT4500(ai,COMMAND,CMD_SOFTRESET);
set_current_state (TASK_UNINTERRUPTIBLE);
schedule_timeout (HZ/5);
if ( setup_card(ai, dev->dev_addr ) != SUCCESS ) {
printk( KERN_ERR "airo: MAC could not be enabled\n" );
+ up(&ai->sem);
return -1;
} else {
printk( KERN_INFO "airo: MAC enabled %s %x:%x:%x:%x:%x:%x\n",
}
enable_interrupts( ai );
netif_wake_queue(dev);
+ up(&ai->sem);
return 0;
}
StatusRid status_rid;
if (down_trylock(&ai->sem) == 0) {
- __set_bit(FLAG_LOCKED, &ai->flags);
- PC4500_readrid(ai, RID_STATUS, &status_rid, sizeof(status_rid));
- clear_bit(FLAG_LOCKED, &ai->flags);
+ PC4500_readrid(ai, RID_STATUS, &status_rid, sizeof(status_rid), 0);
up(&ai->sem);
wrqu.data.length = 0;
wrqu.data.flags = 0;
MICRid mic_rid;
if (down_trylock(&ai->sem) == 0) {
- __set_bit(FLAG_LOCKED, &ai->flags);
- PC4500_readrid(ai, RID_MIC, &mic_rid, sizeof(mic_rid));
- clear_bit(FLAG_LOCKED, &ai->flags);
+ PC4500_readrid(ai, RID_MIC, &mic_rid, sizeof(mic_rid), 0);
up(&ai->sem);
#ifdef MICSUPPORT
micinit (ai, &mic_rid);
return rc;
}
-static int enable_MAC( struct airo_info *ai, Resp *rsp ) {
+static int enable_MAC( struct airo_info *ai, Resp *rsp, int lock ) {
int rc;
Cmd cmd;
if (ai->flags & (FLAG_RADIO_OFF|FLAG_RADIO_DOWN)) return SUCCESS;
memset(&cmd, 0, sizeof(cmd));
cmd.cmd = MAC_ENABLE;
- if (test_bit(FLAG_LOCKED, &ai->flags) != 0)
+ if (!lock)
return issuecommand(ai, &cmd, rsp);
if (down_interruptible(&ai->sem))
return rc;
}
-static void disable_MAC( struct airo_info *ai ) {
+static void disable_MAC( struct airo_info *ai, int lock ) {
Cmd cmd;
Resp rsp;
memset(&cmd, 0, sizeof(cmd));
cmd.cmd = MAC_DISABLE; // disable in case already enabled
- if (test_bit(FLAG_LOCKED, &ai->flags) != 0) {
+ if (!lock) {
issuecommand(ai, &cmd, &rsp);
return;
}
CapabilityRid cap_rid;
// general configuration (read/modify/write)
- status = readConfigRid(ai);
+ status = readConfigRid(ai, 1);
if ( status != SUCCESS ) return ERROR;
status = readCapabilityRid(ai, &cap_rid);
if ( status != SUCCESS ) return ERROR;
- status = PC4500_readrid(ai,RID_RSSI,&rssi_rid,sizeof(rssi_rid));
+ status = PC4500_readrid(ai,RID_RSSI,&rssi_rid,sizeof(rssi_rid),1);
if ( status == SUCCESS ) {
if (ai->rssi || (ai->rssi = kmalloc(512, GFP_KERNEL)) != NULL)
memcpy(ai->rssi, (u8*)&rssi_rid + 2, 512);
}
}
- status = writeConfigRid(ai);
+ status = writeConfigRid(ai, 1);
if ( status != SUCCESS ) return ERROR;
/* Set up the SSID list */
status = writeSsidRid(ai, &mySsid);
if ( status != SUCCESS ) return ERROR;
- status = enable_MAC(ai, &rsp);
+ status = enable_MAC(ai, &rsp, 1);
if ( status != SUCCESS || (rsp.status & 0xFF00) != 0) {
printk( KERN_ERR "airo: Bad MAC enable reason = %x, rid = %x, offset = %d\n", rsp.rsp0, rsp.rsp1, rsp.rsp2 );
return ERROR;
/* Note, that we are using BAP1 which is also used by transmit, so
* we must get a lock. */
-static int PC4500_readrid(struct airo_info *ai, u16 rid, void *pBuf, int len)
+static int PC4500_readrid(struct airo_info *ai, u16 rid, void *pBuf, int len, int lock)
{
- u16 status, dolock = 0;
+ u16 status;
int rc = SUCCESS;
- if (test_bit(FLAG_LOCKED, &ai->flags) == 0) {
- dolock = 1;
+ if (lock) {
if (down_interruptible(&ai->sem))
return ERROR;
}
// read remainder of the rid
rc = bap_read(ai, ((u16*)pBuf)+1, len, BAP1);
done:
- if (dolock)
+ if (lock)
up(&ai->sem);
return rc;
}
/* Note, that we are using BAP1 which is also used by transmit, so
* make sure this isnt called when a transmit is happening */
static int PC4500_writerid(struct airo_info *ai, u16 rid,
- const void *pBuf, int len)
+ const void *pBuf, int len, int lock)
{
- u16 status, dolock = 0;
+ u16 status;
int rc = SUCCESS;
- if (test_bit(FLAG_LOCKED, &ai->flags) == 0) {
- dolock = 1;
+ if (lock) {
if (down_interruptible(&ai->sem))
return ERROR;
}
// ---now commit the rid data
rc = PC4500_accessrid(ai, rid, 0x100|CMD_ACCESS);
done:
- if (dolock)
+ if (lock)
up(&ai->sem);
return rc;
}
return -ENOMEM;
}
- readStatsRid(apriv, &stats, rid);
+ readStatsRid(apriv, &stats, rid, 1);
j = 0;
for(i=0; statsLabels[i]!=(char *)-1 &&
if ( !data->writelen ) return;
- readConfigRid(ai);
+ readConfigRid(ai, 1);
line = data->wbuffer;
while( line[0] ) {
while( line[0] && line[0] != '\n' ) line++;
if ( line[0] ) line++;
}
- disable_MAC(ai);
+ disable_MAC(ai, 1);
if (need_reset) {
APListRid APList_rid;
SsidRid SSID_rid;
readAPListRid(ai, &APList_rid);
readSsidRid(ai, &SSID_rid);
reset_airo_card(dev);
- disable_MAC(ai);
+ disable_MAC(ai, 1);
writeSsidRid(ai, &SSID_rid);
writeAPListRid(ai, &APList_rid);
}
- writeConfigRid(ai);
- enable_MAC(ai, &rsp);
+ writeConfigRid(ai, 1);
+ enable_MAC(ai, &rsp, 1);
if (need_reset)
airo_set_promisc(ai);
}
data->maxwritelen = 2048;
data->on_close = proc_config_on_close;
- readConfigRid(ai);
+ readConfigRid(ai, 1);
i = sprintf( data->rbuffer,
"Mode: %s\n"
offset < data->writelen ) offset++;
offset++;
}
- disable_MAC(ai);
+ disable_MAC(ai, 1);
writeSsidRid(ai, &SSID_rid);
- enable_MAC(ai, &rsp);
+ enable_MAC(ai, &rsp, 1);
}
inline static u8 hexVal(char c) {
}
}
}
- disable_MAC(ai);
+ disable_MAC(ai, 1);
writeAPListRid(ai, &APList_rid);
- enable_MAC(ai, &rsp);
+ enable_MAC(ai, &rsp, 1);
}
/* This function wraps PC4500_writerid with a MAC disable */
static int do_writerid( struct airo_info *ai, u16 rid, const void *rid_data,
- int len ) {
+ int len, int dummy ) {
int rc;
Resp rsp;
- disable_MAC(ai);
- rc = PC4500_writerid(ai, rid, rid_data, len);
- enable_MAC(ai, &rsp);
+ disable_MAC(ai, 1);
+ rc = PC4500_writerid(ai, rid, rid_data, len, 1);
+ enable_MAC(ai, &rsp, 1);
return rc;
}
}
static int set_wep_key(struct airo_info *ai, u16 index,
- const char *key, u16 keylen, int perm ) {
+ const char *key, u16 keylen, int perm, int lock ) {
static const unsigned char macaddr[ETH_ALEN] = { 0x01, 0, 0, 0, 0, 0 };
WepKeyRid wkr;
printk(KERN_INFO "Setting key %d\n", index);
}
- writeWepKeyRid(ai, &wkr, perm);
+ writeWepKeyRid(ai, &wkr, perm, lock);
return 0;
}
(data->wbuffer[1] == ' ' || data->wbuffer[1] == '\n')) {
index = data->wbuffer[0] - '0';
if (data->wbuffer[1] == '\n') {
- set_wep_key(ai, index, 0, 0, 1);
+ set_wep_key(ai, index, 0, 0, 1, 1);
return;
}
j = 2;
break;
}
}
- set_wep_key(ai, index, key, i/3, 1);
+ set_wep_key(ai, index, key, i/3, 1, 1);
}
static int proc_wepkey_open( struct inode *inode, struct file *file ) {
add_timer(&apriv->timer);
return;
}
- __set_bit(FLAG_LOCKED, &apriv->flags);
- readConfigRid(apriv);
- disable_MAC(apriv);
+ readConfigRid(apriv, 0);
+ disable_MAC(apriv, 0);
switch(apriv->config.authType) {
case AUTH_ENCRYPT:
/* So drop to OPEN */
break;
case AUTH_SHAREDKEY:
if (apriv->keyindex < auto_wep) {
- set_wep_key(apriv, apriv->keyindex, 0, 0, 0);
+ set_wep_key(apriv, apriv->keyindex, 0, 0, 0, 0);
apriv->config.authType = AUTH_SHAREDKEY;
apriv->keyindex++;
} else {
/* Drop to ENCRYPT */
apriv->keyindex = 0;
- set_wep_key(apriv, apriv->defindex, 0, 0, 0);
+ set_wep_key(apriv, apriv->defindex, 0, 0, 0, 0);
apriv->config.authType = AUTH_ENCRYPT;
}
break;
apriv->config.authType = AUTH_SHAREDKEY;
}
apriv->need_commit = 1;
- writeConfigRid(apriv);
- enable_MAC(apriv, &rsp);
- clear_bit(FLAG_LOCKED, &apriv->flags);
+ writeConfigRid(apriv, 0);
+ enable_MAC(apriv, &rsp, 0);
up(&apriv->sem);
/* Schedule check to see if the change worked */
SSID_rid.ssids[index].len = dwrq->length - 1;
}
/* Write it to the card */
- disable_MAC(local);
+ disable_MAC(local, 1);
writeSsidRid(local, &SSID_rid);
- enable_MAC(local, &rsp);
+ enable_MAC(local, &rsp, 1);
return 0;
}
memset(&APList_rid, 0, sizeof(APList_rid));
APList_rid.len = sizeof(APList_rid);
memcpy(APList_rid.ap[0], awrq->sa_data, ETH_ALEN);
- disable_MAC(local);
+ disable_MAC(local, 1);
writeAPListRid(local, &APList_rid);
- enable_MAC(local, &rsp);
+ enable_MAC(local, &rsp, 1);
}
return 0;
}
/* Copy the key in the driver */
memcpy(key.key, extra, dwrq->length);
/* Send the key to the card */
- set_wep_key(local, index, key.key, key.len, 1);
+ set_wep_key(local, index, key.key, key.len, 1, 1);
}
/* WE specify that if a valid key is set, encryption
* should be enabled (user may turn it off later)
/* Do we want to just set the transmit key index ? */
int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
if ((index>=0) && (index<(cap_rid.softCap&0x80)?4:1)) {
- set_wep_key(local, index, 0, 0, 1);
+ set_wep_key(local, index, 0, 0, 1, 1);
} else
/* Don't complain if only change the mode */
if(!dwrq->flags & IW_ENCODE_MODE) {
* consequences are begnign. So I don't bother fixing it - Javier */
/* Try to read the first entry of the scan result */
- rc = PC4500_readrid(ai, RID_BSSLISTFIRST, &BSSList, sizeof(BSSList));
+ rc = PC4500_readrid(ai, RID_BSSLISTFIRST, &BSSList, sizeof(BSSList), 1);
if((rc) || (BSSList.index == 0xffff)) {
/* Client error, no scan results...
* The caller need to restart the scan. */
/* Read next entry */
rc = PC4500_readrid(ai, RID_BSSLISTNEXT,
- &BSSList, sizeof(BSSList));
+ &BSSList, sizeof(BSSList), 1);
}
/* Length of data */
dwrq->length = (current_ev - extra);
/* Some of the "SET" function may have modified some of the
* parameters. It's now time to commit them in the card */
- disable_MAC(local);
- writeConfigRid(local);
- enable_MAC(local, &rsp);
+ disable_MAC(local, 1);
+ writeConfigRid(local, 1);
+ enable_MAC(local, &rsp, 1);
return 0;
}
/* Get stats out of the card */
readStatusRid(local, &status_rid);
- readStatsRid(local, &stats_rid, RID_STATS);
+ readStatsRid(local, &stats_rid, RID_STATS, 1);
/* The status */
local->wstats.status = status_rid.mode;
switch(comp->command)
{
case AIROGCAP: ridcode = RID_CAPABILITIES; break;
- case AIROGCFG: writeConfigRid (ai);
+ case AIROGCFG: writeConfigRid (ai, 1);
ridcode = RID_CONFIG; break;
case AIROGSLIST: ridcode = RID_SSID; break;
case AIROGVLIST: ridcode = RID_APLIST; break;
if ((iobuf = kmalloc(RIDS_SIZE, GFP_KERNEL)) == NULL)
return -ENOMEM;
- PC4500_readrid(ai,ridcode,iobuf,RIDS_SIZE);
+ PC4500_readrid(ai,ridcode,iobuf,RIDS_SIZE, 1);
/* get the count of bytes in the rid docs say 1st 2 bytes is it.
* then return it to the user
* 9/22/2000 Honor user given length
struct airo_info *ai = dev->priv;
int ridcode, enabled;
Resp rsp;
- static int (* writer)(struct airo_info *, u16 rid, const void *, int);
+ static int (* writer)(struct airo_info *, u16 rid, const void *, int, int);
unsigned char *iobuf;
/* Only super-user can write RIDs */
* same with MAC off
*/
case AIROPMACON:
- if (enable_MAC(ai, &rsp) != 0)
+ if (enable_MAC(ai, &rsp, 1) != 0)
return -EIO;
return 0;
* as disable_MAC. it's probably so short the compiler does not gen one.
*/
case AIROPMACOFF:
- disable_MAC(ai);
+ disable_MAC(ai, 1);
return 0;
/* This command merely clears the counts does not actually store any data
if ((iobuf = kmalloc(RIDS_SIZE, GFP_KERNEL)) == NULL)
return -ENOMEM;
- PC4500_readrid(ai,RID_STATSDELTACLEAR,iobuf,RIDS_SIZE);
+ PC4500_readrid(ai,RID_STATSDELTACLEAR,iobuf,RIDS_SIZE, 1);
enabled = ai->micstats.enabled;
memset(&ai->micstats,0,sizeof(ai->micstats));
ai->flags &= ~FLAG_ADHOC;
}
- if((*writer)(ai, ridcode, iobuf,comp->len)) {
+ if((*writer)(ai, ridcode, iobuf,comp->len,1)) {
kfree (iobuf);
return -EIO;
}
*/
int cmdreset(struct airo_info *ai) {
- disable_MAC(ai);
+ disable_MAC(ai, 1);
if(!waitbusy (ai)){
printk(KERN_INFO "Waitbusy hang before RESET\n");