diff options
Diffstat (limited to 'drivers/staging/ath6kl/os/linux/ar6000_drv.c')
-rw-r--r-- | drivers/staging/ath6kl/os/linux/ar6000_drv.c | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index 647c6c983a2..9f7a02f5085 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c | |||
@@ -254,11 +254,11 @@ module_param(blocktx, int, 0644); | |||
254 | #endif /* BLOCK_TX_PATH_FLAG */ | 254 | #endif /* BLOCK_TX_PATH_FLAG */ |
255 | 255 | ||
256 | typedef struct user_rssi_compensation_t { | 256 | typedef struct user_rssi_compensation_t { |
257 | A_UINT16 customerID; | 257 | u16 customerID; |
258 | union { | 258 | union { |
259 | A_UINT16 a_enable; | 259 | u16 a_enable; |
260 | A_UINT16 bg_enable; | 260 | u16 bg_enable; |
261 | A_UINT16 enable; | 261 | u16 enable; |
262 | }; | 262 | }; |
263 | A_INT16 bg_param_a; | 263 | A_INT16 bg_param_a; |
264 | A_INT16 bg_param_b; | 264 | A_INT16 bg_param_b; |
@@ -322,7 +322,7 @@ static void ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPackets); | |||
322 | static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPacket); | 322 | static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPacket); |
323 | 323 | ||
324 | #ifdef ATH_AR6K_11N_SUPPORT | 324 | #ifdef ATH_AR6K_11N_SUPPORT |
325 | static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, A_UINT16 num); | 325 | static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num); |
326 | #endif | 326 | #endif |
327 | static void ar6000_deliver_frames_to_nw_stack(void * dev, void *osbuf); | 327 | static void ar6000_deliver_frames_to_nw_stack(void * dev, void *osbuf); |
328 | //static void ar6000_deliver_frames_to_bt_stack(void * dev, void *osbuf); | 328 | //static void ar6000_deliver_frames_to_bt_stack(void * dev, void *osbuf); |
@@ -773,7 +773,7 @@ aptcTimerHandler(unsigned long arg) | |||
773 | 773 | ||
774 | #ifdef ATH_AR6K_11N_SUPPORT | 774 | #ifdef ATH_AR6K_11N_SUPPORT |
775 | static void | 775 | static void |
776 | ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, A_UINT16 num) | 776 | ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num) |
777 | { | 777 | { |
778 | void * osbuf; | 778 | void * osbuf; |
779 | 779 | ||
@@ -904,26 +904,26 @@ ar6000_sysfs_bmi_deinit(AR_SOFTC_T *ar) | |||
904 | static | 904 | static |
905 | void calculate_crc(A_UINT32 TargetType, A_UCHAR *eeprom_data) | 905 | void calculate_crc(A_UINT32 TargetType, A_UCHAR *eeprom_data) |
906 | { | 906 | { |
907 | A_UINT16 *ptr_crc; | 907 | u16 *ptr_crc; |
908 | A_UINT16 *ptr16_eeprom; | 908 | u16 *ptr16_eeprom; |
909 | A_UINT16 checksum; | 909 | u16 checksum; |
910 | A_UINT32 i; | 910 | A_UINT32 i; |
911 | A_UINT32 eeprom_size; | 911 | A_UINT32 eeprom_size; |
912 | 912 | ||
913 | if (TargetType == TARGET_TYPE_AR6001) | 913 | if (TargetType == TARGET_TYPE_AR6001) |
914 | { | 914 | { |
915 | eeprom_size = 512; | 915 | eeprom_size = 512; |
916 | ptr_crc = (A_UINT16 *)eeprom_data; | 916 | ptr_crc = (u16 *)eeprom_data; |
917 | } | 917 | } |
918 | else if (TargetType == TARGET_TYPE_AR6003) | 918 | else if (TargetType == TARGET_TYPE_AR6003) |
919 | { | 919 | { |
920 | eeprom_size = 1024; | 920 | eeprom_size = 1024; |
921 | ptr_crc = (A_UINT16 *)((A_UCHAR *)eeprom_data + 0x04); | 921 | ptr_crc = (u16 *)((A_UCHAR *)eeprom_data + 0x04); |
922 | } | 922 | } |
923 | else | 923 | else |
924 | { | 924 | { |
925 | eeprom_size = 768; | 925 | eeprom_size = 768; |
926 | ptr_crc = (A_UINT16 *)((A_UCHAR *)eeprom_data + 0x04); | 926 | ptr_crc = (u16 *)((A_UCHAR *)eeprom_data + 0x04); |
927 | } | 927 | } |
928 | 928 | ||
929 | 929 | ||
@@ -932,7 +932,7 @@ void calculate_crc(A_UINT32 TargetType, A_UCHAR *eeprom_data) | |||
932 | 932 | ||
933 | // Recalculate new CRC | 933 | // Recalculate new CRC |
934 | checksum = 0; | 934 | checksum = 0; |
935 | ptr16_eeprom = (A_UINT16 *)eeprom_data; | 935 | ptr16_eeprom = (u16 *)eeprom_data; |
936 | for (i = 0;i < eeprom_size; i += 2) | 936 | for (i = 0;i < eeprom_size; i += 2) |
937 | { | 937 | { |
938 | checksum = checksum ^ (*ptr16_eeprom); | 938 | checksum = checksum ^ (*ptr16_eeprom); |
@@ -2552,7 +2552,7 @@ int ar6000_init(struct net_device *dev) | |||
2552 | * of 0-3 */ | 2552 | * of 0-3 */ |
2553 | connect.ConnectionFlags &= ~HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_MASK; | 2553 | connect.ConnectionFlags &= ~HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_MASK; |
2554 | connect.ConnectionFlags |= | 2554 | connect.ConnectionFlags |= |
2555 | ((A_UINT16)reduce_credit_dribble - 1) & HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_MASK; | 2555 | ((u16)reduce_credit_dribble - 1) & HTC_CONNECT_FLAGS_THRESHOLD_LEVEL_MASK; |
2556 | } | 2556 | } |
2557 | /* connect to best-effort service */ | 2557 | /* connect to best-effort service */ |
2558 | connect.ServiceID = WMI_DATA_BE_SVC; | 2558 | connect.ServiceID = WMI_DATA_BE_SVC; |
@@ -2797,11 +2797,11 @@ ar6000_txPwr_rx(void *devt, u8 txPwr) | |||
2797 | 2797 | ||
2798 | 2798 | ||
2799 | void | 2799 | void |
2800 | ar6000_channelList_rx(void *devt, A_INT8 numChan, A_UINT16 *chanList) | 2800 | ar6000_channelList_rx(void *devt, A_INT8 numChan, u16 *chanList) |
2801 | { | 2801 | { |
2802 | AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; | 2802 | AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; |
2803 | 2803 | ||
2804 | A_MEMCPY(ar->arChannelList, chanList, numChan * sizeof (A_UINT16)); | 2804 | A_MEMCPY(ar->arChannelList, chanList, numChan * sizeof (u16)); |
2805 | ar->arNumChannels = numChan; | 2805 | ar->arNumChannels = numChan; |
2806 | 2806 | ||
2807 | wake_up(&arEvent); | 2807 | wake_up(&arEvent); |
@@ -3665,7 +3665,7 @@ ar6000_rx(void *Context, HTC_PACKET *pPacket) | |||
3665 | AR6000_STAT_INC(ar, rx_length_errors); | 3665 | AR6000_STAT_INC(ar, rx_length_errors); |
3666 | A_NETBUF_FREE(skb); | 3666 | A_NETBUF_FREE(skb); |
3667 | } else { | 3667 | } else { |
3668 | A_UINT16 seq_no; | 3668 | u16 seq_no; |
3669 | u8 meta_type; | 3669 | u8 meta_type; |
3670 | 3670 | ||
3671 | #if 0 | 3671 | #if 0 |
@@ -3678,7 +3678,7 @@ ar6000_rx(void *Context, HTC_PACKET *pPacket) | |||
3678 | sta_t *conn = NULL; | 3678 | sta_t *conn = NULL; |
3679 | u8 psState=0,prevPsState; | 3679 | u8 psState=0,prevPsState; |
3680 | ATH_MAC_HDR *datap=NULL; | 3680 | ATH_MAC_HDR *datap=NULL; |
3681 | A_UINT16 offset; | 3681 | u16 offset; |
3682 | 3682 | ||
3683 | meta_type = WMI_DATA_HDR_GET_META(dhdr); | 3683 | meta_type = WMI_DATA_HDR_GET_META(dhdr); |
3684 | 3684 | ||
@@ -4206,7 +4206,7 @@ ar6000_ready_event(void *devt, u8 *datap, u8 phyCap, A_UINT32 sw_ver, A_UINT32 a | |||
4206 | } | 4206 | } |
4207 | 4207 | ||
4208 | void | 4208 | void |
4209 | add_new_sta(AR_SOFTC_T *ar, u8 *mac, A_UINT16 aid, u8 *wpaie, | 4209 | add_new_sta(AR_SOFTC_T *ar, u8 *mac, u16 aid, u8 *wpaie, |
4210 | u8 ielen, u8 keymgmt, u8 ucipher, u8 auth) | 4210 | u8 ielen, u8 keymgmt, u8 ucipher, u8 auth) |
4211 | { | 4211 | { |
4212 | u8 free_slot=aid-1; | 4212 | u8 free_slot=aid-1; |
@@ -4222,8 +4222,8 @@ add_new_sta(AR_SOFTC_T *ar, u8 *mac, A_UINT16 aid, u8 *wpaie, | |||
4222 | } | 4222 | } |
4223 | 4223 | ||
4224 | void | 4224 | void |
4225 | ar6000_connect_event(AR_SOFTC_T *ar, A_UINT16 channel, u8 *bssid, | 4225 | ar6000_connect_event(AR_SOFTC_T *ar, u16 channel, u8 *bssid, |
4226 | A_UINT16 listenInterval, A_UINT16 beaconInterval, | 4226 | u16 listenInterval, u16 beaconInterval, |
4227 | NETWORK_TYPE networkType, u8 beaconIeLen, | 4227 | NETWORK_TYPE networkType, u8 beaconIeLen, |
4228 | u8 assocReqLen, u8 assocRespLen, | 4228 | u8 assocReqLen, u8 assocRespLen, |
4229 | u8 *assocInfo) | 4229 | u8 *assocInfo) |
@@ -4398,9 +4398,9 @@ skip_key: | |||
4398 | if (assocRespLen && (sizeof(buf) > (12 + (assocRespLen * 2)))) | 4398 | if (assocRespLen && (sizeof(buf) > (12 + (assocRespLen * 2)))) |
4399 | { | 4399 | { |
4400 | assoc_resp_ie_pos = beaconIeLen + assocReqLen + | 4400 | assoc_resp_ie_pos = beaconIeLen + assocReqLen + |
4401 | sizeof(A_UINT16) + /* capinfo*/ | 4401 | sizeof(u16) + /* capinfo*/ |
4402 | sizeof(A_UINT16) + /* status Code */ | 4402 | sizeof(u16) + /* status Code */ |
4403 | sizeof(A_UINT16) ; /* associd */ | 4403 | sizeof(u16) ; /* associd */ |
4404 | A_MEMZERO(buf, sizeof(buf)); | 4404 | A_MEMZERO(buf, sizeof(buf)); |
4405 | sprintf(buf, "%s", tag2); | 4405 | sprintf(buf, "%s", tag2); |
4406 | pos = buf + 12; | 4406 | pos = buf + 12; |
@@ -4427,8 +4427,8 @@ skip_key: | |||
4427 | * assoc Request includes capability and listen interval. Skip these. | 4427 | * assoc Request includes capability and listen interval. Skip these. |
4428 | */ | 4428 | */ |
4429 | assoc_req_ie_pos = beaconIeLen + | 4429 | assoc_req_ie_pos = beaconIeLen + |
4430 | sizeof(A_UINT16) + /* capinfo*/ | 4430 | sizeof(u16) + /* capinfo*/ |
4431 | sizeof(A_UINT16); /* listen interval */ | 4431 | sizeof(u16); /* listen interval */ |
4432 | 4432 | ||
4433 | A_MEMZERO(buf, sizeof(buf)); | 4433 | A_MEMZERO(buf, sizeof(buf)); |
4434 | sprintf(buf, "%s", tag1); | 4434 | sprintf(buf, "%s", tag1); |
@@ -4538,7 +4538,7 @@ sta_cleanup(AR_SOFTC_T *ar, u8 i) | |||
4538 | 4538 | ||
4539 | } | 4539 | } |
4540 | 4540 | ||
4541 | u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, A_UINT16 reason) | 4541 | u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, u16 reason) |
4542 | { | 4542 | { |
4543 | u8 i, removed=0; | 4543 | u8 i, removed=0; |
4544 | 4544 | ||
@@ -4572,7 +4572,7 @@ u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, A_UINT16 reason) | |||
4572 | 4572 | ||
4573 | void | 4573 | void |
4574 | ar6000_disconnect_event(AR_SOFTC_T *ar, u8 reason, u8 *bssid, | 4574 | ar6000_disconnect_event(AR_SOFTC_T *ar, u8 reason, u8 *bssid, |
4575 | u8 assocRespLen, u8 *assocInfo, A_UINT16 protocolReasonStatus) | 4575 | u8 assocRespLen, u8 *assocInfo, u16 protocolReasonStatus) |
4576 | { | 4576 | { |
4577 | u8 i; | 4577 | u8 i; |
4578 | unsigned long flags; | 4578 | unsigned long flags; |
@@ -5127,8 +5127,8 @@ ar6000_cac_event(AR_SOFTC_T *ar, u8 ac, u8 cacIndication, | |||
5127 | } | 5127 | } |
5128 | 5128 | ||
5129 | void | 5129 | void |
5130 | ar6000_channel_change_event(AR_SOFTC_T *ar, A_UINT16 oldChannel, | 5130 | ar6000_channel_change_event(AR_SOFTC_T *ar, u16 oldChannel, |
5131 | A_UINT16 newChannel) | 5131 | u16 newChannel) |
5132 | { | 5132 | { |
5133 | A_PRINTF("Channel Change notification\nOld Channel: %d, New Channel: %d\n", | 5133 | A_PRINTF("Channel Change notification\nOld Channel: %d, New Channel: %d\n", |
5134 | oldChannel, newChannel); | 5134 | oldChannel, newChannel); |
@@ -5519,7 +5519,7 @@ ar6000_alloc_cookie(AR_SOFTC_T *ar) | |||
5519 | * the event ID and event content. | 5519 | * the event ID and event content. |
5520 | */ | 5520 | */ |
5521 | #define EVENT_ID_LEN 2 | 5521 | #define EVENT_ID_LEN 2 |
5522 | void ar6000_send_event_to_app(AR_SOFTC_T *ar, A_UINT16 eventId, | 5522 | void ar6000_send_event_to_app(AR_SOFTC_T *ar, u16 eventId, |
5523 | u8 *datap, int len) | 5523 | u8 *datap, int len) |
5524 | { | 5524 | { |
5525 | 5525 | ||
@@ -5528,7 +5528,7 @@ void ar6000_send_event_to_app(AR_SOFTC_T *ar, A_UINT16 eventId, | |||
5528 | /* note: IWEVCUSTOM only exists in wireless extensions after version 15 */ | 5528 | /* note: IWEVCUSTOM only exists in wireless extensions after version 15 */ |
5529 | 5529 | ||
5530 | char *buf; | 5530 | char *buf; |
5531 | A_UINT16 size; | 5531 | u16 size; |
5532 | union iwreq_data wrqu; | 5532 | union iwreq_data wrqu; |
5533 | 5533 | ||
5534 | size = len + EVENT_ID_LEN; | 5534 | size = len + EVENT_ID_LEN; |
@@ -5549,7 +5549,7 @@ void ar6000_send_event_to_app(AR_SOFTC_T *ar, A_UINT16 eventId, | |||
5549 | A_MEMCPY(buf, &eventId, EVENT_ID_LEN); | 5549 | A_MEMCPY(buf, &eventId, EVENT_ID_LEN); |
5550 | A_MEMCPY(buf+EVENT_ID_LEN, datap, len); | 5550 | A_MEMCPY(buf+EVENT_ID_LEN, datap, len); |
5551 | 5551 | ||
5552 | //AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("event ID = %d,len = %d\n",*(A_UINT16*)buf, size)); | 5552 | //AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("event ID = %d,len = %d\n",*(u16 *)buf, size)); |
5553 | A_MEMZERO(&wrqu, sizeof(wrqu)); | 5553 | A_MEMZERO(&wrqu, sizeof(wrqu)); |
5554 | wrqu.data.length = size; | 5554 | wrqu.data.length = size; |
5555 | wireless_send_event(ar->arNetDev, IWEVCUSTOM, &wrqu, buf); | 5555 | wireless_send_event(ar->arNetDev, IWEVCUSTOM, &wrqu, buf); |
@@ -5564,7 +5564,7 @@ void ar6000_send_event_to_app(AR_SOFTC_T *ar, A_UINT16 eventId, | |||
5564 | * to the application. The buf which is sent to application | 5564 | * to the application. The buf which is sent to application |
5565 | * includes the event ID and event content. | 5565 | * includes the event ID and event content. |
5566 | */ | 5566 | */ |
5567 | void ar6000_send_generic_event_to_app(AR_SOFTC_T *ar, A_UINT16 eventId, | 5567 | void ar6000_send_generic_event_to_app(AR_SOFTC_T *ar, u16 eventId, |
5568 | u8 *datap, int len) | 5568 | u8 *datap, int len) |
5569 | { | 5569 | { |
5570 | 5570 | ||
@@ -5573,7 +5573,7 @@ void ar6000_send_generic_event_to_app(AR_SOFTC_T *ar, A_UINT16 eventId, | |||
5573 | /* IWEVGENIE exists in wireless extensions version 18 onwards */ | 5573 | /* IWEVGENIE exists in wireless extensions version 18 onwards */ |
5574 | 5574 | ||
5575 | char *buf; | 5575 | char *buf; |
5576 | A_UINT16 size; | 5576 | u16 size; |
5577 | union iwreq_data wrqu; | 5577 | union iwreq_data wrqu; |
5578 | 5578 | ||
5579 | size = len + EVENT_ID_LEN; | 5579 | size = len + EVENT_ID_LEN; |
@@ -5648,7 +5648,7 @@ a_copy_from_user(void *to, const void *from, A_UINT32 n) | |||
5648 | 5648 | ||
5649 | int | 5649 | int |
5650 | ar6000_get_driver_cfg(struct net_device *dev, | 5650 | ar6000_get_driver_cfg(struct net_device *dev, |
5651 | A_UINT16 cfgParam, | 5651 | u16 cfgParam, |
5652 | void *result) | 5652 | void *result) |
5653 | { | 5653 | { |
5654 | 5654 | ||
@@ -5805,12 +5805,12 @@ read_rssi_compensation_param(AR_SOFTC_T *ar) | |||
5805 | 5805 | ||
5806 | cust_data_ptr = ar6000_get_cust_data_buffer(ar->arTargetType); | 5806 | cust_data_ptr = ar6000_get_cust_data_buffer(ar->arTargetType); |
5807 | 5807 | ||
5808 | rssi_compensation_param.customerID = *(A_UINT16 *)cust_data_ptr & 0xffff; | 5808 | rssi_compensation_param.customerID = *(u16 *)cust_data_ptr & 0xffff; |
5809 | rssi_compensation_param.enable = *(A_UINT16 *)(cust_data_ptr+2) & 0xffff; | 5809 | rssi_compensation_param.enable = *(u16 *)(cust_data_ptr+2) & 0xffff; |
5810 | rssi_compensation_param.bg_param_a = *(A_UINT16 *)(cust_data_ptr+4) & 0xffff; | 5810 | rssi_compensation_param.bg_param_a = *(u16 *)(cust_data_ptr+4) & 0xffff; |
5811 | rssi_compensation_param.bg_param_b = *(A_UINT16 *)(cust_data_ptr+6) & 0xffff; | 5811 | rssi_compensation_param.bg_param_b = *(u16 *)(cust_data_ptr+6) & 0xffff; |
5812 | rssi_compensation_param.a_param_a = *(A_UINT16 *)(cust_data_ptr+8) & 0xffff; | 5812 | rssi_compensation_param.a_param_a = *(u16 *)(cust_data_ptr+8) & 0xffff; |
5813 | rssi_compensation_param.a_param_b = *(A_UINT16 *)(cust_data_ptr+10) &0xffff; | 5813 | rssi_compensation_param.a_param_b = *(u16 *)(cust_data_ptr+10) &0xffff; |
5814 | rssi_compensation_param.reserved = *(A_UINT32 *)(cust_data_ptr+12); | 5814 | rssi_compensation_param.reserved = *(A_UINT32 *)(cust_data_ptr+12); |
5815 | 5815 | ||
5816 | #ifdef RSSICOMPENSATION_PRINT | 5816 | #ifdef RSSICOMPENSATION_PRINT |
@@ -6139,7 +6139,7 @@ ar6000_connect_to_ap(struct ar6_softc *ar) | |||
6139 | /* Set the listen interval into 1000TUs or more. This value will be indicated to Ap in the conn. | 6139 | /* Set the listen interval into 1000TUs or more. This value will be indicated to Ap in the conn. |
6140 | later set it back locally at the STA to 100/1000 TUs depending on the power mode */ | 6140 | later set it back locally at the STA to 100/1000 TUs depending on the power mode */ |
6141 | if ((ar->arNetworkType == INFRA_NETWORK)) { | 6141 | if ((ar->arNetworkType == INFRA_NETWORK)) { |
6142 | wmi_listeninterval_cmd(ar->arWmi, max(ar->arListenIntervalT, (A_UINT16)A_MAX_WOW_LISTEN_INTERVAL), 0); | 6142 | wmi_listeninterval_cmd(ar->arWmi, max(ar->arListenIntervalT, (u16)A_MAX_WOW_LISTEN_INTERVAL), 0); |
6143 | } | 6143 | } |
6144 | status = wmi_connect_cmd(ar->arWmi, ar->arNetworkType, | 6144 | status = wmi_connect_cmd(ar->arWmi, ar->arNetworkType, |
6145 | ar->arDot11AuthMode, ar->arAuthMode, | 6145 | ar->arDot11AuthMode, ar->arAuthMode, |
@@ -6187,7 +6187,7 @@ ar6000_ap_mode_get_wpa_ie(struct ar6_softc *ar, struct ieee80211req_wpaie *wpaie | |||
6187 | } | 6187 | } |
6188 | 6188 | ||
6189 | int | 6189 | int |
6190 | is_iwioctl_allowed(u8 mode, A_UINT16 cmd) | 6190 | is_iwioctl_allowed(u8 mode, u16 cmd) |
6191 | { | 6191 | { |
6192 | if(cmd >= SIOCSIWCOMMIT && cmd <= SIOCGIWPOWER) { | 6192 | if(cmd >= SIOCSIWCOMMIT && cmd <= SIOCGIWPOWER) { |
6193 | cmd -= SIOCSIWCOMMIT; | 6193 | cmd -= SIOCSIWCOMMIT; |