Go back –> ath6kl
ath6kl todo
Contents
- Side cleanups
-
cfg80211 API enhancements
- Understanding how ath6kl uses private ioctls
- standard private ioctls...
-
private ioctls
- 0 - IEEE80211_IOCTL_SETPARAM
- 1 - IEEE80211_IOCTL_SETKEY
- 2 - IEEE80211_IOCTL_DELKEY
- 3 - IEEE80211_IOCTL_SETMLME
- 4 - IEEE80211_IOCTL_ADDPMKID
- 5 - IEEE80211_IOCTL_SETOPTIE
- 6 - IEEE80211_IOCTL_GETPARAM unused
- 7 - IEEE80211_IOCTL_SETWMMPARAMS unused
- 8 - IEEE80211_IOCTL_GETWMMPARAMS unused
- 9 - IEEE80211_IOCTL_GETOPTIE unused
- 10 - IEEE80211_IOCTL_SETAUTHALG unused
- 10 - IEEE80211_IOCTL_LASTONE
- 11 - AR6000_IOCTL_WMI_GETREV
- 12 - AR6000_IOCTL_WMI_SETPWR
- 13 - AR6000_IOCTL_WMI_SETSCAN
- 14 - AR6000_IOCTL_WMI_SETLISTENINT
- 15 - AR6000_IOCTL_WMI_SETBSSFILTER
- 16 - AR6000_IOCTL_WMI_SET_CHANNELPARAMS
- 17 - AR6000_IOCTL_WMI_SET_PROBEDSSID
- 19 - AR6000_IOCTL_WMI_SET_BADAP
- 20 - AR6000_IOCTL_WMI_GET_QOS_QUEUE
- 21 - AR6000_IOCTL_WMI_CREATE_QOS
- 22 - AR6000_IOCTL_WMI_DELETE_QOS
- 23 - AR6000_IOCTL_WMI_SET_SNRTHRESHOLD
- 24 - AR6000_IOCTL_WMI_SET_ERROR_REPORT_BITMASK
- 25 - AR6000_IOCTL_WMI_GET_TARGET_STATS
- 26 - AR6000_IOCTL_WMI_SET_ASSOC_INFO
- 27 - AR6000_IOCTL_WMI_SET_ACCESS_PARAMS
- 28 - AR6000_IOCTL_WMI_SET_BMISS_TIME
- 29 - AR6000_IOCTL_WMI_SET_DISC_TIMEOUT
- 30 - AR6000_IOCTL_WMI_SET_IBSS_PM_CAPS
- xioctls
- Android
- config cleanup
- AP Mode support using cfg80211
- WiFi Direct
Side cleanups
- Multi architecture support (64 bit)
- Bi-endian support (big endian)
cfg80211 API enhancements
Luis is working on this. This section is going to be extended as time goes by. This section will provide recipes of what needs to get done.
Understanding how ath6kl uses private ioctls
The Linux kernel now uses cfg80211 for any new driver. cfg80211 takes care of wireless-extensions for older drivers, so drivers do not need to register their own wireless-extensions at all. Private wireless extensions also cannot be supported by design. This section documents what needs to get done to replace properly these older APIs to allow us to get the driver into proper placement into the Linux kernel.
This initial section will document how the private handlers are used in the driver and defined.
Typically with the older wireless-extensions drivers are allowed to use private wireless extensions. Wireless extensions essentially allowed the netdev to use some specific ioctl()s for wireless device manipulation. If the driver needed to use private definitions of their own (private commands) they would then define their own private handlers as part of wireless-extensions in a way similar to this:
const struct iw_handler_def prism54_handler_def = {
.num_standard = ARRAY_SIZE(prism54_handler),
.num_private = ARRAY_SIZE(prism54_private_handler),
.num_private_args = ARRAY_SIZE(prism54_private_args),
.standard = (iw_handler *) prism54_handler,
.private = (iw_handler *) prism54_private_handler,
.private_args = (struct iw_priv_args *) prism54_private_args,
.get_wireless_stats = prism54_get_wireless_stats,
};However ath6kl does not use of wireless-extensions private extensions... it makes use of the standard netdev ndo_do_ioctl callback as follows:
static struct net_device_ops ar6000_netdev_ops = {
.ndo_init = NULL,
.ndo_open = ar6000_open,
.ndo_stop = ar6000_close,
.ndo_get_stats = ar6000_get_stats,
.ndo_do_ioctl = ar6000_ioctl,
.ndo_start_xmit = ar6000_data_tx,
.ndo_set_multicast_list = ar6000_set_multicast_list,
};It is important to understand how ath6kl uses this ioctl in order to properly address how the private commands can be addressed. ar6000_ioctl() furthermore splits received ioctls into 3 categies:
Standard wireless-extensions commands
Private wireless-extensions
Some further extensions ath6kl calls xioctls...
Now each of these will only be allowed if and only if the respective secondary command passed was designed to operate on the current mode of operation.
standard private ioctls...
It is completely useless to support standard wireless-extensions piggy backed ontop of the generic netdev ioctl given that wireless-extensions already supports the standard wireless-extensions. This support should be removed.
private ioctls
Below are the list of private ioctls:
#define IEEE80211_IOCTL_SETPARAM (SIOCIWFIRSTPRIV+0) #define IEEE80211_IOCTL_SETKEY (SIOCIWFIRSTPRIV+1) #define IEEE80211_IOCTL_DELKEY (SIOCIWFIRSTPRIV+2) #define IEEE80211_IOCTL_SETMLME (SIOCIWFIRSTPRIV+3) #define IEEE80211_IOCTL_ADDPMKID (SIOCIWFIRSTPRIV+4) #define IEEE80211_IOCTL_SETOPTIE (SIOCIWFIRSTPRIV+5) //#define IEEE80211_IOCTL_GETPARAM (SIOCIWFIRSTPRIV+6) //#define IEEE80211_IOCTL_SETWMMPARAMS (SIOCIWFIRSTPRIV+7) //#define IEEE80211_IOCTL_GETWMMPARAMS (SIOCIWFIRSTPRIV+8) //#define IEEE80211_IOCTL_GETOPTIE (SIOCIWFIRSTPRIV+9) //#define IEEE80211_IOCTL_SETAUTHALG (SIOCIWFIRSTPRIV+10) #define IEEE80211_IOCTL_LASTONE (SIOCIWFIRSTPRIV+10)
There are now also some WMI specific knobs exposed as private ioctls, remember these are not really a wext private ioctls. We need to figure out:
- who uses these?
- do we really want to support them?
- are these users comfortable in using debugfs for this?
#define AR6000_IOCTL_WMI_GETREV (SIOCIWFIRSTPRIV+11) #define AR6000_IOCTL_WMI_SETPWR (SIOCIWFIRSTPRIV+12) #define AR6000_IOCTL_WMI_SETSCAN (SIOCIWFIRSTPRIV+13) #define AR6000_IOCTL_WMI_SETLISTENINT (SIOCIWFIRSTPRIV+14) #define AR6000_IOCTL_WMI_SETBSSFILTER (SIOCIWFIRSTPRIV+15) #define AR6000_IOCTL_WMI_SET_CHANNELPARAMS (SIOCIWFIRSTPRIV+16) #define AR6000_IOCTL_WMI_SET_PROBEDSSID (SIOCIWFIRSTPRIV+17) #define AR6000_IOCTL_WMI_SET_PMPARAMS (SIOCIWFIRSTPRIV+18) #define AR6000_IOCTL_WMI_SET_BADAP (SIOCIWFIRSTPRIV+19) #define AR6000_IOCTL_WMI_GET_QOS_QUEUE (SIOCIWFIRSTPRIV+20) #define AR6000_IOCTL_WMI_CREATE_QOS (SIOCIWFIRSTPRIV+21) #define AR6000_IOCTL_WMI_DELETE_QOS (SIOCIWFIRSTPRIV+22) #define AR6000_IOCTL_WMI_SET_SNRTHRESHOLD (SIOCIWFIRSTPRIV+23) #define AR6000_IOCTL_WMI_SET_ERROR_REPORT_BITMASK (SIOCIWFIRSTPRIV+24) #define AR6000_IOCTL_WMI_GET_TARGET_STATS (SIOCIWFIRSTPRIV+25) #define AR6000_IOCTL_WMI_SET_ASSOC_INFO (SIOCIWFIRSTPRIV+26) #define AR6000_IOCTL_WMI_SET_ACCESS_PARAMS (SIOCIWFIRSTPRIV+27) #define AR6000_IOCTL_WMI_SET_BMISS_TIME (SIOCIWFIRSTPRIV+28) #define AR6000_IOCTL_WMI_SET_DISC_TIMEOUT (SIOCIWFIRSTPRIV+29) #define AR6000_IOCTL_WMI_SET_IBSS_PM_CAPS (SIOCIWFIRSTPRIV+30)
We need to address each one and what we should do for cfg80211. We do this below.
0 - IEEE80211_IOCTL_SETPARAM
XXX: Read code.
1 - IEEE80211_IOCTL_SETKEY
XXX: Read code.
2 - IEEE80211_IOCTL_DELKEY
XXX: Read code.
3 - IEEE80211_IOCTL_SETMLME
XXX: Read code.
4 - IEEE80211_IOCTL_ADDPMKID
XXX: Read code.
5 - IEEE80211_IOCTL_SETOPTIE
XXX: Read code.
6 - IEEE80211_IOCTL_GETPARAM unused
XXX: Read code.
7 - IEEE80211_IOCTL_SETWMMPARAMS unused
XXX: Read code.
8 - IEEE80211_IOCTL_GETWMMPARAMS unused
XXX: Read code.
9 - IEEE80211_IOCTL_GETOPTIE unused
XXX: Read code.
10 - IEEE80211_IOCTL_SETAUTHALG unused
XXX: Read code.
10 - IEEE80211_IOCTL_LASTONE
XXX: Read code. Yes 10... again. This is not documented, gotta read the code.
11 - AR6000_IOCTL_WMI_GETREV
XXX: Read code.
12 - AR6000_IOCTL_WMI_SETPWR
XXX: Read code.
13 - AR6000_IOCTL_WMI_SETSCAN
XXX: Read code.
14 - AR6000_IOCTL_WMI_SETLISTENINT
XXX: Read code.
15 - AR6000_IOCTL_WMI_SETBSSFILTER
XXX: Read code.
16 - AR6000_IOCTL_WMI_SET_CHANNELPARAMS
XXX: Read code.
17 - AR6000_IOCTL_WMI_SET_PROBEDSSID
XXX: Read code. === 18 - AR6000_IOCTL_WMI_SET_PMPARAMS === XXX: Read code. XXX: Read code.
19 - AR6000_IOCTL_WMI_SET_BADAP
XXX: Read code.
20 - AR6000_IOCTL_WMI_GET_QOS_QUEUE
XXX: Read code.
21 - AR6000_IOCTL_WMI_CREATE_QOS
XXX: Read code.
22 - AR6000_IOCTL_WMI_DELETE_QOS
XXX: Read code.
23 - AR6000_IOCTL_WMI_SET_SNRTHRESHOLD
XXX: Read code.
24 - AR6000_IOCTL_WMI_SET_ERROR_REPORT_BITMASK
XXX: Read code.
25 - AR6000_IOCTL_WMI_GET_TARGET_STATS
XXX: Read code.
26 - AR6000_IOCTL_WMI_SET_ASSOC_INFO
XXX: Read code.
27 - AR6000_IOCTL_WMI_SET_ACCESS_PARAMS
XXX: Read code.
28 - AR6000_IOCTL_WMI_SET_BMISS_TIME
XXX: Read code.
29 - AR6000_IOCTL_WMI_SET_DISC_TIMEOUT
XXX: Read code.
30 - AR6000_IOCTL_WMI_SET_IBSS_PM_CAPS
XXX: Read code.
xioctls
Linux wireless-extensions only supports 30 private ioctls. The supported way to add more ioctls was to use subioctls, instead ath6kl decided to redefine the concept of subioctls but on the netdev ioctl... It accomplishes this by defining an extended ioctl command which is also mapped as follows:
/* * There is a very small space available for driver-private * wireless ioctls. In order to circumvent this limitation, * we multiplex a bunch of ioctls (XIOCTLs) on top of a * single AR6000_IOCTL_EXTENDED ioctl. */ #define AR6000_IOCTL_EXTENDED (SIOCIWFIRSTPRIV+31)
Below we categorize them. It seems we can likely just move these knobs to debugfs. An evaluation needs to be done to determine if users of these APIs would be happy in using debugfs.
- BT coex APIs:
- ar6000_xioctl_set_bt_status_cmd()
- ar6000_xioctl_set_bt_params_cmd()
- ar6000_xioctl_set_btcoex_fe_ant_cmd()
- ar6000_xioctl_set_btcoex_colocated_bt_dev_cmd()
- ar6000_xioctl_set_btcoex_btinquiry_page_config_cmd()
- ar6000_xioctl_set_btcoex_sco_config_cmd()
- ar6000_xioctl_set_btcoex_a2dp_config_cmd()
- ar6000_xioctl_set_btcoex_aclcoex_config_cmd()
- ar60000_xioctl_set_btcoex_debug_cmd()
- ar6000_xioctl_set_btcoex_bt_operating_status_cmd()
- ar6000_xioctl_get_btcoex_config_cmd()
- ar6000_xioctl_get_btcoex_stats_cmd()
Android
Android needs to be changed to use standard APIs, see this Android changes section.
config cleanup
CONFIG_HOST_TCMD_SUPPORT
This requires some special firmware and will vary depending on the revision of the chipset.
AR6003_REV1_VERSION –> AR6003_REV1_TCMD_FIRMWARE_FILE
AR6003_REV2_VERSION –> AR6003_REV2_TCMD_FIRMWARE_FILE
It seems this does not actually affect the WMI API other firmware so why not just remove the ifdef and keep the code in place. The only use I see for the config option is that it enables a module parameter testmode which if set then it will load the test firmware. This can likely be kept for now, even for proper placement in the Linux kernel.
Random always set macros
This can be remove and the code that makes sense left in place.
ccflags-y += -DLINUX -DKERNEL_2_6 ccflags-y += -DTCMD ccflags-y += -DSEND_EVENT_TO_APP ccflags-y += -DUSER_KEYS ccflags-y += -DNO_SYNC_FLUSH ccflags-y += -DHTC_EP_STAT_PROFILING ccflags-y += -DATH_AR6K_11N_SUPPORT ccflags-y += -DWAPI_ENABLE ccflags-y += -DCHECKSUM_OFFLOAD ccflags-y += -DWLAN_HEADERS ccflags-y += -DINIT_MODE_DRV_ENABLED ccflags-y += -DBMIENABLE_SET ... #if WIRELESS_EXT < 18
AP Mode support using cfg80211
No one is working on this yet.
WiFi Direct
No one is working on this yet