Changeset 1362

Show
Ignore:
Timestamp:
12/19/05 09:58:47 (3 years ago)
Author:
svens
Message:

Added support for enabling/disabling rfkill capability,
can be switched on/off with rfkill=x module option.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ath/if_ath.c

    r1355 r1362  
    258258static  int ath_xchanmode = AH_TRUE;            /* enable extended channels */ 
    259259 
     260static  int rfkill = -1; 
    260261static  int countrycode = -1; 
    261262static  int outdoor = -1; 
     
    285286MODULE_PARM(outdoor, "i"); 
    286287MODULE_PARM(xchanmode, "i"); 
     288MODULE_PARM(rfkill, "i"); 
    287289#else 
    288290#include <linux/moduleparam.h> 
     
    290292module_param(outdoor, int, 0); 
    291293module_param(xchanmode, int, 0); 
     294module_param(rfkill, int, 0); 
    292295#endif 
    293296MODULE_PARM_DESC(countrycode, "Override default country code"); 
    294297MODULE_PARM_DESC(outdoor, "Enable/disable outdoor use"); 
    295298MODULE_PARM_DESC(xchanmode, "Enable/disable extended channel mode"); 
     299MODULE_PARM_DESC(rfkill, "Enable/disable RFKILL capability"); 
    296300 
    297301#ifdef AR_DEBUG 
     
    498502        ic->ic_country_code = ath_countrycode; 
    499503        ic->ic_country_outdoor = ath_outdoor; 
     504 
     505        if(rfkill != -1) { 
     506           printk(KERN_INFO "ath_pci: switching rfkill capability %s\n", rfkill ? "on" : "off");         
     507           ath_hal_setrfsilent(ah, rfkill); 
     508        } 
    500509 
    501510        /* 
  • trunk/ath/if_athvar.h

    r1299 r1362  
    879879#define ath_hal_settsfadjust(_ah, _v) \ 
    880880        ath_hal_setcapability(_ah, HAL_CAP_TSF_ADJUST, 1, _v, NULL) 
     881#define ath_hal_setrfsilent(_ah, _v) \ 
     882        ath_hal_setcapability(_ah, HAL_CAP_RFSILENT, 1, _v, NULL) 
     883#define ath_hal_hasrfsilent(_ah) \ 
     884        (ath_hal_getcapability(_ah, HAL_CAP_RFSILENT, 0, NULL) == HAL_OK) 
    881885 
    882886#define ath_hal_setuprxdesc(_ah, _ds, _size, _intreq) \