diff options
author | Shangbing Hu <shangbing.hu@mediatek.com> | 2016-07-13 06:38:43 +0800 |
---|---|---|
committer | Shangbing Hu <shangbing.hu@mediatek.com> | 2016-07-13 06:38:43 +0800 |
commit | 59ce143cc5393885a7c068e854f16cea1f90b13e (patch) | |
tree | e8be7832251b51a2169973fb4bad6dd22e657e22 /drivers/misc | |
parent | 9802abc17d00b187235cf82cd7a47ade9854ffd4 (diff) |
[ALPS02734249] connectivity:wlan gen2 add GPLv2 header
[Detail]
add GPLv2 header and remove history
[Solution]
modify gen2 47 files
MTK-Commit-Id: 9978c43e993f80783a5e8fcdfc01456e9608ca44
Change-Id: I84575fb2dc6f7927633414e3056cc85a72bdffc0
Signed-off-by: Shangbing Hu <shangbing.hu@mediatek.com>
CR-Id:ALPS02734249
Feature:Connectivity - Wi-Fi
Diffstat (limited to 'drivers/misc')
46 files changed, 556 insertions, 14144 deletions
diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/common/debug.c b/drivers/misc/mediatek/connectivity/wlan/gen2/common/debug.c index 07393af0b3fb..89fa36a0f2ec 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/common/debug.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/common/debug.c @@ -1,3 +1,16 @@ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ + #include "precomp.h" #include "gl_kal.h" diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c b/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c index 21bd849827e1..8fc02d32b10e 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c @@ -1,311 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/common/wlan_bow.c#1 -*/ - -/*! \file wlan_bow.c - \brief This file contains the 802.11 PAL commands processing routines for - MediaTek Inc. 802.11 Wireless LAN Adapters. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: wlan_bow.c - * - * 03 02 2012 terry.wu - * NULL - * Sync CFG80211 modification from branch 2,2. - * - * 01 16 2012 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Support BOW for 5GHz band. - * - * 01 09 2012 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * [ALPS00110632] [Rose][LCA42][Cross Feature][Bluetooth]The "KE" pops up after the device reboots automatically.(once) - * - * Fix bow link disconnected event dereference. - * - * 09 29 2011 cm.chang - * NULL - * Change the function prototype of rlmDomainGetChnlList() - * - * 07 06 2011 terry.wu - * [WCXRP00000735] [MT6620 Wi-Fi][BoW][FW/Driver] Protect BoW connection establishment - * Improve BoW connection establishment speed. - * - * 06 23 2011 cp.wu - * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module - * change parameter name from PeerAddr to BSSID - * - * 06 21 2011 terry.wu - * NULL - * Fix BoW KE. - * - * 06 20 2011 terry.wu - * NULL - * Add BoW Rate Limitation. - * - * 06 20 2011 cp.wu - * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module - * 1. specify target's BSSID when requesting channel privilege. - * 2. pass BSSID information to firmware domain - * - * 06 17 2011 terry.wu - * NULL - * Add BoW 11N support. - * - * 06 07 2011 cp.wu - * [WCXRP00000681] [MT5931][Firmware] HIF code size reduction - * aware more compile options. - * - * 05 25 2011 terry.wu - * [WCXRP00000735] [MT6620 Wi-Fi][BoW][FW/Driver] Protect BoW connection establishment - * Add BoW Cancel Scan Request and Turn On deactive network function. - * - * 05 23 2011 terry.wu - * [WCXRP00000735] [MT6620 Wi-Fi][BoW][FW/Driver] Protect BoW connection establishment - * Add some BoW error handling. - * - * 05 22 2011 terry.wu - * [WCXRP00000735] [MT6620 Wi-Fi][BoW][FW/Driver] Protect BoW connection establishment - * . - * - * 05 22 2011 terry.wu - * [WCXRP00000735] [MT6620 Wi-Fi][BoW][FW/Driver] Protect BoW connection establishment - * Only reply probe response to its peer or mached SSID for BoW AP. - * - * 05 22 2011 terry.wu - * [WCXRP00000735] [MT6620 Wi-Fi][BoW][FW/Driver] Protect BoW connection establishment - * Add BoW SAA retry and disable disconnect event when AAA fail . - * - * 05 21 2011 terry.wu - * [WCXRP00000735] [MT6620 Wi-Fi][BoW][FW/Driver] Protect BoW connection establishment - * Protect BoW connection establishment. - * - * 05 17 2011 terry.wu - * [WCXRP00000730] [MT6620 Wi-Fi][BoW] Send deauth while disconnecting - * Send deauth while disconnecting BoW link. - * - * 05 17 2011 terry.wu - * [WCXRP00000707] [MT6620 Wi-Fi][Driver] Fix BoW Multiple Physical Link connect/disconnect issue - * Fix wrong StaRec state of BoW . - * - * 05 06 2011 terry.wu - * [WCXRP00000707] [MT6620 Wi-Fi][Driver] Fix BoW Multiple Physical Link connect/disconnect issue - * Fix BoW Multiple Physical Link connect/disconnect issue. - * - * 05 03 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Use kalMemAlloc to allocate event buffer for kalIndicateBOWEvent. - * - * 04 15 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Fix prAssocRspSwRfb casting. - * - * 04 15 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Add BOW short range mode. - * - * 04 12 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Add WMM IE for BOW initiator data. - * - * 04 10 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Change Link disconnection event procedure for hotspot and change skb length check to 1514 bytes. - * - * 04 09 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Change Link connection event procedure and change skb length check to 1512 bytes. - * - * 03 28 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Simplify link disconnected routine, remove link disconnected other routine. - * - * 03 27 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Support multiple physical link. - * - * 03 27 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Add new feature - multiple physical link support. - * - * 02 22 2011 wh.su - * [WCXRP00000486] [MT6620 Wi-Fi][BOW] Fixed the bow send frame but not encrypted issue - * fixed the BOW packet sending without encrypted issue. - * - * 02 21 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Fix BOW link disconnection bug. - * - * 02 16 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Add bowNotifyAllLinkDisconnected interface and change channel grant procedure for bow starting. - * - * 02 11 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Update BOW channel granted function. - * - * 02 10 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Fix kernel API change issue. - * Before ALPS 2.2 (2.2 included), kfifo_alloc() is - * struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask, spinlock_t *lock); - * After ALPS 2.3, kfifo_alloc() is changed to - * int kfifo_alloc(struct kfifo *fifo, unsigned int size, gfp_t gfp_mask); - * - * 02 09 2011 cp.wu - * [WCXRP00000430] [MT6620 Wi-Fi][Firmware][Driver] Create V1.2 branch for MT6620E1 and MT6620E3 - * create V1.2 driver branch based on label MT6620_WIFI_DRIVER_V1_2_110209_1031 - * with BOW and P2P enabled as default - * - * 02 08 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Replace kfifo_get and kfifo_put with kfifo_out and kfifo_in. - * Update BOW get MAC status, remove returning event for AIS network type. - * - * 01 26 2011 cm.chang - * [WCXRP00000395] [MT6620 Wi-Fi][Driver][FW] Search STA_REC with additional net type index argument - * . - * - * 01 11 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Update BOW Activity Report structure and bug fix. - * - * 01 10 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Update BOW to support multiple physical link. - * - * 12 08 2010 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Support concurrent networks. - * - * 12 07 2010 cm.chang - * [WCXRP00000239] MT6620 Wi-Fi][Driver][FW] Merge concurrent branch back to maintrunk - * 1. BSSINFO include RLM parameter - * 2. free all sta records when network is disconnected - * - * 11 11 2010 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Fix BoW timer assert issue. - * - * 10 18 2010 chinghwa.yu - * [WCXRP00000110] [MT6620 Wi-Fi] [Driver] Fix BoW Connected event size - * Fix for event returnning Band. - * - * 10 18 2010 chinghwa.yu - * [WCXRP00000110] [MT6620 Wi-Fi] [Driver] Fix BoW Connected event size - * Fix wrong BoW event size. - * - * 10 04 2010 cp.wu - * [WCXRP00000077] [MT6620 Wi-Fi][Driver][FW] Eliminate use of ENUM_NETWORK_TYPE_T and replaced - * by ENUM_NETWORK_TYPE_INDEX_T only remove ENUM_NETWORK_TYPE_T definitions - * - * 09 27 2010 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000065] Update BoW design and settings - * Update BCM/BoW design and settings. - * - * 09 16 2010 chinghwa.yu - * NULL - * Fix bowResponderScanDone error when prBssDesc is NULL. - * - * 09 14 2010 chinghwa.yu - * NULL - * Add bowRunEventAAAComplete. - * - * 09 14 2010 cp.wu - * NULL - * indicate correct AIS network information for PAL. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 24 2010 cm.chang - * NULL - * Support RLM initail channel of Ad-hoc, P2P and BOW - * - * 08 24 2010 chinghwa.yu - * NULL - * Initialize nicActivateNetwork(prAdapter as soon as bow is starting.. - * - * 08 24 2010 chinghwa.yu - * NULL - * Update BOW for the 1st time. - * - * 08 23 2010 cp.wu - * NULL - * revise constant definitions to be matched with implementation (original cmd-event definition is deprecated) - * - * 07 30 2010 cp.wu - * NULL - * 1) BoW wrapper: use definitions instead of hard-coded constant for error code - * 2) AIS-FSM: eliminate use of desired RF parameters, use prTargetBssDesc instead - * 3) add handling for RX_PKT_DESTINATION_HOST_WITH_FORWARD for GO-broadcast frames - * - * 07 15 2010 cp.wu - * - * sync. bluetooth-over-Wi-Fi interface to driver interface document v0.2.6. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 25 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add API in que_mgt to retrieve sta-rec index for security frames. - * - * 06 24 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 802.1x and bluetooth-over-Wi-Fi security frames are now delievered to firmware via command path instead of data path. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * 1) add timeout handler mechanism for pending command packets - * 2) add p2p add/removal key - * - * 05 13 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add NULL OID implementation for WOL-related OIDs. - * - * 05 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * 1) all BT physical handles shares the same RSSI/Link Quality. - * 2) simplify BT command composing - * - * 04 28 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * change prefix for data structure used to communicate with 802.11 PAL - * to avoid ambiguous naming with firmware interface - * - * 04 27 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add multiple physical link support - * - * 04 14 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * information buffer for query oid/ioctl is now buffered in prCmdInfo - * instead of glue-layer variable to improve multiple oid/ioctl capability - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability - * * 2) command sequence number is now increased atomically - * * 3) private data could be hold and taken use for other purpose -** -*/ /****************************************************************************** * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c b/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c index 993ff061ed20..d41dd6a9a3f8 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c @@ -1,1053 +1,15 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/common/wlan_oid.c#5 -*/ - -/*! \file wlanoid.c - \brief This file contains the WLAN OID processing routines of Windows driver for - MediaTek Inc. 802.11 Wireless LAN Adapters. -*/ - -/* -** Log: wlan_oid.c -** -** 09 05 2013 cp.wu -** isolate logic regarding roaming & reassociation -** -** 09 03 2013 cp.wu -** add path for reassociation -** -** 09 02 2013 cp.wu -** add path to handle reassociation request -** -** 07 19 2012 yuche.tsai -** NULL -** Code update for JB. - * - * 07 17 2012 yuche.tsai - * NULL - * Let netdev bring up. - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 03 02 2012 terry.wu - * NULL - * Sync CFG80211 modification from branch 2,2. - * - * 01 06 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * using the wlanSendSetQueryCmd to set the tx power control cmd. - * - * 01 06 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * change the set tx power cmd name. - * - * 01 05 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * Adding the related ioctl / wlan oid function to set the Tx power cfg. - * - * 12 20 2011 cp.wu - * [WCXRP00001144] [MT6620 Wi-Fi][Driver][Firmware] Add RF_FUNC_ID for exposing device and related version information - * add driver implementations for RF_AT_FUNCID_FW_INFO & RF_AT_FUNCID_DRV_INFO - * to expose version information - * - * 12 05 2011 cp.wu - * [WCXRP00001131] [MT6620 Wi-Fi][Driver][AIS] Implement connect-by-BSSID path - * add CONNECT_BY_BSSID policy - * - * 11 22 2011 cp.wu - * [WCXRP00001120] [MT6620 Wi-Fi][Driver] Modify roaming to AIS state transition from synchronous to - * asynchronous approach to avoid incomplete state termination - * 1. change RDD related compile option brace position. - * 2. when roaming is triggered, ask AIS to transit immediately only when AIS is in Normal TR state - * without join timeout timer ticking - * 3. otherwise, insert AIS_REQUEST into pending request queue - * - * 11 21 2011 cp.wu - * [WCXRP00001118] [MT6620 Wi-Fi][Driver] Corner case protections to pass Monkey testing - * 1. wlanoidQueryBssIdList might be passed with a non-zero length but a NULL pointer of buffer - * add more checking for such cases - * - * 2. kalSendComplete() might be invoked with a packet belongs to P2P network right after P2P is unregistered. - * add some tweaking to protect such cases because that net device has become invalid. - * - * 11 15 2011 cm.chang - * NULL - * Fix compiling warning - * - * 11 11 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * modify the xlog related code. - * - * 11 11 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * add debug counters of bb and ar for xlog. - * - * 11 10 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * change the debug module level. - * - * 11 09 2011 george.huang - * [WCXRP00000871] [MT6620 Wi-Fi][FW] Include additional wakeup condition, which is by - * consequent DTIM unicast indication add XLOG for Set PS mode entry - * - * 11 08 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * check if CFG_SUPPORT_SWCR is defined to aoid compiler error. - * - * 11 07 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * add debug counters and periodically dump counters for debugging. - * - * 11 03 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * change the DBGLOG for "\n" and "\r\n". LABEL to LOUD for XLOG - * - * 11 02 2011 chinghwa.yu - * [WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Add RDD certification features. - * - * 10 21 2011 eddie.chen - * [WCXRP00001051] [MT6620 Wi-Fi][Driver/Fw] Adjust the STA aging timeout - * Add switch to ignore the STA aging timeout. - * - * 10 12 2011 wh.su - * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP - * adding the 802.11w related function and define . - * - * 09 15 2011 tsaiyuan.hsu - * [WCXRP00000938] [MT6620 Wi-Fi][FW] add system config for CTIA - * correct fifo full control from query to set operation for CTIA. - * - * 08 31 2011 cm.chang - * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code - * . - * - * 08 17 2011 tsaiyuan.hsu - * [WCXRP00000938] [MT6620 Wi-Fi][FW] add system config for CTIA - * add system config for CTIA. - * - * 08 15 2011 george.huang - * [MT6620 Wi-Fi][FW] handle TSF drift for connection detection - * . - * - * 07 28 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings - * Add BWCS cmd and event. - * - * 07 18 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Add CMD/Event for RDD and BWCS. - * - * 07 11 2011 wh.su - * [WCXRP00000849] [MT6620 Wi-Fi][Driver] Remove some of the WAPI define for make sure the value is initialize, - * for customer not enable WAPI - * For make sure wapi initial value is set. - * - * 06 23 2011 cp.wu - * [WCXRP00000812] [MT6620 Wi-Fi][Driver] not show NVRAM when there is no valid MAC address in NVRAM content - * check with firmware for valid MAC address. - * - * 05 02 2011 eddie.chen - * [WCXRP00000373] [MT6620 Wi-Fi][FW] SW debug control - * Fix compile warning. - * - * 04 29 2011 george.huang - * [WCXRP00000684] [MT6620 Wi-Fi][Driver] Support P2P setting ARP filter - * . - * - * 04 27 2011 george.huang - * [WCXRP00000684] [MT6620 Wi-Fi][Driver] Support P2P setting ARP filter - * add more debug message - * - * 04 26 2011 eddie.chen - * [WCXRP00000373] [MT6620 Wi-Fi][FW] SW debug control - * Add rx path profiling. - * - * 04 12 2011 eddie.chen - * [WCXRP00000617] [MT6620 Wi-Fi][DRV/FW] Fix for sigma - * Fix the sta index in processing security frame - * Simple flow control for TC4 to avoid mgt frames for PS STA to occupy the TC4 - * Add debug message. - * - * 04 08 2011 george.huang - * [WCXRP00000621] [MT6620 Wi-Fi][Driver] Support P2P supplicant to set power mode - * separate settings of P2P and AIS - * - * 03 31 2011 puff.wen - * NULL - * . - * - * 03 29 2011 puff.wen - * NULL - * Add chennel switch for stress test - * - * 03 29 2011 cp.wu - * [WCXRP00000604] [MT6620 Wi-Fi][Driver] Surpress Klockwork Warning - * surpress klock warning with code path rewritten - * - * 03 24 2011 wh.su - * [WCXRP00000595] [MT6620 Wi-Fi][Driver] at CTIA indicate disconnect to make the ps profile can apply - * use disconnect event instead of ais abort for CTIA testing. - * - * 03 23 2011 george.huang - * [WCXRP00000586] [MT6620 Wi-Fi][FW] Modify for blocking absence request right after connected - * revise for CTIA power mode setting - * - * 03 22 2011 george.huang - * [WCXRP00000504] [MT6620 Wi-Fi][FW] Support Sigma CAPI for power saving related command - * link with supplicant commands - * - * 03 17 2011 chinglan.wang - * [WCXRP00000570] [MT6620 Wi-Fi][Driver] Add Wi-Fi Protected Setup v2.0 feature - * . - * - * 03 17 2011 yarco.yang - * [WCXRP00000569] [MT6620 Wi-Fi][F/W][Driver] Set multicast address support current network usage - * . - * - * 03 15 2011 george.huang - * [WCXRP00000557] [MT6620 Wi-Fi] Support current consumption test mode commands - * Support current consumption measurement mode command - * - * 03 15 2011 eddie.chen - * [WCXRP00000554] [MT6620 Wi-Fi][DRV] Add sw control debug counter - * Add sw debug counter for QM. - * - * 03 10 2011 cp.wu - * [WCXRP00000532] [MT6620 Wi-Fi][Driver] Migrate NVRAM configuration procedures from MT6620 E2 to MT6620 E3 - * deprecate configuration used by MT6620 E2 - * - * 03 07 2011 terry.wu - * [WCXRP00000521] [MT6620 Wi-Fi][Driver] Remove non-standard debug message - * Toggle non-standard debug messages to comments. - * - * 03 04 2011 cp.wu - * [WCXRP00000515] [MT6620 Wi-Fi][Driver] Surpress compiler warning which is identified by GNU compiler collection - * surpress compile warning occurred when compiled by GNU compiler collection. - * - * 03 03 2011 wh.su - * [WCXRP00000510] [MT6620 Wi-Fi] [Driver] Fixed the CTIA enter test mode issue - * fixed the enter ctia test mode issue. - * - * 03 02 2011 george.huang - * [WCXRP00000504] [MT6620 Wi-Fi][FW] Support Sigma CAPI for power saving related command - * Update sigma CAPI for U-APSD setting - * - * 03 02 2011 george.huang - * [WCXRP00000504] [MT6620 Wi-Fi][FW] Support Sigma CAPI for power saving related command - * Support UAPSD/OppPS/NoA parameter setting - * - * 03 02 2011 cp.wu - * [WCXRP00000503] [MT6620 Wi-Fi][Driver] Take RCPI brought by association response as - * initial RSSI right after connection is built. - * use RCPI brought by ASSOC-RESP after connection is built as initial RCPI to avoid using a uninitialized MAC-RX RCPI. - * - * 01 27 2011 george.huang - * [WCXRP00000400] [MT6620 Wi-Fi] support CTIA power mode setting - * Support CTIA power mode setting. - * - * 01 26 2011 wh.su - * [WCXRP00000396] [MT6620 Wi-Fi][Driver] Support Sw Ctrl ioctl at linux - * adding the SW cmd ioctl support, use set/get structure ioctl. - * - * 01 25 2011 cp.wu - * [WCXRP00000394] [MT6620 Wi-Fi][Driver] Count space needed for generating error message in - * scanning list into buffer size checking - * when doing size prechecking, check illegal MAC address as well - * - * 01 20 2011 eddie.chen - * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control - * Add Oid for sw control debug command - * - * 01 15 2011 puff.wen - * NULL - * Add Stress test - * - * 01 12 2011 cp.wu - * [WCXRP00000358] [MT6620 Wi-Fi][Driver] Provide concurrent information for each module - * check if allow to switch to IBSS mode via concurrent module before setting to IBSS mode - * - * 01 12 2011 cm.chang - * [WCXRP00000354] [MT6620 Wi-Fi][Driver][FW] Follow NVRAM bandwidth setting - * User-defined bandwidth is for 2.4G and 5G individually - * - * 01 04 2011 cp.wu - * [WCXRP00000342] [MT6620 Wi-Fi][Driver] show error code in scanning list when MAC address is not - * correctly configured in NVRAM - * show error code 0x10 when MAC address in NVRAM is not configured correctly. - * - * 01 04 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc and vmalloc implementations - * to ease physically continuous memory demands - * separate kalMemAlloc() into virtually-continuous and physically-continuous type to ease slab system pressure - * - * 12 28 2010 george.huang - * [WCXRP00000232] [MT5931 Wi-Fi][FW] Modifications for updated HW power on sequence and related design - * support WMM-PS U-APSD AC assignment. - * - * 12 28 2010 cp.wu - * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release - * report EEPROM used flag via NIC_CAPABILITY - * - * 12 28 2010 cp.wu - * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release - * integrate with 'EEPROM used' flag for reporting correct capability to Engineer Mode/META and other tools - * - * 12 16 2010 cp.wu - * [WCXRP00000268] [MT6620 Wi-Fi][Driver] correction for WHQL failed items - * correction for OID_802_11_NETWORK_TYPES_SUPPORTED handlers - * - * 12 13 2010 cp.wu - * [WCXRP00000256] [MT6620 Wi-Fi][Driver] Eliminate potential issues which is identified by Klockwork - * suppress warning reported by Klockwork. - * - * 12 07 2010 cm.chang - * [WCXRP00000239] MT6620 Wi-Fi][Driver][FW] Merge concurrent branch back to maintrunk - * 1. BSSINFO include RLM parameter - * 2. free all sta records when network is disconnected - * - * 12 07 2010 cm.chang - * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant - * 1. Country code is from NVRAM or supplicant - * 2. Change band definition in CMD/EVENT. - * - * 11 30 2010 cp.wu - * [WCXRP00000213] [MT6620 Wi-Fi][Driver] Implement scanning with specified SSID for wpa_supplicant with ap_scan=1 - * . - * - * 11 26 2010 cp.wu - * [WCXRP00000209] [MT6620 Wi-Fi][Driver] Modify NVRAM checking mechanism to warning only - * with necessary data field checking - * 1. NVRAM error is now treated as warning only, thus normal operation is still available - * but extra scan result used to indicate user is attached - * 2. DPD and TX-PWR are needed fields from now on, if these 2 fields are not available then warning message is shown - * - * 11 25 2010 cp.wu - * [WCXRP00000208] [MT6620 Wi-Fi][Driver] Add scanning with specified SSID to AIS FSM - * add scanning with specified SSID facility to AIS-FSM - * - * 11 21 2010 wh.su - * [WCXRP00000192] [MT6620 Wi-Fi][Driver] Fixed fail trying to build connection with Security - * AP while enable WAPI message check - * Not set the wapi mode while the wapi assoc info set non-wapi ie. - * - * 11 05 2010 wh.su - * [WCXRP00000165] [MT6620 Wi-Fi] [Pre-authentication] Assoc req rsn ie use wrong pmkid value - * fixed the.pmkid value mismatch issue - * - * 11 01 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version - * Check[WCXRP00000150] [MT6620 Wi-Fi][Driver] Add implementation for querying - * current TX rate from firmware auto rate module - * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead - * 2) Remove CNM CH-RECOVER event handling - * 3) cfg read/write API renamed with kal prefix for unified naming rules. - * - * 10 26 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version - * Check[WCXRP00000137] [MT6620 Wi-Fi] [FW] Support NIC capability query command - * 1) update NVRAM content template to ver 1.02 - * 2) add compile option for querying NIC capability (default: off) - * 3) modify AIS 5GHz support to run-time option, which could be turned on by registry or NVRAM setting - * 4) correct auto-rate compiler error under linux (treat warning as error) - * 5) simplify usage of NVRAM and REG_INFO_T - * 6) add version checking between driver and firmware - * - * 10 22 2010 cp.wu - * [WCXRP00000122] [MT6620 Wi-Fi][Driver] Preparation for YuSu source tree integration - * dos2unix conversion. - * - * 10 20 2010 cp.wu - * [WCXRP00000117] [MT6620 Wi-Fi][Driver] Add logic for suspending driver when MT6620 is not responding anymore - * use OID_CUSTOM_TEST_MODE as indication for driver reset - * by dropping pending TX packets - * - * 10 18 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version - * Check[WCXRP00000086] [MT6620 Wi-Fi][Driver] The mac address is all zero at android complete - * implementation of Android NVRAM access - * - * 10 06 2010 yuche.tsai - * NULL - * Update SLT 5G Test Channel Set. - * - * 10 06 2010 cp.wu - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * code reorganization to improve isolation between GLUE and CORE layers. - * - * 10 06 2010 yuche.tsai - * NULL - * Update For SLT 5G Test Channel Selection Rule. - * - * 10 05 2010 cp.wu - * [WCXRP00000075] [MT6620 Wi-Fi][Driver] Fill query buffer for OID_802_11_BSSID_LIST in 4-bytes aligned form - * Query buffer size needs to be enlarged due to result is filled in 4-bytes alignment boundary - * - * 10 05 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * 1) add NVRAM access API - * 2) fake scanning result when NVRAM doesn't exist and/or version mismatch. (off by compiler option) - * 3) add OID implementation for NVRAM read/write service - * - * 10 04 2010 cp.wu - * [WCXRP00000077] [MT6620 Wi-Fi][Driver][FW] Eliminate use of ENUM_NETWORK_TYPE_T and - * replaced by ENUM_NETWORK_TYPE_INDEX_T only remove ENUM_NETWORK_TYPE_T definitions - * - * 10 04 2010 cp.wu - * [WCXRP00000075] [MT6620 Wi-Fi][Driver] Fill query buffer for OID_802_11_BSSID_LIST in 4-bytes aligned form - * Extend result length to multiples of 4-bytes - * - * 09 24 2010 cp.wu - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * eliminate unused variables which lead gcc to argue - * - * 09 24 2010 cp.wu - * [WCXRP00000057] [MT6620 Wi-Fi][Driver] Modify online scan to a run-time switchable feature - * Modify online scan as a run-time adjustable option (for Windows, in registry) - * - * 09 23 2010 cp.wu - * [WCXRP00000051] [MT6620 Wi-Fi][Driver] WHQL test fail in MAC address changed item - * use firmware reported mac address right after wlanAdapterStart() as permanent address - * - * 09 23 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * add skeleton for NVRAM integration - * - * 09 08 2010 cp.wu - * NULL - * use static memory pool for storing IEs of scanning result. - * - * 09 07 2010 yuche.tsai - * NULL - * Update SLT due to API change of SCAN module. - * - * 09 06 2010 cp.wu - * NULL - * Androi/Linux: return current operating channel information - * - * 09 06 2010 cp.wu - * NULL - * 1) initialize for correct parameter even for disassociation. - * 2) AIS-FSM should have a limit on trials to build connection - * - * 09 03 2010 yuche.tsai - * NULL - * Refine SLT IO control handler. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 09 01 2010 wh.su - * NULL - * adding the wapi support for integration test. - * - * 08 30 2010 chinglan.wang - * NULL - * Modify the rescan condition. - * - * 08 29 2010 yuche.tsai - * NULL - * Finish SLT TX/RX & Rate Changing Support. - * - * 08 27 2010 chinglan.wang - * NULL - * Update configuration for MT6620_E1_PRE_ALPHA_1832_0827_2010 - * - * 08 25 2010 george.huang - * NULL - * update OID/ registry control path for PM related settings - * - * 08 24 2010 cp.wu - * NULL - * 1) initialize variable for enabling short premable/short time slot. - * 2) add compile option for disabling online scan - * - * 08 16 2010 george.huang - * NULL - * . - * - * 08 16 2010 george.huang - * NULL - * update params defined in CMD_SET_NETWORK_ADDRESS_LIST - * - * 08 04 2010 cp.wu - * NULL - * fix for check build WHQL testing: - * 1) do not assert query buffer if indicated buffer length is zero - * 2) sdio.c has bugs which cause freeing same pointer twice - * - * 08 04 2010 cp.wu - * NULL - * revert changelist #15371, efuse read/write access will be done by RF test approach - * - * 08 04 2010 cp.wu - * NULL - * add OID definitions for EFUSE read/write access. - * - * 08 04 2010 george.huang - * NULL - * handle change PS mode OID/ CMD - * - * 08 04 2010 cp.wu - * NULL - * add an extra parameter to rftestQueryATInfo 'cause it's necessary to pass u4FuncData for query request. - * - * 08 04 2010 cp.wu - * NULL - * bypass u4FuncData for RF-Test query request as well. - * - * 08 04 2010 yarco.yang - * NULL - * Add TX_AMPDU and ADDBA_REJECT command - * - * 08 03 2010 cp.wu - * NULL - * surpress compilation warning. - * - * 08 02 2010 george.huang - * NULL - * add WMM-PS test related OID/ CMD handlers - * - * 07 29 2010 cp.wu - * NULL - * eliminate u4FreqInKHz usage, combined into rConnections.ucAdHoc* - * - * 07 28 2010 cp.wu - * NULL - * 1) eliminate redundant variable eOPMode in prAdapter->rWlanInfo - * 2) change nicMediaStateChange() API prototype - * - * 07 26 2010 cp.wu - * - * re-commit code logic being overwriten. - * - * 07 24 2010 wh.su - * - * .support the Wi-Fi RSN - * - * 07 21 2010 cp.wu - * - * 1) change BG_SCAN to ONLINE_SCAN for consistent term - * 2) only clear scanning result when scan is permitted to do - * - * 07 20 2010 cp.wu - * - * 1) [AIS] when new scan is issued, clear currently available scanning result except the connected one - * 2) refine disconnection behaviour when issued during BG-SCAN process - * - * 07 19 2010 wh.su - * - * modify the auth and encry status variable. - * - * 07 16 2010 cp.wu - * - * remove work-around in case SCN is not available. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 05 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) change fake BSS_DESC from channel 6 to channel 1 due to channel switching is not done yet. - * 2) after MAC address is queried from firmware, all related variables in driver domain should be updated as well - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * AIS-FSM integration with CNM channel request messages - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * implementation of DRV-SCN and related mailbox message handling. - * - * 06 29 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) sync to. CMD/EVENT document v0.03 - * 2) simplify DTIM period parsing in scan.c only, bss.c no longer parses it again. - * 3) send command packet to indicate FW-PM after - * a) 1st beacon is received after AIS has connected to an AP - * b) IBSS-ALONE has been created - * c) IBSS-MERGE has occurred - * - * 06 25 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add API in que_mgt to retrieve sta-rec index for security frames. - * - * 06 24 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 802.1x and bluetooth-over-Wi-Fi security frames are now delievered to firmware via command path instead of data path. - * - * 06 23 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) add SCN compilation option. - * 2) when SCN is not turned on, BSSID_SCAN will generate a fake entry for 1st connection - * - * 06 23 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * implement SCAN-REQUEST oid as mailbox message dispatching. - * - * 06 23 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * integrate . - * - * 06 22 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) add command warpper for STA-REC/BSS-INFO sync. - * 2) enhance command packet sending procedure for non-oid part - * 3) add command packet definitions for STA-REC/BSS-INFO sync. - * - * 06 21 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * remove duplicate variable for migration. - * - * 06 21 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * adding the compiling flag for oid pmkid. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * enable RX management frame handling. - * - * 06 18 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * migration the security related function from firmware. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) eliminate CFG_CMD_EVENT_VERSION_0_9 - * 2) when disconnected, indicate nic directly (no event is needed) - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wlan_def.h. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wifi_var.h, precomp.h, cnm_timer.h (data type only) - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 06 03 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * move timer callback to glue layer. - * - * 05 28 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * simplify cmd packet sending for RF test and MCR access OIDs - * - * 05 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * disable radio even when STA is not associated. - * - * 05 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * correct 2 OID behaviour to meet WHQL requirement. - * - * 05 26 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * 1) Modify set mac address code - * 2) remove power management macro - * - * 05 25 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * correct BSSID_LIST oid when radio if turned off. - * - * 05 24 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) when acquiring LP-own, write for clr-own with lower frequency compared to read poll - * 2) correct address list parsing - * - * 05 24 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * disable wlanoidSetNetworkAddress() temporally. - * - * 05 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * some OIDs should be DRIVER_CORE instead of GLUE_EXTENSION - * - * 05 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) disable NETWORK_LAYER_ADDRESSES handling temporally. - * 2) finish statistics OIDs - * - * 05 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * change OID behavior to meet WHQL requirement. - * - * 05 20 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) integrate OID_GEN_NETWORK_LAYER_ADDRESSES with CMD_ID_SET_IP_ADDRESS - * 2) buffer statistics data for 2 seconds - * 3) use default value for adhoc parameters instead of 0 - * - * 05 19 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) do not take timeout mechanism for power mode oids - * 2) retrieve network type from connection status - * 3) after disassciation, set radio state to off - * 4) TCP option over IPv6 is supported - * - * 05 18 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement Wakeup-on-LAN except firmware integration part - * - * 05 17 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * correct wlanoidSet802dot11PowerSaveProfile implementation. - * - * 05 17 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) enable CMD/EVENT ver 0.9 definition. - * 2) abandon use of ENUM_MEDIA_STATE - * - * 05 17 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * correct OID_802_11_DISASSOCIATE handling. - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * 1) add timeout handler mechanism for pending command packets - * 2) add p2p add/removal key - * - * 05 14 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * Add dissassocation support for wpa supplicant - * - * 05 14 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * correct return value. - * - * 05 13 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add NULL OID implementation for WOL-related OIDs. - * - * 05 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * for disassociation, still use parameter with current setting. - * - * 05 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * for disassociation, generate a WZC-compatible invalid SSID. - * - * 05 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * associate to illegal SSID when handling OID_802_11_DISASSOCIATE - * - * 04 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * reserve field of privacy filter and RTS threshold setting. - * - * 04 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * surpress compiler warning - * - * 04 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * . - * - * 04 22 2010 cp.wu - * [WPD00003830]add OID_802_11_PRIVACY_FILTER support - * enable RX filter OID - * - * 04 19 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * Add ioctl of power management - * - * 04 14 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * information buffer for query oid/ioctl is now buffered in prCmdInfo - * * instead of glue-layer variable to improve multiple oid/ioctl capability - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability - * * * * 2) command sequence number is now increased atomically - * * * * 3) private data could be hold and taken use for other purpose - * - * 04 12 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * correct OID_802_11_CONFIGURATION query for infrastructure mode. - * - * 04 09 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * 1) remove unused spin lock declaration - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * finish non-glue layer access to glue variables - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * rWlanInfo should be placed at adapter rather than glue due to most operations - * * are done in adapter layer. - * - * 04 07 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * (1)improve none-glue code portability - * (2) disable set Multicast address during atomic context - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access to prGlueInfo->eParamMediaStateIndicated from non-glue layer - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * ePowerCtrl is not necessary as a glue variable. - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access to prGlueInfo->rWlanInfo.eLinkAttr.ucMediaStreamMode from non-glue layer. - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * improve none-glue code portability - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * code refine: fgTestMode should be at adapter rather than glue due to the device/fw is also involved - * - * 04 01 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * . - * - * 03 31 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * modify the wapi related code for new driver's design. - * - * 03 30 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * statistics information OIDs are now handled by querying from firmware domain - * - * 03 28 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * improve glue code portability - * - * 03 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * indicate media stream mode after set is done - * - * 03 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add a temporary flag for integration with CMD/EVENT v0.9. - * - * 03 25 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) correct OID_802_11_CONFIGURATION with frequency setting behavior. - * the frequency is used for adhoc connection only - * 2) update with SD1 v0.9 CMD/EVENT documentation - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * [WPD00003826] Initial import for Linux port - * initial import for Linux port - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port - * - * 03 24 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * generate information for OID_GEN_RCV_OK & OID_GEN_XMIT_OK - * - * - * 03 22 2010 cp.wu - * [WPD00003824][MT6620 Wi-Fi][New Feature] Add support of large scan list - * Implement feature needed by CR: WPD00003824: refining association command by pasting scanning result - * - * 03 19 2010 wh.su - * [WPD00003820][MT6620 Wi-Fi] Modify the code for meet the WHQL test - * adding the check for pass WHQL test item. - * - * 03 19 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) add ACPI D0/D3 state switching support - * * 2) use more formal way to handle interrupt when the status is retrieved from enhanced RX response - * -* 03 16 2010 wh.su - * [WPD00003820][MT6620 Wi-Fi] Modify the code for meet the WHQL test - * fixed some whql pre-test fail case. - * - * 03 03 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement custom OID: EEPROM read/write access - * - * 03 03 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement OID_802_3_MULTICAST_LIST oid handling - * - * 03 02 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) the use of prPendingOid revised, all accessing are now protected by spin lock - * * 2) ensure wlanReleasePendingOid will clear all command queues - * - * 02 25 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * send CMD_ID_INFRASTRUCTURE when handling OID_802_11_INFRASTRUCTURE_MODE set. - * - * 02 24 2010 wh.su - * [WPD00003820][MT6620 Wi-Fi] Modify the code for meet the WHQL test - * Don't needed to check the auth mode, WHQL testing not specific at auth wpa2. - * - * 02 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * do not check SSID validity anymore. - * - * 02 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add checksum offloading support. - * - * 02 09 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. Permanent and current MAC address are now retrieved by CMD/EVENT packets instead of hard-coded address - * * 2. follow MSDN defined behavior when associates to another AP - * * 3. for firmware download, packet size could be up to 2048 bytes - * - * 02 09 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * move ucCmdSeqNum as instance variable - * - * 02 04 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * when OID_CUSTOM_OID_INTERFACE_VERSION is queried, do modify connection states - * - * 01 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) implement timeout mechanism when OID is pending for longer than 1 second - * * 2) allow OID_802_11_CONFIGURATION to be executed when RF test mode is turned on - * - * 01 27 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * . - * - * 01 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. eliminate improper variable in rHifInfo - * * 2. block TX/ordinary OID when RF test mode is engaged - * * 3. wait until firmware finish operation when entering into and leaving from RF test mode - * * 4. correct some HAL implementation - * - * 01 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement following 802.11 OIDs: - * OID_802_11_RSSI, - * OID_802_11_RSSI_TRIGGER, - * OID_802_11_STATISTICS, - * OID_802_11_DISASSOCIATE, - * OID_802_11_POWER_MODE - * - * 01 21 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement OID_802_11_MEDIA_STREAM_MODE - * - * 01 21 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement OID_802_11_SUPPORTED_RATES / OID_802_11_DESIRED_RATES - * - * 01 21 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * do not fill ucJoinOnly currently - * - * 01 14 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * enable to connect to ad-hoc network - * - * 01 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * .implement Set/Query BeaconInterval/AtimWindow - * - * 01 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * .Set/Get AT Info is not blocked even when driver is not in fg test mode - * - * 12 30 2009 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) According to CMD/EVENT documentation v0.8, - * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used, - * and result is retrieved by get ATInfo instead - * 2) add 4 counter for recording aggregation statistics - * - * 12 28 2009 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate redundant variables for connection_state -** \main\maintrunk.MT6620WiFiDriver_Prj\32 2009-12-16 22:13:36 GMT mtk02752 -** change hard-coded MAC address to match with FW (temporally) -** \main\maintrunk.MT6620WiFiDriver_Prj\31 2009-12-10 16:49:50 GMT mtk02752 -** code clean -** \main\maintrunk.MT6620WiFiDriver_Prj\30 2009-12-08 17:38:49 GMT mtk02752 -** + add OID for RF test -** * MCR RD/WR are modified to match with cmd/event definition -** \main\maintrunk.MT6620WiFiDriver_Prj\29 2009-12-08 11:32:20 GMT mtk02752 -** add skeleton for RF test implementation -** \main\maintrunk.MT6620WiFiDriver_Prj\28 2009-12-03 16:43:24 GMT mtk01461 -** Modify query SCAN list oid by adding prEventScanResult -** -** \main\maintrunk.MT6620WiFiDriver_Prj\27 2009-12-03 16:39:27 GMT mtk01461 -** Sync CMD data structure in set ssid oid -** \main\maintrunk.MT6620WiFiDriver_Prj\26 2009-12-03 16:28:22 GMT mtk01461 -** Add invalid check of set SSID oid and fix query scan list oid -** \main\maintrunk.MT6620WiFiDriver_Prj\25 2009-11-30 17:33:08 GMT mtk02752 -** implement wlanoidSetInfrastructureMode/wlanoidQueryInfrastructureMode -** \main\maintrunk.MT6620WiFiDriver_Prj\24 2009-11-30 10:53:49 GMT mtk02752 -** 1st DW of WIFI_CMD_T is shared with HIF_TX_HEADER_T -** \main\maintrunk.MT6620WiFiDriver_Prj\23 2009-11-30 09:22:48 GMT mtk02752 -** correct wifi cmd length mismatch -** \main\maintrunk.MT6620WiFiDriver_Prj\22 2009-11-25 21:34:33 GMT mtk02752 -** sync EVENT_SCAN_RESULT_T with firmware -** \main\maintrunk.MT6620WiFiDriver_Prj\21 2009-11-25 21:03:27 GMT mtk02752 -** implement wlanoidQueryBssidList() -** \main\maintrunk.MT6620WiFiDriver_Prj\20 2009-11-25 18:17:17 GMT mtk02752 -** refine GL_WLAN_INFO_T for buffering scan result -** \main\maintrunk.MT6620WiFiDriver_Prj\19 2009-11-23 20:28:51 GMT mtk02752 -** some OID will be set to WLAN_STATUS_PENDING until it is sent via wlanSendCommand() -** \main\maintrunk.MT6620WiFiDriver_Prj\18 2009-11-23 17:56:36 GMT mtk02752 -** implement wlanoidSetBssidListScan(), wlanoidSetBssid() and wlanoidSetSsid() -** -** \main\maintrunk.MT6620WiFiDriver_Prj\17 2009-11-13 17:20:53 GMT mtk02752 -** add Set BSSID/SSID path but disabled temporally due to FW is not ready yet -** \main\maintrunk.MT6620WiFiDriver_Prj\16 2009-11-13 12:28:58 GMT mtk02752 -** add wlanoidSetBssidListScan -> cmd_info path -** \main\maintrunk.MT6620WiFiDriver_Prj\15 2009-11-09 22:48:07 GMT mtk01084 -** modify test cases entry -** \main\maintrunk.MT6620WiFiDriver_Prj\14 2009-11-04 14:10:58 GMT mtk01084 -** add new test interfaces -** \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-10-30 18:17:10 GMT mtk01084 -** fix compiler warning -** \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-10-29 19:46:26 GMT mtk01084 -** add test functions -** \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-10-23 16:07:56 GMT mtk01084 -** include new file -** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-10-13 21:58:29 GMT mtk01084 -** modify for new HW architecture -** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-10-02 13:48:49 GMT mtk01725 -** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-09-09 17:26:04 GMT mtk01084 -** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-04-21 12:09:50 GMT mtk01461 -** Update for MCR Write OID -** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-04-21 09:35:18 GMT mtk01461 -** Update wlanoidQueryMcrRead() for composing CMD_INFO_T -** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-04-17 18:09:51 GMT mtk01426 -** Remove kalIndicateStatusAndComplete() in wlanoidQueryOidInterfaceVersion() -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-04-14 15:51:50 GMT mtk01426 -** Add MCR read/write support -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-19 18:32:40 GMT mtk01084 -** update for basic power management functions -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:06:31 GMT mtk01426 -** Init for develop -** -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ /****************************************************************************** * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/config.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/config.h index 2e194adf38d1..68a6c74f5736 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/config.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/config.h @@ -1,868 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/config.h#2 -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/*! \file "config.h" - \brief This file includes the various configurable parameters for customers - - This file ncludes the configurable parameters except the parameters indicate the turning-on/off of some features -*/ - -/* -** Log: config.h - * - * 07 13 2012 cp.wu - * [WCXRP00001259] [MT6620 Wi-Fi][Driver][Firmware] Send a signal to firmware for - * termination after SDIO error has happened - * [driver domain] add force reset by host-to-device interrupt mechanism - * - * 06 13 2012 yuche.tsai - * NULL - * Update maintrunk driver. - * Add support for driver compose assoc request frame. - * - * 06 05 2012 tsaiyuan.hsu - * [WCXRP00001249] [ALPS.ICS] Daily build warning on "wlan/mgmt/swcr.c#1" - * resolve build waring for "WNM_UNIT_TEST not defined".. - * - * 06 04 2012 cp.wu - * [WCXRP00001245] [MT6620 Wi-Fi][Driver][Firmware] NPS Software Development - * discussed with WH, privacy bit in associate response is not necessary to be checked, - * and identified as association failure when mismatching with beacon/probe response - * - * 05 11 2012 cp.wu - * [WCXRP00001237] [MT6620 Wi-Fi][Driver] Show MAC address and MAC address source for ACS's convenience - * show MAC address & source while initiliazation - * - * 04 20 2012 cp.wu - * [WCXRP00000913] [MT6620 Wi-Fi] create repository of source code dedicated for MT6620 E6 ASIC - * correct macro - * - * 04 12 2012 terry.wu - * NULL - * Add AEE message support - * 1) Show AEE warning(red screen) if SDIO access error occurs - * - * 03 29 2012 eason.tsai - * [WCXRP00001216] [MT6628 Wi-Fi][Driver]add conditional define - * add conditional define. - * - * 03 02 2012 terry.wu - * NULL - * Enable CFG80211 Support. - * - * 01 05 2012 tsaiyuan.hsu - * [WCXRP00001157] [MT6620 Wi-Fi][FW][DRV] add timing measurement support for 802.11v - * add timing measurement support for 802.11v. - * - * 11 23 2011 cp.wu - * [WCXRP00001123] [MT6620 Wi-Fi][Driver] Add option to disable beacon content change detection - * add compile option to disable beacon content change detection. - * - * 11 18 2011 yuche.tsai - * NULL - * CONFIG P2P support RSSI query, default turned off. - * - * 10 28 2011 cp.wu - * [MT6620 Wi-Fi][Win32 Driver] Enable 5GHz support as default - * enable 5GHz as default for DaVinci trunk and V2.1 driver release . - * - * 10 18 2011 cp.wu - * [WCXRP00001022] [MT6628 Driver][Firmware Download] Add multi section independent download functionality - * surpress compiler warning for MT6628 build - * - * 10 12 2011 wh.su - * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP - * adding the 802.11w related function and define . - * - * 10 03 2011 cp.wu - * [WCXRP00001022] [MT6628 Driver][Firmware Download] Add multi section independent download functionality - * enable divided firmware downloading. - * - * 10 03 2011 cp.wu - * [WCXRP00001022] [MT6628 Driver][Firmware Download] Add multi section independent download functionality - * add firmware download path in divided scatters. - * - * 10 03 2011 cp.wu - * [MT6628 Driver][Firmware Download] Add multi section independent download functionality - * add firmware downloading aggregated path. - * - * 09 28 2011 tsaiyuan.hsu - * [WCXRP00000900] [MT5931 Wi-Fi] Improve balance of TX and RX - * enlarge window size only by 4. - * - * 08 15 2011 cp.wu - * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree - * reuse firmware download logic of MT6620 for MT6628. - * - * 08 15 2011 cp.wu - * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree - * add MT6628-specific definitions. - * - * 08 15 2011 cp.wu - * [WCXRP00000913] [MT6620 Wi-Fi] create repository of source code dedicated for MT6620 E6 ASIC - * support to load different firmware image for E3/E4/E5 and E6 ASIC on win32 platforms. - * - * 08 12 2011 cp.wu - * [WCXRP00000913] [MT6620 Wi-Fi] create repository of source code dedicated for MT6620 E6 ASIC - * load WIFI_RAM_CODE_E6 for MT6620 E6 ASIC. - * - * 08 09 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings - * Add BWCS definition for MT6620. - * - * 07 28 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings - * Add BWCS cmd and event. - * - * 07 22 2011 jeffrey.chang - * [WCXRP00000864] [MT5931] Add command to adjust OSC stable time - * modify driver to set OSC stable time after f/w download - * - * 07 18 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Add CMD/Event for RDD and BWCS. - * - * 07 05 2011 yuche.tsai - * [WCXRP00000821] [Volunteer Patch][WiFi Direct][Driver] WiFi Direct Connection Speed Issue - * Refine compile flag. - * - * 07 05 2011 yuche.tsai - * [WCXRP00000821] [Volunteer Patch][WiFi Direct][Driver] WiFi Direct Connection Speed Issue - * Add wifi direct connection enhancement method I, II & VI. - * - * 06 24 2011 cp.wu - * [WCXRP00000702] [MT5931][Driver] Modify initialization sequence for E1 ASIC - * [WCXRP00000812] [MT6620 Wi-Fi][Driver] not show NVRAM when there is no valid MAC address in NVRAM content - * increase RX buffer number to have a 2:1 ping-pong ratio - * - * 06 23 2011 eddie.chen - * [WCXRP00000810] [MT5931][DRV/FW] Adjust TxRx Buffer number and Rx buffer size - * 1. Different TX RX buffer - * 2. Enlarge RX buffer and increase the number 8->11 - * 3. Separate the WINSZIE and RX buffer number - * 4. Fix RX maximum size in MAC - * - * 06 20 2011 terry.wu - * NULL - * Add BoW Rate Limitation. - * - * 06 17 2011 terry.wu - * NULL - * . - * - * 06 17 2011 terry.wu - * NULL - * Add BoW 11N support. - * - * 06 07 2011 yuche.tsai - * [WCXRP00000763] [Volunteer Patch][MT6620][Driver] RX Service Discovery Frame under AP mode Issue - * Add compile flag for persistent group support. - * - * 06 01 2011 cm.chang - * [WCXRP00000756] [MT6620 Wi-Fi][Driver] 1. AIS follow channel of BOW 2. Provide legal channel function - * Limit AIS to fixed channel same with BOW - * - * 04 18 2011 terry.wu - * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED - * Remove flag CFG_WIFI_DIRECT_MOVED. - * - * 04 14 2011 cm.chang - * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency - * Enable RX STBC capability - * - * 04 11 2011 george.huang - * [WCXRP00000628] [MT6620 Wi-Fi][FW][Driver] Modify U-APSD setting to default OFF - * . - * - * 04 08 2011 pat.lu - * [WCXRP00000623] [MT6620 Wi-Fi][Driver] use ARCH define to distinguish PC Linux driver - * Use CONFIG_X86 instead of PC_LINUX_DRIVER_USE option to have proper compile setting for PC Linux driver - * - * 04 08 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * 1. correction: RX aggregation is not limited to SDIO but for all host interface options - * 2. add forward declarations for DBG-only symbols - * - * 04 06 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * 1. do not check for pvData inside wlanNetCreate() due to it is NULL for eHPI port - * 2. update perm_addr as well for MAC address - * 3. not calling check_mem_region() anymore for eHPI - * 4. correct MSC_CS macro for 0-based notation - * - * 04 01 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * 1. simplify config.h due to aggregation options could be also applied for eHPI/SPI interface - * 2. use spin-lock instead of semaphore for protecting eHPI access because of possible access from ISR - * 3. request_irq() API has some changes between linux kernel 2.6.12 and 2.6.26 - * - * 03 29 2011 cp.wu - * [WCXRP00000598] [MT6620 Wi-Fi][Driver] Implementation of interface for communicating with - * user space process for RESET_START and RESET_END events - * implement kernel-to-userspace communication via generic netlink socket for whole-chip resetting mechanism - * - * 03 22 2011 pat.lu - * [WCXRP00000592] [MT6620 Wi-Fi][Driver] Support PC Linux Environment Driver Build - * Add a compiler option "PC_LINUX_DRIVER_USE" for building driver in PC Linux environment. - * - * 03 18 2011 wh.su - * [WCXRP00000530] [MT6620 Wi-Fi] [Driver] skip doing p2pRunEventAAAComplete after send assoc response Tx Done - * enable the Anti_piracy check at driver . - * - * 03 17 2011 tsaiyuan.hsu - * [WCXRP00000517] [MT6620 Wi-Fi][Driver][FW] Fine Tune Performance of Roaming - * enable roaming feature. - * - * 03 17 2011 chinglan.wang - * [WCXRP00000570] [MT6620 Wi-Fi][Driver] Add Wi-Fi Protected Setup v2.0 feature - * . - * - * 03 15 2011 cp.wu - * [WCXRP00000559] [MT6620 Wi-Fi][Driver] Combine TX/RX DMA buffers into a single one - * to reduce physically continuous memory consumption - * 1. deprecate CFG_HANDLE_IST_IN_SDIO_CALLBACK - * 2. Use common coalescing buffer for both TX/RX directions - * - * - * 03 15 2011 eddie.chen - * [WCXRP00000554] [MT6620 Wi-Fi][DRV] Add sw control debug counter - * Add sw debug counter for QM. - * - * 03 07 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * rename the define to anti_pviracy. - * - * 03 06 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Sync BOW Driver to latest person development branch version.. - * - * 03 02 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * Add security check code. - * - * 03 01 2011 george.huang - * [WCXRP00000495] [MT6620 Wi-Fi][FW] Support pattern filter for unwanted ARP frames - * Fix compile issue - * - * 02 25 2011 george.huang - * [WCXRP00000497] [MT6620 Wi-Fi][FW] Change default UAPSD AC assignment - * Assign all AC default to be U-APSD enabled. - * - * 02 14 2011 wh.su - * [WCXRP00000432] [MT6620 Wi-Fi][Driver] Add STA privacy check at hotspot mode - * Let the privacy check at hotspot mode default enable. - * - * 02 09 2011 wh.su - * [WCXRP00000432] [MT6620 Wi-Fi][Driver] Add STA privacy check at hotspot mode - * adding the code for check STA privacy bit at AP mode, . - * - * 02 08 2011 cp.wu - * [WCXRP00000427] [MT6620 Wi-Fi][Driver] Modify veresion information to match with release revision number - * change version number to v1.2.0.0 for preparing v1.2 software package release. - * - * 02 01 2011 yarco.yang - * [WCXRP00000417] [MT6620 Driver] Change CFG_HANDLE_IST_IN_SDIO_CALLBACK from 1 to 0 for Interoperability - * . - * - * 01 27 2011 tsaiyuan.hsu - * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support - * add roaming fsm - * 1. not support 11r, only use strength of signal to determine roaming. - * 2. not enable CFG_SUPPORT_ROAMING until completion of full test. - * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw - * 4. assume that change of link quality in smooth way. - * - * 01 19 2011 wh.su - * [WCXRP00000370] [MT6620 Wi-Fi][Driver] Disable Rx RDG for workaround pre-N ccmp issue - * Not announce support Rx RDG for wokaround pre-N ccmp construct AAD issue.. - * - * 01 15 2011 puff.wen - * NULL - * Add Stress test - * - * 01 12 2011 cp.wu - * [WCXRP00000356] [MT6620 Wi-Fi][Driver] fill mac header length for security frames 'cause - * hardware header translation needs such information - * fill mac header length information for 802.1x frames. - * - * 01 11 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Support BOW only for Linux. - * - * 01 10 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Enable BOW and 4 physical links. - * - * 01 08 2011 yuche.tsai - * [WCXRP00000345] [MT6620][Volunteer Patch] P2P may issue a SSID specified scan request, - * but the SSID length is still invalid. - * Modify CFG_SLT_SUPPORT default value. - * - * 01 08 2011 yuche.tsai - * [WCXRP00000341] [MT6620][SLT] Create Branch for SLT SW. - * Update configure flag. - * - * 12 28 2010 cp.wu - * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release - * report EEPROM used flag via NIC_CAPABILITY - * - * 12 28 2010 cp.wu - * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release - * integrate with 'EEPROM used' flag for reporting correct capability to Engineer Mode/META and other tools - * - * 12 15 2010 yuche.tsai - * NULL - * Update SLT Descriptor number configure in driver. - * - * 12 13 2010 chinglan.wang - * NULL - * Add WPS 1.0 feature flag to enable the WPS 1.0 function. - * - * 11 23 2010 george.huang - * [WCXRP00000127] [MT6620 Wi-Fi][Driver] Add a registry to disable Beacon Timeout function for SQA test by using E1 EVB - * Enable PM function by default - * - * 11 15 2010 wh.su - * [WCXRP00000171] [MT6620 Wi-Fi][Driver] Add message check code same behavior as mt5921 - * use config.mk WAPI config define. - * - * 11 08 2010 wh.su - * [WCXRP00000171] [MT6620 Wi-Fi][Driver] Add message check code same behavior as mt5921 - * use the config.mk define. - * - * 11 01 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * [WCXRP00000150] [MT6620 Wi-Fi][Driver] Add implementation for querying current TX rate from firmware auto rate module - * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead - * 2) Remove CNM CH-RECOVER event handling - * 3) cfg read/write API renamed with kal prefix for unified naming rules. - * - * 11 01 2010 yarco.yang - * [WCXRP00000149] [MT6620 WI-Fi][Driver]Fine tune performance on MT6516 platform - * Add code to run WlanIST in SDIO callback. - * - * 10 26 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * [WCXRP00000137] [MT6620 Wi-Fi] [FW] Support NIC capability query command - * 1) update NVRAM content template to ver 1.02 - * 2) add compile option for querying NIC capability (default: off) - * 3) modify AIS 5GHz support to run-time option, which could be turned on by registry or NVRAM setting - * 4) correct auto-rate compiler error under linux (treat warning as error) - * 5) simplify usage of NVRAM and REG_INFO_T - * 6) add version checking between driver and firmware - * - * 10 25 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * add option for enable/disable TX PWR gain adjustment (default: off) - * - * 10 20 2010 wh.su - * [WCXRP00000067] [MT6620 Wi-Fi][Driver] Support the android+ WAPI function - * enable the WAPI compiling flag as default - * - * 10 19 2010 cp.wu - * [WCXRP00000122] [MT6620 Wi-Fi][Driver] Preparation for YuSu source tree integration - * remove HIF_SDIO_ONE flags because the settings could be merged for runtime detection instead of compile-time. - * - * 10 18 2010 cp.wu - * [WCXRP00000117] [MT6620 Wi-Fi][Driver] Add logic for suspending driver when MT6620 is not responding anymore - * 1. when wlanAdapterStop() failed to send POWER CTRL command to firmware, do not poll for ready bit dis-assertion - * 2. shorten polling count for shorter response time - * 3. if bad I/O operation is detected during TX resource polling, then further operation is aborted as well - * - * 10 18 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * [WCXRP00000086] [MT6620 Wi-Fi][Driver] The mac address is all zero at android - * complete implementation of Android NVRAM access - * - * 10 14 2010 wh.su - * [WCXRP00000102] [MT6620 Wi-Fi] [FW] Add a compiling flag and code for support Direct GO at Android - * Add a define CFG_TEST_ANDROID_DIRECT_GO compiling flag - * - * 10 08 2010 cm.chang - * NULL - * Remove unused compiling flags (TX_RDG and TX_SGI) - * - * 10 07 2010 cp.wu - * [WCXRP00000083] [MT5931][Driver][FW] Add necessary logic for MT5931 first connection - * add firmware download for MT5931. - * - * 10 05 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * load manufacture data when CFG_SUPPORT_NVRAM is set to 1 - * - * 10 05 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * 1) add NVRAM access API - * 2) fake scanning result when NVRAM doesn't exist and/or version mismatch. (off by compiler option) - * 3) add OID implementation for NVRAM read/write service - * - * 10 05 2010 yarco.yang - * [WCXRP00000082] [MT6620 Wi-Fi][Driver]High throughput performance tuning - * Change CFG_IST_LOOP_COUNT from 2 to 1 to reduce unnecessary SDIO bus access - * - * 09 24 2010 cp.wu - * [WCXRP00000057] [MT6620 Wi-Fi][Driver] Modify online scan to a run-time switchable feature - * Modify online scan as a run-time adjustable option (for Windows, in registry) - * - * 09 23 2010 cp.wu - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * eliminate reference of CFG_RESPONSE_MAX_PKT_SIZE - * - * 09 20 2010 cm.chang - * NULL - * Disable RX STBC by BB HEC based on MT6620E1_PHY_BUG v05.docx - * - * 09 17 2010 chinglan.wang - * NULL - * Add performance test option - * - * 09 10 2010 chinglan.wang - * NULL - * Modify for Software Migration Phase 2.10 for E2 FPGA - * - * 09 07 2010 yuche.tsai - * NULL - * Add a CFG for max common IE buffer size. - * - * 09 01 2010 cp.wu - * NULL - * restore configuration as before. - * - * 09 01 2010 cp.wu - * NULL - * HIFSYS Clock Source Workaround - * - * 08 31 2010 kevin.huang - * NULL - * Use LINK LIST operation to process SCAN result - * - * 08 30 2010 chinglan.wang - * NULL - * Enable the MT6620_FPGA_BWCS value. - * - * 08 30 2010 chinglan.wang - * NULL - * Disable the FW encryption. - * - * 08 27 2010 chinglan.wang - * NULL - * Update configuration for MT6620_E1_PRE_ALPHA_1832_0827_2010 - * - * 08 26 2010 yuche.tsai - * NULL - * Add AT GO test configure mode under WinXP. - * Please enable 1. CFG_ENABLE_WIFI_DIRECT, 2. CFG_TEST_WIFI_DIRECT_GO, 3. CFG_SUPPORT_AAA - * - * 08 25 2010 cp.wu - * NULL - * add option for enabling AIS 5GHz scan - * - * 08 25 2010 george.huang - * NULL - * update OID/ registry control path for PM related settings - * - * 08 24 2010 cp.wu - * NULL - * 1) initialize variable for enabling short premable/short time slot. - * 2) add compile option for disabling online scan - * - * 08 24 2010 cm.chang - * NULL - * Support RLM initail channel of Ad-hoc, P2P and BOW - * - * 08 23 2010 cp.wu - * NULL - * revise constant definitions to be matched with implementation (original cmd-event definition is deprecated) - * - * 08 23 2010 chinghwa.yu - * NULL - * Disable BOW Test. - * - * 08 23 2010 jeffrey.chang - * NULL - * fix config.h typo - * - * 08 23 2010 chinghwa.yu - * NULL - * Update for BOW. - * - * 08 21 2010 jeffrey.chang - * NULL - * 1) add sdio two setting - * 2) bug fix of sdio glue - * - * 08 09 2010 wh.su - * NULL - * let the firmware download default enabled. - * - * 08 07 2010 wh.su - * NULL - * adding the privacy related code for P2P network - * - * 08 05 2010 yuche.tsai - * NULL - * Add a configure flag for P2P unitest. - * - * 07 23 2010 cp.wu - * - * 1) re-enable AIS-FSM beacon timeout handling. - * 2) scan done API revised - * - * 07 23 2010 cp.wu - * - * 1) enable Ad-Hoc - * 2) disable beacon timeout handling temporally due to unexpected beacon timeout event. - * - * 07 19 2010 wh.su - * - * update for security supporting. - * - * 07 19 2010 yuche.tsai - * - * Add for SLT support. - * - * 07 16 2010 cp.wu - * - * remove work-around in case SCN is not available. - * - * 07 14 2010 yarco.yang - * - * 1. Remove CFG_MQM_MIGRATION - * 2. Add CMD_UPDATE_WMM_PARMS command - * - * 07 13 2010 cp.wu - * - * 1) MMPDUs are now sent to MT6620 by CMD queue for keeping strict order of 1X/MMPDU/CMD packets - * 2) integrate with qmGetFrameAction() for deciding which MMPDU/1X could pass checking for sending - * 2) enhance CMD_INFO_T descriptor number from 10 to 32 to avoid descriptor - * underflow under concurrent network operation - * - * 07 09 2010 yarco.yang - * - * [MT6620 and MT5931] SW Migration: Add ADDBA support - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * take use of RLM module for parsing/generating HT IEs for 11n capability - * - * 07 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * for first connection, if connecting failed do not enter into scan state. - * - * 06 25 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * modify Beacon/ProbeResp to complete parsing, - * because host software has looser memory usage restriction - * - * 06 23 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) add SCN compilation option. - * 2) when SCN is not turned on, BSSID_SCAN will generate a fake entry for 1st connection - * - * 06 22 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) add command warpper for STA-REC/BSS-INFO sync. - * 2) enhance command packet sending procedure for non-oid part - * 3) add command packet definitions for STA-REC/BSS-INFO sync. - * - * 06 21 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * set default compiling flag for security disable. - * - * 06 21 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Support CFG_MQM_MIGRATION flag - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * enable RX management frame handling. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add scan_fsm into building. - * - * 06 18 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add scan.c. - * - * 06 14 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add management dispatching function table. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * auth.c is migrated. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add bss.c. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) eliminate CFG_CMD_EVENT_VERSION_0_9 - * 2) when disconnected, indicate nic directly (no event is needed) - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add aa_fsm.h, ais_fsm.h, bss.h, mib.h and scan.h. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wlan_def.h. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 31 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add config option for cfg80211. - * - * 05 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * set ATIMwindow default value to zero. - * - * 05 21 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add option for FPGA_BWCS & FPGA_V5 - * - * 05 20 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) integrate OID_GEN_NETWORK_LAYER_ADDRESSES with CMD_ID_SET_IP_ADDRESS - * 2) buffer statistics data for 2 seconds - * 3) use default value for adhoc parameters instead of 0 - * - * 05 17 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) enable CMD/EVENT ver 0.9 definition. - * 2) abandon use of ENUM_MEDIA_STATE - * - * 05 17 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add CFG_STARTUP_DEBUG for debugging starting up issue. - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add basic handling framework for wireless extension ioctls. - * - * 05 11 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * change firmware name to WIFI_RAM_CODE. - * - * 05 07 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * disable bt-over-wifi configuration, turn it on after firmware finished implementation - * - * 04 27 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add multiple physical link support - * - * 04 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * surpress compiler warning - * - * 04 22 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * re-enable power management - * - * 04 22 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * - * 1) modify rx path code for supporting Wi-Fi direct - * 2) modify config.h since Linux dont need to consider retaining packet - * - * 04 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * enable TCP/IP checksum offloading by default. - * - * 04 19 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * set CFG_ENABLE_FULL_PM to 1 as default to - * 1) acquire own before hardware access - * 2) set own back after hardware access - * - * 04 15 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * change firmware name - * - * 04 07 2010 cp.wu - * [WPD00003827][MT6620 Wi-Fi] Chariot fail and following ping fail, no pkt send from driver - * disable RX-enhanced response temporally, it seems the CQ is not resolved yet. - * - * 04 06 2010 cp.wu - * [WPD00003827][MT6620 Wi-Fi] Chariot fail and following ping fail, no pkt send from driver - * re-enable RX enhanced mode as WPD00003827 is resolved. - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * turn off RX_ENHANCE mode by default. - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) eliminate unused definitions - * * 2) ready bit will be polled for limited iteration - * - * 04 02 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * firmware download: Linux uses different firmware path - * - * 04 01 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * change to use WIFI_TCM_ALWAYS_ON as firmware image - * - * 03 31 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * modify the wapi related code for new driver's design. - * - * 03 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add a temporary flag for integration with CMD/EVENT v0.9. - * - * 03 25 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * firmware download load address & start address are now configured from config.h - * * due to the different configurations on FPGA and ASIC - * - * 03 24 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add options for full PM support. - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * [WPD00003826] Initial import for Linux port - * initial import for Linux port - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * [WPD00003826] Initial import for Linux port - * initial import for Linux port - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port - * - * 03 16 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * turn on FW-DOWNLOAD as default for release. - * - * 03 16 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * build up basic data structure and definitions to support BT-over-WiFi - * - * 03 12 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add two option for ACK and ENCRYPTION for firmware download - * - * 03 11 2010 cp.wu - * [WPD00003821][BUG] Host driver stops processing RX packets from HIF RX0 - * add RX starvation warning debug message controlled by CFG_HIF_RX_STARVATION_WARNING - * - * 03 10 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * code clean: removing unused variables and structure definitions - * - * 03 05 2010 cp.wu - * [WPD00003821][BUG] Host driver stops processing RX packets from HIF RX0 - * change CFG_NUM_OF_QM_RX_PKT_NUM to 120 - * - * 03 04 2010 cp.wu - * [WPD00003821][BUG] Host driver stops processing RX packets from HIF RX0 - * . - * - * 03 04 2010 cp.wu - * [WPD00003821][BUG] Host driver stops processing RX packets from HIF RX0 - * increase RX buffer number to avoid RX buffer starvation. - * - * 02 24 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Changed the number of STA_RECs to 20 - * - * 02 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add checksum offloading support. - * - * 02 11 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. add logic for firmware download - * * 2. firmware image filename and start/load address are now retrieved from registry - * - * 02 08 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * prepare for implementing fw download logic - * - * 12 30 2009 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) According to CMD/EVENT documentation v0.8, - * * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used, - * * and result is retrieved by get ATInfo instead - * * 2) add 4 counter for recording aggregation statistics -** \main\maintrunk.MT6620WiFiDriver_Prj\25 2009-12-16 22:12:28 GMT mtk02752 -** enable interrupt enhanced response, TX/RX Aggregation as default -** \main\maintrunk.MT6620WiFiDriver_Prj\24 2009-12-10 16:38:43 GMT mtk02752 -** eliminate compile options which are obsolete or for emulation purpose -** \main\maintrunk.MT6620WiFiDriver_Prj\23 2009-12-09 13:56:26 GMT MTK02468 -** Added RX buffer reordering configurations -** \main\maintrunk.MT6620WiFiDriver_Prj\22 2009-12-04 12:09:09 GMT mtk02752 -** once enhanced intr/rx response is taken, RX must be access in aggregated basis -** \main\maintrunk.MT6620WiFiDriver_Prj\21 2009-11-23 17:54:50 GMT mtk02752 -** correct a typo -** \main\maintrunk.MT6620WiFiDriver_Prj\20 2009-11-17 22:40:47 GMT mtk01084 -** add defines -** \main\maintrunk.MT6620WiFiDriver_Prj\19 2009-11-17 17:33:37 GMT mtk02752 -** add coalescing buffer definition for SD1_SD3_DATAPATH_INTEGRATION -** \main\maintrunk.MT6620WiFiDriver_Prj\18 2009-11-16 20:32:40 GMT mtk02752 -** add CFG_TX_MAX_PKT_NUM for limiting queued TX packet -** \main\maintrunk.MT6620WiFiDriver_Prj\17 2009-11-16 13:34:44 GMT mtk02752 -** add SD1_SD3_DATAPATH_INTEGRATION define for source control -** \main\maintrunk.MT6620WiFiDriver_Prj\16 2009-11-13 13:54:11 GMT mtk01084 -** enable INT enhance mode by default -** \main\maintrunk.MT6620WiFiDriver_Prj\15 2009-10-30 18:17:14 GMT mtk01084 -** add new define -** \main\maintrunk.MT6620WiFiDriver_Prj\14 2009-10-29 19:47:36 GMT mtk01084 -** not use HIF loopback mode -** \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-10-13 21:58:33 GMT mtk01084 -** update for new macro define -** \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-09-09 17:26:08 GMT mtk01084 -** add CFG_TEST_WITH_MT5921 -** \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-05-18 21:02:30 GMT mtk01426 -** Update CFG_RX_COALESCING_BUFFER_SIZE -** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-04-21 09:35:51 GMT mtk01461 -** Add CFG_TX_DBG_MGT_BUF to debug MGMT Buffer depth -** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-04-14 15:52:21 GMT mtk01426 -** Add OOB_DATA_PRE_FIXED_LEN define -** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-04-08 16:51:08 GMT mtk01084 -** update for FW download part -** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-04-01 10:33:37 GMT mtk01461 -** Add SW pre test flag CFG_HIF_LOOPBACK_PRETEST -** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-03-23 00:29:18 GMT mtk01461 -** Fix CFG_COALESCING_BUFFER_SIZE if enable the CFG_TX_FRAGMENT -** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-03-18 20:58:34 GMT mtk01426 -** Add CFG_HIF_LOOPBACK and CFG_SDIO_RX_ENHANCE -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-17 20:17:36 GMT mtk01426 -** Add CMD/Response related configure -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-16 09:08:21 GMT mtk01461 -** Update TX PATH API -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:11:21 GMT mtk01426 -** Init for develop -** -*/ #ifndef _CONFIG_H #define _CONFIG_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/debug.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/debug.h index 301b574668ae..bdc92c7323c0 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/debug.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/debug.h @@ -1,117 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/debug.h#1 -*/ - -/*! \file debug.h - \brief Definition of SW debugging level. - - In this file, it describes the definition of various SW debugging levels and - assert functions. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: debug.h - * - * 12 16 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * fixed the Windows DDK free build compiling error. - * - * 11 24 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * Adjust code for DBG and CONFIG_XLOG. - * - * 11 11 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * modify the xlog related code. - * - * 11 10 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * Using the new XLOG define for dum Memory. - * - * 11 03 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * Add dumpMemory8 at XLOG support. - * - * 11 02 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * adding the code for XLOG. - * - * 08 31 2011 cm.chang - * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code - * . - * - * 01 27 2011 tsaiyuan.hsu - * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support - * add roaming fsm - * 1. not support 11r, only use strength of signal to determine roaming. - * 2. not enable CFG_SUPPORT_ROAMING until completion of full test. - * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw - * 4. assume that change of link quality in smooth way. - * - * 01 07 2011 wh.su - * [WCXRP00000326] [MT6620][Wi-Fi][Driver] check in the binary format gl_sec.o.new instead of use change type!!! - * . - * - * 09 23 2010 cp.wu - * NULL - * add BOW index for debugging message and passing compilation - * - * 07 20 2010 wh.su - * - * adding the wapi code. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 21 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Support CFG_MQM_MIGRATION flag - * - * 06 17 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * Add one more debug moduel for P2P. - * - * 06 14 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add management dispatching function table. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add bss.c. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add debug module index for cnm and ais. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 17 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add CFG_STARTUP_DEBUG for debugging starting up issue. - * - * 04 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) surpress compiler warning - * 2) when acqruing LP-own, keep writing WHLPCR whenever OWN is not acquired yet -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-10-29 19:47:50 GMT mtk01084 -** add emu category -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-04-17 18:12:04 GMT mtk01426 -** Don't use dynamic memory allocate for debug message -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:11:29 GMT mtk01426 -** Init for develop -** -*/ #ifndef _DEBUG_H #define _DEBUG_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/ais_fsm.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/ais_fsm.h index 3db3d8cbbea0..a4f9d689ac9a 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/ais_fsm.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/ais_fsm.h @@ -1,226 +1,15 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/mgmt/ais_fsm.h#1 -*/ - -/*! \file ais_fsm.h - \brief Declaration of functions and finite state machine for AIS Module. - - Declaration of functions and finite state machine for AIS Module. -*/ - -/* -** Log: ais_fsm.h - * - * 11 22 2011 cp.wu - * [WCXRP00001120] [MT6620 Wi-Fi][Driver] Modify roaming to AIS state transition - * from synchronous to asynchronous approach to avoid incomplete state termination - * 1. change RDD related compile option brace position. - * 2. when roaming is triggered, ask AIS to transit immediately only when AIS - * is in Normal TR state without join timeout timer ticking - * 3. otherwise, insert AIS_REQUEST into pending request queue - * - * 04 25 2011 cp.wu - * [WCXRP00000676] [MT6620 Wi-Fi][Driver] AIS to reduce request channel period from 5 seconds to 2 seconds - * channel interval for joining is shortened to 2 seconds to avoid interruption of concurrent operating network. - * - * 02 26 2011 tsaiyuan.hsu - * [WCXRP00000391] [MT6620 Wi-Fi][FW] Add Roaming Support - * not send disassoc or deauth to leaving AP so as to improve performace of roaming. - * - * 02 22 2011 cp.wu - * [WCXRP00000487] [MT6620 Wi-Fi][Driver][AIS] Serve scan and connect request with - * a queue-based approach to improve response time for scanning request - * handle SCAN and RECONNECT with a FIFO approach. - * - * 01 27 2011 tsaiyuan.hsu - * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support - * add roaming fsm - * 1. not support 11r, only use strength of signal to determine roaming. - * 2. not enable CFG_SUPPORT_ROAMING until completion of full test. - * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw - * 4. assume that change of link quality in smooth way. - * - * 01 14 2011 cp.wu - * [WCXRP00000359] [MT6620 Wi-Fi][Driver] add an extra state to ensure DEAUTH frame is always sent - * Add an extra state to guarantee DEAUTH frame is sent then connect to new BSS. - * This change is due to WAPI AP needs DEAUTH frame as a necessary step in handshaking protocol. - * - * 11 25 2010 cp.wu - * [WCXRP00000208] [MT6620 Wi-Fi][Driver] Add scanning with specified SSID to AIS FSM - * add scanning with specified SSID facility to AIS-FSM - * - * 11 01 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * [WCXRP00000150] [MT6620 Wi-Fi][Driver] Add implementation for querying current TX rate from firmware auto rate module - * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead - * 2) Remove CNM CH-RECOVER event handling - * 3) cfg read/write API renamed with kal prefix for unified naming rules. - * - * 09 06 2010 cp.wu - * NULL - * 1) initialize for correct parameter even for disassociation. - * 2) AIS-FSM should have a limit on trials to build connection - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 25 2010 cp.wu - * NULL - * [AIS-FSM] IBSS no longer needs to acquire channel for beaconing, RLM/CNM will handle - * the channel switching when BSS information is updated - * - * 08 12 2010 kevin.huang - * NULL - * Refine bssProcessProbeRequest() and bssSendBeaconProbeResponse() - * - * 08 12 2010 cp.wu - * NULL - * [AIS-FSM] honor registry setting for adhoc running mode. (A/B/G) - * - * 08 03 2010 cp.wu - * NULL - * surpress compilation warning. - * - * 07 30 2010 cp.wu - * NULL - * 1) BoW wrapper: use definitions instead of hard-coded constant for error code - * 2) AIS-FSM: eliminate use of desired RF parameters, use prTargetBssDesc instead - * 3) add handling for RX_PKT_DESTINATION_HOST_WITH_FORWARD for GO-broadcast frames - * - * 07 26 2010 cp.wu - * - * AIS-FSM: when scan request is coming in the 1st 5 seconds of channel privilege period, - * just pend it til 5-sec. period finishes - * - * 07 26 2010 cp.wu - * - * AIS-FSM FIX: return channel privilege even when the privilege is not granted yet - * QM: qmGetFrameAction() won't assert when corresponding STA-REC index is not found - * - * 07 23 2010 cp.wu - * - * add AIS-FSM handling for beacon timeout event. - * - * 07 21 2010 cp.wu - * - * separate AIS-FSM states into different cases of channel request. - * - * 07 21 2010 cp.wu - * - * 1) change BG_SCAN to ONLINE_SCAN for consistent term - * 2) only clear scanning result when scan is permitted to do - * - * 07 19 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * Add Ad-Hoc support to AIS-FSM - * - * 07 14 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * Refine AIS-FSM by divided into more states - * - * 07 09 2010 cp.wu - * - * 1) separate AIS_FSM state for two kinds of scanning. (OID triggered scan, and scan-for-connection) - * 2) eliminate PRE_BSS_DESC_T, Beacon/PrebResp is now parsed in single pass - * 3) implment DRV-SCN module, currently only accepts single scan request, - * other request will be directly dropped by returning BUSY - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * AIS-FSM integration with CNM channel request messages - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * implementation of DRV-SCN and related mailbox message handling. - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add buildable & linkable ais_fsm.c - * - * related reference are still waiting to be resolved - * - * 06 09 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add definitions for module migration. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add aa_fsm.h, ais_fsm.h, bss.h, mib.h and scan.h. - * - * 05 12 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Add Power Management - Legacy PS-POLL support. - * - * 04 23 2010 wh.su - * [BORA00000605][WIFISYS] Phase3 Integration - * reduce the background ssid idle time min and max value - * - * 04 19 2010 kevin.huang - * [BORA00000714][WIFISYS][New Feature]Beacon Timeout Support - * Add Beacon Timeout Support - * * and will send Null frame to diagnose connection - * - * 03 16 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Add AdHoc Mode - * - * 03 10 2010 kevin.huang - * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support - * - * * Add Channel Manager for arbitration of JOIN and SCAN Req - * - * 02 26 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Remove CFG_TEST_VIRTUAL_CMD and add support of Driver STA_RECORD_T activation - * - * 02 23 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Support dynamic channel selection - * - * 02 04 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add AAA Module Support, Revise Net Type to Net Type Index for array lookup - * - * 01 11 2010 kevin.huang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Add Deauth and Disassoc Handler - * - * 01 07 2010 kevin.huang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add Media disconnect indication and related postpone functions - * - * Dec 3 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add aisFsmRunEventJoinComplete() - * - * Nov 25 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add Virtual CMD & RESP for testing CMD PATH - * - * Nov 23 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * add aisFsmInitializeConnectionSettings() - * - * Nov 20 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add CFG_TEST_MGMT_FSM for aisFsmTest() - * - * Nov 18 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add function prototype of aisFsmInit() - * - * Nov 16 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ #ifndef _AIS_FSM_H #define _AIS_FSM_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/hem_mbox.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/hem_mbox.h index 868de4a6c40a..53ab13f336c3 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/hem_mbox.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/hem_mbox.h @@ -1,214 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/mgmt/hem_mbox.h#2 -*/ - -/*! \file hem_mbox.h - \brief +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -*/ - -/* -** Log: hem_mbox.h -** -** 07 26 2012 yuche.tsai -** [ALPS00324337] [ALPS.JB][Hot-Spot] Driver update for Hot-Spot -** Update driver code of ALPS.JB for hot-spot. -** -** 07 19 2012 yuche.tsai -** NULL -** Code update for JB. - * - * 03 02 2012 terry.wu - * NULL - * Sync CFG80211 modification from branch 2,2. - * - * 07 18 2011 cp.wu - * [WCXRP00000858] [MT5931][Driver][Firmware] Add support for scan to search for - * more than one SSID in a single scanning request - * add framework in driver domain for supporting new SCAN_REQ_V2 for more than 1 SSID - * support as well as uProbeDelay in NDIS 6.x driver model - * - * 06 07 2011 yuche.tsai - * [WCXRP00000696] [Volunteer Patch][MT6620][Driver] Infinite loop issue when RX invitation response. - * cnm_timer[WCXRP00000763] [Volunteer Patch][MT6620][Driver] RX Service Discovery Frame under AP mode Issue - * Add invitation support. - * - * 06 02 2011 cp.wu - * [WCXRP00000681] [MT5931][Firmware] HIF code size reduction - * eliminate unused parameters for SAA-FSM - * - * 01 26 2011 cm.chang - * [WCXRP00000395] [MT6620 Wi-Fi][Driver][FW] Search STA_REC with additional net type index argument - * Allocate system RAM if fixed message or mgmt buffer is not available - * - * 11 08 2010 cm.chang - * [WCXRP00000169] [MT6620 Wi-Fi][Driver][FW] Remove unused CNM recover message ID - * Remove CNM channel reover message ID - * - * 09 16 2010 cm.chang - * NULL - * Remove unused message ID - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 30 2010 cp.wu - * NULL - * eliminate klockwork errors - * - * 08 25 2010 george.huang - * NULL - * update OID/ registry control path for PM related settings - * - * 08 23 2010 chinghwa.yu - * NULL - * Update for BOW. - * - * 08 16 2010 cp.wu - * NULL - * add interface for RLM to trigger OBSS-SCAN. - * - * 08 11 2010 yuche.tsai - * NULL - * Add some message ID for P2P FSM under provisioning phase. - * - * 08 11 2010 yuche.tsai - * NULL - * Add Message Event ID for P2P Module. - * - * 08 05 2010 yuche.tsai - * NULL - * Check-in P2P Device Discovery Feature. - * - * 08 04 2010 cp.wu - * NULL - * remove unused mailbox message definitions. - * - * 08 02 2010 yuche.tsai - * NULL - * P2P Group Negotiation Code Check in. - * - * 07 19 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * message table should not be commented out by compilation option without modifying header file - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 08 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Rename MID_MNY_CNM_CH_RELEASE to MID_MNY_CNM_CH_ABORT - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * AIS-FSM integration with CNM channel request messages - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * implementation of DRV-SCN and related mailbox message handling. - * - * 07 01 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Modify CNM message handler for new flow - * - * 06 18 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf - * - * 06 14 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * restore utility function invoking via hem_mbox to direct calls - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * auth.c is migrated. - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add buildable & linkable ais_fsm.c - * - * related reference are still waiting to be resolved - * - * 06 09 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add definitions for module migration. - * - * 06 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * hem_mbox is migrated. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge cnm_scan.h and hem_mbox.h - * - * 05 12 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Add Power Management - Legacy PS-POLL support. - * - * 04 29 2010 tehuang.liu - * [BORA00000605][WIFISYS] Phase3 Integration - * Removed MID_RXM_MQM_QOS_ACTION_FRAME - * - * 04 29 2010 tehuang.liu - * [BORA00000605][WIFISYS] Phase3 Integration - * Removed MID_RXM_MQM_BA_ACTION_FRAME - * - * 03 30 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Support 2.4G OBSS scan - * - * 03 16 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Add AdHoc Mode - * - * 03 10 2010 kevin.huang - * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support - * - * * * * * Add Channel Manager for arbitration of JOIN and SCAN Req - * - * 03 05 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Develop partial DPD code - * - * 02 11 2010 tehuang.liu - * [BORA00000569][WIFISYS] Phase 2 Integration Test - * Added MID_RXM_MQM_QOS_ACTION_FRAME for RXM to indicate QoS Action frames to MQM - * - * 01 11 2010 kevin.huang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Add Deauth and Disassoc Handler - * - * Dec 7 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Rename the parameter of mboxDummy() - * - * Dec 2 2009 MTK02468 - * [BORA00000337] To check in codes for FPGA emulation - * Added MID_RXM_MQM_BA_ACTION_FRAME - * - * Nov 24 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Remove Dummy MSG ID - * - * Nov 23 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add JOIN REQ related MSG ID - * - * Nov 16 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add AIS ABORT MSG ID - * - * Nov 5 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add SCN MSG IDs - * - * Oct 28 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * -*/ #ifndef _HEM_MBOX_H #define _HEM_MBOX_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/p2p_fsm.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/p2p_fsm.h index 2541e1d2883e..49e32be038b5 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/p2p_fsm.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/p2p_fsm.h @@ -1,440 +1,16 @@ -/* -** Id: //Department/DaVinci/TRUNK/WiFi_P2P_Driver/include/mgmt/p2p_fsm.h#23 -*/ - -/*! \file p2p_fsm.h - \brief Declaration of functions and finite state machine for P2P Module. +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ - Declaration of functions and finite state machine for P2P Module. -*/ - -/* -** Log: p2p_fsm.h -** -** 09 12 2012 wcpadmin -** [ALPS00276400] Remove MTK copyright and legal header on GPL/LGPL related packages -** . -** -** 08 14 2012 yuche.tsai -** NULL -** Fix compile error. -** -** 07 26 2012 yuche.tsai -** [ALPS00324337] [ALPS.JB][Hot-Spot] Driver update for Hot-Spot -** Update driver code of ALPS.JB for hot-spot. -** -** 07 19 2012 yuche.tsai -** NULL -** Code update for JB. - * - * 07 18 2012 yuche.tsai - * NULL - * add one file. - * - * 12 02 2011 yuche.tsai - * NULL - * Resolve class 3 error issue under AP mode. - * - * data frame may TX before Assoc Response TX. - * - * 11 11 2011 yuche.tsai - * NULL - * Fix work thread cancel issue. - * - * 11 11 2011 yuche.tsai - * NULL - * Fix default device name issue. - * - * 11 09 2011 yuche.tsai - * [WCXRP00001093] [Need Patch][Volunteer Patch] Service Discovery 2.0 state transition issue. - * Fix SD2.0 issue which may cause KE. (Monkey test) - * - * 11 08 2011 yuche.tsai - * [WCXRP00001094] [Volunteer Patch][Driver] Driver version & supplicant version - * query & set support for service discovery version check. - * Add support for driver version query & p2p supplicant verseion set. - * For new service discovery mechanism sync. - * - * 10 18 2011 yuche.tsai - * [WCXRP00001045] [WiFi Direct][Driver] Check 2.1 branch. - * Support Channel Query. - * - * 10 18 2011 yuche.tsai - * [WCXRP00001045] [WiFi Direct][Driver] Check 2.1 branch. - * New 2.1 branch - - * - * 09 01 2011 yuche.tsai - * NULL - * Fix channel stay interval. - * Sync channel stay interval & channel request interval under AP mode.. - * - * 08 30 2011 yuche.tsai - * [WCXRP00000953] [Volunteer Patch][Driver] Hot Spot Channel ASSERT issue. - * Fix hot spot FW assert issue when under concurrent case. (DBG enable only) - * - * 08 16 2011 cp.wu - * [WCXRP00000934] [MT6620 Wi-Fi][Driver][P2P] Wi-Fi hot spot with auto sparse channel residence - * auto channel decision for 2.4GHz hot spot mode - * - * 08 16 2011 yuche.tsai - * NULL - * Fix scan policy for Active LISTEN scan. - * - * 08 09 2011 yuche.tsai - * [WCXRP00000919] [Volunteer Patch][WiFi Direct][Driver] Invitation New Feature. - * Invitation Feature add on. - * - * 08 02 2011 yuche.tsai - * [WCXRP00000896] [Volunteer Patch][WiFi Direct][Driver] GO with multiple client, - * TX deauth to a disconnecting device issue. - * Support TX Deauth Issue. - * - * 07 26 2011 yuche.tsai - * [WCXRP00000875] [Volunteer Patch][WiFi Direct][Driver] MT6620 IOT issue with realtek test bed solution. - * Turn off persistent group support for V2.0 release. - * - * 07 18 2011 yuche.tsai - * [WCXRP00000856] [Volunteer Patch][WiFi Direct][Driver] MT6620 WiFi Direct IOT Issue with BCM solution. - * Fix compile error. - * - * 07 18 2011 yuche.tsai - * [WCXRP00000856] [Volunteer Patch][WiFi Direct][Driver] MT6620 WiFi Direct IOT Issue with BCM solution. - * Fix MT6620 WiFi Direct IOT Issue with BCM solution. - * - * 07 11 2011 yuche.tsai - * [WCXRP00000845] [Volunteer Patch][WiFi Direct] WiFi Direct Device Connection Robustness - * Enhance Connection Robustness. - * - * 07 08 2011 yuche.tsai - * [WCXRP00000841] [Volunteer Patch][WiFi Direct] Group Owner Setting. - * Update GO configure parameter. - * - * 07 05 2011 yuche.tsai - * [WCXRP00000821] [Volunteer Patch][WiFi Direct][Driver] WiFi Direct Connection Speed Issue - * Disable enhancement II for debugging. - * - * 07 05 2011 yuche.tsai - * [WCXRP00000821] [Volunteer Patch][WiFi Direct][Driver] WiFi Direct Connection Speed Issue - * Refine compile flag. - * - * 07 05 2011 yuche.tsai - * [WCXRP00000821] [Volunteer Patch][WiFi Direct][Driver] WiFi Direct Connection Speed Issue - * Add wifi direct connection enhancement method I, II & VI. - * - * 06 20 2011 yuche.tsai - * [WCXRP00000799] [Volunteer Patch][MT6620][Driver] Connection Indication Twice Issue. - * Fix connection indication twice issue. - * - * 06 07 2011 yuche.tsai - * [WCXRP00000763] [Volunteer Patch][MT6620][Driver] RX Service Discovery Frame under AP mode Issue - * Fix RX SD request under AP mode issue. - * - * 05 04 2011 yuche.tsai - * NULL - * Support partial persistent group function. - * - * 04 20 2011 terry.wu - * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED - * Remove CFG_WIFI_DIRECT_MOVED. - * - * 04 08 2011 yuche.tsai - * [WCXRP00000624] [Volunteer Patch][MT6620][Driver] Add device discoverability support for GO. - * Add device discoverability support. - * - * 03 25 2011 yuche.tsai - * NULL - * Improve some error handleing. - * - * 03 22 2011 george.huang - * [WCXRP00000504] [MT6620 Wi-Fi][FW] Support Sigma CAPI for power saving related command - * link with supplicant commands - * - * 03 22 2011 yuche.tsai - * NULL - * 1.Shorten the LISTEN interval. - * 2. Fix IF address issue when we are GO - * 3. Fix LISTEN channel issue. - * - * 03 21 2011 yuche.tsai - * NULL - * Change P2P Connection Request Flow. - * - * 03 19 2011 yuche.tsai - * [WCXRP00000584] [Volunteer Patch][MT6620][Driver] Add beacon timeout support for WiFi Direct. - * Add beacon timeout support. - * - * 03 19 2011 yuche.tsai - * [WCXRP00000581] [Volunteer Patch][MT6620][Driver] P2P IE in Assoc Req Issue - * Append P2P IE in Assoc Req, so that GC can be discovered in probe response of GO. - * - * 03 18 2011 yuche.tsai - * [WCXRP00000574] [Volunteer Patch][MT6620][Driver] Modify P2P FSM Connection Flow - * Modify connection flow after Group Formation Complete, or device connect to a GO. - * Instead of request channel & connect directly, we use scan to allocate channel bandwidth & connect after RX BCN. - * - * 03 15 2011 yuche.tsai - * [WCXRP00000560] [Volunteer Patch][MT6620][Driver] P2P Connection from UI using KEY/DISPLAY issue - * Fix some configure method issue. - * - * 03 10 2011 yuche.tsai - * NULL - * Add P2P API. - * - * 03 07 2011 yuche.tsai - * [WCXRP00000502] [Volunteer Patch][MT6620][Driver] Fix group ID issue when doing Group Formation. - * . - * - * 03 07 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * rename the define to anti_pviracy. - * - * 03 05 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * add the code to get the check rsponse and indicate to app. - * - * 03 01 2011 yuche.tsai - * [WCXRP00000501] [Volunteer Patch][MT6620][Driver] No common channel issue when doing GO formation - * Update channel issue when doing GO formation.. - * - * 03 01 2011 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. -2. Provision Discovery Request/Response - - * Update Service Discovery Related wlanoid function. - * - * 02 18 2011 wh.su - * [WCXRP00000471] [MT6620 Wi-Fi][Driver] Add P2P Provison discovery append Config Method attribute at WSC IE - * fixed the ioctl setting that index not map to spec defined config method. - * - * 02 18 2011 yuche.tsai - * [WCXRP00000480] [Volunteer Patch][MT6620][Driver] WCS IE format issue - * Fix WSC IE BE format issue. - * - * 02 17 2011 wh.su - * [WCXRP00000471] [MT6620 Wi-Fi][Driver] Add P2P Provison discovery append Config Method attribute at WSC IE - * append the WSC IE config method attribute at provision discovery request. - * - * 02 11 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * Add two function prototype. - * - * 02 10 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * Support Disassoc & Deauthentication for Hot-Spot. - * - * 02 09 2011 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. - -2. Provision Discovery Request/Response - - * Add Service Discovery Indication Related code. - * - * 02 09 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * Add Support for MLME deauthentication for Hot-Spot. - * - * 02 09 2011 yuche.tsai - * [WCXRP00000429] [Volunteer Patch][MT6620][Driver] Hot Spot Client Limit Issue - * Fix Client Limit Issue. - * - * 01 26 2011 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. - -2. Provision Discovery Request/Response - - * Add Service Discovery Function. - * - * 01 25 2011 terry.wu - * [WCXRP00000393] [MT6620 Wi-Fi][Driver] Add new module insert parameter - * Add a new module parameter to indicate current runnig mode, P2P or AP. - * - * 01 19 2011 george.huang - * [WCXRP00000355] [MT6620 Wi-Fi] Set WMM-PS related setting with qualifying AP capability - * Null NOA attribute setting when no related parameters. - * - * 01 12 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Modify some behavior of AP mode. - * - * 12 22 2010 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. -2. Provision Discovery Request/Response - - * Fix Compile Error. - * - * 12 15 2010 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. -2. Provision Discovery Request/Response - - * Refine Connection Flow. - * - * 12 08 2010 yuche.tsai - * [WCXRP00000244] [MT6620][Driver] Add station record type for each client when in AP mode. - * Change STA Type under AP mode. We would tell if client is a P2P device or a legacy client - * by checking the P2P IE in assoc req frame. - * - * 12 02 2010 yuche.tsai - * NULL - * Update P2P Connection Policy for Invitation. - * - * 12 02 2010 yuche.tsai - * NULL - * Update P2P Connection Policy for Invitation & Provision Discovery. - * - * 11 30 2010 yuche.tsai - * NULL - * Invitation & Provision Discovery Indication. - * - * 11 30 2010 yuche.tsai - * NULL - * Update Configure Method indication & selection for Provision Discovery & GO_NEGO_REQ - * - * 11 29 2010 yuche.tsai - * NULL - * Update P2P related function for INVITATION & PROVISION DISCOVERY. - * - * 11 26 2010 george.huang - * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function - * Update P2P PS for NOA function. - * - * 11 25 2010 yuche.tsai - * NULL - * Update Code for Invitation Related Function. - * - * 11 17 2010 wh.su - * [WCXRP00000164] [MT6620 Wi-Fi][Driver] Support the p2p random SSID[WCXRP00000179] [MT6620 Wi-Fi][FW] - * Set the Tx lowest rate at wlan table for normal operation - * fixed some ASSERT check. - * - * 11 04 2010 wh.su - * [WCXRP00000164] [MT6620 Wi-Fi][Driver] Support the p2p random SSID - * adding the p2p random ssid support. - * - * 10 20 2010 wh.su - * [WCXRP00000124] [MT6620 Wi-Fi] [Driver] Support the dissolve P2P Group - * Add the code to support disconnect p2p group - * - * 10 08 2010 wh.su - * [WCXRP00000085] [MT6620 Wif-Fi] [Driver] update the modified p2p state machine - * update the frog's new p2p state machine. - * - * 10 04 2010 wh.su - * [WCXRP00000081] [MT6620][Driver] Fix the compiling error at WinXP while enable P2P - * fixed compiling error while enable p2p. - * - * 09 21 2010 kevin.huang - * [WCXRP00000054] [MT6620 Wi-Fi][Driver] Restructure driver for second Interface - * Isolate P2P related function for Hardware Software Bundle - * - * 09 10 2010 wh.su - * NULL - * fixed the compiling error at WinXP. - * - * 09 07 2010 wh.su - * NULL - * adding the code for beacon/probe req/ probe rsp wsc ie at p2p. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 26 2010 yuche.tsai - * NULL - * Add connection abort message event prototype. - * - * 08 20 2010 kevin.huang - * NULL - * Modify AAA Module for changing STA STATE 3 at p2p/bowRunEventAAAComplete() - * - * 08 16 2010 yuche.tsai - * NULL - * Fix P2P Intended Interface Address Bug. - * Extend GO Nego Timeout Time. - * - * 08 16 2010 yuche.tsai - * NULL - * Extend Listen Interval default value & remove deprecated variable. - * - * 08 16 2010 kevin.huang - * NULL - * Refine AAA functions - * - * 08 12 2010 kevin.huang - * NULL - * Refine bssProcessProbeRequest() and bssSendBeaconProbeResponse() - * - * 08 12 2010 yuche.tsai - * NULL - * Add function prototype for join complete. - * - * 08 11 2010 yuche.tsai - * NULL - * Add some function proto type for P2P FSM under provisioning phase.. - * - * 08 11 2010 yuche.tsai - * NULL - * Change P2P data structure for supporting - * 1. P2P Device discovery. - * 2. P2P Group Negotiation. - * 3. P2P JOIN - * - * 08 05 2010 yuche.tsai - * NULL - * Check-in P2P Device Discovery Feature. - * - * 08 03 2010 george.huang - * NULL - * handle event for updating NOA parameters indicated from FW - * - * 08 02 2010 yuche.tsai - * NULL - * P2P Group Negotiation Code Check in. - * - * 07 26 2010 yuche.tsai - * - * Update P2P FSM header file. - * - * 07 23 2010 cp.wu - * - * P2P/RSN/WAPI IEs need to be declared with compact structure. - * - * 07 21 2010 yuche.tsai - * - * Add for P2P Scan Result Parsing & Saving. - * - * 07 19 2010 yuche.tsai - * - * Update P2P FSM header file. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 21 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * Fix some P2P function prototype. - * - * 06 17 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * First draft for migration P2P FSM from FW to Driver. - * - * 03 18 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Rename CFG flag for P2P - * - * 02 26 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Modify parameter of p2pStartGO - * - * 02 23 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add Wi-Fi Direct SSID and P2P GO Test Mode - * - * 02 04 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add AAA Module Support, Revise Net Type to Net Type Index for array lookup -*/ #ifndef _P2P_FSM_H #define _P2P_FSM_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/p2p_func.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/p2p_func.h index 1ac1770debca..32d58ce66b61 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/p2p_func.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/p2p_func.h @@ -1,3 +1,16 @@ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ + #ifndef _P2P_FUNC_H #define _P2P_FUNC_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/rlm_domain.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/rlm_domain.h index 65e907041a28..0d6236213965 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/rlm_domain.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/rlm_domain.h @@ -1,57 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/mgmt/rlm_domain.h#1 -*/ - -/*! \file "rlm_domain.h" - \brief -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: rlm_domain.h - * - * 09 29 2011 cm.chang - * NULL - * Change the function prototype of rlmDomainGetChnlList() - * - * 09 08 2011 cm.chang - * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code - * Use new fields ucChannelListMap and ucChannelListIndex in NVRAM - * - * 08 31 2011 cm.chang - * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code - * . - * - * 06 01 2011 cm.chang - * [WCXRP00000756] [MT6620 Wi-Fi][Driver] 1. AIS follow channel of BOW 2. Provide legal channel function - * Provide legal channel function based on domain - * - * 12 07 2010 cm.chang - * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant - * 1. Country code is from NVRAM or supplicant - * 2. Change band definition in CMD/EVENT. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 28 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * 1st draft code for RLM module - * - * 02 23 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add support scan channel 1~14 and update scan result's frequency infou1rwduu`wvpghlqg|n`slk+mpdkb - * - * 01 13 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Provide query function about full channel list. - * - * Dec 1 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Declare public rDomainInfo - * -** -*/ #ifndef _RLM_DOMAIN_H #define _RLM_DOMAIN_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/adapter.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/adapter.h index d34f2c9c36a8..d6d2990e840f 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/adapter.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/adapter.h @@ -1,602 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/nic/adapter.h#3 -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/*! \file adapter.h - \brief Definition of internal data structure for driver manipulation. - - In this file we define the internal data structure - ADAPTER_T which stands - for MiniPort ADAPTER(From Windows point of view) or stands for Network ADAPTER. -*/ - -/* -** Log: adapter.h -** -** 08 31 2012 yuche.tsai -** [ALPS00349585] [6577JB][WiFi direct][KE]Establish p2p connection while both device have -** connected to AP previously,one device reboots automatically with KE -** Fix possible KE when concurrent & disconnect. -** -** 07 26 2012 yuche.tsai -** [ALPS00324337] [ALPS.JB][Hot-Spot] Driver update for Hot-Spot -** Update driver code of ALPS.JB for hot-spot. - * - * 07 17 2012 yuche.tsai - * NULL - * Let netdev bring up. - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 06 13 2012 yuche.tsai - * NULL - * Update maintrunk driver. - * Add support for driver compose assoc request frame. - * - * 03 02 2012 terry.wu - * NULL - * Snc CFG80211 modification for ICS migration from branch 2.2. - * - * 03 02 2012 terry.wu - * NULL - * Sync CFG80211 modification from branch 2,2. - * - * 01 16 2012 cp.wu - * [MT6620 Wi-Fi][Driver] API and behavior modification for preferred band configuration - * with corresponding network configuration - * add wlanSetPreferBandByNetwork() for glue layer to invoke for setting preferred band configuration - * corresponding to network type. - * - * 12 13 2011 cm.chang - * [WCXRP00001136] [All Wi-Fi][Driver] Add wake lock for pending timer - * Add wake lock if timer timeout value is smaller than 5 seconds - * - * 12 02 2011 yuche.tsai - * NULL - * Resolve inorder issue under AP mode. - * - * data frame may TX before assoc response frame. - * - * 11 19 2011 yuche.tsai - * NULL - * Update RSSI for P2P. - * - * 11 18 2011 yuche.tsai - * NULL - * CONFIG P2P support RSSI query, default turned off. - * - * 11 11 2011 yuche.tsai - * NULL - * Fix work thread cancel issue. - * - * 10 21 2011 eddie.chen - * [WCXRP00001051] [MT6620 Wi-Fi][Driver/Fw] Adjust the STA aging timeout - * Add switch to ignore the STA aging timeout. - * - * 10 12 2011 wh.su - * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP - * adding the 802.11w related function and define . - * - * 09 20 2011 cm.chang - * [WCXRP00000997] [MT6620 Wi-Fi][Driver][FW] Handle change of BSS preamble type and slot time - * Remove ERP member in adapter structure - * - * 09 14 2011 yuche.tsai - * NULL - * Add P2P IE in assoc response. - * - * 08 31 2011 cm.chang - * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code - * . - * - * 07 18 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Add CMD/Event for RDD and BWCS. - * - * 06 23 2011 cp.wu - * [WCXRP00000812] [MT6620 Wi-Fi][Driver] not show NVRAM when there is no valid MAC address in NVRAM content - * check with firmware for valid MAC address. - * - * 04 18 2011 terry.wu - * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED - * Remove flag CFG_WIFI_DIRECT_MOVED. - * - * 04 12 2011 cm.chang - * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency - * . - * - * 04 08 2011 yuche.tsai - * [WCXRP00000624] [Volunteer Patch][MT6620][Driver] Add device discoverability support for GO. - * Add device discoverability support. - * Action frame callback for GO Device Discoverability Req. - * - * 04 08 2011 george.huang - * [WCXRP00000621] [MT6620 Wi-Fi][Driver] Support P2P supplicant to set power mode - * separate settings of P2P and AIS - * - * 04 08 2011 eddie.chen - * [WCXRP00000617] [MT6620 Wi-Fi][DRV/FW] Fix for sigma - * Fix for sigma - * - * 03 19 2011 yuche.tsai - * [WCXRP00000584] [Volunteer Patch][MT6620][Driver] Add beacon timeout support for WiFi Direct. - * Add beacon timeout support for WiFi Direct Network. - * - * 03 19 2011 yuche.tsai - * [WCXRP00000581] [Volunteer Patch][MT6620][Driver] P2P IE in Assoc Req Issue - * Make assoc req to append P2P IE if wifi direct is enabled. - * - * 03 17 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically - * continuous memory shortage after system running for a long period - * use pre-allocated buffer for storing enhanced interrupt response as well - * - * 03 15 2011 cp.wu - * [WCXRP00000559] [MT6620 Wi-Fi][Driver] Combine TX/RX DMA buffers into a single one to reduce - * physically continuous memory consumption - * 1. deprecate CFG_HANDLE_IST_IN_SDIO_CALLBACK - * 2. Use common coalescing buffer for both TX/RX directions - * - * - * 03 10 2011 yuche.tsai - * [WCXRP00000533] [Volunteer Patch][MT6620][Driver] Provide a P2P function API for Legacy WiFi to query AP mode. - * Provide an API for Legacy WiFi to query the operation mode.. - * - * 03 05 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * add the code to get the check rsponse and indicate to app. - * - * 03 02 2011 wh.su - * [WCXRP00000448] [MT6620 Wi-Fi][Driver] Fixed WSC IE not send out at probe request - * Add code to send beacon and probe response WSC IE at Auto GO. - * - * 03 02 2011 cp.wu - * [WCXRP00000503] [MT6620 Wi-Fi][Driver] Take RCPI brought by association response as - * initial RSSI right after connection is built. - * use RCPI brought by ASSOC-RESP after connection is built as initial RCPI to avoid - * using a uninitialized MAC-RX RCPI. - * - * 02 21 2011 terry.wu - * [WCXRP00000476] [MT6620 Wi-Fi][Driver] Clean P2P scan list while removing P2P - * Clean P2P scan list while removing P2P. - * - * 02 17 2011 eddie.chen - * [WCXRP00000458] [MT6620 Wi-Fi][Driver] BOW Concurrent - ProbeResp was exist in other channel - * 1) Change GetFrameAction decision when BSS is absent. - * 2) Check channel and resource in processing ProbeRequest - * - * 02 16 2011 cm.chang - * [WCXRP00000447] [MT6620 Wi-Fi][FW] Support new NVRAM update mechanism - * . - * - * 02 10 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * Add RX deauthentication & disassociation process under Hot-Spot mode. - * - * 02 09 2011 wh.su - * [WCXRP00000433] [MT6620 Wi-Fi][Driver] Remove WAPI structure define for avoid P2P module - * with structure miss-align pointer issue - * always pre-allio WAPI related structure for align p2p module. - * - * 02 08 2011 yuche.tsai - * [WCXRP00000419] [Volunteer Patch][MT6620/MT5931][Driver] Provide function of disconnect to - * target station for AAA module. - * Provide disconnect function for AAA module. - * - * 02 01 2011 cm.chang - * [WCXRP00000415] [MT6620 Wi-Fi][Driver] Check if any memory leakage happens when uninitializing in DGB mode - * . - * - * 01 27 2011 tsaiyuan.hsu - * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support - * add roaming fsm - * 1. not support 11r, only use strength of signal to determine roaming. - * 2. not enable CFG_SUPPORT_ROAMING until completion of full test. - * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw - * 4. assume that change of link quality in smooth way. - * - * 01 27 2011 george.huang - * [WCXRP00000400] [MT6620 Wi-Fi] support CTIA power mode setting - * Support CTIA power mode setting. - * - * 01 27 2011 george.huang - * [WCXRP00000355] [MT6620 Wi-Fi] Set WMM-PS related setting with qualifying AP capability - * Support current measure mode, assigned by registry (XP only). - * - * 01 24 2011 cp.wu - * [WCXRP00000382] [MT6620 Wi-Fi][Driver] Track forwarding packet number with notifying tx thread for serving - * 1. add an extra counter for tracking pending forward frames. - * 2. notify TX service thread as well when there is pending forward frame - * 3. correct build errors leaded by introduction of Wi-Fi direct separation module - * - * 01 12 2011 cm.chang - * [WCXRP00000354] [MT6620 Wi-Fi][Driver][FW] Follow NVRAM bandwidth setting - * User-defined bandwidth is for 2.4G and 5G individually - * - * 12 29 2010 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, - -Add per station flow control when STA is in PS - - * Add WMM parameter for broadcast. - * - * 12 29 2010 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, - -Add per station flow control when STA is in PS - - * Add CWMin CWMax for AP to generate IE. - * - * 12 29 2010 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, -Add per station flow control when STA is in PS - - * 1) PS flow control event - * - * 2) WMM IE in beacon, assoc resp, probe resp - * - * 12 28 2010 cp.wu - * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release - * report EEPROM used flag via NIC_CAPABILITY - * - * 12 28 2010 cp.wu - * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release - * integrate with 'EEPROM used' flag for reporting correct capability to Engineer Mode/META and other tools - * - * 12 07 2010 cm.chang - * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant - * 1. Country code is from NVRAM or supplicant - * 2. Change band definition in CMD/EVENT. - * - * 11 01 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000150] [MT6620 Wi-Fi][Driver] - * Add implementation for querying current TX rate from firmware auto rate module - * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead - * 2) Remove CNM CH-RECOVER event handling - * 3) cfg read/write API renamed with kal prefix for unified naming rules. - * - * 10 27 2010 george.huang - * [WCXRP00000127] [MT6620 Wi-Fi][Driver] Add a registry to disable Beacon Timeout function for SQA test by using E1 EVB - * Support registry option for disable beacon lost detection. - * - * 10 26 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000137] [MT6620 Wi-Fi] [FW] - * Support NIC capability query command - * 1) update NVRAM content template to ver 1.02 - * 2) add compile option for querying NIC capability (default: off) - * 3) modify AIS 5GHz support to run-time option, which could be turned on by registry or NVRAM setting - * 4) correct auto-rate compiler error under linux (treat warning as error) - * 5) simplify usage of NVRAM and REG_INFO_T - * 6) add version checking between driver and firmware - * - * 10 08 2010 cp.wu - * [WCXRP00000084] [MT6620 Wi-Fi][Driver][FW] Add fixed rate support for distance test - * adding fixed rate support for distance test. (from registry setting) - * - * 10 06 2010 cp.wu - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * code reorganization to improve isolation between GLUE and CORE layers. - * - * 10 05 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * 1) add NVRAM access API - * 2) fake scanning result when NVRAM doesn't exist and/or version mismatch. (off by compiler option) - * 3) add OID implementation for NVRAM read/write service - * - * 09 27 2010 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000065] Update BoW design and settings - * Update BCM/BoW design and settings. - * - * 09 24 2010 cp.wu - * [WCXRP00000057] [MT6620 Wi-Fi][Driver] Modify online scan to a run-time switchable feature - * Modify online scan as a run-time adjustable option (for Windows, in registry) - * - * 09 23 2010 cp.wu - * [WCXRP00000051] [MT6620 Wi-Fi][Driver] WHQL test fail in MAC address changed item - * use firmware reported mac address right after wlanAdapterStart() as permanent address - * - * 09 08 2010 cp.wu - * NULL - * use static memory pool for storing IEs of scanning result. - * - * 09 07 2010 yuche.tsai - * NULL - * Add a common IE buffer in P2P INFO structure. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 09 01 2010 cp.wu - * NULL - * restore configuration as before. - * - * 09 01 2010 wh.su - * NULL - * adding the wapi support for integration test. - * - * 08 31 2010 kevin.huang - * NULL - * Use LINK LIST operation to process SCAN result - * - * 08 29 2010 yuche.tsai - * NULL - * Finish SLT TX/RX & Rate Changing Support. - * - * 08 25 2010 george.huang - * NULL - * update OID/ registry control path for PM related settings - * - * 08 24 2010 cm.chang - * NULL - * Support RLM initail channel of Ad-hoc, P2P and BOW - * - * 08 23 2010 chinghwa.yu - * NULL - * Update for BOW. - * - * 08 20 2010 cm.chang - * NULL - * Migrate RLM code to host from FW - * - * 08 16 2010 yuche.tsai - * NULL - * Add an intend mode for BSS info. - * It is used to let P2P BSS Info to know which OP Mode it is going to become. - * - * 08 04 2010 george.huang - * NULL - * handle change PS mode OID/ CMD - * - * 08 02 2010 cp.wu - * NULL - * comment out deprecated members in BSS_INFO, which are only used by firmware rather than driver. - * - * 07 29 2010 cp.wu - * NULL - * eliminate u4FreqInKHz usage, combined into rConnections.ucAdHoc* - * - * 07 28 2010 cp.wu - * NULL - * 1) eliminate redundant variable eOPMode in prAdapter->rWlanInfo - * 2) change nicMediaStateChange() API prototype - * - * 07 24 2010 wh.su - * - * .support the Wi-Fi RSN - * - * 07 21 2010 yuche.tsai - * - * Add for P2P Scan Result Parsing & Saving. - * - * 07 19 2010 wh.su - * - * update for security supporting. - * - * 07 19 2010 cm.chang - * - * Set RLM parameters and enable CNM channel manager - * - * 07 19 2010 yuche.tsai - * - * Remove BSS info which is redonedent in Wifi Var.. - * - * 07 16 2010 yarco.yang - * - * 1. Support BSS Absence/Presence Event - * 2. Support STA change PS mode Event - * 3. Support BMC forwarding for AP mode. - * - * 07 14 2010 yarco.yang - * - * 1. Remove CFG_MQM_MIGRATION - * 2. Add CMD_UPDATE_WMM_PARMS command - * - * 07 09 2010 george.huang - * - * [WPD00001556] Migrate PM variables from FW to driver: for composing QoS Info - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 08 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Check draft RLM code for HT cap - * - * 06 29 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * replace g_rQM with Adpater->rQM - * - * 06 28 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * 1st draft code for RLM module - * - * 06 21 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * remove duplicate variable for migration. - * - * 06 21 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * modify some code for concurrent network. - * - * 06 21 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * Add P2P FSM Info in adapter. - * - * 06 21 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Support CFG_MQM_MIGRATION flag - * - * 06 18 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf - * - * 06 18 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * migration the security related function from firmware. - * - * 06 17 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * Add P2P related field, additional include p2p_fsm.h if p2p is enabled. - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add scan.c. - * - * 06 14 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add management dispatching function table. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * auth.c is migrated. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add buildable & linkable ais_fsm.c - * - * related reference are still waiting to be resolved - * - * 06 09 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add definitions for module migration. - * - * 06 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * cnm_timer has been migrated. - * - * 06 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * hem_mbox is migrated. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wifi_var.h, precomp.h, cnm_timer.h (data type only) - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * change OID behavior to meet WHQL requirement. - * - * 05 20 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) integrate OID_GEN_NETWORK_LAYER_ADDRESSES with CMD_ID_SET_IP_ADDRESS - * 2) buffer statistics data for 2 seconds - * 3) use default value for adhoc parameters instead of 0 - * - * 05 19 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) do not take timeout mechanism for power mode oids - * 2) retrieve network type from connection status - * 3) after disassciation, set radio state to off - * 4) TCP option over IPv6 is supported - * - * 05 18 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement Wakeup-on-LAN except firmware integration part - * - * 04 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * reserve field of privacy filter and RTS threshold setting. - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability - * * * * * * 2) command sequence number is now increased atomically - * * * * * * 3) private data could be hold and taken use for other purpose - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * rWlanInfo should be placed at adapter rather than glue due to most operations - * * * are done in adapter layer. - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * code refine: fgTestMode should be at adapter rather than glue due to the device/fw is also involved - * - * 03 31 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * modify the wapi related code for new driver's design. - * - * 03 19 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) add ACPI D0/D3 state switching support - * * * 2) use more formal way to handle interrupt when the status is retrieved from enhanced RX response - * - * 03 03 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement OID_802_3_MULTICAST_LIST oid handling - * - * 03 02 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) the use of prPendingOid revised, all accessing are now protected by spin lock - * * * 2) ensure wlanReleasePendingOid will clear all command queues - * - * 02 09 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * move ucCmdSeqNum as instance variable - * - * 01 27 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * . - * - * 01 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. eliminate improper variable in rHifInfo - * * * 2. block TX/ordinary OID when RF test mode is engaged - * * * 3. wait until firmware finish operation when entering into and leaving from RF test mode - * * * 4. correct some HAL implementation - * - * 12 30 2009 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) According to CMD/EVENT documentation v0.8, - * * * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used, - * * * and result is retrieved by get ATInfo instead - * * * 2) add 4 counter for recording aggregation statistics - * - * 12 28 2009 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate redundant variables for connection_state -** \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-12-16 18:02:03 GMT mtk02752 -** add external reference to avoid compilation error -** \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-12-10 16:40:26 GMT mtk02752 -** eliminate unused member -** \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-12-08 17:36:08 GMT mtk02752 -** add RF test data members into P_ADAPTER_T -** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-10-13 21:58:45 GMT mtk01084 -** update for new HW architecture design -** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-04-28 10:29:57 GMT mtk01461 -** Add read WTSR for SDIO_STATUS_ENHANCE mode -** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-04-21 09:37:35 GMT mtk01461 -** Add prPendingCmdInfoOfOID for temporarily saving the CMD_INFO_T before en-queue to rCmdQueue -** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-04-17 19:57:51 GMT mtk01461 -** Add MGMT Buffer Info -** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-04-01 10:34:12 GMT mtk01461 -** Add SW pre test CFG_HIF_LOOPBACK_PRETEST -** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-03-23 21:41:48 GMT mtk01461 -** Add fgIsWmmAssoc flag for TC assignment -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-19 18:32:51 GMT mtk01084 -** update for basic power management functions -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-18 20:51:52 GMT mtk01426 -** Add #if CFG_SDIO_RX_ENHANCE related data structure -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:16:17 GMT mtk01426 -** Init for develop -** -*/ #ifndef _ADAPTER_H #define _ADAPTER_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/nic_tx.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/nic_tx.h index e516468fcb16..75db971ed0ea 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/nic_tx.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/nic_tx.h @@ -1,251 +1,15 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/nic/nic_tx.h#1 -*/ - -/*! \file nic_tx.h - \brief Functions that provide TX operation in NIC's point of view. - - This file provides TX functions which are responsible for both Hardware and - Software Resource Management and keep their Synchronization. - -*/ - -/* -** Log: nic_tx.h - * - * 11 18 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Add log counter for tx - * - * 11 10 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Add TX_DONE status detail information. - * - * 08 15 2011 cp.wu - * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree - * add MT6628-specific definitions. - * - * 04 12 2011 cp.wu - * [WCXRP00000631] [MT6620 Wi-Fi][Driver] Add an API for QM to retrieve current TC counter value and processing - * frame dropping cases for TC4 path - * 1. add nicTxGetResource() API for QM to make decisions. - * 2. if management frames is decided by QM for dropping, the call back is invoked to indicate such a case. - * - * 03 21 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * portability improvement - * - * 02 16 2011 cp.wu - * [WCXRP00000449] [MT6620 Wi-Fi][Driver] Refine CMD queue handling by adding an extra API for checking - * available count and modify behavior - * 1. add new API: nicTxGetFreeCmdCount() - * 2. when there is insufficient command descriptor, nicTxEnqueueMsdu() will drop command packets directly - * - * 01 24 2011 cp.wu - * [WCXRP00000382] [MT6620 Wi-Fi][Driver] Track forwarding packet number with notifying tx thread for serving - * 1. add an extra counter for tracking pending forward frames. - * 2. notify TX service thread as well when there is pending forward frame - * 3. correct build errors leaded by introduction of Wi-Fi direct separation module - * - * 12 15 2010 yuche.tsai - * NULL - * Update SLT Descriptor number configure in driver. - * - * 11 16 2010 yarco.yang - * [WCXRP00000177] [MT5931 F/W] Performance tuning for 1st connection - * Update TX buffer count - * - * 11 03 2010 cp.wu - * [WCXRP00000083] [MT5931][Driver][FW] Add necessary logic for MT5931 first connection - * 1) use 8 buffers for MT5931 which is equipped with less memory - * 2) modify MT5931 debug level to TRACE when download is successful - * - * 10 18 2010 cp.wu - * [WCXRP00000117] [MT6620 Wi-Fi][Driver] Add logic for suspending driver when MT6620 is not responding anymore - * 1. when wlanAdapterStop() failed to send POWER CTRL command to firmware, do not poll for ready bit dis-assertion - * 2. shorten polling count for shorter response time - * 3. if bad I/O operation is detected during TX resource polling, then further operation is aborted as well - * - * 10 06 2010 cp.wu - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * code reorganization to improve isolation between GLUE and CORE layers. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 30 2010 cp.wu - * NULL - * API added: nicTxPendingPackets(), for simplifying porting layer - * - * 07 26 2010 cp.wu - * - * change TC4 initial value from 2 to 4. - * - * 07 13 2010 cp.wu - * - * 1) MMPDUs are now sent to MT6620 by CMD queue for keeping strict order of 1X/MMPDU/CMD packets - * 2) integrate with qmGetFrameAction() for deciding which MMPDU/1X could pass checking for sending - * 2) enhance CMD_INFO_T descriptor number from 10 to 32 to avoid descriptor underflow under - * concurrent network operation - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 06 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Add MGMT Packet type for HIF_TX_HEADER - * - * 06 23 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * integrate . - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * refine TX-DONE callback. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * TX descriptors are now allocated once for reducing allocation overhead - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * specify correct value for management frames. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) add flag on MSDU_INFO_T for indicating BIP frame and forceBasicRate - * 2) add packet type for indicating management frames - * - * 06 09 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add necessary changes to driver data paths. - * - * 06 09 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add TX_PACKET_MGMT to indicate the frame is coming from management modules - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wlan_def.h. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 03 30 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * remove driver-land statistics. - * - * 03 24 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * generate information for OID_GEN_RCV_OK & OID_GEN_XMIT_OK - * * * - * - * 03 10 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * code clean: removing unused variables and structure definitions - * - * 03 02 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Redistributed the initial TC resources for normal operation - * - * 03 02 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add mutex to avoid multiple access to qmTxQueue simultaneously. - * - * 02 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add new API: wlanProcessQueuedPackets() - * - * 02 10 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) remove unused function in nic_rx.c [which has been handled in que_mgt.c] - * * * 2) firmware image length is now retrieved via NdisFileOpen - * * * 3) firmware image is not structured by (P_IMG_SEC_HDR_T) anymore - * * * 4) nicRxWaitResponse() revised - * * * 5) another set of TQ counter default value is added for fw-download state - * * * 6) Wi-Fi load address is now retrieved from registry too - * - * 02 09 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. Permanent and current MAC address are now retrieved by CMD/EVENT packets instead of hard-coded address - * * * * 2. follow MSDN defined behavior when associates to another AP - * * * * 3. for firmware download, packet size could be up to 2048 bytes - * - * 01 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. eliminate improper variable in rHifInfo - * * * * * 2. block TX/ordinary OID when RF test mode is engaged - * * * * * 3. wait until firmware finish operation when entering into and leaving from RF test mode - * * * * * 4. correct some HAL implementation - * - * 01 13 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled the Burst_End Indication mechanism - * - * 12 30 2009 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) According to CMD/EVENT documentation v0.8, - * * * * * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used, - * * * * * and result is retrieved by get ATInfo instead - * * * * * 2) add 4 counter for recording aggregation statistics -** \main\maintrunk.MT6620WiFiDriver_Prj\24 2009-12-10 16:53:28 GMT mtk02752 -** remove unused API -** \main\maintrunk.MT6620WiFiDriver_Prj\23 2009-11-27 11:08:00 GMT mtk02752 -** add flush for reset -** \main\maintrunk.MT6620WiFiDriver_Prj\22 2009-11-24 19:56:49 GMT mtk02752 -** remove redundant eTC -** \main\maintrunk.MT6620WiFiDriver_Prj\21 2009-11-23 22:01:08 GMT mtk02468 -** Added MSDU_INFO fields for composing HIF TX header -** \main\maintrunk.MT6620WiFiDriver_Prj\20 2009-11-17 22:40:51 GMT mtk01084 -** \main\maintrunk.MT6620WiFiDriver_Prj\19 2009-11-17 17:35:05 GMT mtk02752 -** + nicTxMsduInfoList() for sending MsduInfoList -** + NIC_TX_BUFF_COUNT_TC[0~5] -** \main\maintrunk.MT6620WiFiDriver_Prj\18 2009-11-17 11:07:00 GMT mtk02752 -** add nicTxAdjustTcq() API -** \main\maintrunk.MT6620WiFiDriver_Prj\17 2009-11-16 22:28:30 GMT mtk02752 -** move aucFreeBufferCount/aucMaxNumOfBuffer into another structure -** \main\maintrunk.MT6620WiFiDriver_Prj\16 2009-11-16 21:44:50 GMT mtk02752 -** + nicTxReturnMsduInfo() -** + nicTxFillMsduInfo() -** + rFreeMsduInfoList field in TX_CTRL -** \main\maintrunk.MT6620WiFiDriver_Prj\15 2009-11-16 18:00:43 GMT mtk02752 -** use P_PACKET_INFO_T for prPacket to avoid inventing another new structure for packet -** \main\maintrunk.MT6620WiFiDriver_Prj\14 2009-11-16 15:28:49 GMT mtk02752 -** add ucQueuedPacketNum for indicating how many packets are queued by per STA/AC queue -** \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-11-16 10:52:01 GMT mtk02752 -** \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-11-14 23:39:24 GMT mtk02752 -** interface structure redefine -** \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-11-13 21:17:03 GMT mtk02752 -** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-10-29 19:53:10 GMT mtk01084 -** remove strange code by Frog -** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-10-13 21:59:04 GMT mtk01084 -** update for new HW architecture design -** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-10-02 13:53:03 GMT mtk01725 -** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-04-28 10:36:50 GMT mtk01461 -** Add declaration of nicTxReleaseResource() -** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-04-17 19:58:39 GMT mtk01461 -** Move CMD_INFO_T related define and function to cmd_buf.h -** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-04-01 10:53:53 GMT mtk01461 -** Add function for SDIO_TX_ENHANCE -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-23 00:33:27 GMT mtk01461 -** Define constants for TX PATH and add nicTxPollingResource -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-16 09:09:32 GMT mtk01461 -** Update TX PATH API -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:16:38 GMT mtk01426 -** Init for develop -** -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ #ifndef _NIC_TX_H #define _NIC_TX_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/que_mgt.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/que_mgt.h index dbfb90d94ee4..7bfe98aac09d 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/que_mgt.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/que_mgt.h @@ -1,192 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/nic/que_mgt.h#1 -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/*! \file "que_mgt.h" - \brief TX/RX queues management header file - - The main tasks of queue management include TC-based HIF TX flow control, - adaptive TC quota adjustment, HIF TX grant scheduling, Power-Save - forwarding control, RX packet reordering, and RX BA agreement management. -*/ - -/* -** Log: que_mgt.h - * - * 08 15 2011 cp.wu - * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree - * add MT6628-specific definitions. - * - * 07 26 2011 eddie.chen - * [WCXRP00000874] [MT5931][DRV] API for query the RX reorder queued packets counter - * API for query the RX reorder queued packets counter. - * - * 06 14 2011 eddie.chen - * [WCXRP00000753] [MT5931 Wi-Fi][DRV] Adjust QM for MT5931 - * Change the parameter for WMM pass. - * - * 05 31 2011 eddie.chen - * [WCXRP00000753] [MT5931 Wi-Fi][DRV] Adjust QM for MT5931 - * Fix the QM quota in MT5931. - * - * 05 09 2011 eddie.chen - * [WCXRP00000709] [MT6620 Wi-Fi][Driver] Check free number before copying broadcast packet - * Check free number before copying broadcast packet. - * - * 04 14 2011 eddie.chen - * [WCXRP00000603] [MT6620 Wi-Fi][DRV] Fix Klocwork warning - * Check the SW RFB free. Fix the compile warning.. - * - * 04 08 2011 eddie.chen - * [WCXRP00000617] [MT6620 Wi-Fi][DRV/FW] Fix for sigma - * Fix for sigma - * - * 03 28 2011 eddie.chen - * [WCXRP00000602] [MT6620 Wi-Fi][DRV] Fix wmm parameters in beacon for BOW - * Fix wmm parameters in beacon for BOW. - * - * 03 15 2011 eddie.chen - * [WCXRP00000554] [MT6620 Wi-Fi][DRV] Add sw control debug counter - * Add sw debug counter for QM. - * - * 02 17 2011 eddie.chen - * [WCXRP00000458] [MT6620 Wi-Fi][Driver] BOW Concurrent - ProbeResp was exist in other channel - * 1) Change GetFrameAction decision when BSS is absent. - * 2) Check channel and resource in processing ProbeRequest - * - * 01 12 2011 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, - -Add per station flow control when STA is in PS - - * 1) Check Bss if support QoS before adding WMMIE - * 2) Check if support prAdapter->rWifiVar QoS and uapsd in flow control - * - * 12 29 2010 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, - -Add per station flow control when STA is in PS - - * 1) PS flow control event - * - * 2) WMM IE in beacon, assoc resp, probe resp - * - * 12 23 2010 george.huang - * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function - * 1. update WMM IE parsing, with ASSOC REQ handling - * 2. extend U-APSD parameter passing from driver to FW - * - * 10 04 2010 cp.wu - * [WCXRP00000077] [MT6620 Wi-Fi][Driver][FW] Eliminate use of ENUM_NETWORK_TYPE_T - * and replaced by ENUM_NETWORK_TYPE_INDEX_T only remove ENUM_NETWORK_TYPE_T definitions - * - * 09 21 2010 kevin.huang - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * Eliminate Linux Compile Warning - * - * 08 04 2010 yarco.yang - * NULL - * Add TX_AMPDU and ADDBA_REJECT command - * - * 07 22 2010 george.huang - * - * Update fgIsQoS information in BSS INFO by CMD - * - * 07 16 2010 yarco.yang - * - * 1. Support BSS Absence/Presence Event - * 2. Support STA change PS mode Event - * 3. Support BMC forwarding for AP mode. - * - * 07 14 2010 yarco.yang - * - * 1. Remove CFG_MQM_MIGRATION - * 2. Add CMD_UPDATE_WMM_PARMS command - * - * 07 13 2010 yarco.yang - * - * [WPD00003849] - * [MT6620 and MT5931] SW Migration, add qmGetFrameAction() API for CMD Queue Processing - * - * 07 09 2010 yarco.yang - * - * [MT6620 and MT5931] SW Migration: Add ADDBA support - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 29 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * replace g_rQM with Adpater->rQM - * - * 06 25 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add API in que_mgt to retrieve sta-rec index for security frames. - * - * 06 23 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Merge g_arStaRec[] into adapter->arStaRec[] - * - * 06 21 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Support CFG_MQM_MIGRATION flag - * - * 06 18 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf - * - * 06 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add hem_mbox.c and cnm_mem.h (but disabled some feature) for further migration - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 03 30 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled adaptive TC resource control - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port - * - * 03 19 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * By default enabling dynamic STA_REC activation and decactivation - * - * 03 17 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Changed STA_REC index determination rules (DA=BMCAST always --> STA_REC_INDEX_BMCAST) - * - * 03 11 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Fixed buffer leak when processing BAR frames - * - * 02 25 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled multi-STA TX path with fairness - * - * 02 24 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled dynamically activating and deactivating STA_RECs - * - * 02 24 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Added code for dynamic activating and deactivating STA_RECs. - * - * 01 13 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled the Burst_End Indication mechanism -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-12-09 14:04:53 GMT MTK02468 -** Added RX buffer reordering function prototypes -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-12-02 22:08:44 GMT MTK02468 -** Added macro QM_INIT_STA_REC for initialize a STA_REC -** \main\maintrunk.MT6620WiFiDriver_Prj\1 2009-11-23 21:58:43 GMT mtk02468 -** Initial version -** -*/ #ifndef _QUE_MGT_H #define _QUE_MGT_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h index 2804b0387f5f..494a7bb0ef2c 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h @@ -1,187 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/nic/wlan_def.h#1 -*/ - -/*! \file "wlan_def.h" - \brief This file includes the basic definition of WLAN +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -*/ - -/* -** Log: wlan_def.h -** -** 09 02 2013 cp.wu -** add path to handle reassociation request - * - * 12 05 2011 cp.wu - * [WCXRP00001131] [MT6620 Wi-Fi][Driver][AIS] Implement connect-by-BSSID path - * add CONNECT_BY_BSSID policy - * - * 10 12 2011 wh.su - * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP - * adding the 802.11w related function and define . - * - * 06 22 2011 wh.su - * [WCXRP00000806] [MT6620 Wi-Fi][Driver] Move the WPA/RSN IE and WAPI IE structure to mac.h and let the sw - * structure not align at byte - * Move the WAPI/RSN IE to mac.h and SW structure not align to byte, - * Notice needed update P2P.ko. - * - * 04 08 2011 eddie.chen - * [WCXRP00000617] [MT6620 Wi-Fi][DRV/FW] Fix for sigma - * Fix for sigma - * - * 03 17 2011 yuche.tsai - * NULL - * Resize the Secondary Device Type array when WiFi Direct is enabled. - * - * 01 25 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Change Station Type in Station Record, Modify MACRO definition for getting station type & network type index & Role. - * - * 01 25 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Add new station type MACRO. - * - * 12 07 2010 cm.chang - * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant - * 1. Country code is from NVRAM or supplicant - * 2. Change band definition in CMD/EVENT. - * - * 10 11 2010 kevin.huang - * [WCXRP00000068] [MT6620 Wi-Fi][Driver][FW] Fix STA RECORD sync issue and remove unused code - * Update ENUM_STA_ROLE_INDEX_T by using a fixed base value - * - * 10 04 2010 cp.wu - * [WCXRP00000077] [MT6620 Wi-Fi][Driver][FW] Eliminate use of ENUM_NETWORK_TYPE_T and replaced by - * ENUM_NETWORK_TYPE_INDEX_T only - * remove ENUM_NETWORK_TYPE_T definitions - * - * 09 14 2010 chinghwa.yu - * NULL - * Update OP_MODE_BOW and include bow_fsm.h. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 31 2010 kevin.huang - * NULL - * Use LINK LIST operation to process SCAN result - * - * 08 29 2010 yuche.tsai - * NULL - * Change P2P Descriptor List to a pointer and allocate it dynamically to avoid structure corrupt by BssDescriptor free. - * - * 08 16 2010 kevin.huang - * NULL - * Refine AAA functions - * - * 08 12 2010 kevin.huang - * NULL - * Refine bssProcessProbeRequest() and bssSendBeaconProbeResponse() - * - * 08 12 2010 yuche.tsai - * NULL - * Add a pointer in BSS Descriptor for P2P Descriptor. - * - * 08 11 2010 yuche.tsai - * NULL - * Add an Interface in BSS Descriptor. - * - * 08 05 2010 yuche.tsai - * NULL - * Modify data structure for P2P Scan result. - * - * 07 26 2010 yuche.tsai - * - * Add an operation mode for P2P device. - * - * 07 23 2010 cp.wu - * - * P2P/RSN/WAPI IEs need to be declared with compact structure. - * - * 07 21 2010 yuche.tsai - * - * Add for P2P Scan Result Parsing & Saving. - * - * 07 20 2010 wh.su - * - * adding the wapi code. - * - * 07 09 2010 cp.wu - * - * 1) separate AIS_FSM state for two kinds of scanning. (OID triggered scan, and scan-for-connection) - * 2) eliminate PRE_BSS_DESC_T, Beacon/PrebResp is now parsed in single pass - * 3) implment DRV-SCN module, currently only accepts single scan request, other request will be directly - * dropped by returning BUSY - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 28 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * 1st draft code for RLM module - * - * 06 25 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * modify Beacon/ProbeResp to complete parsing, - * because host software has looser memory usage restriction - * - * 06 21 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * Add P2P present boolean flag in BSS & Pre-BSS descriptor. - * - * 06 18 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * migration the security related function from firmware. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * auth.c is migrated. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add buildable & linkable ais_fsm.c - * - * related reference are still waiting to be resolved - * - * 06 09 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add definitions for module migration. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * move bss related data types to wlan_def.h to avoid recursive dependency. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wlan_def.h. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge cnm_scan.h and hem_mbox.h - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wifi_var.h, precomp.h, cnm_timer.h (data type only) - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:16:40 GMT mtk01426 -** Init for develop -** -*/ #ifndef _WLAN_DEF_H #define _WLAN_DEF_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/p2p_precomp.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/p2p_precomp.h index 85af819f4e62..3887ff9fd2da 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/p2p_precomp.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/p2p_precomp.h @@ -1,13 +1,16 @@ -/* -** Id: //Department/DaVinci/TRUNK/WiFi_P2P_Driver/include/p2p_precomp.h#1 -*/ - -/*! \file p2p_precomp.h - \brief Collection of most compiler flags for p2p driver are described here. +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ - In this file we collect all compiler flags and detail the p2p driver behavior if - enable/disable such switch or adjust numeric parameters. -*/ #ifndef _P2P_PRECOMP_H #define _P2P_PRECOMP_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h index 1b7e7ede66e1..259bd8dffcea 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h @@ -1,160 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/precomp.h#2 -*/ - -/*! \file precomp.h - \brief Collection of most compiler flags are described here. +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ - In this file we collect all compiler flags and detail the driver behavior if - enable/disable such switch or adjust numeric parameters. -*/ - -/* -** Log: precomp.h - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 01 05 2012 tsaiyuan.hsu - * [WCXRP00001157] [MT6620 Wi-Fi][FW][DRV] add timing measurement support for 802.11v - * add timing measurement support for 802.11v. - * - * 08 15 2011 cp.wu - * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree - * add MT6628-specific definitions. - * - * 04 18 2011 terry.wu - * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED - * Remove flag CFG_WIFI_DIRECT_MOVED. - * - * 03 15 2011 eddie.chen - * [WCXRP00000554] [MT6620 Wi-Fi][DRV] Add sw control debug counter - * Add sw debug counter for QM. - * - * 01 27 2011 tsaiyuan.hsu - * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support - * add roaming fsm - * 1. not support 11r, only use strength of signal to determine roaming. - * 2. not enable CFG_SUPPORT_ROAMING until completion of full test. - * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw - * 4. assume that change of link quality in smooth way. - * - * 12 13 2010 cp.wu - * [WCXRP00000260] [MT6620 Wi-Fi][Driver][Firmware] Create V1.1 branch for both firmware and driver - * create branch for Wi-Fi driver v1.1 - * - * 10 07 2010 cp.wu - * [WCXRP00000083] [MT5931][Driver][FW] Add necessary logic for MT5931 first connection - * add firmware download for MT5931. - * - * 10 05 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * 1) add NVRAM access API - * 2) fake scanning result when NVRAM doesn't exist and/or version mismatch. (off by compiler option) - * 3) add OID implementation for NVRAM read/write service - * - * 09 21 2010 kevin.huang - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * Isolate P2P related function for Hardware Software Bundle - * - * 09 14 2010 chinghwa.yu - * NULL - * Fix BOW_FSM_INFO_T dependence. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 07 20 2010 wh.su - * - * adding the wapi code. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 08 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Check draft RLM code for HT cap - * - * 07 01 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Modify CNM message handler for new flow - * - * 06 28 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * 1st draft code for RLM module - * - * 06 19 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * consdier the concurrent network setting. - * - * 06 18 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * migration the security related function from firmware. - * - * 06 18 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * migration from MT6620 firmware. - * - * 06 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add hem_mbox.c and cnm_mem.h (but disabled some feature) for further migration - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge cnm_scan.h and hem_mbox.h - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wifi_var.h, precomp.h, cnm_timer.h (data type only) - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * 1) add timeout handler mechanism for pending command packets - * 2) add p2p add/removal key - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability - * * * * * * * * * * * 2) command sequence number is now increased atomically - * * * * * * * * * * * 3) private data could be hold and taken use for other purpose - * - * 03 16 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * build up basic data structure and definitions to support BT-over-WiFi - * - * 02 08 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * prepare for implementing fw download logic - * - * 01 27 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * . -** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-12-08 11:30:58 GMT mtk02752 -** add rftest.h for implementing RF test mode in driver land -** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-11-23 22:02:00 GMT mtk02468 -** Added que_mgt.h -** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-10-13 21:58:36 GMT mtk01084 -** update for new macro define -** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-04-21 09:40:11 GMT mtk01461 -** Add nic_cmd_event.h -** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-04-17 20:00:26 GMT mtk01461 -** Add cmd_buf.h -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-19 18:32:44 GMT mtk01084 -** update for basic power management functions -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-16 09:08:25 GMT mtk01461 -** Update TX PATH API -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:11:38 GMT mtk01426 -** Init for develop -** -*/ #ifndef _PRECOMP_H #define _PRECOMP_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/include/wlan_oid.h b/drivers/misc/mediatek/connectivity/wlan/gen2/include/wlan_oid.h index 45919df996e9..a23c6f284bf6 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/include/wlan_oid.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/include/wlan_oid.h @@ -1,212 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/wlan_oid.h#2 -*/ - -/*! \file "wlan_oid.h" - \brief This file contains the declairation file of the WLAN OID processing routines - of Windows driver for MediaTek Inc. 802.11 Wireless LAN Adapters. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: wlan_oid.h - * - * 03 02 2012 terry.wu - * NULL - * Sync CFG80211 modification from branch 2,2. - * - * 01 05 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * Adding the related ioctl / wlan oid function to set the Tx power cfg. - * - * 07 18 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Add CMD/Event for RDD and BWCS. - * - * 03 22 2011 george.huang - * [WCXRP00000504] [MT6620 Wi-Fi][FW] Support Sigma CAPI for power saving related command - * link with supplicant commands - * - * 03 17 2011 chinglan.wang - * [WCXRP00000570] [MT6620 Wi-Fi][Driver] Add Wi-Fi Protected Setup v2.0 feature - * . - * - * 03 02 2011 george.huang - * [WCXRP00000504] [MT6620 Wi-Fi][FW] Support Sigma CAPI for power saving related command - * Support UAPSD/OppPS/NoA parameter setting - * - * 01 20 2011 eddie.chen - * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control - * Add Oid for sw control debug command - * - * 12 07 2010 cm.chang - * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant - * 1. Country code is from NVRAM or supplicant - * 2. Change band definition in CMD/EVENT. - * - * 10 18 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * [WCXRP00000086] [MT6620 Wi-Fi][Driver] The mac address is all zero at android - * complete implementation of Android NVRAM access - * - * 10 08 2010 cp.wu - * [WCXRP00000084] [MT6620 Wi-Fi][Driver][FW] Add fixed rate support for distance test - * adding fixed rate support for distance test. (from registry setting) - * - * 09 23 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * add skeleton for NVRAM integration - * - * 09 08 2010 cp.wu - * NULL - * use static memory pool for storing IEs of scanning result. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 29 2010 yuche.tsai - * NULL - * Finish SLT TX/RX & Rate Changing Support. - * - * 08 04 2010 cp.wu - * NULL - * revert changelist #15371, efuse read/write access will be done by RF test approach - * - * 08 04 2010 cp.wu - * NULL - * add OID definitions for EFUSE read/write access. - * - * 08 04 2010 yarco.yang - * NULL - * Add TX_AMPDU and ADDBA_REJECT command - * - * 08 02 2010 george.huang - * NULL - * add WMM-PS test related OID/ CMD handlers - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 22 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) add command warpper for STA-REC/BSS-INFO sync. - * 2) enhance command packet sending procedure for non-oid part - * 3) add command packet definitions for STA-REC/BSS-INFO sync. - * - * 06 18 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * migration from MT6620 firmware. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wlan_def.h. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wifi_var.h, precomp.h, cnm_timer.h (data type only) - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 06 03 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * move timer callback to glue layer. - * - * 05 20 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) integrate OID_GEN_NETWORK_LAYER_ADDRESSES with CMD_ID_SET_IP_ADDRESS - * 2) buffer statistics data for 2 seconds - * 3) use default value for adhoc parameters instead of 0 - * - * 05 18 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement Wakeup-on-LAN except firmware integration part - * - * 05 17 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * MT6620 is not supporting NDIS_PACKET_TYPE_PROMISCUOUS. - * - - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * 1) add timeout handler mechanism for pending command packets - * 2) add p2p add/removal key - * - * 05 13 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add NULL OID implementation for WOL-related OIDs. - * - * 04 22 2010 cp.wu - * [WPD00003830]add OID_802_11_PRIVACY_FILTER support - * enable RX filter OID - * - * 04 14 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * information buffer for query oid/ioctl is now buffered in prCmdInfo - * * * * * instead of glue-layer variable to improve multiple oid/ioctl capability - * - * 03 31 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * modify the wapi related code for new driver's design. - * - * 03 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * indicate media stream mode after set is done - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port - * - * 03 03 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement custom OID: EEPROM read/write access - * - * 02 09 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. Permanent and current MAC address are now retrieved by CMD/EVENT packets instead of hard-coded address - * * * * * * 2. follow MSDN defined behavior when associates to another AP - * * * * * * 3. for firmware download, packet size could be up to 2048 bytes - * - * 01 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) implement timeout mechanism when OID is pending for longer than 1 second - * * * 2) allow OID_802_11_CONFIGURATION to be executed when RF test mode is turned on - * - * 01 27 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * . - * - * 01 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement following 802.11 OIDs: - * * * * OID_802_11_RSSI, - * * * * OID_802_11_RSSI_TRIGGER, - * * * * OID_802_11_STATISTICS, - * * * * OID_802_11_DISASSOCIATE, - * * * * OID_802_11_POWER_MODE - * - * 01 21 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement OID_802_11_MEDIA_STREAM_MODE - * - * 01 21 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement OID_802_11_SUPPORTED_RATES / OID_802_11_DESIRED_RATES -** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-12-08 11:38:11 GMT mtk02752 -** add declares for RF test related APIs -** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-11-24 22:41:53 GMT mtk02752 -** remove u4SysTime, MSDN 10-second will be implemented in FW side -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-11-23 20:30:13 GMT mtk02752 -** add u4SysTime field in PARAM_BSSID_EX_T -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-11-12 19:48:35 GMT mtk02752 -** allow upper layer to set a packet filter with PROMISCUOUS mode -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:12:12 GMT mtk01426 -** Init for develop -** -*/ #ifndef _WLAN_OID_H #define _WLAN_OID_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/ais_fsm.c b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/ais_fsm.c index 0c0b9bb00e87..e4f354388805 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/ais_fsm.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/ais_fsm.c @@ -1,974 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/mgmt/ais_fsm.c#1 -*/ - -/*! \file "aa_fsm.c" - \brief This file defines the FSM for SAA and AAA MODULE. - - This file defines the FSM for SAA and AAA MODULE. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: ais_fsm.c -** -** 09 06 2013 cp.wu -** always paste SSID information to SAA-FSM -** -** 09 06 2013 cp.wu -** add error handling when reassociation request failed to locate bss descriptor -** -** 09 05 2013 cp.wu -** isolate logic regarding roaming & reassociation -** -** 09 04 2013 cp.wu -** fix typo -** -** 09 03 2013 cp.wu -** add path for reassociation - * - * 04 20 2012 cp.wu - * [WCXRP00000913] [MT6620 Wi-Fi] create repository of source code dedicated for MT6620 E6 ASIC - * correct macro - * - * 01 16 2012 cp.wu - * [MT6620 Wi-Fi][Driver] API and behavior modification for preferred band configuration with - * corresponding network configuration - * add wlanSetPreferBandByNetwork() for glue layer to invoke for setting preferred band configuration - * corresponding to network type. - * - * 11 24 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * Adjust code for DBG and CONFIG_XLOG. - * - * 11 22 2011 cp.wu - * [WCXRP00001120] [MT6620 Wi-Fi][Driver] Modify roaming to AIS state transition from synchronous - * to asynchronous approach to avoid incomplete state termination - * 1. change RDD related compile option brace position. - * 2. when roaming is triggered, ask AIS to transit immediately only when AIS is in Normal TR state - * without join timeout timer ticking - * 3. otherwise, insert AIS_REQUEST into pending request queue - * - * 11 11 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * modify the xlog related code. - * - * 11 04 2011 cp.wu - * [WCXRP00001086] [MT6620 Wi-Fi][Driver] On Android, indicate an extra DISCONNECT for REASSOCIATED - * cases as an explicit trigger for Android framework - * correct reference to BSSID field in Association-Response frame. - * - * 11 04 2011 cp.wu - * [WCXRP00001086] [MT6620 Wi-Fi][Driver] On Android, indicate an extra DISCONNECT for REASSOCIATED - * cases as an explicit trigger for Android framework - * 1. for DEAUTH/DISASSOC cases, indicate for DISCONNECTION immediately. - * 2. (Android only) when reassociation-and-non-roaming cases happened, indicate an extra DISCONNECT - * indication to Android Wi-Fi framework - * - * 11 02 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * adding the code for XLOG. - * - * 10 26 2011 tsaiyuan.hsu - * [WCXRP00001064] [MT6620 Wi-Fi][DRV]] add code with roaming awareness when disconnecting AIS network - * be aware roaming when disconnecting AIS network. - * - * 10 25 2011 cm.chang - * [WCXRP00001058] [All Wi-Fi][Driver] Fix sta_rec's phyTypeSet and OBSS scan in AP mode - * STA_REC shall be NULL for Beacon's MSDU - * - * 10 13 2011 cp.wu - * [MT6620 Wi-Fi][Driver] Reduce join failure count limit to 2 for faster re-join for other BSS - * 1. short join failure count limit to 2 - * 2. treat join timeout as kind of join failure as well - * - * 10 12 2011 wh.su - * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP - * adding the 802.11w related function and define . - * - * 09 30 2011 cm.chang - * [WCXRP00001020] [MT6620 Wi-Fi][Driver] Handle secondary channel offset of AP in 5GHz band - * . - * - * 09 20 2011 tsaiyuan.hsu - * [WCXRP00000931] [MT5931 Wi-Fi][DRV/FW] add swcr to disable roaming from driver - * change window registry of driver for roaming. - * - * 09 20 2011 cm.chang - * [WCXRP00000997] [MT6620 Wi-Fi][Driver][FW] Handle change of BSS preamble type and slot time - * Handle client mode about preamble type and slot time - * - * 09 08 2011 tsaiyuan.hsu - * [WCXRP00000972] [MT6620 Wi-Fi][DRV]] check if roaming occurs after join failure to avoid state incosistence. - * check if roaming occurs after join failure to avoid deactivation of network. - * - * 08 24 2011 chinghwa.yu - * [WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Update RDD test mode cases. - * - * 08 16 2011 tsaiyuan.hsu - * [WCXRP00000931] [MT5931 Wi-Fi][DRV/FW] add swcr to disable roaming from driver - * EnableRoaming in registry is deprecated. - * - * 08 16 2011 tsaiyuan.hsu - * [WCXRP00000931] [MT5931 Wi-Fi][DRV/FW] add swcr to disable roaming from driver - * use registry to enable or disable roaming. - * - * 07 07 2011 cp.wu - * [WCXRP00000840] [MT6620 Wi-Fi][Driver][AIS] Stop timer for joining when channel is released - * due to join failure count exceeding limit - * stop timer when joining operation is failed due to try count exceeds limitation - * - * 06 28 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple SSID settings to work - * around some tricky AP which use space character as hidden SSID - * do not handle SCAN request immediately after connected to increase the probability of receiving 1st beacon frame. - * - * 06 23 2011 cp.wu - * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module - * change parameter name from PeerAddr to BSSID - * - * 06 20 2011 cp.wu - * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module - * 1. specify target's BSSID when requesting channel privilege. - * 2. pass BSSID information to firmware domain - * - * 06 16 2011 cp.wu - * [WCXRP00000782] [MT6620 Wi-Fi][AIS] Treat connection at higher priority over scanning to avoid WZC connection timeout - * ensure DEAUTH is always sent before establish a new connection - * - * 06 16 2011 cp.wu - * [WCXRP00000782] [MT6620 Wi-Fi][AIS] Treat connection at higher priority over scanning to avoid WZC connection timeout - * typo fix: a right brace is missed. - * - * 06 16 2011 cp.wu - * [WCXRP00000782] [MT6620 Wi-Fi][AIS] Treat connection at higher priority over scanning to avoid WZC connection timeout - * When RECONNECT request is identified as disconnected, it is necessary to check for pending scan request. - * - * 06 16 2011 cp.wu - * [WCXRP00000757] [MT6620 Wi-Fi][Driver][SCN] take use of RLM API to filter out BSS in disallowed channels - * mark fgIsTransition as TRUE for state rolling. - * - * 06 16 2011 cp.wu - * [WCXRP00000782] [MT6620 Wi-Fi][AIS] Treat connection at higher priority over scanning to avoid WZC connection timeout - * always check for pending scan after switched into NORMAL_TR state. - * - * 06 14 2011 cp.wu - * [WCXRP00000782] [MT6620 Wi-Fi][AIS] Treat connection at higher priority over scanning to avoid WZC connection timeout - * always treat connection request at higher priority over scanning request - * - * 06 09 2011 tsaiyuan.hsu - * [WCXRP00000760] [MT5931 Wi-Fi][FW] Refine rxmHandleMacRxDone to reduce code size - * move send_auth at rxmHandleMacRxDone in firmware to driver to reduce code size. - * - * 06 02 2011 cp.wu - * [WCXRP00000681] [MT5931][Firmware] HIF code size reduction - * eliminate unused parameters for SAA-FSM - * - * 05 18 2011 cp.wu - * [WCXRP00000732] [MT6620 Wi-Fi][AIS] No need to switch back to IDLE state - * when DEAUTH frame is dropped due to bss disconnection - * change SCAN handling behavior when followed by a CONNECT/DISCONNECT requests by pending instead of dropping. - * - * 05 17 2011 cp.wu - * [WCXRP00000732] [MT6620 Wi-Fi][AIS] No need to switch back to IDLE state - * when DEAUTH frame is dropped due to bss disconnection - * when TX DONE status is TX_RESULT_DROPPED_IN_DRIVER, no need to switch back to IDLE state. - * - * 04 14 2011 cm.chang - * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency - * . - * - * 04 13 2011 george.huang - * [WCXRP00000628] [MT6620 Wi-Fi][FW][Driver] Modify U-APSD setting to default OFF - * remove assert - * - * 03 18 2011 cp.wu - * [WCXRP00000575] [MT6620 Wi-Fi][Driver][AIS] reduce memory usage when generating mailbox message for scan request - * when there is no IE needed for probe request, then request a smaller memory for mailbox message - * - * 03 17 2011 chinglan.wang - * [WCXRP00000570] [MT6620 Wi-Fi][Driver] Add Wi-Fi Protected Setup v2.0 feature - * . - * - * 03 17 2011 chinglan.wang - * [WCXRP00000570] [MT6620 Wi-Fi][Driver] Add Wi-Fi Protected Setup v2.0 feature - * . - * - * 03 16 2011 tsaiyuan.hsu - * [WCXRP00000517] [MT6620 Wi-Fi][Driver][FW] Fine Tune Performance of Roaming - * remove obsolete definition and unused variables. - * - * 03 11 2011 cp.wu - * [WCXRP00000535] [MT6620 Wi-Fi][Driver] Fixed channel operation when AIS and Tethering are operating concurrently - * When fixed channel operation is necessary, AIS-FSM would scan and only connect for BSS on the specific channel - * - * 03 09 2011 tsaiyuan.hsu - * [WCXRP00000517] [MT6620 Wi-Fi][Driver][FW] Fine Tune Performance of Roaming - * avoid clearing fgIsScanReqIssued so as to add scan results. - * - * 03 07 2011 terry.wu - * [WCXRP00000521] [MT6620 Wi-Fi][Driver] Remove non-standard debug message - * Toggle non-standard debug messages to comments. - * - * 03 04 2011 tsaiyuan.hsu - * [WCXRP00000517] [MT6620 Wi-Fi][Driver][FW] Fine Tune Performance of Roaming - * reset retry conter of attemp to connect to ap after completion of join. - * - * 03 04 2011 cp.wu - * [WCXRP00000515] [MT6620 Wi-Fi][Driver] Surpress compiler warning which is identified by GNU compiler collection - * surpress compile warning occurred when compiled by GNU compiler collection. - * - * 03 02 2011 cp.wu - * [WCXRP00000503] [MT6620 Wi-Fi][Driver] Take RCPI brought by association response as initial RSSI right - * after connection is built. - * use RCPI brought by ASSOC-RESP after connection is built as initial RCPI to avoid using a uninitialized MAC-RX RCPI. - * - * 02 26 2011 tsaiyuan.hsu - * [WCXRP00000391] [MT6620 Wi-Fi][FW] Add Roaming Support - * not send disassoc or deauth to leaving AP so as to improve performace of roaming. - * - * 02 23 2011 cp.wu - * [WCXRP00000487] [MT6620 Wi-Fi][Driver][AIS] Serve scan and connect request with a queue-based approach to - * improve response time for scanning request - * when handling reconnect request, set fgTryScan as TRUE - * - * 02 22 2011 cp.wu - * [WCXRP00000487] [MT6620 Wi-Fi][Driver][AIS] Serve scan and connect request with a queue-based approach - * to improve response time for scanning request - * handle SCAN and RECONNECT with a FIFO approach. - * - * 02 09 2011 tsaiyuan.hsu - * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support - * Check if prRegInfo is null or not before initializing roaming parameters. - * - * 02 01 2011 cp.wu - * [WCXRP00000416] [MT6620 Wi-Fi][Driver] treat "unable to find BSS" as connection trial - * to prevent infinite reconnection trials - * treat "unable to find BSS" as connection trial to prevent infinite reconnection trials. - * - * 01 27 2011 tsaiyuan.hsu - * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support - * add roaming fsm - * 1. not support 11r, only use strength of signal to determine roaming. - * 2. not enable CFG_SUPPORT_ROAMING until completion of full test. - * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw - * 4. assume that change of link quality in smooth way. - * - * 01 26 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * . - * - * 01 25 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Fix Compile Error when DBG is disabled. - * - * 01 25 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Change Station Type in Station Record, Modify MACRO definition for getting station type & network type index & Role. - * - * 01 14 2011 cp.wu - * [WCXRP00000359] [MT6620 Wi-Fi][Driver] add an extra state to ensure DEAUTH frame is always sent - * Add an extra state to guarantee DEAUTH frame is sent then connect to new BSS. - * This change is due to WAPI AP needs DEAUTH frame as a necessary step in handshaking protocol. - * - * 01 11 2011 cp.wu - * [WCXRP00000307] [MT6620 Wi-Fi][SQA]WHQL test .2c_wlan_adhoc case fail. - * [IBSS] when merged in, the bss state should be updated to firmware to pass WHQL adhoc failed item - * - * 01 10 2011 cp.wu - * [WCXRP00000351] [MT6620 Wi-Fi][Driver] remove from scanning result in OID handling layer - * when the corresponding BSS is disconnected due to beacon timeout - * remove from scanning result when the BSS is disconnected due to beacon timeout. - * - * 01 03 2011 cp.wu - * [WCXRP00000337] [MT6620 Wi-FI][Driver] AIS-FSM not to invoke cnmStaRecResetStatus - * directly 'cause it frees all belonging STA-RECs - * do not invoke cnmStaRecResetStatus() directly, nicUpdateBss will do the things after bss is disconnected - * - * 12 30 2010 cp.wu - * [WCXRP00000270] [MT6620 Wi-Fi][Driver] Clear issues after concurrent networking support has been merged - * do not need to manipulate prStaRec after indicating BSS disconnection to firmware, - * 'cause all STA-RECs belongs to BSS has been freed already - * - * 12 27 2010 cp.wu - * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release - * add DEBUGFUNC() macro invoking for more detailed debugging information - * - * 12 23 2010 george.huang - * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function - * 1. update WMM IE parsing, with ASSOC REQ handling - * 2. extend U-APSD parameter passing from driver to FW - * - * 12 17 2010 cp.wu - * [WCXRP00000270] [MT6620 Wi-Fi][Driver] Clear issues after concurrent networking support has been merged - * before BSS disconnection is indicated to firmware, all correlated peer should be cleared and freed - * - * 12 07 2010 cm.chang - * [WCXRP00000239] MT6620 Wi-Fi][Driver][FW] Merge concurrent branch back to maintrunk - * 1. BSSINFO include RLM parameter - * 2. free all sta records when network is disconnected - * - * 11 25 2010 yuche.tsai - * NULL - * Update SLT Function for QoS Support and not be affected by fixed rate function. - * - * 11 25 2010 cp.wu - * [WCXRP00000208] [MT6620 Wi-Fi][Driver] Add scanning with specified SSID to AIS FSM - * add scanning with specified SSID facility to AIS-FSM - * - * 11 01 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with - * Version Check[WCXRP00000150] [MT6620 Wi-Fi][Driver] Add implementation for querying current TX rate - * from firmware auto rate module - * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead - * 2) Remove CNM CH-RECOVER event handling - * 3) cfg read/write API renamed with kal prefix for unified naming rules. - * - * 10 26 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000137] [MT6620 Wi-Fi] [FW] - * Support NIC capability query command - * 1) update NVRAM content template to ver 1.02 - * 2) add compile option for querying NIC capability (default: off) - * 3) modify AIS 5GHz support to run-time option, which could be turned on by registry or NVRAM setting - * 4) correct auto-rate compiler error under linux (treat warning as error) - * 5) simplify usage of NVRAM and REG_INFO_T - * 6) add version checking between driver and firmware - * - * 10 14 2010 wh.su - * [WCXRP00000097] [MT6620 Wi-Fi] [Driver] Fixed the P2P not setting the fgIsChannelExt value make scan not abort - * initial the fgIsChannelExt value. - * - * 10 08 2010 cp.wu - * [WCXRP00000087] [MT6620 Wi-Fi][Driver] Cannot connect to 5GHz AP, driver will cause FW assert. - * correct erroneous logic: specifying eBand with incompatible eSco - * - * 10 04 2010 cp.wu - * [WCXRP00000077] [MT6620 Wi-Fi][Driver][FW] Eliminate use of ENUM_NETWORK_TYPE_T - * and replaced by ENUM_NETWORK_TYPE_INDEX_T only - * remove ENUM_NETWORK_TYPE_T definitions - * - * 09 27 2010 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000065] Update BoW design and settings - * Update BCM/BoW design and settings. - * - * 09 23 2010 cp.wu - * [WCXRP00000049] [MT6620 Wi-Fi][Driver] Adhoc cannot be created successfully. - * keep IBSS-ALONE state retrying until further instruction is received - * - * 09 21 2010 cp.wu - * [WCXRP00000053] [MT6620 Wi-Fi][Driver] Reset incomplete and might leads to BSOD - * when entering RF test with AIS associated - * Do a complete reset with STA-REC null checking for RF test re-entry - * - * 09 09 2010 yuche.tsai - * NULL - * Fix NULL IE Beacon issue. Sync Beacon Content to FW before enable beacon. - * Both in IBSS Create & IBSS Merge - * - * 09 09 2010 cp.wu - * NULL - * frequency is in unit of KHz thus no need to divide 1000 once more. - * - * 09 06 2010 cp.wu - * NULL - * 1) initialize for correct parameter even for disassociation. - * 2) AIS-FSM should have a limit on trials to build connection - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 30 2010 cp.wu - * NULL - * eliminate klockwork errors - * - * 08 29 2010 yuche.tsai - * NULL - * Finish SLT TX/RX & Rate Changing Support. - * - * 08 25 2010 cp.wu - * NULL - * add option for enabling AIS 5GHz scan - * - * 08 25 2010 cp.wu - * NULL - * [AIS-FSM] IBSS no longer needs to acquire channel for beaconing, - * RLM/CNM will handle the channel switching when BSS information is updated - * - * 08 25 2010 george.huang - * NULL - * update OID/ registry control path for PM related settings - * - * 08 24 2010 cm.chang - * NULL - * Support RLM initail channel of Ad-hoc, P2P and BOW - * - * 08 20 2010 cm.chang - * NULL - * Migrate RLM code to host from FW - * - * 08 12 2010 cp.wu - * NULL - * check-in missed files. - * - * 08 12 2010 kevin.huang - * NULL - * Refine bssProcessProbeRequest() and bssSendBeaconProbeResponse() - * - * 08 09 2010 cp.wu - * NULL - * reset fgIsScanReqIssued when abort request is received right after join completion. - * - * 08 03 2010 cp.wu - * NULL - * surpress compilation warning. - * - * 08 02 2010 cp.wu - * NULL - * comment out deprecated members in BSS_INFO, which are only used by firmware rather than driver. - * - * 07 30 2010 cp.wu - * NULL - * 1) BoW wrapper: use definitions instead of hard-coded constant for error code - * 2) AIS-FSM: eliminate use of desired RF parameters, use prTargetBssDesc instead - * 3) add handling for RX_PKT_DESTINATION_HOST_WITH_FORWARD for GO-broadcast frames - * - * 07 29 2010 cp.wu - * NULL - * eliminate u4FreqInKHz usage, combined into rConnections.ucAdHoc* - * - * 07 29 2010 cp.wu - * NULL - * allocate on MGMT packet for IBSS beaconing. - * - * 07 29 2010 cp.wu - * NULL - * [AIS-FSM] fix: when join failed, release channel privilege as well - * - * 07 28 2010 cp.wu - * NULL - * reuse join-abort sub-procedure to reduce code size. - * - * 07 28 2010 cp.wu - * NULL - * 1) eliminate redundant variable eOPMode in prAdapter->rWlanInfo - * 2) change nicMediaStateChange() API prototype - * - * 07 26 2010 cp.wu - * - * AIS-FSM: when scan request is coming in the 1st 5 seconds of channel privilege period, - * just pend it til 5-sec. period finishes - * - * 07 26 2010 cp.wu - * - * AIS-FSM FIX: return channel privilege even when the privilege is not granted yet - * QM: qmGetFrameAction() won't assert when corresponding STA-REC index is not found - * - * 07 26 2010 cp.wu - * - * re-commit code logic being overwriten. - * - * 07 24 2010 wh.su - * - * .support the Wi-Fi RSN - * - * 07 23 2010 cp.wu - * - * 1) re-enable AIS-FSM beacon timeout handling. - * 2) scan done API revised - * - * 07 23 2010 cp.wu - * - * 1) enable Ad-Hoc - * 2) disable beacon timeout handling temporally due to unexpected beacon timeout event. - * - * 07 23 2010 cp.wu - * - * indicate scan done for linux wireless extension - * - * 07 23 2010 cp.wu - * - * add AIS-FSM handling for beacon timeout event. - * - * 07 22 2010 cp.wu - * - * 1) refine AIS-FSM indent. - * 2) when entering RF Test mode, flush 802.1X frames as well - * 3) when entering D3 state, flush 802.1X frames as well - * - * 07 21 2010 cp.wu - * - * separate AIS-FSM states into different cases of channel request. - * - * 07 21 2010 cp.wu - * - * 1) change BG_SCAN to ONLINE_SCAN for consistent term - * 2) only clear scanning result when scan is permitted to do - * - * 07 20 2010 cp.wu - * - * 1) [AIS] when new scan is issued, clear currently available scanning result except the connected one - * 2) refine disconnection behaviour when issued during BG-SCAN process - * - * 07 20 2010 cp.wu - * - * 1) bugfix: do not stop timer for join after switched into normal_tr state, - * for providing chance for DHCP handshasking - * 2) modify rsnPerformPolicySelection() invoking - * - * 07 19 2010 cp.wu - * - * 1) init AIS_BSS_INFO as channel number = 1 with band = 2.4GHz - * 2) correct typo - * - * 07 19 2010 wh.su - * - * update for security supporting. - * - * 07 19 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * when IBSS is being merged-in, send command packet to PM for connected indication - * - * 07 19 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * Add Ad-Hoc support to AIS-FSM - * - * 07 19 2010 jeffrey.chang - * - * Linux port modification - * - * 07 16 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * bugfix for SCN migration - * 1) modify QUEUE_CONCATENATE_QUEUES() so it could be used to concatence with an empty queue - * 2) before AIS issues scan request, network(BSS) needs to be activated first - * 3) only invoke COPY_SSID when using specified SSID for scan - * - * 07 15 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * for AIS scanning, driver specifies no extra IE for probe request - * - * 07 15 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * driver no longer generates probe request frames - * - * 07 14 2010 yarco.yang - * - * Remove CFG_MQM_MIGRATION - * - * 07 14 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * Refine AIS-FSM by divided into more states - * - * 07 13 2010 cm.chang - * - * Rename MSG_CH_RELEASE_T to MSG_CH_ABORT_T - * - * 07 09 2010 cp.wu - * - * 1) separate AIS_FSM state for two kinds of scanning. (OID triggered scan, and scan-for-connection) - * 2) eliminate PRE_BSS_DESC_T, Beacon/PrebResp is now parsed in single pass - * 3) implment DRV-SCN module, currently only accepts single scan request, - * other request will be directly dropped by returning BUSY - * - * 07 09 2010 george.huang - * - * [WPD00001556] Migrate PM variables from FW to driver: for composing QoS Info - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * take use of RLM module for parsing/generating HT IEs for 11n capability - * - * 07 08 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Rename MID_MNY_CNM_CH_RELEASE to MID_MNY_CNM_CH_ABORT - * - * 07 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * for first connection, if connecting failed do not enter into scan state. - * - * 07 06 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * once STA-REC is allocated and updated, invoke cnmStaRecChangeState() to sync. with firmware. - * - * 07 06 2010 george.huang - * [WPD00001556]Basic power managemenet function - * Update arguments for nicUpdateBeaconIETemplate() - * - * 07 06 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * STA-REC is maintained by CNM only. - * - * 07 05 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * remove unused definitions. - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * AIS-FSM integration with CNM channel request messages - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * implementation of DRV-SCN and related mailbox message handling. - * - * 06 30 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * sync. with CMD/EVENT document ver0.07. - * - * 06 29 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) sync to. CMD/EVENT document v0.03 - * 2) simplify DTIM period parsing in scan.c only, bss.c no longer parses it again. - * 3) send command packet to indicate FW-PM after - * a) 1st beacon is received after AIS has connected to an AP - * b) IBSS-ALONE has been created - * c) IBSS-MERGE has occurred - * - * 06 25 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * modify Beacon/ProbeResp to complete parsing, - * because host software has looser memory usage restriction - * - * 06 23 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * integrate . - * - * 06 22 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * comment out RLM APIs by CFG_RLM_MIGRATION. - * - * 06 22 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) add command warpper for STA-REC/BSS-INFO sync. - * 2) enhance command packet sending procedure for non-oid part - * 3) add command packet definitions for STA-REC/BSS-INFO sync. - * - * 06 21 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Support CFG_MQM_MIGRATION flag - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add scan_fsm into building. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * RSN/PRIVACY compilation flag awareness correction - * - * 06 18 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf - * - * 06 18 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * migration from MT6620 firmware. - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add scan.c. - * - * 06 14 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * restore utility function invoking via hem_mbox to direct calls - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * auth.c is migrated. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add bss.c. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * change to enqueue TX frame infinitely. - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) eliminate CFG_CMD_EVENT_VERSION_0_9 - * 2) when disconnected, indicate nic directly (no event is needed) - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add buildable & linkable ais_fsm.c - * - * related reference are still waiting to be resolved - * - * 06 01 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Add conditionial compiling flag to choose default available bandwidth - * - * 05 28 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Add ClientList handling API - bssClearClientList, bssAddStaRecToClientList - * - * 05 24 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Refine authSendAuthFrame() for NULL STA_RECORD_T case and minimum deauth interval. - * - * 05 21 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Fix compile error if CFG_CMD_EVENT_VER_009 == 0 for prEventConnStatus->ucNetworkType. - * - * 05 21 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Refine txmInitWtblTxRateTable() - set TX initial rate according to AP's operation rate set - * - * 05 17 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Call pmAbort() and add ucNetworkType field in EVENT_CONNECTION_STATUS - * - * 05 14 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Fix compile warning - define of MQM_WMM_PARSING was removed - * - * 05 12 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Add Power Management - Legacy PS-POLL support. - * - * 04 28 2010 tehuang.liu - * [BORA00000605][WIFISYS] Phase3 Integration - * Removed the use of compiling flag MQM_WMM_PARSING - * - * 04 27 2010 kevin.huang - * [BORA00000714][WIFISYS][New Feature]Beacon Timeout Support - * - * Fix typo - * - * 04 27 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Add Set Slot Time and Beacon Timeout Support for AdHoc Mode - * - * 04 19 2010 kevin.huang - * [BORA00000714][WIFISYS][New Feature]Beacon Timeout Support - * Add Send Deauth for Class 3 Error and Leave Network Support - * - * 04 15 2010 wh.su - * [BORA00000680][MT6620] Support the statistic for Micxxsoft os query - * fixed the protected bit at cap info for ad-hoc. - * - * 04 13 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Add new HW CH macro support - * - * 04 07 2010 chinghwa.yu - * [BORA00000563]Add WiFi CoEx BCM module - * Add TX Power Control RCPI function. - * - * 03 29 2010 wh.su - * [BORA00000605][WIFISYS] Phase3 Integration - * move the wlan table alloc / free to change state function. - * - * 03 25 2010 wh.su - * [BORA00000676][MT6620] Support the frequency setting and query at build connection / connection event - * modify the build connection and status event structure bu CMD_EVENT doc 0.09 draft, default is disable. - * - * 03 24 2010 wh.su - * [BORA00000605][WIFISYS] Phase3 Integration - * fixed some WHQL testing error. - * - * 03 24 2010 kevin.huang - * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support - * Add Set / Unset POWER STATE in AIS Network - * - * 03 16 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Add AdHoc Mode - * - * 03 10 2010 kevin.huang - * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support - * Add Channel Manager for arbitration of JOIN and SCAN Req - * - * 03 03 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add PHY_CONFIG to change Phy Type - * - * 03 03 2010 chinghwa.yu - * [BORA00000563]Add WiFi CoEx BCM module - * Use bcmWiFiNotify to replace wifi_send_msg to pass information to BCM module. - * - * 03 03 2010 chinghwa.yu - * [BORA00000563]Add WiFi CoEx BCM module - * Remove wmt_task definition and add PTA function. - * - * 03 02 2010 tehuang.liu - * [BORA00000569][WIFISYS] Phase 2 Integration Test - * Init TXM and MQM testing procedures in aisFsmRunEventJoinComplete() - * - * 03 01 2010 tehuang.liu - * [BORA00000569][WIFISYS] Phase 2 Integration Test - * Modified aisUpdateBssInfo() to call TXM's functions for setting WTBL TX parameters - * - * 03 01 2010 wh.su - * [BORA00000605][WIFISYS] Phase3 Integration - * clear the pmkid cache while indicate media disconnect. - * - * 02 26 2010 tehuang.liu - * [BORA00000569][WIFISYS] Phase 2 Integration Test - * . - * - * 02 26 2010 tehuang.liu - * [BORA00000569][WIFISYS] Phase 2 Integration Test - * Enabled MQM parsing WMM IEs for non-AP mode - * - * 02 26 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Remove CFG_TEST_VIRTUAL_CMD and add support of Driver STA_RECORD_T activation - * - * 02 25 2010 wh.su - * [BORA00000605][WIFISYS] Phase3 Integration - * use the Rx0 dor event indicate. - * - * 02 23 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Support dynamic channel selection - * - * 02 23 2010 wh.su - * [BORA00000621][MT6620 Wi-Fi] Add the RSSI indicate to avoid XP stalled for query rssi value - * Adding the RSSI event support, - * using the HAL function to get the rcpi value and tranlsate to RSSI and indicate to driver - * - * 02 12 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Use bss info array for concurrent handle - * - * 02 05 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Revise data structure to share the same BSS_INFO_T for avoiding coding error - * - * 02 04 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add AAA Module Support, Revise Net Type to Net Type Index for array lookup - * - * 01 27 2010 tehuang.liu - * [BORA00000569][WIFISYS] Phase 2 Integration Test - * Set max AMDPU size supported by the peer to 64 KB, - * removed mqmInit() and mqmTxSendAddBaReq() function calls in aisUpdateBssInfo() - * - * 01 27 2010 wh.su - * [BORA00000476][Wi-Fi][firmware] Add the security module initialize code - * add and fixed some security function. - * - * 01 22 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Support protection and bandwidth switch - * - * 01 20 2010 kevin.huang - * [BORA00000569][WIFISYS] Phase 2 Integration Test - * Add PHASE_2_INTEGRATION_WORK_AROUND and CFG_SUPPORT_BCM flags - * - * 01 15 2010 tehuang.liu - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Configured the AMPDU factor to 3 for the APu1rwduu`wvpghlqg|q`mpdkb+ilp - * - * 01 14 2010 chinghwa.yu - * [BORA00000563]Add WiFi CoEx BCM module - * Add WiFi BCM module for the 1st time. - * - * 01 11 2010 kevin.huang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Add Deauth and Disassoc Handler - * - * 01 07 2010 kevin.huang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * - * Refine JOIN Complete and separate the function of Media State indication - * - * 01 04 2010 tehuang.liu - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * For working out the first connection Chariot-verified version - * - * 12 18 2009 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * . - * - * Dec 10 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * adding the sample code to update the wlan table rate, - * - * Dec 10 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Different function prototype of wifi_send_msg() - * - * Dec 9 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Call rlm related function to process HT info when join complete - * - * Dec 9 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * default the acquired wlan table entry code off - * - * Dec 9 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * adding the code to acquired the wlan table entry, and a sample code to update the BA bit at table - * - * Dec 7 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Fix the problem of prSwRfb overwrited by event packet in aisFsmRunEventJoinComplete() - * - * Dec 4 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * adding the code to integrate the security related code - * - * Dec 3 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Remove redundant declaration - * - * Dec 3 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add code for JOIN init and JOIN complete - * - * Nov 30 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Rename u4RSSI to i4RSSI - * - * Nov 30 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Revise ENUM_MEDIA_STATE to ENUM_PARAM_MEDIA_STATE - * - * Nov 30 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add fgIsScanReqIssued to CONNECTION_SETTINGS_T - * - * Nov 26 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Revise Virtual CMD handler due to structure changed - * - * Nov 25 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add Virtual CMD & RESP for testing CMD PATH - * - * Nov 23 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add aisFsmInitializeConnectionSettings() - * - * Nov 20 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add CFG_TEST_MGMT_FSM flag for aisFsmTest() - * - * Nov 16 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/hem_mbox.c b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/hem_mbox.c index c7a23eb018b6..c7201b76c99e 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/hem_mbox.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/hem_mbox.c @@ -1,349 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/mgmt/hem_mbox.c#3 -*/ - -/*! \file "hem_mbox.c" - \brief - -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: hem_mbox.c -** -** 08 31 2012 yuche.tsai -** [ALPS00349585] [6577JB][WiFi direct][KE]Establish p2p connection while both device -** have connected to AP previously,one device reboots automatically with KE -** Fix possible KE when concurrent & disconnect. -** -** 07 26 2012 yuche.tsai -** [ALPS00324337] [ALPS.JB][Hot-Spot] Driver update for Hot-Spot -** Update driver code of ALPS.JB for hot-spot. -** -** 07 19 2012 yuche.tsai -** NULL -** Code update for JB. - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 05 03 2012 cp.wu - * [WCXRP00001231] [MT6620 Wi-Fi][MT5931][Driver] Correct SCAN_V2 related debugging facilities within hem_mbox.c - * correct for debug message string table by adding missed scan_v2 related definitions. - * - * 03 02 2012 terry.wu - * NULL - * Sync CFG80211 modification from branch 2,2. - * - * 01 17 2012 yuche.tsai - * NULL - * Update mgmt frame filter setting. - * Please also update FW 2.1 - * - * 01 13 2012 yuche.tsai - * NULL - * WiFi Hot Spot Tethering for ICS ALPHA testing version. - * - * 11 24 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * Adjust code for DBG and CONFIG_XLOG. - * - * 11 15 2011 cm.chang - * NULL - * Add exception handle for NULL function pointer of mailbox message - * - * 11 11 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * modify the xlog related code. - * - * 11 02 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * adding the code for XLOG. - * - * 07 18 2011 cp.wu - * [WCXRP00000858] [MT5931][Driver][Firmware] Add support for scan to search - * for more than one SSID in a single scanning request - * add framework in driver domain for supporting new SCAN_REQ_V2 for more than 1 SSID support - * as well as uProbeDelay in NDIS 6.x driver model - * - * 06 07 2011 yuche.tsai - * [WCXRP00000696] [Volunteer Patch][MT6620][Driver] Infinite loop issue when RX invitation response. - * [WCXRP00000763] [Volunteer Patch][MT6620][Driver] RX Service Discovery Frame under AP mode Issue - * Add invitation support. - * - * 04 18 2011 terry.wu - * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED - * Remove flag CFG_WIFI_DIRECT_MOVED. - * - * 03 29 2011 cm.chang - * [WCXRP00000606] [MT6620 Wi-Fi][Driver][FW] Fix klocwork warning - * As CR title - * - * 02 24 2011 cp.wu - * [WCXRP00000490] [MT6620 Wi-Fi][Driver][Win32] modify kalMsleep() implementation - * because NdisMSleep() won't sleep long enough for specified interval such as 500ms - * modify cnm_timer and hem_mbox APIs to be thread safe to ease invoking restrictions - * - * 02 15 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Update bowString and channel grant. - * - * 01 26 2011 cm.chang - * [WCXRP00000395] [MT6620 Wi-Fi][Driver][FW] Search STA_REC with additional net type index argument - * Allocate system RAM if fixed message or mgmt buffer is not available - * - * 01 26 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * . - * - * 01 25 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Fix Compile Error when DBG is disabled. - * - * 01 24 2011 cp.wu - * [WCXRP00000382] [MT6620 Wi-Fi][Driver] Track forwarding packet number with notifying tx thread for serving - * 1. add an extra counter for tracking pending forward frames. - * 2. notify TX service thread as well when there is pending forward frame - * 3. correct build errors leaded by introduction of Wi-Fi direct separation module - * - * 12 08 2010 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Support concurrent networks. - * - * 11 08 2010 cm.chang - * [WCXRP00000169] [MT6620 Wi-Fi][Driver][FW] Remove unused CNM recover message ID - * Remove CNM channel reover message ID - * - * 11 01 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000150] [MT6620 Wi-Fi][Driver] - * Add implementation for querying current TX rate from firmware auto rate module - * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead - * 2) Remove CNM CH-RECOVER event handling - * 3) cfg read/write API renamed with kal prefix for unified naming rules. - * - * 10 08 2010 wh.su - * [WCXRP00000085] [MT6620 Wif-Fi] [Driver] update the modified p2p state machine - * update the frog's new p2p state machine. - * - * 09 28 2010 wh.su - * NULL - * [WCXRP00000069][MT6620 Wi-Fi][Driver] Fix some code for phase 1 P2P Demo. - * - * 09 16 2010 cm.chang - * NULL - * Remove unused message ID - * - * 08 30 2010 cp.wu - * NULL - * eliminate klockwork errors - * - * 08 26 2010 yuche.tsai - * NULL - * Add P2P Connection Abort Event Message handler. - * - * 08 25 2010 george.huang - * NULL - * update OID/ registry control path for PM related settings - * - * 08 24 2010 yarco.yang - * NULL - * Fixed Driver ASSERT at mboxInitMsgMap() - * - * 08 24 2010 chinghwa.yu - * NULL - * Update for MID_SCN_BOW_SCAN_DONE mboxDummy. - * Update saa_fsm for BOW. - * - * 08 23 2010 chinghwa.yu - * NULL - * Add CFG_ENABLE_BT_OVER_WIFI. - * - * 08 23 2010 chinghwa.yu - * NULL - * Update for BOW. - * - * 08 16 2010 cp.wu - * NULL - * add interface for RLM to trigger OBSS-SCAN. - * - * 08 16 2010 yuche.tsai - * NULL - * Add debug message for newly add P2P message. - * - * 08 11 2010 yuche.tsai - * NULL - * Add some function entry for P2P FSM under provisioning phase.. - * - * 08 11 2010 yuche.tsai - * NULL - * Add some events to P2P Module. - * - * 08 05 2010 yuche.tsai - * NULL - * Add message box event for P2P device switch on & device discovery. - * - * 08 04 2010 cp.wu - * NULL - * remove unused mailbox message definitions. - * - * 08 02 2010 yuche.tsai - * NULL - * P2P Group Negotiation Code Check in. - * - * 07 19 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * message table should not be commented out by compilation option without modifying header file - * - * 07 19 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * Add Ad-Hoc support to AIS-FSM - * - * 07 19 2010 yuche.tsai - * - * Add wifi direct scan done callback. - * - * 07 09 2010 cp.wu - * - * change handler of MID_MNY_CNM_CONNECTION_ABORT from NULL to mboxDummy. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 08 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Rename MID_MNY_CNM_CH_RELEASE to MID_MNY_CNM_CH_ABORT - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * AIS-FSM integration with CNM channel request messages - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * implementation of DRV-SCN and related mailbox message handling. - * - * 07 01 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Modify CNM message handler for new flow - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * enable currently migrated message call-backs. - * - * 06 14 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * restore utility function invoking via hem_mbox to direct calls - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add buildable & linkable ais_fsm.c - * - * related reference are still waiting to be resolved - * - * 06 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * hem_mbox is migrated. - * - * 06 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add hem_mbox.c and cnm_mem.h (but disabled some feature) for further migration - * - * 05 12 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Fix file merge error - * - * 05 12 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Add Power Management - Legacy PS-POLL support. - * - * 04 29 2010 tehuang.liu - * [BORA00000605][WIFISYS] Phase3 Integration - * Removed MID_RXM_MQM_QOS_ACTION_FRAME - * - * 04 29 2010 tehuang.liu - * [BORA00000605][WIFISYS] Phase3 Integration - * Removed MID_RXM_MQM_BA_ACTION_FRAME - * - * 04 27 2010 tehuang.liu - * [BORA00000605][WIFISYS] Phase3 Integration - * MID_RXM_MQM_BA_ACTION_FRAME - * - * 03 30 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Support 2.4G OBSS scan - * - * 03 16 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Add AdHoc Mode - * - * 03 10 2010 kevin.huang - * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support - * - * * * * * * * * * * * * * * Add Channel Manager for arbitration of JOIN and SCAN Req - * - * 03 05 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Develop partial DPD code - * - * 02 11 2010 tehuang.liu - * [BORA00000569][WIFISYS] Phase 2 Integration Test - * Updated arMsgMapTable for MID_RXM_MQM_QOS_ACTION_FRAME - * - * 01 11 2010 kevin.huang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Add Deauth and Disassoc Handler - * - * Dec 9 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add hemRunEventScanDone() to arMsgMapTable[] - * - * Dec 4 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Fix mboxDummy() didn't free prMsgHdr - * - * Dec 3 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add saaAisJoinComplete event handler - * - * Dec 2 2009 MTK02468 - * [BORA00000337] To check in codes for FPGA emulation - * Fixed the handler function name in arMsgMapTable for MID_RXM_MQM_BA_ACTION_FRAME - * - * Dec 2 2009 MTK02468 - * [BORA00000337] To check in codes for FPGA emulation - * Added MID_RXM_MQM_BA_ACTION_FRAME to MsgMapTable - * - * Nov 23 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Revise MSG Handler (remove dummy and add for SAA) - * - * Nov 16 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add aisFsmRunEventAbort() event handler - * - * Nov 11 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Fix typo - * - * Nov 10 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add more MSG_HNDL_ENTRY_T to avoid ASSERT() in mboxInitMsgMap() - * - * Nov 5 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add SCN message and function entry to arMsgMapTable[] - * - * Nov 2 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Fix sorting algorithm in mboxInitMsgMap() - * - * Oct 28 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c index 41d862dafcf4..082df5bc27b1 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_fsm.c @@ -1,840 +1,16 @@ -/* -** Id: //Department/DaVinci/TRUNK/WiFi_P2P_Driver/mgmt/p2p_fsm.c#61 -*/ - -/*! \file "p2p_fsm.c" - \brief This file defines the FSM for P2P Module. - - This file defines the FSM for P2P Module. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: p2p_fsm.c -** -** 12 20 2012 yuche.tsai -** [ALPS00410124] [Rose][Free Test][KE][rlmUpdateParamsForAP]The device reboot automatically -** and then "Fatal/Kernel" pops up during use data service.(Once) -** Fix possible NULL station record cause KE under AP mode. -** May due to variable uninitial. -** Review: http://mtksap20:8080/go?page=NewReview&reviewid=49970 -** -** 09 12 2012 wcpadmin -** [ALPS00276400] Remove MTK copyright and legal header on GPL/LGPL related packages -** . -** -** 08 31 2012 yuche.tsai -** [ALPS00349585] [6577JB][WiFi direct][KE]Establish p2p connection while both device have connected -**to AP previously,one device reboots automatically with KE -** Fix possible KE when concurrent & disconnect. -** -** 08 21 2012 yuche.tsai -** NULL -** fix disconnect indication. -** -** 08 16 2012 yuche.tsai -** NULL -** Fix compile warning. -** -** 08 14 2012 yuche.tsai -** NULL -** Fix p2p bug find on ALPS.JB trunk. -** -** 07 27 2012 yuche.tsai -** [ALPS00324337] [ALPS.JB][Hot-Spot] Driver update for Hot-Spot -** Update for driver unload KE issue. -** -** 07 26 2012 yuche.tsai -** [ALPS00324337] [ALPS.JB][Hot-Spot] Driver update for Hot-Spot -** Update driver code of ALPS.JB for hot-spot. -** -** 07 19 2012 yuche.tsai -** NULL -** Code update for JB. - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 07 05 2011 yuche.tsai - * [WCXRP00000821] [Volunteer Patch][WiFi Direct][Driver] WiFi Direct Connection Speed Issue - * Fix the compile flag of enhancement. - * - * 07 05 2011 yuche.tsai - * [WCXRP00000808] [Volunteer Patch][MT6620][Driver/FW] Device discoverability issue fix - * Change device discoverability methodology. From driver SCAN to FW lock channel. - * - * 07 05 2011 yuche.tsai - * [WCXRP00000821] [Volunteer Patch][WiFi Direct][Driver] WiFi Direct Connection Speed Issue - * Add wifi direct connection enhancement method I, II & VI. - * - * 07 05 2011 yuche.tsai - * [WCXRP00000833] [Volunteer Patch][WiFi Direct][Driver] Service Discovery Frame RX Indicate Issue - * Fix Service Discovery Race Condition Issue. - * - * 06 23 2011 cp.wu - * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module - * change parameter name from PeerAddr to BSSID - * - * 06 21 2011 yuche.tsai - * [WCXRP00000799] [Volunteer Patch][MT6620][Driver] Connection Indication Twice Issue. - * Fix an issue of accepting connection of GO. - * - * 06 21 2011 yuche.tsai - * [WCXRP00000775] [Volunteer Patch][MT6620][Driver] Dynamic enable SD capability - * Drop GAS frame when SD is not enabled. - * - * 06 20 2011 yuche.tsai - * NULL - * Fix compile error. - * - * 06 20 2011 yuche.tsai - * [WCXRP00000799] [Volunteer Patch][MT6620][Driver] Connection Indication Twice Issue. - * Fix connection indication twice issue. - * - * 06 20 2011 cp.wu - * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module - * 1. specify target's BSSID when requesting channel privilege. - * 2. pass BSSID information to firmware domain - * - * 06 20 2011 yuche.tsai - * [WCXRP00000795] [Volunteer Patch][MT6620][Driver] GO can not connect second device issue - * Solve P2P GO can not formation with second device issue. - * - * 06 14 2011 yuche.tsai - * NULL - * Change disconnect feature. - * - * 06 10 2011 yuche.tsai - * [WCXRP00000775] [Volunteer Patch][MT6620][Driver] Dynamic enable SD capability[WCXRP00000776] - * [Need Patch][MT6620][Driver] MT6620 response probe request of P2P device with P2P IE under Hot Spot mode. - * 1. Dynamic enable SD capability after P2P supplicant ready. - * 2. Avoid response probe respone with p2p IE when under hot spot mode. - * - * 06 07 2011 yuche.tsai - * [WCXRP00000763] [Volunteer Patch][MT6620][Driver] RX Service Discovery Frame under AP mode Issue - * Fix RX SD request under AP mode issue. - * - * 06 02 2011 cp.wu - * [WCXRP00000681] [MT5931][Firmware] HIF code size reduction - * eliminate unused parameters for SAA-FSM - * - * 05 26 2011 yuche.tsai - * [WCXRP00000745] Support accepting connection after one Group Connection Lost. - -After Group Formation & lost connection, if MT6620 behave as: - -1. GO: It would keep under GO state until been dissolved by supplicant. - - At this time, other P2P device can use join method to join this group. - -2. GC: It would keep on searching target GO or target device until been dissolved by supplicant. - -At this time, it would ignore other P2P device formation request. - --- - -Modification: Make driver to accept GO NEGO REQ at this time, to let user decide to accept new connection or not. - - * [Volunteer Patch][MT6620][Driver] - * Driver would indicate connection request, if password ID is not ready but connection request is issued. - * - * 05 18 2011 yuche.tsai - * [WCXRP00000728] [Volunteer Patch][MT6620][Driver] Service Discovery Request TX issue. - * A solution for both connection request & IO control. - * - * 05 16 2011 yuche.tsai - * [WCXRP00000728] [Volunteer Patch][MT6620][Driver] Service Discovery Request TX issue. - * Fix SD request can not send out issue. - * - * 05 09 2011 terry.wu - * [WCXRP00000711] [MT6620 Wi-Fi][Driver] Set Initial value of StaType in StaRec for Hotspot Client - * Set initial value of StaType in StaRec for hotspot client. - * - * 05 04 2011 yuche.tsai - * [WCXRP00000697] [Volunteer Patch][MT6620][Driver] - * Bug fix for p2p descriptor is NULL if BSS descriptor is found first. - * - * 05 04 2011 yuche.tsai - * NULL - * Support partial persistent group function. - * - * 05 02 2011 yuche.tsai - * [WCXRP00000693] [Volunteer Patch][MT6620][Driver] Clear Formation Flag after TX lifetime timeout. - * Clear formation flag after formation timeout. - * - * 04 20 2011 yuche.tsai - * [WCXRP00000668] [Volunteer Patch][MT6620][Driver] Possible race condition - * when add scan & query scan result at the same time. - * Fix side effect while starting ATGO. - * - * 04 20 2011 yuche.tsai - * NULL - * Fix ASSERT issue in FW, side effect of last change. - * - * 04 19 2011 yuche.tsai - * [WCXRP00000668] [Volunteer Patch][MT6620][Driver] Possible race condition - * when add scan & query scan result at the same time. - * Workaround for multiple device connection, before invitation ready. - * - * 04 19 2011 yuche.tsai - * [WCXRP00000665] [Wifi Direct][MT6620 E4] When use Ralink's dongle to establish wifi direct connection with PBC. - * But 6573 always not pop accept option to establish connection. - * Support connection indication when GO NEGO REQ doesn't have configure method, instead it has PasswordID. - * - * 04 18 2011 yuche.tsai - * NULL - * Fix error. - * - * 04 14 2011 yuche.tsai - * [WCXRP00000646] [Volunteer Patch][MT6620][FW/Driver] Sigma Test Modification for some test case. - * Fix a connection issue. - * - * 04 14 2011 yuche.tsai - * [WCXRP00000646] [Volunteer Patch][MT6620][FW/Driver] Sigma Test Modification for some test case. - * Fix the channel issue of AP mode. - * - * 04 14 2011 yuche.tsai - * [WCXRP00000646] [Volunteer Patch][MT6620][FW/Driver] Sigma Test Modification for some test case. - * Connection flow refine for Sigma test. - * - * 04 09 2011 yuche.tsai - * [WCXRP00000624] [Volunteer Patch][MT6620][Driver] Add device discoverability support for GO. - * Fix Device discoverability related issue. - * - * 04 09 2011 yuche.tsai - * [WCXRP00000624] [Volunteer Patch][MT6620][Driver] Add device discoverability support for GO. - * Fix bug for Device Discoverability. - * - * 04 08 2011 yuche.tsai - * [WCXRP00000624] [Volunteer Patch][MT6620][Driver] Add device discoverability support for GO. - * Fix compile error. - * - * 04 08 2011 yuche.tsai - * [WCXRP00000624] [Volunteer Patch][MT6620][Driver] Add device discoverability support for GO. - * Add device discoverability support. - * - * 03 28 2011 yuche.tsai - * NULL - * Fix a possible issue for retry join when media status connected. - * - * 03 25 2011 yuche.tsai - * NULL - * Improve some error handleing. - * - * 03 24 2011 yuche.tsai - * NULL - * Assign AID before change STA_REC state to state 3. - * - * 03 23 2011 yuche.tsai - * NULL - * Fix Response Rate Issue when TX Auth Rsp Frame under P2P Mode. - * - * 03 23 2011 yuche.tsai - * NULL - * Fix issue of connection to one GC. - * - * 03 23 2011 yuche.tsai - * NULL - * Fix ASSERT issue when starting Hot-spot. - * - * 03 22 2011 yuche.tsai - * NULL - * When Target Information is not available, change to passive mode. - * - * 03 22 2011 yuche.tsai - * NULL - * Fix one connection issue while using Keypad to connect a GO. - * - * 03 22 2011 yuche.tsai - * NULL - * 1. Fix two issues that may cause kernel panic. - * - * 03 22 2011 yuche.tsai - * NULL - * Fix GC connect to other device issue. - * - * 03 22 2011 yuche.tsai - * NULL - * 1.Shorten the LISTEN interval. - * 2. Fix IF address issue when we are GO - * 3. Fix LISTEN channel issue. - * - * 03 22 2011 yuche.tsai - * NULL - * Modify formation policy setting. - * - * 03 21 2011 yuche.tsai - * NULL - * Solve Listen State doesn't response probe response issue. - * - * 03 21 2011 yuche.tsai - * NULL - * Change P2P Connection Request Flow. - * - * 03 19 2011 yuche.tsai - * [WCXRP00000584] [Volunteer Patch][MT6620][Driver] Add beacon timeout support for WiFi Direct. - * Add beacon timeout support. - * - * 03 19 2011 yuche.tsai - * [WCXRP00000583] [Volunteer Patch][MT6620][Driver] P2P connection of the third peer issue - * Indicate the correct Group SSID when join on Group. - * - * 03 19 2011 yuche.tsai - * [WCXRP00000583] [Volunteer Patch][MT6620][Driver] P2P connection of the third peer issue - * Support the third P2P device to join GO/GC group. - * - * 03 19 2011 yuche.tsai - * [WCXRP00000581] [Volunteer Patch][MT6620][Driver] P2P IE in Assoc Req Issue - * Append P2P IE in Assoc Req, so that GC can be discovered in probe response of GO. - * - * 03 18 2011 yuche.tsai - * [WCXRP00000578] [Volunteer Patch][MT6620][Driver] Separate Connection Request from general IOCTL - * Separate connection request from general IOCTL. - * - * 03 18 2011 yuche.tsai - * [WCXRP00000574] [Volunteer Patch][MT6620][Driver] Modify P2P FSM Connection Flow - * Modify connection flow after Group Formation Complete, or device connect to a GO. - * Instead of request channel & connect directly, we use scan to allocate channel bandwidth & connect after RX BCN. - * - * 03 17 2011 yuche.tsai - * NULL - * When AIS is connect to an AP, Hot Spot would be enabled under fixed same channel. - * - * 03 17 2011 yuche.tsai - * NULL - * Solve the Group Info IE in Probe Response incorrect issue. - * - * 03 17 2011 yuche.tsai - * NULL - * Release Channel after Join Complete. - * - * 03 16 2011 wh.su - * [WCXRP00000530] [MT6620 Wi-Fi] [Driver] skip doing p2pRunEventAAAComplete after send assoc response Tx Done - * enable the protected while at P2P start GO, and skip some security check . - * - * 03 15 2011 yuche.tsai - * [WCXRP00000560] [Volunteer Patch][MT6620][Driver] P2P Connection from UI using KEY/DISPLAY issue - * Fix local configure method issue. - * - * 03 15 2011 yuche.tsai - * [WCXRP00000560] [Volunteer Patch][MT6620][Driver] P2P Connection from UI using KEY/DISPLAY issue - * Fix some configure method issue. - * - * 03 14 2011 yuche.tsai - * NULL - * . - * - * 03 14 2011 yuche.tsai - * NULL - * Fix password ID issue. - * - * 03 10 2011 yuche.tsai - * NULL - * Add P2P API. - * - * 03 08 2011 yuche.tsai - * [WCXRP00000480] [Volunteer Patch][MT6620][Driver] WCS IE format issue[WCXRP00000509] - * [Volunteer Patch][MT6620][Driver] Kernal panic when remove p2p module. - * . - * - * 03 07 2011 yuche.tsai - * [WCXRP00000502] [Volunteer Patch][MT6620][Driver] Fix group ID issue when doing Group Formation. - * . - * - * 03 07 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * rename the define to anti_pviracy. - * - * 03 05 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * add the code to get the check rsponse and indicate to app. - * - * 03 04 2011 wh.su - * [WCXRP00000510] [MT6620 Wi-Fi] [Driver] Fixed the CTIA enter test mode issue - * fixed the p2p action frame type check for device request indication. - * - * 03 02 2011 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. -2. Provision Discovery Request/Response - - * Fix Service Discovery RX packet buffer pointer. - * - * 03 01 2011 yuche.tsai - * [WCXRP00000501] [Volunteer Patch][MT6620][Driver] No common channel issue when doing GO formation - * Update channel issue when doing GO formation.. - * - * 03 01 2011 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. -2. Provision Discovery Request/Response - - * Update Service Discovery Related wlanoid function. - * - * 02 21 2011 yuche.tsai - * [WCXRP00000481] [Volunteer Patch][MT6620][FW] Scan hang under concurrent case. - * Fix all BE issue of WSC or P2P IE. - * - * 02 18 2011 wh.su - * [WCXRP00000471] [MT6620 Wi-Fi][Driver] Add P2P Provison discovery append Config Method attribute at WSC IE - * fixed the wsc config method mapping to driver used config method issue. - * - * 02 18 2011 yuche.tsai - * [WCXRP00000479] [Volunteer Patch][MT6620][Driver] Probe Response of P2P using 11b rate. - * Update basic rate to FW, after P2P is initialed. - * - * 02 18 2011 yuche.tsai - * [WCXRP00000478] [Volunteer Patch][MT6620][Driver] Probe request frame during search - * phase do not contain P2P wildcard SSID. - * Use P2P Wildcard SSID when scan type of P2P_WILDCARD_SSID is set. - * - * 02 18 2011 yuche.tsai - * [WCXRP00000480] [Volunteer Patch][MT6620][Driver] WCS IE format issue - * Fix WSC IE BE format issue. - * - * 02 17 2011 wh.su - * [WCXRP00000471] [MT6620 Wi-Fi][Driver] Add P2P Provison discovery append Config Method attribute at WSC IE - * append the WSC IE config method attribute at provision discovery request. - * - * 02 16 2011 wh.su - * [WCXRP00000448] [MT6620 Wi-Fi][Driver] Fixed WSC IE not send out at probe request - * fixed the probe request send out without WSC IE issue (at P2P). - * - * 02 16 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * If two station connected to the Hot-Spot and one disconnect, FW would get into an infinite loop - * - * 02 15 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * Fix re-connection issue after RX deauthentication. - * - * 02 15 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * Fix conneciton issue after disconnect with AP. - * - * 02 12 2011 yuche.tsai - * [WCXRP00000441] [Volunteer Patch][MT6620][Driver] BoW can not create desired station type when Hot Spot is enabled. - * P2P Create Station Type according to Target BSS capability. - * - * 02 10 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * Support Disassoc & Deauthentication for Hot-Spot. - * - * 02 09 2011 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. -2. Provision Discovery Request/Response - - * Add Service Discovery Indication Related code. - * - * 02 09 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * Add Support for MLME deauthentication for Hot-Spot. - * - * 02 09 2011 yuche.tsai - * [WCXRP00000429] [Volunteer Patch][MT6620][Driver] Hot Spot Client Limit Issue - * Fix Client Limit Issue. - * - * 02 08 2011 yuche.tsai - * [WCXRP00000419] [Volunteer Patch][MT6620/MT5931][Driver] Provide function of disconnect - * to target station for AAA module. - * Disconnect every station client when disolve on P2P group. - * - * 02 08 2011 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. -2. Provision Discovery Request/Response - - * 1. Fix Service Disocvery Logical issue. - * 2. Fix a NULL pointer access violation issue when sending deauthentication packet to a class error station. - * - * 02 08 2011 yuche.tsai - * [WCXRP00000419] [Volunteer Patch][MT6620/MT5931][Driver] Provide function of disconnect - * to target station for AAA module. - * Workaround of disable P2P network. - * - * 02 08 2011 yuche.tsai - * [WCXRP00000421] [Volunteer Patch][MT6620][Driver] Fix incorrect SSID length Issue - * 1. Fixed SSID wrong length issue. - * 2. Under Hot Spot configuration, there won't be any P2P IE. - * 3. Under Hot Spot configuration, P2P FSM won't get into LISTEN state first. - * - * 01 27 2011 yuche.tsai - * [WCXRP00000399] [Volunteer Patch][MT6620/MT5931][Driver] Fix scan side effect after P2P module separate. - * Modify Start GO flow. - * - * 01 27 2011 yuche.tsai - * [WCXRP00000399] [Volunteer Patch][MT6620/MT5931][Driver] Fix scan side effect after P2P module separate. - * Fix desire phy type set issue. - * - * 01 27 2011 yuche.tsai - * [WCXRP00000399] [Volunteer Patch][MT6620/MT5931][Driver] Fix scan side effect after P2P module separate. - * Add desire phy type set phase I. - * - * 01 26 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Fix P2P Disconnect Issue. - * - * 01 26 2011 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. -2. Provision Discovery Request/Response - - * Add Service Discovery Function. - * - * 01 26 2011 cm.chang - * [WCXRP00000395] [MT6620 Wi-Fi][Driver][FW] Search STA_REC with additional net type index argument - * . - * - * 01 25 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Fix compile error when DBG is disabled. - * - * 01 25 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Change Station Type Definition. - * - * 01 19 2011 yuche.tsai - * [WCXRP00000353] [Volunteer Patch][MT6620][Driver] Desired Non-HT Rate Set update - * when STA record is created under AP Mode. - * Add P2P QoS Support. - * - * 01 19 2011 george.huang - * [WCXRP00000355] [MT6620 Wi-Fi] Set WMM-PS related setting with qualifying AP capability - * Null NOA attribute setting when no related parameters. - * - * 01 14 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Modify AAA flow according to CM's comment. - * - * 01 13 2011 yuche.tsai - * [WCXRP00000353] [Volunteer Patch][MT6620][Driver] Desired Non-HT Rate Set update - * when STA record is created under AP Mode. - * Resolve Channel ZERO issue. (Uninitialized default channel) - * - * 01 13 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Update P2P State Debug Message. - * - * 01 12 2011 yuche.tsai - * [WCXRP00000353] [Volunteer Patch][MT6620][Driver] Desired Non-HT Rate Set update - * when STA record is created under AP Mode. - * Fix bug when allocating message buffer. - * - * 01 12 2011 yuche.tsai - * [WCXRP00000353] [Volunteer Patch][MT6620][Driver] Desired Non-HT Rate Set update - * when STA record is created under AP Mode. - * Update Phy Type Set. When legacy client is connected, it can use 11b rate, - * but if the P2P device is connected, 11b rate is not allowed. - * - * 01 12 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * 1. Modify Channel Acquire Time of AP mode from 5s to 1s. - * 2. Call cnmP2pIsPermit() before active P2P network. - * 3. Add channel selection support for AP mode. - * - * 01 12 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Fix Bug of reference to NULL pointer. - * - * 01 12 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Modify some behavior of AP mode. - * - * 01 12 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Fix bug of wrong pointer check. - * - * 01 12 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Fix Compile Error. - * - * 01 11 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Add station record into client list before change it state from STATE_2 to STATE_3. - * - * 01 05 2011 yuche.tsai - * [WCXRP00000345] [MT6620][Volunteer Patch] P2P may issue a SSID specified scan request, - * but the SSID length is still invalid. - * Specify SSID Type when issue a scan request. - * - * 01 05 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc and vmalloc implementations - * to ease physically continuous memory demands - * correct typo - * - * 01 05 2011 george.huang - * [WCXRP00000343] [MT6620 Wi-Fi] Add TSF reset path for concurrent operation - * modify NOA update path for preventing assertion false alarm. - * - * 01 04 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc and vmalloc implementations - * to ease physically continuous memory demands - * separate kalMemAlloc() into virtually-continuous and physically-continuous type to ease slab system pressure - * - * 01 03 2011 wh.su - * [WCXRP00000326] [MT6620][Wi-Fi][Driver] check in the binary format gl_sec.o.new instead of use change type!!! - * let the p2p ap mode acept a legacy device join. - * - * 12 22 2010 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. -2. Provision Discovery Request/Response - - * Fix Compile Error. - * - * 12 15 2010 yuche.tsai - * [WCXRP00000245] 1. Invitation Request/Response. -2. Provision Discovery Request/Response - - * Refine Connection Flow. - * - * 12 08 2010 yuche.tsai - * [WCXRP00000245] [MT6620][Driver] Invitation & Provision Discovery Feature Check-in - * [WCXRP000000245][MT6620][Driver] Invitation Request Feature Add - * - * 12 08 2010 yuche.tsai - * [WCXRP00000244] [MT6620][Driver] Add station record type for each client when in AP mode. - * Change STA Type under AP mode. We would tell if client is a P2P device or a legacy client - * by checking the P2P IE in assoc req frame. - * - * 12 07 2010 cm.chang - * [WCXRP00000239] MT6620 Wi-Fi][Driver][FW] Merge concurrent branch back to maintrunk - * The order of invoking nicUpdateBss() and rlm functions - * - * 12 02 2010 yuche.tsai - * NULL - * Update P2P Connection Policy for Invitation. - * - * 12 02 2010 yuche.tsai - * NULL - * Update P2P Connection Policy for Invitation & Provision Discovery. - * - * 11 30 2010 yuche.tsai - * NULL - * Invitation & Provision Discovery Indication. - * - * 11 30 2010 yuche.tsai - * NULL - * Update Configure Method indication & selection for Provision Discovery & GO_NEGO_REQ - * - * 11 30 2010 yuche.tsai - * NULL - * Update RCIP value when RX assoc request frame. - * - * 11 29 2010 yuche.tsai - * NULL - * Update P2P related function for INVITATION & PROVISION DISCOVERY. - * - * 11 26 2010 george.huang - * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function - * Update P2P PS for NOA function. - * - * 11 25 2010 yuche.tsai - * NULL - * Update Code for Invitation Related Function. - * - * 11 17 2010 wh.su - * [WCXRP00000164] [MT6620 Wi-Fi][Driver] Support the p2p random SSID[WCXRP00000179] [MT6620 Wi-Fi][FW] - * Set the Tx lowest rate at wlan table for normal operation - * fixed some ASSERT check. - * - * 11 05 2010 wh.su - * [WCXRP00000164] [MT6620 Wi-Fi][Driver] Support the p2p random SSID - * fixed the p2p role code error. - * - * 11 04 2010 wh.su - * [WCXRP00000164] [MT6620 Wi-Fi][Driver] Support the p2p random SSID - * adding the p2p random ssid support. - * - * 10 20 2010 wh.su - * [WCXRP00000124] [MT6620 Wi-Fi] [Driver] Support the dissolve P2P Group - * fixed the ASSERT check error - * - * 10 20 2010 wh.su - * [WCXRP00000124] [MT6620 Wi-Fi] [Driver] Support the dissolve P2P Group - * Add the code to support disconnect p2p group - * - * 10 19 2010 wh.su - * [WCXRP00000085] [MT6620 Wif-Fi] [Driver] update the modified p2p state - * machine[WCXRP00000102] [MT6620 Wi-Fi] [FW] Add a compiling flag and code for support Direct GO at Android - * fixed the compiling error. - * - * 10 14 2010 wh.su - * [WCXRP00000102] [MT6620 Wi-Fi] [FW] Add a compiling flag and code for support Direct GO at Android - * adding a code to support Direct GO with a compiling flag . - * - * 10 08 2010 cp.wu - * [WCXRP00000087] [MT6620 Wi-Fi][Driver] Cannot connect to 5GHz AP, driver will cause FW assert. - * correct erroneous logic: specifying eBand with incompatible eSco - * - * 10 08 2010 wh.su - * [WCXRP00000085] [MT6620 Wif-Fi] [Driver] update the modified p2p state machine - * fixed the compiling error. - * - * 10 08 2010 wh.su - * [WCXRP00000085] [MT6620 Wif-Fi] [Driver] update the modified p2p state machine - * update the frog's new p2p state machine. - * - * 09 10 2010 wh.su - * NULL - * fixed the compiling error at WinXP. - * - * 09 07 2010 yuche.tsai - * NULL - * Reset Common IE Buffer of P2P INFO when scan request is issued. - * If an action frame other than public action frame is received, return direcly. - * - * 09 07 2010 wh.su - * NULL - * adding the code for beacon/probe req/ probe rsp wsc ie at p2p. - * - * 09 06 2010 wh.su - * NULL - * let the p2p can set the privacy bit at beacon and rsn ie at assoc req at key handshake state. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 26 2010 yuche.tsai - * NULL - * Add P2P Connection Abort Event Message handler. - * - * 08 24 2010 cm.chang - * NULL - * Support RLM initail channel of Ad-hoc, P2P and BOW - * - * 08 23 2010 yuche.tsai - * NULL - * 1. Fix Interface Address from GO Nego Req/Rsp is not correct. - * 2. Fix GO mode does not change media state after station connected. - * 3. Fix STA don't response probe request when there is a connection request. - * - * 08 20 2010 cm.chang - * NULL - * Migrate RLM code to host from FW - * - * 08 20 2010 kevin.huang - * NULL - * Modify AAA Module for changing STA STATE 3 at p2p/bowRunEventAAAComplete() - * - * 08 20 2010 yuche.tsai - * NULL - * Add Glue Layer indication. - * - * 08 17 2010 yuche.tsai - * NULL - * Fix compile warning under Linux. - * - * 08 17 2010 yuche.tsai - * NULL - * Fix some P2P FSM bug. - * - * 08 16 2010 yuche.tsai - * NULL - * Add random Interface Address Generation support. - * - * 08 16 2010 yuche.tsai - * NULL - * Fix some P2P FSM bug. - * - * 08 16 2010 yuche.tsai - * NULL - * Update P2P FSM code for GO Nego. - * - * 08 16 2010 kevin.huang - * NULL - * Refine AAA functions - * - * 08 12 2010 kevin.huang - * NULL - * Refine bssProcessProbeRequest() and bssSendBeaconProbeResponse() - * - * 08 12 2010 yuche.tsai - * NULL - * Join complete indication. - * - * 08 11 2010 yuche.tsai - * NULL - * Add two boolean in connection request. - * Based on these two boolean value, P2P FSM should - * decide to do invitation or group formation or start a GO directly. - * - * 08 11 2010 yuche.tsai - * NULL - * Update P2P FSM, currently P2P Device Discovery is verified. - * - * 08 05 2010 yuche.tsai - * NULL - * Update P2P FSM for group formation. - * - * 08 03 2010 george.huang - * NULL - * handle event for updating NOA parameters indicated from FW - * - * 08 03 2010 cp.wu - * NULL - * limit build always needs spin-lock declaration. - * - * 08 02 2010 yuche.tsai - * NULL - * P2P Group Negotiation Code Check in. - * - * 07 26 2010 yuche.tsai - * - * Add P2P FSM code check in. - * - * 07 21 2010 yuche.tsai - * - * Add P2P Scan & Scan Result Parsing & Saving. - * - * 07 19 2010 yuche.tsai - * - * Update P2P FSM. - * - * 07 09 2010 george.huang - * - * [WPD00001556] Migrate PM variables from FW to driver: for composing QoS Info - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 21 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * Fix compile error while enable WIFI_DIRECT support. - * - * 06 21 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * Update P2P Function call. - * - * 06 17 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * First draft for migration P2P FSM from FW to Driver. - * - * 04 19 2010 kevin.huang - * [BORA00000714][WIFISYS][New Feature]Beacon Timeout Support - * Add Beacon Timeout Support and will send Null frame to diagnose connection - * - * 03 18 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Rename CFG flag for P2P - * - * 02 26 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add code to test P2P GO - * - * 02 23 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add Wi-Fi Direct SSID and P2P GO Test Mode - * - * 02 05 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Modify code due to BAND_24G define was changed - * - * 02 05 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Revise data structure to share the same BSS_INFO_T for avoiding coding error - * - * 02 04 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add AAA Module Support, Revise Net Type to Net Type Index for array lookup -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c index 978076ecbcfa..3de4b335615d 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_func.c @@ -1,3 +1,16 @@ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ + #include "precomp.h" #ifdef __GNUC__ diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_state.c b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_state.c index befb9978f473..a37985faf487 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_state.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/p2p_state.c @@ -1,3 +1,16 @@ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ + #include "p2p_precomp.h" BOOLEAN diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/rlm.c b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/rlm.c index 244346983f40..0dc8e3f99d36 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/rlm.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/rlm.c @@ -1,312 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/mgmt/rlm.c#2 -*/ - -/*! \file "rlm.c" - \brief - -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: rlm.c - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 11 15 2011 cm.chang - * NULL - * Check length HT cap IE about RX associate request frame - * - * 11 10 2011 cm.chang - * NULL - * Modify debug message for XLOG - * - * 11 08 2011 cm.chang - * NULL - * Add RLM and CNM debug message for XLOG - * - * 11 03 2011 cm.chang - * [WCXRP00000997] [MT6620 Wi-Fi][Driver][FW] Handle change of BSS preamble type and slot time - * Fix preamble type of STA mode - * - * 10 25 2011 cm.chang - * [WCXRP00001058] [All Wi-Fi][Driver] Fix sta_rec's phyTypeSet and OBSS scan in AP mode - * Not send ERP IE if peer STA is 802.11b-only - * - * 10 11 2011 cm.chang - * [WCXRP00001031] [All Wi-Fi][Driver] Check HT IE length to avoid wrong SCO parameter - * Ignore HT OP IE if its length field is not valid - * - * 09 28 2011 cm.chang - * NULL - * Add length check to reduce possibility to adopt wrong IE - * - * 09 20 2011 cm.chang - * [WCXRP00000997] [MT6620 Wi-Fi][Driver][FW] Handle change of BSS preamble type and slot time - * Handle client mode about preamble type and slot time - * - * 09 01 2011 cm.chang - * [WCXRP00000971] [MT6620 Wi-Fi][Driver][FW] Not set Beacon timeout interval when CPTT - * Final channel number only adopts the field from assoc response - * - * 06 10 2011 cm.chang - * [WCXRP00000773] [MT6620 Wi-Fi][Driver] Workaround some AP fill primary channel field with its secondary channel - * If DS IE exists, ignore the primary channel field in HT OP IE - * - * 05 03 2011 cm.chang - * [WCXRP00000691] [MT6620 Wi-Fi][Driver] Workaround about AP's wrong HT capability IE to have wrong channel number - * Fix compiling error - * - * 05 02 2011 cm.chang - * [WCXRP00000691] [MT6620 Wi-Fi][Driver] Workaround about AP's wrong HT capability IE to have wrong channel number - * Refine range of valid channel number - * - * 05 02 2011 cm.chang - * [WCXRP00000691] [MT6620 Wi-Fi][Driver] Workaround about AP's wrong HT capability IE to have wrong channel number - * Check if channel is valided before record ing BSS channel - * - * 04 14 2011 cm.chang - * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency - * . - * - * 04 12 2011 cm.chang - * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency - * . - * - * 03 29 2011 cm.chang - * [WCXRP00000606] [MT6620 Wi-Fi][Driver][FW] Fix klocwork warning - * As CR title - * - * 01 24 2011 cm.chang - * [WCXRP00000384] [MT6620 Wi-Fi][Driver][FW] Handle 20/40 action frame in AP mode - * and stop ampdu timer when sta_rec is freed - * Process received 20/40 coexistence action frame for AP mode - * - * 12 13 2010 cp.wu - * [WCXRP00000260] [MT6620 Wi-Fi][Driver][Firmware] Create V1.1 branch for both firmware and driver - * create branch for Wi-Fi driver v1.1 - * - * 12 07 2010 cm.chang - * [WCXRP00000239] MT6620 Wi-Fi][Driver][FW] Merge concurrent branch back to maintrunk - * 1. BSSINFO include RLM parameter - * 2. free all sta records when network is disconnected - * - * 12 07 2010 cm.chang - * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant - * 1. Country code is from NVRAM or supplicant - * 2. Change band definition in CMD/EVENT. - * - * 10 15 2010 cm.chang - * [WCXRP00000094] [MT6620 Wi-Fi][Driver] Connect to 2.4GHz AP, Driver crash. - * Add exception handle when no mgmt buffer in free build - * - * 10 08 2010 cm.chang - * NULL - * When 20M only setting, ignore OBSS IE - * - * 09 16 2010 cm.chang - * NULL - * Change conditional compiling options for BOW - * - * 09 10 2010 cm.chang - * NULL - * Always update Beacon content if FW sync OBSS info - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 24 2010 cm.chang - * NULL - * Support RLM initail channel of Ad-hoc, P2P and BOW - * - * 08 23 2010 cp.wu - * NULL - * revise constant definitions to be matched with implementation (original cmd-event definition is deprecated) - * - * 08 23 2010 chinghwa.yu - * NULL - * Temporary add rlmUpdateParamByStaForBow() and rlmBssInitForBow(). - * - * 08 23 2010 chinghwa.yu - * NULL - * Add CFG_ENABLE_BT_OVER_WIFI. - * - * 08 23 2010 chinghwa.yu - * NULL - * Update for BOW. - * - * 08 20 2010 cm.chang - * NULL - * Migrate RLM code to host from FW - * - * 08 02 2010 yuche.tsai - * NULL - * P2P Group Negotiation Code Check in. - * - * 07 26 2010 yuche.tsai - * - * Fix compile error while enabling WiFi Direct function. - * - * 07 21 2010 yuche.tsai - * - * Add P2P Scan & Scan Result Parsing & Saving. - * - * 07 19 2010 cm.chang - * - * Set RLM parameters and enable CNM channel manager - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * take use of RLM module for parsing/generating HT IEs for 11n capability - * - * 07 08 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Check draft RLM code for HT cap - * - * 06 05 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Fix channel ID definition in RFB status to primary channel instead of center channel - * - * 06 02 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Add TX short GI compiling option - * - * 06 02 2010 chinghwa.yu - * [BORA00000563]Add WiFi CoEx BCM module - * Roll back to remove CFG_SUPPORT_BCM_TEST. - * - * 06 01 2010 chinghwa.yu - * [BORA00000563]Add WiFi CoEx BCM module - * Update BCM Test and RW configuration. - * - * 05 31 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Add some compiling options to control 11n functions - * - * 05 28 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Set RTS threshold of 2K bytes initially - * - * 05 18 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Ad-hoc Beacon should not carry HT OP and OBSS IEs - * - * 05 07 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Process 20/40 coexistence public action frame in AP mode - * - * 05 05 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * First draft support for 20/40M bandwidth for AP mode - * - * 04 24 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * g_aprBssInfo[] depends on CFG_SUPPORT_P2P and CFG_SUPPORT_BOW - * - * 04 22 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * First draft code to support protection in AP mode - * - * 04 13 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Utilize status of swRfb to know channel number and band - * - * 04 07 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Different invoking order for WTBL entry of associated AP - * - * 04 07 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Add virtual test for OBSS scan - * - * 04 02 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Process Beacon only ready for infra STA now - * - * 03 30 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Support 2.4G OBSS scan - * - * 03 24 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Not carry HT cap when being associated with b/g only AP - * - * 03 24 2010 wh.su - * [BORA00000605][WIFISYS] Phase3 Integration - * fixed some WHQL testing error. - * - * 03 15 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Provide draft measurement and quiet functions - * - * 03 09 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * If bss is not 11n network, zero WTBL HT parameters - * - * 03 03 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * To support CFG_SUPPORT_BCM_STP - * - * 03 02 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Generate HT IE only depending on own phyTypeSet - * - * 03 02 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Not fill HT related IE if BssInfo does not include 11n phySet - * - * 03 01 2010 tehuang.liu - * [BORA00000569][WIFISYS] Phase 2 Integration Test - * To store field AMPDU Parameters in STA_REC - * - * 02 26 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Enable RDG RX, but disable RDG TX for IOT and LongNAV - * - * 02 12 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Use bss info array for concurrent handle - * - * 02 05 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add AAA Module Support, Revise Net Type to Net Type Index for array lookup - * - * 01 22 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Support protection and bandwidth switch - * - * 01 07 2010 kevin.huang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Modify the parameter of rlmRecAssocRspHtInfo function - * - * 12 18 2009 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * . - * - * Dec 12 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Fix prBssInfo->ucPrimaryChannel handle for assoc resp - * - * Dec 9 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add some function to process HT operation - * - * Nov 28 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Call rlmStatisticsInit() to handle MIB counters - * - * Nov 18 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * - * -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/rlm_domain.c b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/rlm_domain.c index 5e127488ea49..cbce361998ee 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/rlm_domain.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/rlm_domain.c @@ -1,90 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/mgmt/rlm_domain.c#1 -*/ - -/*! \file "rlm_domain.c" - \brief - -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: rlm_domain.c - * - * 11 10 2011 cm.chang - * NULL - * Modify debug message for XLOG - * - * 09 29 2011 cm.chang - * NULL - * Change the function prototype of rlmDomainGetChnlList() - * - * 09 23 2011 cm.chang - * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code - * Let channel number to zero if band is illegal - * - * 09 22 2011 cm.chang - * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code - * Exclude channel list with illegal band - * - * 09 15 2011 cm.chang - * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code - * Use defined country group to have a change to add new group - * - * 09 08 2011 cm.chang - * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code - * Use new fields ucChannelListMap and ucChannelListIndex in NVRAM - * - * 08 31 2011 cm.chang - * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code - * . - * - * 06 01 2011 cm.chang - * [WCXRP00000756] [MT6620 Wi-Fi][Driver] 1. AIS follow channel of BOW 2. Provide legal channel function - * Provide legal channel function based on domain - * - * 03 19 2011 yuche.tsai - * [WCXRP00000584] [Volunteer Patch][MT6620][Driver] Add beacon timeout support for WiFi Direct. - * Add beacon timeout support for WiFi Direct Network. - * - * 03 02 2011 terry.wu - * [WCXRP00000505] [MT6620 Wi-Fi][Driver/FW] WiFi Direct Integration - * Export rlmDomainGetDomainInfo for p2p driver. - * - * 01 12 2011 cm.chang - * [WCXRP00000354] [MT6620 Wi-Fi][Driver][FW] Follow NVRAM bandwidth setting - * User-defined bandwidth is for 2.4G and 5G individually - * - * 12 07 2010 cm.chang - * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant - * 1. Country code is from NVRAM or supplicant - * 2. Change band definition in CMD/EVENT. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 08 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Check draft RLM code for HT cap - * - * 03 25 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Filter out not supported RF freq when reporting available chnl list - * - * 01 22 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Support protection and bandwidth switch - * - * 01 13 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Provide query function about full channel list. - * - * Dec 1 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * - * -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/scan.c b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/scan.c index dab442013ecc..5513f3af4fb7 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/scan.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/scan.c @@ -1,665 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/mgmt/scan.c#3 -*/ - -/*! \file "scan.c" - \brief This file defines the scan profile and the processing function of - scan result for SCAN Module. - - The SCAN Profile selection is part of SCAN MODULE and responsible for defining - SCAN Parameters - e.g. MIN_CHANNEL_TIME, number of scan channels. - In this file we also define the process of SCAN Result including adding, searching - and removing SCAN record from the list. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: scan.c -** -** 01 30 2013 yuche.tsai -** [ALPS00451578] [JB2][WFD][Case Fail][JE][MR1]?????????[Java (JE),660,-1361051648,99, -** /data/core/,0,system_server_crash,system_server]JE happens when try to connect WFD.(4/5) -** Fix possible old scan result indicate to supplicant after formation. -** -** 01 16 2013 yuche.tsai -** [ALPS00431980] [WFD]Aupus one ?play game 10 minitues?wfd connection automaticlly disconnect -** Fix possible FW assert issue. - * - * 07 17 2012 yuche.tsai - * NULL - * Let netdev bring up. - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 06 25 2012 cp.wu - * [WCXRP00001258] [MT6620][MT5931][MT6628][Driver] Do not use stale scan result for deciding connection target - * drop off scan result which is older than 5 seconds when choosing which BSS to join - * - * 03 02 2012 terry.wu - * NULL - * Sync CFG80211 modification from branch 2,2. - * - * 01 16 2012 cp.wu - * [WCXRP00001169] [MT6620 Wi-Fi][Driver] API and behavior modification for preferred band - * configuration with corresponding network configuration - * correct typo. - * - * 01 16 2012 cp.wu - * [MT6620 Wi-Fi][Driver] API and behavior modification for preferred band configuration - * with corresponding network configuration - * add wlanSetPreferBandByNetwork() for glue layer to invoke for setting preferred - * band configuration corresponding to network type. - * - * 12 05 2011 cp.wu - * [WCXRP00001131] [MT6620 Wi-Fi][Driver][AIS] Implement connect-by-BSSID path - * add CONNECT_BY_BSSID policy - * - * 11 23 2011 cp.wu - * [WCXRP00001123] [MT6620 Wi-Fi][Driver] Add option to disable beacon content change detection - * add compile option to disable beacon content change detection. - * - * 11 04 2011 cp.wu - * [WCXRP00001085] [MT6628 Wi-Fi][Driver] deprecate old BSS-DESC if timestamp - * is reset with received beacon/probe response frames - * deprecate old BSS-DESC when timestamp in received beacon/probe response frames showed a smaller value than before - * - * 10 11 2011 cm.chang - * [WCXRP00001031] [All Wi-Fi][Driver] Check HT IE length to avoid wrong SCO parameter - * Ignore HT OP IE if its length field is not valid - * - * 09 30 2011 cp.wu - * [WCXRP00001021] [MT5931][Driver] Correct scan result generation for conversion between BSS type and operation mode - * correct type casting issue. - * - * 08 23 2011 yuche.tsai - * NULL - * Fix multicast address list issue. - * - * 08 11 2011 cp.wu - * [WCXRP00000830] [MT6620 Wi-Fi][Firmware] Use MDRDY counter to detect empty channel for shortening scan time - * sparse channel detection: - * driver: collect sparse channel information with scan-done event - * - * 08 10 2011 cp.wu - * [WCXRP00000922] [MT6620 Wi-Fi][Driver] traverse whole BSS-DESC list for removing - * traverse whole BSS-DESC list because BSSID is not unique anymore. - * - * 07 12 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple - * SSID settings to work around some tricky AP which use space character as hidden SSID - * for multiple BSS descriptior detecting issue: - * 1) check BSSID for infrastructure network - * 2) check SSID for AdHoc network - * - * 07 12 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple - * SSID settings to work around some tricky AP which use space character as hidden SSID - * check for BSSID for beacons used to update DTIM - * - * 07 12 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple - * SSID settings to work around some tricky AP which use space character as hidden SSID - * do not check BSS descriptor for connected flag due to linksys's hidden - * SSID will use another BSS descriptor and never connected - * - * 07 11 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple - * SSID settings to work around some tricky AP which use space character as hidden SSID - * just pass beacons with the same BSSID. - * - * 07 11 2011 wh.su - * [WCXRP00000849] [MT6620 Wi-Fi][Driver] Remove some of the WAPI define - * for make sure the value is initialize, for customer not enable WAPI - * For make sure wapi initial value is set. - * - * 06 28 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple - * SSID settings to work around some tricky AP which use space character as hidden SSID - * Do not check for SSID as beacon content change due to the existence of - * single BSSID with multiple SSID AP configuration - * - * 06 27 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple - * SSID settings to work around some tricky AP which use space character as hidden SSID - * 1. correct logic - * 2. replace only BSS-DESC which doesn't have a valid SSID. - * - * 06 27 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple SSID - * settings to work around some tricky AP which use space character as hidden SSID - * remove unused temporal variable reference. - * - * 06 27 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple SSID - * settings to work around some tricky AP which use space character as hidden SSID - * allow to have a single BSSID with multiple SSID to be presented in scanning result - * - * 06 02 2011 cp.wu - * [WCXRP00000757] [MT6620 Wi-Fi][Driver][SCN] take use of RLM API to filter out BSS in disallowed channels - * filter out BSS in disallowed channel by - * 1. do not add to scan result array if BSS is at disallowed channel - * 2. do not allow to search for BSS-DESC in disallowed channels - * - * 05 02 2011 cm.chang - * [WCXRP00000691] [MT6620 Wi-Fi][Driver] Workaround about AP's wrong HT capability IE to have wrong channel number - * Refine range of valid channel number - * - * 05 02 2011 cp.wu - * [MT6620 Wi-Fi][Driver] Take parsed result for channel information instead of - * hardware channel number passed from firmware domain - * take parsed result for generating scanning result with channel information. - * - * 05 02 2011 cm.chang - * [WCXRP00000691] [MT6620 Wi-Fi][Driver] Workaround about AP's wrong HT capability IE to have wrong channel number - * Check if channel is valided before record ing BSS channel - * - * 04 18 2011 terry.wu - * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED - * Remove flag CFG_WIFI_DIRECT_MOVED. - * - * 04 14 2011 cm.chang - * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency - * . - * - * 04 12 2011 eddie.chen - * [WCXRP00000617] [MT6620 Wi-Fi][DRV/FW] Fix for sigma - * Fix the sta index in processing security frame - * Simple flow control for TC4 to avoid mgt frames for PS STA to occupy the TC4 - * Add debug message. - * - * 03 25 2011 yuche.tsai - * NULL - * Always update Bss Type, for Bss Type for P2P Network is changing every time. - * - * 03 23 2011 yuche.tsai - * NULL - * Fix concurrent issue when AIS scan result would overwrite p2p scan result. - * - * 03 14 2011 cp.wu - * [WCXRP00000535] [MT6620 Wi-Fi][Driver] Fixed channel operation when AIS and Tethering are operating concurrently - * filtering out other BSS coming from adjacent channels - * - * 03 11 2011 chinglan.wang - * [WCXRP00000537] [MT6620 Wi-Fi][Driver] Can not connect to 802.11b/g/n mixed AP with WEP security. - * . - * - * 03 11 2011 cp.wu - * [WCXRP00000535] [MT6620 Wi-Fi][Driver] Fixed channel operation when AIS and Tethering are operating concurrently - * When fixed channel operation is necessary, AIS-FSM would scan and only connect for BSS on the specific channel - * - * 02 24 2011 cp.wu - * [WCXRP00000490] [MT6620 Wi-Fi][Driver][Win32] modify kalMsleep() implementation because NdisMSleep() - * won't sleep long enough for specified interval such as 500ms - * implement beacon change detection by checking SSID and supported rate. - * - * 02 22 2011 yuche.tsai - * [WCXRP00000480] [Volunteer Patch][MT6620][Driver] WCS IE format issue - * Fix WSC big endian issue. - * - * 02 21 2011 terry.wu - * [WCXRP00000476] [MT6620 Wi-Fi][Driver] Clean P2P scan list while removing P2P - * Clean P2P scan list while removing P2P. - * - * 01 27 2011 yuche.tsai - * [WCXRP00000399] [Volunteer Patch][MT6620/MT5931][Driver] Fix scan side effect after P2P module separate. - * Fix scan channel extension issue when p2p module is not registered. - * - * 01 26 2011 cm.chang - * [WCXRP00000395] [MT6620 Wi-Fi][Driver][FW] Search STA_REC with additional net type index argument - * . - * - * 01 21 2011 cp.wu - * [WCXRP00000380] [MT6620 Wi-Fi][Driver] SSID information should come from buffered - * BSS_DESC_T rather than using beacon-carried information - * SSID should come from buffered prBssDesc rather than beacon-carried information - * - * 01 14 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Fix compile error. - * - * 01 14 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Memfree for P2P Descriptor & P2P Descriptor List. - * - * 01 14 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * Free P2P Descriptor List & Descriptor under BSS Descriptor. - * - * 01 04 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc - * and vmalloc implementations to ease physically continuous memory demands - * 1) correct typo in scan.c - * 2) TX descriptors, RX descriptos and management buffer should use virtually - * continuous buffer instead of physically continuous one - * - * 01 04 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc - * and vmalloc implementations to ease physically continuous memory demands - * separate kalMemAlloc() into virtually-continuous and physically-continuous type to ease slab system pressure - * - * 12 31 2010 cp.wu - * [WCXRP00000327] [MT6620 Wi-Fi][Driver] Improve HEC WHQA 6972 workaround coverage in driver side - * while being unloaded, clear all pending interrupt then set LP-own to firmware - * - * 12 21 2010 cp.wu - * [WCXRP00000280] [MT6620 Wi-Fi][Driver] Enable BSS selection with best RCPI policy in SCN module - * SCN: enable BEST RSSI selection policy support - * - * 11 29 2010 cp.wu - * [WCXRP00000210] [MT6620 Wi-Fi][Driver][FW] Set RCPI value in STA_REC - * for initial TX rate selection of auto-rate algorithm - * update ucRcpi of STA_RECORD_T for AIS when - * 1) Beacons for IBSS merge is received - * 2) Associate Response for a connecting peer is received - * - * 11 03 2010 wh.su - * [WCXRP00000124] [MT6620 Wi-Fi] [Driver] Support the dissolve P2P Group - * Refine the HT rate disallow TKIP pairwise cipher . - * - * 10 12 2010 cp.wu - * [WCXRP00000091] [MT6620 Wi-Fi][Driver] Add scanning logic to filter out - * beacons which is received on the folding frequency - * trust HT IE if available for 5GHz band - * - * 10 11 2010 cp.wu - * [WCXRP00000091] [MT6620 Wi-Fi][Driver] Add scanning logic to filter out - * beacons which is received on the folding frequency - * add timing and strenght constraint for filtering out beacons with same SSID/TA but received on different channels - * - * 10 08 2010 wh.su - * [WCXRP00000085] [MT6620 Wif-Fi] [Driver] update the modified p2p state machine - * update the frog's new p2p state machine. - * - * 10 01 2010 yuche.tsai - * NULL - * [MT6620 P2P] Fix Big Endian Issue when parse P2P device name TLV. - * - * 09 24 2010 cp.wu - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * eliminate unused variables which lead gcc to argue - * - * 09 08 2010 cp.wu - * NULL - * use static memory pool for storing IEs of scanning result. - * - * 09 07 2010 yuche.tsai - * NULL - * When indicate scan result, append IE buffer information in the scan result. - * - * 09 03 2010 yuche.tsai - * NULL - * 1. Update Beacon RX count when running SLT. - * 2. Ignore Beacon when running SLT, would not update information from Beacon. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 31 2010 kevin.huang - * NULL - * Use LINK LIST operation to process SCAN result - * - * 08 29 2010 yuche.tsai - * NULL - * 1. Fix P2P Descriptor List to be a link list, to avoid link corrupt after Bss Descriptor Free. - * 2.. Fix P2P Device Name Length BE issue. - * - * 08 23 2010 yuche.tsai - * NULL - * Add P2P Device Found Indication to supplicant - * - * 08 20 2010 cp.wu - * NULL - * reset BSS_DESC_T variables before parsing IE due to peer might have been reconfigured. - * - * 08 20 2010 yuche.tsai - * NULL - * Workaround for P2P Descriptor Infinite loop issue. - * - * 08 16 2010 cp.wu - * NULL - * Replace CFG_SUPPORT_BOW by CFG_ENABLE_BT_OVER_WIFI. - * There is no CFG_SUPPORT_BOW in driver domain source. - * - * 08 16 2010 yuche.tsai - * NULL - * Modify code of processing Probe Resonse frame for P2P. - * - * 08 12 2010 yuche.tsai - * NULL - * Add function to get P2P descriptor of BSS descriptor directly. - * - * 08 11 2010 yuche.tsai - * NULL - * Modify Scan result processing for P2P module. - * - * 08 05 2010 yuche.tsai - * NULL - * Update P2P Device Discovery result add function. - * - * 08 03 2010 cp.wu - * NULL - * surpress compilation warning. - * - * 07 26 2010 yuche.tsai - * - * Add support for Probe Request & Response parsing. - * - * 07 21 2010 cp.wu - * - * 1) change BG_SCAN to ONLINE_SCAN for consistent term - * 2) only clear scanning result when scan is permitted to do - * - * 07 21 2010 yuche.tsai - * - * Fix compile error for SCAN module while disabling P2P feature. - * - * 07 21 2010 yuche.tsai - * - * Add P2P Scan & Scan Result Parsing & Saving. - * - * 07 19 2010 wh.su - * - * update for security supporting. - * - * 07 19 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * Add Ad-Hoc support to AIS-FSM - * - * 07 19 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * SCN module is now able to handle multiple concurrent scanning requests - * - * 07 15 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * driver no longer generates probe request frames - * - * 07 14 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * remove timer in DRV-SCN. - * - * 07 09 2010 cp.wu - * - * 1) separate AIS_FSM state for two kinds of scanning. (OID triggered scan, and scan-for-connection) - * 2) eliminate PRE_BSS_DESC_T, Beacon/PrebResp is now parsed in single pass - * 3) implment DRV-SCN module, currently only accepts single scan request, - * other request will be directly dropped by returning BUSY - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * take use of RLM module for parsing/generating HT IEs for 11n capability - * - * 07 05 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) ignore RSN checking when RSN is not turned on. - * 2) set STA-REC deactivation callback as NULL - * 3) add variable initialization API based on PHY configuration - * - * 07 05 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * correct BSS_DESC_T initialization after allocated. - * - * 07 02 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) for event packet, no need to fill RFB. - * 2) when wlanAdapterStart() failed, no need to initialize state machines - * 3) after Beacon/ProbeResp parsing, corresponding BSS_DESC_T should be marked as IE-parsed - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add scan uninitialization procedure - * - * 06 30 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * if beacon/probe-resp is received in 2.4GHz bands and there is ELEM_ID_DS_PARAM_SET IE available, - * trust IE instead of RMAC information - * - * 06 29 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) sync to. CMD/EVENT document v0.03 - * 2) simplify DTIM period parsing in scan.c only, bss.c no longer parses it again. - * 3) send command packet to indicate FW-PM after - * a) 1st beacon is received after AIS has connected to an AP - * b) IBSS-ALONE has been created - * c) IBSS-MERGE has occurred - * - * 06 28 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * send MMPDU in basic rate. - * - * 06 25 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * modify Beacon/ProbeResp to complete parsing, - * because host software has looser memory usage restriction - * - * 06 23 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * integrate . - * - * 06 22 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * comment out RLM APIs by CFG_RLM_MIGRATION. - * - * 06 21 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * Update P2P Function call. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * RSN/PRIVACY compilation flag awareness correction - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * specify correct value for management frames. - * - * 06 18 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf - * - * 06 18 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * migration from MT6620 firmware. - * - * 06 17 2010 yuche.tsai - * [WPD00003839][MT6620 5931][P2P] Feature migration - * Fix compile error when enable P2P function. - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * correct when ADHOC support is turned on. - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add scan.c. - * - * 06 04 2010 george.huang - * [BORA00000678][MT6620]WiFi LP integration - * [PM] Support U-APSD for STA mode - * - * 05 28 2010 wh.su - * [BORA00000680][MT6620] Support the statistic for Micxxsoft os query - * adding the TKIP disallow join a HT AP code. - * - * 05 14 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Add more chance of JOIN retry for BG_SCAN - * - * 05 12 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Add Power Management - Legacy PS-POLL support. - * - * 04 29 2010 wh.su - * [BORA00000637][MT6620 Wi-Fi] [Bug] WPA2 pre-authentication timer not correctly initialize - * adjsut the pre-authentication code. - * - * 04 27 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Add Set Slot Time and Beacon Timeout Support for AdHoc Mode - * - * 04 24 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * g_aprBssInfo[] depends on CFG_SUPPORT_P2P and CFG_SUPPORT_BOW - * - * 04 19 2010 kevin.huang - * [BORA00000714][WIFISYS][New Feature]Beacon Timeout Support - * Add Beacon Timeout Support and will send Null frame to diagnose connection - * - * 04 13 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Add new HW CH macro support - * - * 04 06 2010 wh.su - * [BORA00000680][MT6620] Support the statistic for Micxxsoft os query - * fixed the firmware return the broadcast frame at wrong tc. - * - * 03 29 2010 wh.su - * [BORA00000605][WIFISYS] Phase3 Integration - * let the rsn wapi IE always parsing. - * - * 03 24 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Not carry HT cap when being associated with b/g only AP - * - * 03 18 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Solve the compile warning for 'return non-void' function - * - * 03 16 2010 kevin.huang - * [BORA00000663][WIFISYS][New Feature] AdHoc Mode Support - * Add AdHoc Mode - * - * 03 10 2010 kevin.huang - * [BORA00000654][WIFISYS][New Feature] CNM Module - Ch Manager Support - * - * * * * * * * * * * * * * * * * Add Channel Manager for arbitration of JOIN and SCAN Req - * - * 03 03 2010 wh.su - * [BORA00000637][MT6620 Wi-Fi] [Bug] WPA2 pre-authentication timer not correctly initialize - * move the AIS specific variable for security to AIS specific structure. - * - * 03 01 2010 wh.su - * [BORA00000605][WIFISYS] Phase3 Integration - * Refine the variable and parameter for security. - * - * 02 26 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Fix No PKT_INFO_T issue - * - * 02 26 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Update outgoing ProbeRequest Frame's TX data rate - * - * 02 23 2010 wh.su - * [BORA00000592][MT6620 Wi-Fi] Adding the security related code for driver - * refine the scan procedure, reduce the WPA and WAPI IE parsing, and move the parsing to the time for join. - * - * 02 23 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add support scan channel 1~14 and update scan result's frequency infou1rwduu`wvpghlqg|n`slk+mpdkb - * - * 02 04 2010 kevin.huang - * [BORA00000603][WIFISYS] [New Feature] AAA Module Support - * Add AAA Module Support, Revise Net Type to Net Type Index for array lookup - * - * 01 27 2010 wh.su - * [BORA00000476][Wi-Fi][firmware] Add the security module initialize code - * add and fixed some security function. - * - * 01 22 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Support protection and bandwidth switch - * - * 01 20 2010 kevin.huang - * [BORA00000569][WIFISYS] Phase 2 Integration Test - * Add PHASE_2_INTEGRATION_WORK_AROUND and CFG_SUPPORT_BCM flags - * - * 01 11 2010 kevin.huang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * Add Deauth and Disassoc Handler - * - * 01 08 2010 kevin.huang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * - * Refine Beacon processing, add read RF channel from RX Status - * - * 01 04 2010 tehuang.liu - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * For working out the first connection Chariot-verified version - * - * 12 18 2009 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * . - * - * Dec 12 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Modify u2EstimatedExtraIELen for probe request - * - * Dec 9 2009 mtk01104 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add HT cap IE to probe request - * - * Dec 7 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Fix lint warning - * - * - * Dec 3 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Update the process of SCAN Result by adding more Phy Attributes - * - * Dec 1 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * adjust the function and code for meet the new define - * - * Nov 30 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Rename u4RSSI to i4RSSI - * - * Nov 30 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Report event of scan result to host - * - * Nov 26 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Fix SCAN Record update - * - * Nov 24 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Revise MGMT Handler with Retain Status and Integrate with TXM - * - * Nov 23 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add (Ext)Support Rate Set IE to ProbeReq - * - * Nov 20 2009 mtk02468 - * [BORA00000337] To check in codes for FPGA emulation - * Removed the use of SW_RFB->u2FrameLength - * - * Nov 20 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Fix uninitial aucMacAddress[] for ProbeReq - * - * Nov 16 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add scanSearchBssDescByPolicy() - * - * Nov 5 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * Add Send Probe Request Frame - * - * Oct 30 2009 mtk01461 - * [BORA00000018] Integrate WIFI part into BORA for the 1st time - * -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/sec_fsm.c b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/sec_fsm.c index 29eb8d4e7d92..853fb4d709c1 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/sec_fsm.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/sec_fsm.c @@ -1,151 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/mgmt/sec_fsm.c#1 -*/ - -/*! \file "sec_fsm.c" - \brief This is the file implement security check state machine. - - In security module, do the port control check after success join to an AP, - and the path to NORMAL TR, the state machine handle these state transition. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: sec_fsm.c - * - * 11 24 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * Adjust code for DBG and CONFIG_XLOG. - * - * 11 11 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * modify the xlog related code. - * - * 11 10 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * change the debug module level. - * - * 11 02 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * adding the code for XLOG. - * - * 03 29 2011 wh.su - * [WCXRP00000248] [MT6620 Wi-Fi][FW]Fixed the Klockwork error - * fixed the kclocwork error. - * - * 01 26 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * . - * - * 01 25 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Fix Compile Error when DBG is disabled. - * - * 01 25 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Change Station Type in Station Record, Modify MACRO definition for getting station type & network type index & Role. - * - * 09 29 2010 wh.su - * [WCXRP00000072] [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue - * [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue. - * - * 09 24 2010 wh.su - * NULL - * [WCXRP00005002][MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 20 2010 wh.su - * NULL - * adding the eapol callback setting. - * - * 08 19 2010 wh.su - * NULL - * adding the tx pkt call back handle for countermeasure. - * - * 07 19 2010 wh.su - * - * fixed the compilng error at debug mode. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 21 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * modify some code for concurrent network. - * - * 06 19 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * consdier the concurrent network setting. - * - * 05 28 2010 wh.su - * [BORA00000626][MT6620] Refine the remove key flow for WHQL testing - * fixed the ad-hoc wpa-none send non-encrypted frame issue. - * - * 05 24 2010 kevin.huang - * [BORA00000794][WIFISYS][New Feature]Power Management Support - * Refine authSendAuthFrame() for NULL STA_RECORD_T case and minimum deauth interval. - * - * 04 24 2010 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * g_aprBssInfo[] depends on CFG_SUPPORT_P2P and CFG_SUPPORT_BOW - * - * 04 13 2010 wh.su - * [BORA00000680][MT6620] Support the statistic for Micxxsoft os query - * fixed the Klocwork error and refine the class error message. - * - * 03 03 2010 wh.su - * [BORA00000637][MT6620 Wi-Fi] [Bug] WPA2 pre-authentication timer not correctly initialize - * move the AIS specific variable for security to AIS specific structure. - * - * 03 03 2010 wh.su - * [BORA00000637][MT6620 Wi-Fi] [Bug] WPA2 pre-authentication timer not correctly initialize - * Fixed the pre-authentication timer not correctly init issue, - * and modify the security related callback function prototype. - * - * 03 01 2010 wh.su - * [BORA00000605][WIFISYS] Phase3 Integration - * Refine the variable and parameter for security. - * - * 01 27 2010 wh.su - * [BORA00000476][Wi-Fi][firmware] Add the security module initialize code - * add and fixed some security function. - * - * 01 13 2010 wh.su - * [BORA00000476][Wi-Fi][firmware] Add the security module initialize code - * fixed the compiling warning - * - * 12 18 2009 cm.chang - * [BORA00000018]Integrate WIFI part into BORA for the 1st time - * . - * - * Dec 7 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * refine some code - * - * Dec 4 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * refine the code - * - * Dec 1 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * code refine - * - * Nov 23 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * adjust the function name - * - * Nov 19 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * adjust the state machine, to meet the firmware security design v1.1 - * - * Nov 18 2009 mtk01088 - * [BORA00000476] [Wi-Fi][firmware] Add the security module initialize code - * -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/tdls.c b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/tdls.c index 743247d22979..05b9019a167b 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/tdls.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/mgmt/tdls.c @@ -1,18 +1,16 @@ -/* -** Id: tdls.c#1 -*/ - -/*! \file tdls.c - \brief This file includes IEEE802.11z TDLS support. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: tdls.c - * - * 11 13 2013 vend_samp.lin - * NULL - * Initial version. - */ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic.c b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic.c index dfaaedd118bf..9787454bb5bb 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic.c @@ -1,629 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/nic/nic.c#2 -*/ - -/*! \file nic.c - \brief Functions that provide operation in NIC's (Network Interface Card) point of view. - - This file includes functions which unite multiple hal(Hardware) operations - and also take the responsibility of Software Resource Management in order - to keep the synchronization with Hardware Manipulation. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: nic.c - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 05 02 2012 terry.wu - * NULL - * Set the default value of AP StaRec index to "STA_REC_INDEX_NOT_FOUND" in update firmware bss command. - * - * 03 02 2012 terry.wu - * NULL - * Sync CFG80211 modification from branch 2,2. - * - * 11 28 2011 cp.wu - * [WCXRP00001125] [MT6620 Wi-Fi][Firmware] Strengthen Wi-Fi power off sequence to have a clearroom environment when - * returining to ROM code - * 1. Due to firmware now stops HIF DMA for powering off, do not try to receive any packet from firmware - * 2. Take use of prAdapter->fgIsEnterD3ReqIssued for tracking whether it is powering off or not - * - * 11 22 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * keep debug counter setting after wake up. - * - * 11 19 2011 yuche.tsai - * NULL - * Update RSSI for P2P. - * - * 11 18 2011 yuche.tsai - * NULL - * CONFIG P2P support RSSI query, default turned off. - * - * 11 07 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * add debug counters and periodically dump counters for debugging. - * - * 11 04 2011 cp.wu - * [WCXRP00001079] [MT5931][Driver] Release pending MMPDU only when BSS is being deactivated - * pre-check for NULL before calling MMPDU free function - * - * 11 03 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * change the DBGLOG for "\n" and "\r\n". LABEL to LOUD for XLOG - * - * 11 01 2011 chinglan.wang - * NULL - * Modify the Wi-Fi method of the flush TX queue when disconnect the AP. - * If disconnect the AP and flush all the data frame in the TX queue, WPS cannot do the 4-way handshake to connect to - * the AP.. - * - * 10 11 2011 terry.wu - * NULL - * Rewrite Assert Dump Function for Portability. - * - * 09 20 2011 cm.chang - * [WCXRP00000997] [MT6620 Wi-Fi][Driver][FW] Handle change of BSS preamble type and slot time - * New CMD definition about RLM parameters - * - * 08 15 2011 cp.wu - * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree - * reuse firmware download logic of MT6620 for MT6628. - * - * 08 03 2011 terry.wu - * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode - * Reply Probe Rsp in FW for Hotspot Mode. - * - * - * - * 08 03 2011 terry.wu - * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode - * Reply Probe Rsp in FW for Hotspot Mode. - * - * - * 08 03 2011 terry.wu - * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode - * Reply Probe Rsp in FW for Hotspot Mode. - * - * 08 03 2011 terry.wu - * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode - * Reply Probe Rsp in FW for Hotspot Mode. - * - * 08 02 2011 yuche.tsai - * [WCXRP00000896] [Volunteer Patch][WiFi Direct][Driver] GO with multiple client, TX deauth to a disconnecting device - * issue. - * Fix GO send deauth frame issue. - * - * 07 18 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Add CMD/Event for RDD and BWCS. - * - * 07 11 2011 wh.su - * [WCXRP00000849] [MT6620 Wi-Fi][Driver] Remove some of the WAPI define for make sure the value is initialize, for - * customer not enable WAPI - * For make sure wapi initial value is set. - * - * 06 27 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple SSID settings to work around some tricky - * AP which use space character as hidden SSID - * 1. correct logic - * 2. replace only BSS-DESC which doesn't have a valid SSID. - * - * 06 27 2011 cp.wu - * [WCXRP00000815] [MT6620 Wi-Fi][Driver] allow single BSSID with multiple SSID settings to work around some tricky - * AP which use space character as hidden SSID - * allow to have a single BSSID with multiple SSID to be presented in scanning result - * - * 05 12 2011 puff.wen - * NULL - * FW Assert information dump to driver - * - * 04 18 2011 terry.wu - * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED - * Remove flag CFG_WIFI_DIRECT_MOVED. - * - * 04 15 2011 cp.wu - * [WCXRP00000651] [MT6620 Wi-Fi][Driver] Refine RSSI buffering mechanism - * ROLLBACK due to the special design is to workaround incorrect initial RCPI value coming from firmware domain. - * - * 04 14 2011 cm.chang - * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency - * . - * - * 04 14 2011 cp.wu - * [WCXRP00000598] [MT6620 Wi-Fi][Driver] Implementation of interface for communicating with user space process for - * RESET_START and RESET_END events - * 1. add code to put whole-chip resetting trigger when abnormal firmware assertion is detected - * 2. add dummy function for both Win32 and Linux part. - * - * 04 12 2011 cp.wu - * [WCXRP00000635] [MT6620 Wi-Fi][Driver] Clear pending security frames when QM clear pending data frames for - * dedicated network type - * clear pending security frames for dedicated network type when BSS is being deactivated/disconnected - * - * 04 12 2011 wh.su - * NULL - * enable the p2p check the cipher to set the bssInfo auth mode. - * - * 04 12 2011 wh.su - * NULL - * prepare the code for sync the auth mode and encryption status for P2P and BOW. - * - * 04 11 2011 yuche.tsai - * [WCXRP00000627] [Volunteer Patch][MT6620][Driver] Pending MMPUD of P2P Network may crash system issue. - * Fix kernel panic issue when MMPDU of P2P is pending in driver. - * - * 04 10 2011 george.huang - * [WCXRP00000621] [MT6620 Wi-Fi][Driver] Support P2P supplicant to set power mode - * Fix compiler issue. - * - * 04 08 2011 george.huang - * [WCXRP00000621] [MT6620 Wi-Fi][Driver] Support P2P supplicant to set power mode - * separate settings of P2P and AIS - * - * 04 08 2011 eddie.chen - * [WCXRP00000617] [MT6620 Wi-Fi][DRV/FW] Fix for sigma - * Fix for sigma - * - * 04 07 2011 cp.wu - * [WCXRP00000616] [MT6620 Wi-Fi][Driver] Free memory to pool and kernel in case any unexpected failure happend inside - * wlanAdapterStart - * . - * - * 04 07 2011 cp.wu - * [WCXRP00000616] [MT6620 Wi-Fi][Driver] Free memory to pool and kernel in case any unexpected failure happend inside - * wlanAdapterStart - * implementation of internal error handling of nicAllocateAdapterMemory. - * - * 03 31 2011 chinglan.wang - * [WCXRP00000613] [MT6620 Wi-Fi] [FW] [Driver] BssInfo can get the security mode which is WPA/WPA2/WAPI or not. - * . - * - * 03 21 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * portability improvement - * - * 03 17 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically continuous memory shortage - * after system running for a long period - * use pre-allocated buffer for storing enhanced interrupt response as well - * - * 03 16 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically continuous memory shortage - * after system running for a long period - * 1. pre-allocate physical continuous buffer while module is being loaded - * 2. use pre-allocated physical continuous buffer for TX/RX DMA transfer - * - * The windows part remained the same as before, but added similar APIs to hide the difference. - * - * 03 15 2011 cp.wu - * [WCXRP00000559] [MT6620 Wi-Fi][Driver] Combine TX/RX DMA buffers into a single one to reduce physically continuous - * memory consumption - * 1. deprecate CFG_HANDLE_IST_IN_SDIO_CALLBACK - * 2. Use common coalescing buffer for both TX/RX directions - * - * - * 03 10 2011 cm.chang - * [WCXRP00000358] [MT6620 Wi-Fi][Driver] Provide concurrent information for each module - * Add some functions to let AIS/Tethering or AIS/BOW be the same channel - * - * 03 07 2011 terry.wu - * [WCXRP00000521] [MT6620 Wi-Fi][Driver] Remove non-standard debug message - * Toggle non-standard debug messages to comments. - * - * 03 02 2011 cp.wu - * [WCXRP00000503] [MT6620 Wi-Fi][Driver] Take RCPI brought by association response as initial RSSI right after - * connection is built. - * use RCPI brought by ASSOC-RESP after connection is built as initial RCPI to avoid using a uninitialized MAC-RX RCPI. - * - * 02 08 2011 terry.wu - * [WCXRP00000412] [MT6620 Wi-Fi][FW/Driver] Dump firmware assert info at android kernel log - * Use kalPrint to print firmware assert info. - * - * 02 01 2011 terry.wu - * [WCXRP00000412] [MT6620 Wi-Fi][FW/Driver] Dump firmware assert info at android kernel log - * . - * - * 02 01 2011 cm.chang - * [WCXRP00000415] [MT6620 Wi-Fi][Driver] Check if any memory leakage happens when uninitializing in DGB mode - * . - * - * 01 31 2011 terry.wu - * [WCXRP00000412] [MT6620 Wi-Fi][FW/Driver] Dump firmware assert info at android kernel log - * Print firmware ASSERT info at Android kernel log, driver side - * - * 01 27 2011 tsaiyuan.hsu - * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support - * add roaming fsm - * 1. not support 11r, only use strength of signal to determine roaming. - * 2. not enable CFG_SUPPORT_ROAMING until completion of full test. - * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw - * 4. assume that change of link quality in smooth way. - * - * 01 26 2011 cm.chang - * [WCXRP00000395] [MT6620 Wi-Fi][Driver][FW] Search STA_REC with additional net type index argument - * Allocate system RAM if fixed message or mgmt buffer is not available - * - * 01 24 2011 cp.wu - * [WCXRP00000382] [MT6620 Wi-Fi][Driver] Track forwarding packet number with notifying tx thread for serving - * 1. add an extra counter for tracking pending forward frames. - * 2. notify TX service thread as well when there is pending forward frame - * 3. correct build errors leaded by introduction of Wi-Fi direct separation module - * - * 01 19 2011 cp.wu - * [WCXRP00000372] [MT6620 Wi-Fi][Driver] Check bus access failure inside nicProcessIST() - * check bus error and/or card removal when retrieving interrupt status from HAL - * - * 01 04 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc and vmalloc implementations to ease - * physically continuous memory demands - * 1) correct typo in scan.c - * 2) TX descriptors, RX descriptos and management buffer should use virtually continuous buffer instead of - * physically contineous one - * - * 01 04 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc and vmalloc implementations to ease - * physically continuous memory demands - * separate kalMemAlloc() into virtually-continuous and physically-continuous type to ease slab system pressure - * - * 12 30 2010 cp.wu - * [WCXRP00000327] [MT6620 Wi-Fi][Driver] Improve HEC WHQA 6972 workaround coverage in driver side - * host driver not to set FW-own when there is still pending interrupts - * - * 12 17 2010 cp.wu - * [WCXRP00000270] [MT6620 Wi-Fi][Driver] Clear issues after concurrent networking support has been merged - * before BSS disconnection is indicated to firmware, all correlated peer should be cleared and freed - * - * 12 07 2010 cm.chang - * [WCXRP00000239] MT6620 Wi-Fi][Driver][FW] Merge concurrent branch back to maintrunk - * 1. BSSINFO include RLM parameter - * 2. free all sta records when network is disconnected - * - * 12 02 2010 eddie.chen - * [WCXRP00000218] [MT6620 Wi-Fi][Driver] Add auto rate window control in registry - * Add more control value but dont use it now. - * - * 11 30 2010 eddie.chen - * [WCXRP00000218] [MT6620 Wi-Fi][Driver] Add auto rate window control in registry - * Add auto rate check window in registry - * - * 11 10 2010 eddie.chen - * [WCXRP00000156] [MT6620][FW] Change Auto rate window to 64 and add throughput swcr - * Use autorate parameter 1 as phy rate mask. - * - * 11 08 2010 cp.wu - * [WCXRP00000166] [MT6620 Wi-Fi][Driver] use SDIO CMD52 for enabling/disabling interrupt to reduce transaction period - * change to use CMD52 for enabling/disabling interrupt to reduce SDIO transaction time - * - * 10 26 2010 eddie.chen - * [WCXRP00000134] [MT6620 Wi-Fi][Driver] Add a registry to enable auto rate for SQA test by using E1 EVB - * Add auto rate parameter in registry. - * - * 10 18 2010 cp.wu - * [WCXRP00000053] [MT6620 Wi-Fi][Driver] Reset incomplete and might leads to - * BSOD when entering RF test with AIS associated - * 1. remove redundant variables in STA_REC structure - * 2. add STA-REC uninitialization routine for clearing pending events - * - * 10 18 2010 cp.wu - * [WCXRP00000103] [MT6620 Wi-Fi][Driver] Driver crashed when using WZC to connect to AP#B with connection with AP#A - * reset ptrs when IEs are going to be dropped - * - * 10 12 2010 cp.wu - * [WCXRP00000084] [MT6620 Wi-Fi][Driver][FW] Add fixed rate support for distance test - * add HT (802.11n) fixed rate support. - * - * 10 08 2010 cp.wu - * [WCXRP00000084] [MT6620 Wi-Fi][Driver][FW] Add fixed rate support for distance test - * adding fixed rate support for distance test. (from registry setting) - * - * 10 07 2010 cp.wu - * [WCXRP00000083] [MT5931][Driver][FW] Add necessary logic for MT5931 first connection - * add firmware download for MT5931. - * - * 10 05 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * load manufacture data when CFG_SUPPORT_NVRAM is set to 1 - * - * 10 04 2010 cp.wu - * [WCXRP00000077] [MT6620 Wi-Fi][Driver][FW] Eliminate use of ENUM_NETWORK_TYPE_T and replaced by - * ENUM_NETWORK_TYPE_INDEX_T only remove ENUM_NETWORK_TYPE_T definitions - * - * 09 21 2010 cp.wu - * [WCXRP00000053] [MT6620 Wi-Fi][Driver] Reset incomplete and might leads to BSOD when entering RF test - * with AIS associated - * Do a complete reset with STA-REC null checking for RF test re-entry - * - * 09 08 2010 cp.wu - * NULL - * use static memory pool for storing IEs of scanning result. - * - * 09 06 2010 cp.wu - * NULL - * Androi/Linux: return current operating channel information - * - * 09 01 2010 cp.wu - * NULL - * HIFSYS Clock Source Workaround - * - * 08 26 2010 yuche.tsai - * NULL - * Fix someones coding error while enable WIFI_DIRECT. - * - * 08 25 2010 george.huang - * NULL - * update OID/ registry control path for PM related settings - * - * 08 24 2010 cm.chang - * NULL - * Support RLM initail channel of Ad-hoc, P2P and BOW - * - * 08 24 2010 chinghwa.yu - * NULL - * Update BOW for the 1st time. - * - * 08 23 2010 chinghwa.yu - * NULL - * Update for BOW. - * - * 08 20 2010 yuche.tsai - * NULL - * Add state change indication. - * - * 08 16 2010 yuche.tsai - * NULL - * Add support for P2P BSS update info. - * - * 08 12 2010 cp.wu - * NULL - * [removing debugging] not to dump beacon content. - * - * 08 12 2010 cp.wu - * NULL - * [AIS-FSM] honor registry setting for adhoc running mode. (A/B/G) - * - * 08 11 2010 cp.wu - * NULL - * 1) do not use in-stack variable for beacon updating. (for MAUI porting) - * 2) extending scanning result to 64 instead of 48 - * - * 08 04 2010 yarco.yang - * NULL - * Add TX_AMPDU and ADDBA_REJECT command - * - * 08 03 2010 cp.wu - * NULL - * surpress compilation warning. - * - * 08 03 2010 cp.wu - * NULL - * Centralize mgmt/system service procedures into independent calls. - * - * 07 28 2010 cp.wu - * NULL - * 1) eliminate redundant variable eOPMode in prAdapter->rWlanInfo - * 2) change nicMediaStateChange() API prototype - * - * 07 28 2010 cp.wu - * NULL - * sync. CMD_BSS_INFO structure change to CMD-EVENT v0.15. - * - * 07 24 2010 wh.su - * - * .support the Wi-Fi RSN - * - * 07 23 2010 cp.wu - * - * FIX: structure of CMD_SET_BSS_INFO has been changed but no follow-ups are done. - * - * 07 22 2010 george.huang - * - * . - * - * 07 22 2010 george.huang - * - * Update fgIsQoS information in BSS INFO by CMD - * - * 07 19 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * Add Ad-Hoc support to AIS-FSM - * - * 07 14 2010 yarco.yang - * - * 1. Remove CFG_MQM_MIGRATION - * 2. Add CMD_UPDATE_WMM_PARMS command - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * update prStaRecOfAP with BSS-INFO. - * - * 07 06 2010 george.huang - * [WPD00001556]Basic power managemenet function - * Update arguments for nicUpdateBeaconIETemplate() - * - * 07 06 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * STA-REC is maintained by CNM only. - * - * 07 05 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) ignore RSN checking when RSN is not turned on. - * 2) set STA-REC deactivation callback as NULL - * 3) add variable initialization API based on PHY configuration - * - * 07 01 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Support sync command of STA_REC - * - * 06 30 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * sync. with CMD/EVENT document ver0.07. - * - * 06 29 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * correct variable naming for 8-bit variable used in CMD_BEACON_TEMPLATE_UPDATE. - * - * 06 29 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) sync to. CMD/EVENT document v0.03 - * 2) simplify DTIM period parsing in scan.c only, bss.c no longer parses it again. - * 3) send command packet to indicate FW-PM after - * a) 1st beacon is received after AIS has connected to an AP - * b) IBSS-ALONE has been created - * c) IBSS-MERGE has occurred - * - * 06 25 2010 george.huang - * [WPD00001556]Basic power managemenet function - * Create beacon update path, with expose bssUpdateBeaconContent() - * - * 06 22 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * fill fgIsUapsdConnection when indicating BSS-CREATE with AIS-STA mode. - * - * 06 22 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) add command warpper for STA-REC/BSS-INFO sync. - * 2) enhance command packet sending procedure for non-oid part - * 3) add command packet definitions for STA-REC/BSS-INFO sync. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * implement TX_DONE callback path. - * - * 06 21 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * remove duplicate variable for migration. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * TX descriptors are now allocated once for reducing allocation overhead - * - * 06 18 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) eliminate CFG_CMD_EVENT_VERSION_0_9 - * 2) when disconnected, indicate nic directly (no event is needed) - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 04 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) surpress compiler warning - * 2) when acqruing LP-own, keep writing WHLPCR whenever OWN is not acquired yet - * - * 04 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * surpress compiler warning - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * * * * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability - * * * * * * * * * * * * * 2) command sequence number is now increased atomically - * * * * * * * * * * * * * 3) private data could be hold and taken use for other purpose - * - * 04 12 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add channel frequency <-> number conversion - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access for prGlueInfo->fgIsCardRemoved in non-glue layer - * - * 04 06 2010 cp.wu - * [WPD00003827][MT6620 Wi-Fi] Chariot fail and following ping fail, no pkt send from driver - * correct nicProcessIST_impl() for interrupt status brought up by RX enhanced response - * - * 03 19 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) add ACPI D0/D3 state switching support - * * * * * * * 2) use more formal way to handle interrupt when the status is retrieved from enhanced RX response - * - * 03 17 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * always process TX interrupt first then RX interrupt. - * - * 02 25 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * correct behavior to prevent duplicated RX handling for RX0_DONE and RX1_DONE - * - * 02 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add checksum offloading support. -** \main\maintrunk.MT6620WiFiDriver_Prj\27 2009-12-16 18:03:43 GMT mtk02752 -** handling enhanced response which fields are fetched at different moments -** \main\maintrunk.MT6620WiFiDriver_Prj\26 2009-12-15 17:00:29 GMT mtk02752 -** if RX enhanced response is used, D2H interrupt status should be coming from buffered result as well -** \main\maintrunk.MT6620WiFiDriver_Prj\25 2009-12-15 12:01:55 GMT mtk02752 -** if TX_DONE bit is not set but WTSR0/WTSR1 is non-zero, then set TX_DONE -** bit due to time latency of interrupt status enhanced response -** \main\maintrunk.MT6620WiFiDriver_Prj\24 2009-12-10 16:52:52 GMT mtk02752 -** code clean -** \main\maintrunk.MT6620WiFiDriver_Prj\23 2009-11-24 20:51:01 GMT mtk02752 -** integrate with SD1 by invoking qmHandleMailboxRxMessage() -** \main\maintrunk.MT6620WiFiDriver_Prj\22 2009-11-16 17:32:33 GMT mtk02752 -** prepare code for invoking rxHandleMailboxRxMessage() -** \main\maintrunk.MT6620WiFiDriver_Prj\21 2009-11-11 10:36:08 GMT mtk01084 -** \main\maintrunk.MT6620WiFiDriver_Prj\20 2009-11-09 22:56:41 GMT mtk01084 -** modify HW access routines -** \main\maintrunk.MT6620WiFiDriver_Prj\19 2009-10-30 18:17:20 GMT mtk01084 -** prevent warning -** \main\maintrunk.MT6620WiFiDriver_Prj\18 2009-10-29 19:54:57 GMT mtk01084 -** init HIF -** \main\maintrunk.MT6620WiFiDriver_Prj\17 2009-10-23 16:08:30 GMT mtk01084 -** \main\maintrunk.MT6620WiFiDriver_Prj\16 2009-10-13 21:59:12 GMT mtk01084 -** update for new HW design -** \main\maintrunk.MT6620WiFiDriver_Prj\15 2009-09-09 17:26:15 GMT mtk01084 -** modify for CFG_TEST_WITH_MT5921 -** \main\maintrunk.MT6620WiFiDriver_Prj\14 2009-05-19 10:55:22 GMT mtk01461 -** Unmask the unused HISR -** \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-05-18 15:59:13 GMT mtk01084 -** remove debug purpose code -** \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-05-18 14:05:02 GMT mtk01084 -** update for WIFI ownback part on initial -** \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-05-04 21:32:57 GMT mtk01084 -** add temporarily code to set driver own on adapter initialization -** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-04-28 10:35:41 GMT mtk01461 -** Add init of TX aggregation and fix RX STATUS is DW align for SDIO_STATUS_ENHANCE mode -** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-04-24 21:12:10 GMT mtk01104 -** Add function nicRestoreSpiDefMode() -** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-04-21 09:43:31 GMT mtk01461 -** Revise for MTK coding style - nicInitializeAdapter() -** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-04-17 19:52:47 GMT mtk01461 -** Update allocate Adapter Memory for MGMT Memory pool -** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-04-01 10:57:08 GMT mtk01461 -** Refine the order of release memory from pucRxCoalescingBufCached -** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-03-19 18:32:57 GMT mtk01084 -** update for basic power management functions -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-18 21:00:14 GMT mtk01426 -** Add CFG_SDIO_RX_ENHANCE support -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-16 09:10:27 GMT mtk01461 -** Update TX PATH API -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:25:59 GMT mtk01426 -** Init for develop -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_cmd_event.c b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_cmd_event.c index 3c9c24f9542b..7ba0e95f04d9 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_cmd_event.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_cmd_event.c @@ -1,314 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/nic/nic_cmd_event.c#1 -*/ - -/*! \file nic_cmd_event.c - \brief Callback functions for Command packets. - - Various Event packet handlers which will be setup in the callback function of - a command packet. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: nic_cmd_event.c - * - * 04 10 2012 yuche.tsai - * NULL - * Update address for wifi direct connection issue. - * - * 06 15 2011 cm.chang - * [WCXRP00000785] [MT6620 Wi-Fi][Driver][FW] P2P/BOW MAC address is XOR with AIS MAC address - * P2P/BOW mac address XOR with local bit instead of OR - * - * 03 05 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * add the code to get the check rsponse and indicate to app. - * - * 03 02 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * Add security check code. - * - * 02 24 2011 cp.wu - * [WCXRP00000493] [MT6620 Wi-Fi][Driver] Do not indicate redundant disconnection to host when entering into RF - * test mode - * only indicate DISCONNECTION to host when entering RF test if necessary (connected -> disconnected cases) - * - * 01 20 2011 eddie.chen - * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control - * Add Oid for sw control debug command - * - * 12 31 2010 cp.wu - * [WCXRP00000335] [MT6620 Wi-Fi][Driver] change to use milliseconds sleep instead of delay to avoid blocking to - * system scheduling - * change to use msleep() and shorten waiting interval to reduce blocking to other task while Wi-Fi driver is being - * loaded - * - * 12 01 2010 cp.wu - * [WCXRP00000223] MT6620 Wi-Fi][Driver][FW] Adopt NVRAM parameters when enter/exit RF test mode - * reload NVRAM settings before entering RF test mode and leaving from RF test mode. - * - * 11 01 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000150] [MT6620 Wi-Fi][Driver] - * Add implementation for querying current TX rate from firmware auto rate module - * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead - * 2) Remove CNM CH-RECOVER event handling - * 3) cfg read/write API renamed with kal prefix for unified naming rules. - * - * 10 20 2010 cp.wu - * [WCXRP00000117] [MT6620 Wi-Fi][Driver] Add logic for suspending driver when MT6620 is not responding anymore - * use OID_CUSTOM_TEST_MODE as indication for driver reset - * by dropping pending TX packets - * - * 10 18 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000086] [MT6620 Wi-Fi][Driver] - * The mac address is all zero at android - * complete implementation of Android NVRAM access - * - * 09 21 2010 cp.wu - * [WCXRP00000053] [MT6620 Wi-Fi][Driver] Reset incomplete and might leads to BSOD when entering RF test with AIS - * associated - * Do a complete reset with STA-REC null checking for RF test re-entry - * - * 09 15 2010 yuche.tsai - * NULL - * Start to test AT GO only when P2P state is not IDLE. - * - * 09 09 2010 yuche.tsai - * NULL - * Add AT GO Test mode after MAC address available. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 30 2010 cp.wu - * NULL - * eliminate klockwork errors - * - * 08 16 2010 cp.wu - * NULL - * Replace CFG_SUPPORT_BOW by CFG_ENABLE_BT_OVER_WIFI. - * There is no CFG_SUPPORT_BOW in driver domain source. - * - * 08 12 2010 cp.wu - * NULL - * [AIS-FSM] honor registry setting for adhoc running mode. (A/B/G) - * - * 08 11 2010 yuche.tsai - * NULL - * Add support for P2P Device Address query from FW. - * - * 08 03 2010 cp.wu - * NULL - * Centralize mgmt/system service procedures into independent calls. - * - * 08 02 2010 cp.wu - * NULL - * reset FSMs before entering RF test mode. - * - * 07 22 2010 cp.wu - * - * 1) refine AIS-FSM indent. - * 2) when entering RF Test mode, flush 802.1X frames as well - * 3) when entering D3 state, flush 802.1X frames as well - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 05 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) change fake BSS_DESC from channel 6 to channel 1 due to channel switching is not done yet. - * 2) after MAC address is queried from firmware, all related variables in driver domain should be updated as well - * - * 06 21 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * remove duplicate variable for migration. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 29 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * change upon request: indicate as disconnected in driver domain when leaving from RF test mode - * - * 05 24 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * do not clear scanning list array after disassociation - * - * 05 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) disable NETWORK_LAYER_ADDRESSES handling temporally. - * 2) finish statistics OIDs - * - * 05 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * change OID behavior to meet WHQL requirement. - * - * 05 20 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) integrate OID_GEN_NETWORK_LAYER_ADDRESSES with CMD_ID_SET_IP_ADDRESS - * 2) buffer statistics data for 2 seconds - * 3) use default value for adhoc parameters instead of 0 - * - * 05 19 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) do not take timeout mechanism for power mode oids - * 2) retrieve network type from connection status - * 3) after disassciation, set radio state to off - * 4) TCP option over IPv6 is supported - * - * 05 17 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * correct OID_802_11_DISASSOCIATE handling. - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * 1) add timeout handler mechanism for pending command packets - * 2) add p2p add/removal key - * - * 04 16 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * treat BUS access failure as kind of card removal. - * - * 04 14 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * information buffer for query oid/ioctl is now buffered in prCmdInfo - * * * * * * instead of glue-layer variable to improve multiple oid/ioctl capability - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * * * * * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability - * * * * * * * * * * * * * * 2) command sequence number is now increased atomically - * * * * * * * * * * * * * * 3) private data could be hold and taken use for other purpose - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * accessing to firmware load/start address, and access to OID handling information - * are now handled in glue layer - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * rWlanInfo should be placed at adapter rather than glue due to most operations - * * * * are done in adapter layer. - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add KAL API: kalFlushPendingTxPackets(), and take use of the API - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access to prGlueInfo->rWlanInfo.eLinkAttr.ucMediaStreamMode from non-glue layer. - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * improve none-glude code portability - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * sync statistics data structure definition with firmware implementation - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * code refine: fgTestMode should be at adapter rather than glue due to the device/fw is also involved - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access for prGlueInfo->fgIsCardRemoved in non-glue layer - * - * 03 30 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * statistics information OIDs are now handled by querying from firmware domain - * - * 03 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * indicate media stream mode after set is done - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port - * - * 03 03 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement custom OID: EEPROM read/write access - * - * 03 03 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement OID_802_3_MULTICAST_LIST oid handling - * - * 02 25 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * limit RSSI return value to micxxsoft defined range. - * - * 02 09 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. Permanent and current MAC address are now retrieved by CMD/EVENT packets instead of hard-coded address - * * * * * * * 2. follow MSDN defined behavior when associates to another AP - * * * * * * * 3. for firmware download, packet size could be up to 2048 bytes - * - * 01 29 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * block until firmware finished RF test enter/leave then indicate completion to upper layer - * - * 01 29 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * when entering RF test mode and leaving from RF test mode, wait for W_FUNC_RDY bit to be asserted forever until it - * is set or card is removed. - * - * 01 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. eliminate improper variable in rHifInfo - * * * * * * * * 2. block TX/ordinary OID when RF test mode is engaged - * * * * * * * * 3. wait until firmware finish operation when entering into and leaving from RF test mode - * * * * * * * * 4. correct some HAL implementation - * - * 01 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Under WinXP with SDIO, use prGlueInfo->rHifInfo.pvInformationBuffer instead of prGlueInfo->pvInformationBuffer - * - * 01 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement following 802.11 OIDs: - * * * * * OID_802_11_RSSI, - * * * * * OID_802_11_RSSI_TRIGGER, - * * * * * OID_802_11_STATISTICS, - * * * * * OID_802_11_DISASSOCIATE, - * * * * * OID_802_11_POWER_MODE - * - * 01 21 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement OID_802_11_MEDIA_STREAM_MODE - * - * 12 30 2009 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) According to CMD/EVENT documentation v0.8, - * * * * * * * * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used, - * * * * * * * * and result is retrieved by get ATInfo instead - * * * * * * * * 2) add 4 counter for recording aggregation statistics -** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-12-10 16:47:47 GMT mtk02752 -** only handle MCR read when accessing FW domain register -** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-12-08 17:37:28 GMT mtk02752 -** * refine nicCmdEventQueryMcrRead -** + add TxStatus/RxStatus for RF test QueryInformation OIDs -** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-12-02 22:05:45 GMT mtk02752 -** kalOidComplete() will decrease i4OidPendingCount -** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-12-01 23:02:57 GMT mtk02752 -** remove unnecessary spin locks -** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-12-01 22:51:18 GMT mtk02752 -** maintein i4OidPendingCount -** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-11-30 10:55:03 GMT mtk02752 -** modify for compatibility -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-11-23 14:46:32 GMT mtk02752 -** add another version of command-done handler upon new event structure -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-04-29 15:42:33 GMT mtk01461 -** Add comment -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-04-21 19:32:42 GMT mtk01461 -** Add nicCmdEventSetCommon() for general set OID -** \main\maintrunk.MT6620WiFiDriver_Prj\1 2009-04-21 01:40:35 GMT mtk01461 -** Command Done Handler -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c index ba4840414da8..78e77ccae9ea 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c @@ -1,804 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/nic/nic_rx.c#3 -*/ - -/*! \file nic_rx.c - \brief Functions that provide many rx-related functions - - This file includes the functions used to process RFB and dispatch RFBs to - the appropriate related rx functions for protocols. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: nic_rx.c -** -** 08 31 2012 yuche.tsai -** [ALPS00349585] [6577JB][WiFi direct][KE]Establish p2p connection while both device have connected to AP previously, -** one device reboots automatically with KE -** Fix possible KE when concurrent & disconnect. - * - * 07 17 2012 yuche.tsai - * NULL - * Let netdev bring up. - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 03 02 2012 terry.wu - * NULL - * Sync CFG80211 modification from branch 2,2. - * - * 02 14 2012 cp.wu - * NULL - * remove another assertion by error message dump - * - * 01 05 2012 tsaiyuan.hsu - * [WCXRP00001157] [MT6620 Wi-Fi][FW][DRV] add timing measurement support for 802.11v - * add timing measurement support for 802.11v. - * - * 11 19 2011 yuche.tsai - * NULL - * Update RSSI for P2P. - * - * 11 18 2011 yuche.tsai - * NULL - * CONFIG P2P support RSSI query, default turned off. - * - * 11 17 2011 tsaiyuan.hsu - * [WCXRP00001115] [MT6620 Wi-Fi][DRV] avoid deactivating staRec when changing state 3 to 3. - * avoid deactivating staRec when changing state from 3 to 3. - * - * 11 11 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * modify the xlog related code. - * - * 11 10 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Modify the QM xlog level and remove LOG_FUNC. - * - * 11 09 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Add xlog for beacon timeout and sta aging timeout. - * - * 11 08 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Add xlog function. - * - * 11 07 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * add debug counters and periodically dump counters for debugging. - * - * 10 21 2011 eddie.chen - * [WCXRP00001051] [MT6620 Wi-Fi][Driver/Fw] Adjust the STA aging timeout - * Add switch to ignore the STA aging timeout. - * - * 10 12 2011 wh.su - * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP - * adding the 802.11w related function and define . - * - * 08 26 2011 cp.wu - * [WCXRP00000958] [MT6620 Wi-Fi][Driver] Extend polling timeout from 25ms to 1sec due to RF calibration might took - * up to 600ms - * extend polling RX response timeout period from 25ms to 1000ms. - * - * 08 11 2011 cp.wu - * [WCXRP00000830] [MT6620 Wi-Fi][Firmware] Use MDRDY counter to detect empty channel for shortening scan time - * sparse channel detection: - * driver: collect sparse channel information with scan-done event - * - * 07 28 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings - * Add BWCS cmd and event. - * - * 07 27 2011 cp.wu - * [WCXRP00000876] [MT5931][Drver] Decide to retain according to currently available RX counter and QUE_MGT used count - * correct comment. - * - * 07 27 2011 cp.wu - * [WCXRP00000876] [MT5931][Drver] Decide to retain according to currently available RX counter and QUE_MGT used count - * take use of QUE_MGT exported function to estimate currently RX buffer usage count. - * - * 07 18 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Add CMD/Event for RDD and BWCS. - * - * 06 09 2011 tsaiyuan.hsu - * [WCXRP00000760] [MT5931 Wi-Fi][FW] Refine rxmHandleMacRxDone to reduce code size - * move send_auth at rxmHandleMacRxDone in firmware to driver to reduce code size. - * - * 05 11 2011 eddie.chen - * [WCXRP00000709] [MT6620 Wi-Fi][Driver] Check free number before copying broadcast packet - * Fix dest type when GO packet copying. - * - * 05 09 2011 eddie.chen - * [WCXRP00000709] [MT6620 Wi-Fi][Driver] Check free number before copying broadcast packet - * Check free number before copying broadcast packet. - * - * 05 05 2011 cp.wu - * [WCXRP00000702] [MT5931][Driver] Modify initialization sequence for E1 ASIC - * add delay after whole-chip resetting for MT5931 E1 ASIC. - * - * 04 18 2011 terry.wu - * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED - * Remove flag CFG_WIFI_DIRECT_MOVED. - * - * 04 12 2011 cm.chang - * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency - * . - * - * 04 08 2011 yuche.tsai - * [WCXRP00000624] [Volunteer Patch][MT6620][Driver] Add device discoverability support for GO. - * Add device discoverability support for GO. - * - * 04 01 2011 tsaiyuan.hsu - * [WCXRP00000615] [MT 6620 Wi-Fi][Driver] Fix klocwork issues - * fix the klocwork issues, 57500, 57501, 57502 and 57503. - * - * 03 19 2011 yuche.tsai - * [WCXRP00000584] [Volunteer Patch][MT6620][Driver] Add beacon timeout support for WiFi Direct. - * Add beacon timeout support for WiFi Direct Network. - * - * 03 18 2011 wh.su - * [WCXRP00000530] [MT6620 Wi-Fi] [Driver] skip doing p2pRunEventAAAComplete after send assoc response Tx Done - * enable the Anti_piracy check at driver . - * - * 03 17 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically continuous memory shortage - * after system running for a long period - * use pre-allocated buffer for storing enhanced interrupt response as well - * - * 03 15 2011 cp.wu - * [WCXRP00000559] [MT6620 Wi-Fi][Driver] Combine TX/RX DMA buffers into a single one to reduce physically continuous - * memory consumption - * 1. deprecate CFG_HANDLE_IST_IN_SDIO_CALLBACK - * 2. Use common coalescing buffer for both TX/RX directions - * - * - * 03 07 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * rename the define to anti_pviracy. - * - * 03 05 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * add the code to get the check rsponse and indicate to app. - * - * 03 02 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * Add security check code. - * - * 03 02 2011 cp.wu - * [WCXRP00000503] [MT6620 Wi-Fi][Driver] Take RCPI brought by association response as initial RSSI right after - * connection is built. - * use RCPI brought by ASSOC-RESP after connection is built as initial RCPI to avoid using a uninitialized MAC-RX RCPI. - * - * 02 10 2011 yuche.tsai - * [WCXRP00000419] [Volunteer Patch][MT6620/MT5931][Driver] Provide function of disconnect to target station for AAA - * module. - * Remove Station Record after Aging timeout. - * - * 02 10 2011 cp.wu - * [WCXRP00000434] [MT6620 Wi-Fi][Driver] Obsolete unused event packet handlers - * EVENT_ID_CONNECTION_STATUS has been obsoleted and no need to handle. - * - * 02 09 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * Add MLME deauthentication support for Hot-Spot mode. - * - * 02 09 2011 eddie.chen - * [WCXRP00000426] [MT6620 Wi-Fi][FW/Driver] Add STA aging timeout and defualtHwRatein AP mode - * Adjust variable order. - * - * 02 08 2011 eddie.chen - * [WCXRP00000426] [MT6620 Wi-Fi][FW/Driver] Add STA aging timeout and defualtHwRatein AP mode - * Add event STA agint timeout - * - * 01 27 2011 tsaiyuan.hsu - * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support - * add roaming fsm - * 1. not support 11r, only use strength of signal to determine roaming. - * 2. not enable CFG_SUPPORT_ROAMING until completion of full test. - * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw - * 4. assume that change of link quality in smooth way. - * - * 01 26 2011 cm.chang - * [WCXRP00000395] [MT6620 Wi-Fi][Driver][FW] Search STA_REC with additional net type index argument - * . - * - * 01 24 2011 eddie.chen - * [WCXRP00000385] [MT6620 Wi-Fi][DRV] Add destination decision for forwarding packets - * Remove comments. - * - * 01 24 2011 eddie.chen - * [WCXRP00000385] [MT6620 Wi-Fi][DRV] Add destination decision for forwarding packets - * Add destination decision in AP mode. - * - * 01 24 2011 cm.chang - * [WCXRP00000384] [MT6620 Wi-Fi][Driver][FW] Handle 20/40 action frame in AP mode and stop ampdu timer when sta_rec - * is freed - * Process received 20/40 coexistence action frame for AP mode - * - * 01 24 2011 cp.wu - * [WCXRP00000382] [MT6620 Wi-Fi][Driver] Track forwarding packet number with notifying tx thread for serving - * 1. add an extra counter for tracking pending forward frames. - * 2. notify TX service thread as well when there is pending forward frame - * 3. correct build errors leaded by introduction of Wi-Fi direct separation module - * - * 01 12 2011 cp.wu - * [WCXRP00000357] [MT6620 Wi-Fi][Driver][Bluetooth over Wi-Fi] add another net device interface for BT AMP - * implementation of separate BT_OVER_WIFI data path. - * - * 12 29 2010 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, -Add per station flow control when STA is in PS - - * 1) PS flow control event - * - * 2) WMM IE in beacon, assoc resp, probe resp - * - * 12 15 2010 george.huang - * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function - * update beacon for NoA - * - * 11 01 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000150] [MT6620 Wi-Fi][Driver] - * Add implementation for querying current TX rate from firmware auto rate module - * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead - * 2) Remove CNM CH-RECOVER event handling - * 3) cfg read/write API renamed with kal prefix for unified naming rules. - * - * 10 27 2010 george.huang - * [WCXRP00000127] [MT6620 Wi-Fi][Driver] Add a registry to disable Beacon Timeout function for SQA test by using E1 EVB - * Support registry option for disable beacon lost detection. - * - * 10 20 2010 wh.su - * NULL - * add a cmd to reset the p2p key - * - * 10 20 2010 wh.su - * [WCXRP00000124] [MT6620 Wi-Fi] [Driver] Support the dissolve P2P Group - * Add the code to support disconnect p2p group - * - * 09 29 2010 wh.su - * [WCXRP00000072] [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue - * fixed compilier error. - * - * 09 29 2010 wh.su - * [WCXRP00000072] [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue - * [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue. - * - * 09 23 2010 cp.wu - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * eliminate reference of CFG_RESPONSE_MAX_PKT_SIZE - * - * 09 21 2010 cp.wu - * [WCXRP00000053] [MT6620 Wi-Fi][Driver] Reset incomplete and might leads to BSOD when entering RF test with AIS - * associated - * release RX packet to packet pool when in RF test mode - * - * 09 21 2010 cp.wu - * [WCXRP00000053] [MT6620 Wi-Fi][Driver] Reset incomplete and might leads to BSOD when entering RF test with AIS - @ associated - * Do a complete reset with STA-REC null checking for RF test re-entry - * - * 09 08 2010 cp.wu - * NULL - * use static memory pool for storing IEs of scanning result. - * - * 09 07 2010 yuche.tsai - * NULL - * Add a common buffer, store the IE of a P2P device in this common buffer. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 31 2010 kevin.huang - * NULL - * Use LINK LIST operation to process SCAN result - * - * 08 30 2010 cp.wu - * NULL - * eliminate klockwork errors - * - * 08 20 2010 cm.chang - * NULL - * Migrate RLM code to host from FW - * - * 08 20 2010 yuche.tsai - * NULL - * When enable WiFi Direct function, check each packet to tell which interface to indicate. - * - * 08 05 2010 yuche.tsai - * NULL - * Add P2P Device Discovery Function. - * - * 08 03 2010 cp.wu - * NULL - * surpress compilation warning. - * - * 08 03 2010 george.huang - * NULL - * handle event for updating NOA parameters indicated from FW - * - * 08 02 2010 yuche.tsai - * NULL - * Add support API for RX public action frame. - * - * 08 02 2010 jeffrey.chang - * NULL - * 1) modify tx service thread to avoid busy looping - * 2) add spin lock declartion for linux build - * - * 07 30 2010 cp.wu - * NULL - * 1) BoW wrapper: use definitions instead of hard-coded constant for error code - * 2) AIS-FSM: eliminate use of desired RF parameters, use prTargetBssDesc instead - * 3) add handling for RX_PKT_DESTINATION_HOST_WITH_FORWARD for GO-broadcast frames - * - * 07 26 2010 yuche.tsai - * - * Update Device Capability Bitmap & Group Capability Bitmap from 16 bits to 8 bits. - * - * 07 24 2010 wh.su - * - * .support the Wi-Fi RSN - * - * 07 23 2010 cp.wu - * - * add AIS-FSM handling for beacon timeout event. - * - * 07 21 2010 yuche.tsai - * - * Add P2P Scan & Scan Result Parsing & Saving. - * - * 07 19 2010 cm.chang - * - * Set RLM parameters and enable CNM channel manager - * - * 07 19 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration. - * Add Ad-Hoc support to AIS-FSM - * - * 07 19 2010 jeffrey.chang - * - * Linux port modification - * - * 07 16 2010 yarco.yang - * - * 1. Support BSS Absence/Presence Event - * 2. Support STA change PS mode Event - * 3. Support BMC forwarding for AP mode. - * - * 07 15 2010 cp.wu - * - * sync. bluetooth-over-Wi-Fi interface to driver interface document v0.2.6. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * fill ucStaRecIdx into SW_RFB_T. - * - * 07 02 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) for event packet, no need to fill RFB. - * 2) when wlanAdapterStart() failed, no need to initialize state machines - * 3) after Beacon/ProbeResp parsing, corresponding BSS_DESC_T should be marked as IE-parsed - * - * 07 01 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * implementation of DRV-SCN and related mailbox message handling. - * - * 06 29 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * replace g_rQM with Adpater->rQM - * - * 06 23 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Merge g_arStaRec[] into adapter->arStaRec[] - * - * 06 22 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) add command warpper for STA-REC/BSS-INFO sync. - * 2) enhance command packet sending procedure for non-oid part - * 3) add command packet definitions for STA-REC/BSS-INFO sync. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * refine TX-DONE callback. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * implement TX_DONE callback path. - * - * 06 21 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Add TX Done Event handle entry - * - * 06 21 2010 wh.su - * [WPD00003840][MT6620 5931] Security migration - * remove duplicate variable for migration. - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * . - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * . - * - * 06 14 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * saa_fsm.c is migrated. - * - * 06 14 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add management dispatching function table. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) eliminate CFG_CMD_EVENT_VERSION_0_9 - * 2) when disconnected, indicate nic directly (no event is needed) - * - * 06 08 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * cnm_timer has been migrated. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * merge wlan_def.h. - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * sync with MT6620 driver for scan result replacement policy - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 20 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) integrate OID_GEN_NETWORK_LAYER_ADDRESSES with CMD_ID_SET_IP_ADDRESS - * 2) buffer statistics data for 2 seconds - * 3) use default value for adhoc parameters instead of 0 - * - * 05 19 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) do not take timeout mechanism for power mode oids - * 2) retrieve network type from connection status - * 3) after disassciation, set radio state to off - * 4) TCP option over IPv6 is supported - * - * 04 29 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * fixing the PMKID candicate indicate code. - * - * 04 28 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * change prefix for data structure used to communicate with 802.11 PAL - * to avoid ambiguous naming with firmware interface - * - * 04 27 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * basic implementation for EVENT_BT_OVER_WIFI - * - * 04 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * surpress compiler warning - * - * 04 22 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * - * 1) modify rx path code for supporting Wi-Fi direct - * 2) modify config.h since Linux dont need to consider retaining packet - * - * 04 16 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * treat BUS access failure as kind of card removal. - * - * 04 14 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * nicRxProcessEvent packet doesn't access spin-lock directly from now on. - * - * 04 14 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * do not need to release the spin lock due to it is done inside nicGetPendingCmdInfo() - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * * * * * * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability - * * * * * * * * * * * * * * * 2) command sequence number is now increased atomically - * * * * * * * * * * * * * * * 3) private data could be hold and taken use for other purpose - * - * 04 12 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add channel frequency <-> number conversion - * - * 04 09 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * 1) add spinlock - * 2) add KAPI for handling association info - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * rWlanInfo should be placed at adapter rather than glue due to most operations - * * * * * are done in adapter layer. - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access to prGlueInfo->eParamMediaStateIndicated from non-glue layer - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access for prGlueInfo->fgIsCardRemoved in non-glue layer - * - * 04 01 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * improve Linux supplicant compliance - * - * 03 31 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * fix ioctl which may cause cmdinfo memory leak - * - * 03 30 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * remove driver-land statistics. - * - * 03 29 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * improve none-glue code portability - * - * 03 28 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * rWlanInfo is modified before data is indicated to OS - * - * 03 28 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * rWlanInfo is modified before data is indicated to OS - * - * 03 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add a temporary flag for integration with CMD/EVENT v0.9. - * - * 03 25 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) correct OID_802_11_CONFIGURATION with frequency setting behavior. - * * * the frequency is used for adhoc connection only - * * * 2) update with SD1 v0.9 CMD/EVENT documentation - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port - * - * 03 24 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * . - * - * 03 24 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * generate information for OID_GEN_RCV_OK & OID_GEN_XMIT_OK - * * * * - * - * 03 19 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) add ACPI D0/D3 state switching support - * * * * * * * * * 2) use more formal way to handle interrupt when the status is retrieved from enhanced RX - * response - * - * 03 15 2010 kevin.huang - * [WPD00003820][MT6620 Wi-Fi] Modify the code for meet the WHQL test - * Add event for activate STA_RECORD_T - * - * 03 12 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * correct fgSetQuery/fgNeedResp check - * - * 03 11 2010 cp.wu - * [WPD00003821][BUG] Host driver stops processing RX packets from HIF RX0 - * add RX starvation warning debug message controlled by CFG_HIF_RX_STARVATION_WARNING - * - * 03 10 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * code clean: removing unused variables and structure definitions - * - * 03 08 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) add another spin-lock to protect MsduInfoList due to it might be accessed by different thread. - * * * 2) change own-back acquiring procedure to wait for up to 16.67 seconds - * - * 03 02 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) the use of prPendingOid revised, all accessing are now protected by spin lock - * * * * 2) ensure wlanReleasePendingOid will clear all command queues - * - * 03 02 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add mutex to avoid multiple access to qmTxQueue simultaneously. - * - * 02 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * move EVENT_ID_ASSOC_INFO from nic_rx.c to gl_kal_ndis_51.c - * * 'cause it involves OS dependent data structure handling - * - * 02 25 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * correct behavior to prevent duplicated RX handling for RX0_DONE and RX1_DONE - * - * 02 24 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Updated API interfaces for qmHandleEventRxAddBa() and qmHandleEventRxDelBa() - * - * 02 10 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement host-side firmware download logic - * - * 02 10 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) remove unused function in nic_rx.c [which has been handled in que_mgt.c] - * * * * * 2) firmware image length is now retrieved via NdisFileOpen - * * * * * 3) firmware image is not structured by (P_IMG_SEC_HDR_T) anymore - * * * * * 4) nicRxWaitResponse() revised - * * * * * 5) another set of TQ counter default value is added for fw-download state - * * * * * 6) Wi-Fi load address is now retrieved from registry too - * - * 02 09 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. Permanent and current MAC address are now retrieved by CMD/EVENT packets instead of hard-coded address - * * * * * * * * 2. follow MSDN defined behavior when associates to another AP - * * * * * * * * 3. for firmware download, packet size could be up to 2048 bytes - * - * 01 27 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * . - * - * 01 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * implement following 802.11 OIDs: - * * * * * * OID_802_11_RSSI, - * * * * * * OID_802_11_RSSI_TRIGGER, - * * * * * * OID_802_11_STATISTICS, - * * * * * * OID_802_11_DISASSOCIATE, - * * * * * * OID_802_11_POWER_MODE - * - * 12 30 2009 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) According to CMD/EVENT documentation v0.8, - * * * * * * * * * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used, - * * * * * * * * * and result is retrieved by get ATInfo instead - * * * * * * * * * 2) add 4 counter for recording aggregation statistics - * - * 12 23 2009 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add a precheck: if free sw rfb is not enough, do not invoke read transactionu1rwduu`wvpghlqg|fu+rp - * - * 12 22 2009 cp.wu - * [WPD00003809][Bug] Host driver will crash when processing reordered MSDUs - * The root cause is pointer accessing by mistake. After dequeued from reordering-buffer, handling logic should access - * returned pointer instead of pointer which has been passed in before. -** \main\maintrunk.MT6620WiFiDriver_Prj\58 2009-12-17 13:40:33 GMT mtk02752 -** always update prAdapter->rSDIOCtrl when enhanced response is read by RX -** \main\maintrunk.MT6620WiFiDriver_Prj\57 2009-12-16 18:01:38 GMT mtk02752 -** if interrupt enhanced response is fetched by RX enhanced response, RX needs to invoke interrupt handlers too -** \main\maintrunk.MT6620WiFiDriver_Prj\56 2009-12-16 14:16:52 GMT mtk02752 -** \main\maintrunk.MT6620WiFiDriver_Prj\55 2009-12-15 20:03:12 GMT mtk02752 -** ASSERT when RX FreeSwRfb is not enough -** \main\maintrunk.MT6620WiFiDriver_Prj\54 2009-12-15 17:01:29 GMT mtk02752 -** when CFG_SDIO_RX_ENHANCE is enabled, after enhanced response is read, rx procedure should process -** 1) TX_DONE_INT 2) D2H INT as well -** \main\maintrunk.MT6620WiFiDriver_Prj\53 2009-12-14 20:45:28 GMT mtk02752 -** when CFG_SDIO_RX_ENHANCE is set, TC counter must be updated each time RX enhance response is read -** -** \main\maintrunk.MT6620WiFiDriver_Prj\52 2009-12-14 11:34:16 GMT mtk02752 -** correct a trivial logic issue -** \main\maintrunk.MT6620WiFiDriver_Prj\51 2009-12-14 10:28:25 GMT mtk02752 -** add a protection to avoid out-of-boundary access -** \main\maintrunk.MT6620WiFiDriver_Prj\50 2009-12-10 16:55:18 GMT mtk02752 -** code clean -** \main\maintrunk.MT6620WiFiDriver_Prj\49 2009-12-09 14:06:47 GMT MTK02468 -** Added parsing event packets with EVENT_ID_RX_ADDBA or EVENT_ID_RX_DELBA -** \main\maintrunk.MT6620WiFiDriver_Prj\48 2009-12-08 17:37:51 GMT mtk02752 -** handle EVENT_ID_TEST_STATUS as well -** \main\maintrunk.MT6620WiFiDriver_Prj\47 2009-12-04 17:59:11 GMT mtk02752 -** to pass free-build compilation check -** \main\maintrunk.MT6620WiFiDriver_Prj\46 2009-12-04 12:09:52 GMT mtk02752 -** correct trivial mistake -** \main\maintrunk.MT6620WiFiDriver_Prj\45 2009-12-04 11:53:37 GMT mtk02752 -** all API should be compilable under SD1_SD3_DATAPATH_INTEGRATION == 0 -** \main\maintrunk.MT6620WiFiDriver_Prj\44 2009-12-03 16:19:48 GMT mtk01461 -** Fix the Connected Event -** \main\maintrunk.MT6620WiFiDriver_Prj\43 2009-11-30 10:56:18 GMT mtk02752 -** 1st DW of WIFI_EVENT_T is shared with HIF_RX_HEADER_T -** \main\maintrunk.MT6620WiFiDriver_Prj\42 2009-11-30 10:11:27 GMT mtk02752 -** implement replacement for bss scan result -** \main\maintrunk.MT6620WiFiDriver_Prj\41 2009-11-27 11:08:05 GMT mtk02752 -** add flush for reset -** \main\maintrunk.MT6620WiFiDriver_Prj\40 2009-11-26 09:38:59 GMT mtk02752 -** \main\maintrunk.MT6620WiFiDriver_Prj\39 2009-11-26 09:29:40 GMT mtk02752 -** enable packet forwarding path (for AP mode) -** \main\maintrunk.MT6620WiFiDriver_Prj\38 2009-11-25 21:37:00 GMT mtk02752 -** sync. with EVENT_SCAN_RESULT_T change, and add an assert for checking event size -** \main\maintrunk.MT6620WiFiDriver_Prj\37 2009-11-25 20:17:41 GMT mtk02752 -** fill HIF_TX_HEADER_T.u2SeqNo -** \main\maintrunk.MT6620WiFiDriver_Prj\36 2009-11-25 18:18:57 GMT mtk02752 -** buffer scan result to prGlueInfo->rWlanInfo.arScanResult directly. -** \main\maintrunk.MT6620WiFiDriver_Prj\35 2009-11-24 22:42:45 GMT mtk02752 -** add nicRxAddScanResult() to prepare to handle SCAN_RESULT event (not implemented yet) -** \main\maintrunk.MT6620WiFiDriver_Prj\34 2009-11-24 20:51:41 GMT mtk02752 -** integrate with SD1's data path API -** \main\maintrunk.MT6620WiFiDriver_Prj\33 2009-11-24 19:56:17 GMT mtk02752 -** adopt P_HIF_RX_HEADER_T in new path -** \main\maintrunk.MT6620WiFiDriver_Prj\32 2009-11-23 20:31:21 GMT mtk02752 -** payload to send into pfCmdDoneHandler() will not include WIFI_EVENT_T -** \main\maintrunk.MT6620WiFiDriver_Prj\31 2009-11-23 17:51:34 GMT mtk02752 -** when event packet corresponding to some pendingOID is received, pendingOID should be cleared -** \main\maintrunk.MT6620WiFiDriver_Prj\30 2009-11-23 14:46:54 GMT mtk02752 -** implement nicRxProcessEventPacket() -** \main\maintrunk.MT6620WiFiDriver_Prj\29 2009-11-17 22:40:54 GMT mtk01084 -** \main\maintrunk.MT6620WiFiDriver_Prj\28 2009-11-16 21:48:22 GMT mtk02752 -** add SD1_SD3_DATAPATH_INTEGRATION data path handling -** \main\maintrunk.MT6620WiFiDriver_Prj\27 2009-11-16 15:41:18 GMT mtk01084 -** modify the length to be read in emu mode -** \main\maintrunk.MT6620WiFiDriver_Prj\26 2009-11-13 17:00:12 GMT mtk02752 -** add blank function for event packet -** \main\maintrunk.MT6620WiFiDriver_Prj\25 2009-11-13 13:54:24 GMT mtk01084 -** \main\maintrunk.MT6620WiFiDriver_Prj\24 2009-11-11 14:41:51 GMT mtk02752 -** fix typo -** \main\maintrunk.MT6620WiFiDriver_Prj\23 2009-11-11 14:33:46 GMT mtk02752 -** add protection when there is no packet avilable -** \main\maintrunk.MT6620WiFiDriver_Prj\22 2009-11-11 12:33:36 GMT mtk02752 -** add RX1 read path for aggregated/enhanced/normal packet read procedures -** \main\maintrunk.MT6620WiFiDriver_Prj\21 2009-11-11 10:36:18 GMT mtk01084 -** \main\maintrunk.MT6620WiFiDriver_Prj\20 2009-11-04 14:11:08 GMT mtk01084 -** modify lines in RX aggregation -** \main\maintrunk.MT6620WiFiDriver_Prj\19 2009-10-30 18:17:23 GMT mtk01084 -** modify RX aggregation handling -** \main\maintrunk.MT6620WiFiDriver_Prj\18 2009-10-29 19:56:12 GMT mtk01084 -** modify HAL part -** \main\maintrunk.MT6620WiFiDriver_Prj\17 2009-10-23 16:08:34 GMT mtk01084 -** \main\maintrunk.MT6620WiFiDriver_Prj\16 2009-10-13 21:59:20 GMT mtk01084 -** update for new HW design -** \main\maintrunk.MT6620WiFiDriver_Prj\15 2009-10-02 13:59:08 GMT mtk01725 -** \main\maintrunk.MT6620WiFiDriver_Prj\14 2009-05-21 23:39:05 GMT mtk01461 -** Fix the paste error of RX STATUS in OOB of HIF Loopback CTRL -** \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-05-20 12:25:32 GMT mtk01461 -** Fix process of Read Done, and add u4MaxEventBufferLen to nicRxWaitResponse() -** \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-05-18 21:13:18 GMT mtk01426 -** Fixed compiler error -** \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-05-18 21:05:29 GMT mtk01426 -** Fixed nicRxSDIOAggReceiveRFBs() ASSERT issue -** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-04-28 10:38:43 GMT mtk01461 -** Fix RX STATUS is DW align for SDIO_STATUS_ENHANCE mode and refine nicRxSDIOAggeceiveRFBs() for RX Aggregation -** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-04-22 09:12:17 GMT mtk01461 -** Fix nicRxProcessHIFLoopbackPacket(), the size of HIF CTRL LENGTH field is 1 byte -** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-04-14 15:51:26 GMT mtk01426 -** Update RX OOB Setting -** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-04-03 14:58:58 GMT mtk01426 -** Fixed logical error -** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-04-01 10:58:31 GMT mtk01461 -** Rename the HIF_PKT_TYPE_DATA -** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-03-23 21:51:18 GMT mtk01461 -** Fix u4HeaderOffset in nicRxProcessHIFLoopbackPacket() -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-18 21:02:58 GMT mtk01426 -** Add CFG_SDIO_RX_ENHANCE and CFG_HIF_LOOPBACK support -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-17 20:20:59 GMT mtk01426 -** Add nicRxWaitResponse function -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:26:01 GMT mtk01426 -** Init for develop -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_tx.c b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_tx.c index 969504f8200a..250bb9ed0755 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_tx.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_tx.c @@ -1,418 +1,15 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/nic/nic_tx.c#1 -*/ - -/*! \file nic_tx.c - \brief Functions that provide TX operation in NIC Layer. - - This file provides TX functions which are responsible for both Hardware and - Software Resource Management and keep their Synchronization. -*/ - -/* -** Log: nic_tx.c - * - * 06 13 2012 yuche.tsai - * NULL - * Update maintrunk driver. - * Add support for driver compose assoc request frame. - * - * 11 18 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Add log counter for tx - * - * 11 09 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Add xlog for beacon timeout and sta aging timeout. - * - * 11 08 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Add xlog function. - * - * 05 17 2011 cp.wu - * [WCXRP00000732] [MT6620 Wi-Fi][AIS] No need to switch back to IDLE state when DEAUTH frame is dropped due to bss - * disconnection - * when TX DONE status is TX_RESULT_DROPPED_IN_DRIVER, no need to switch back to IDLE state. - * - * 04 12 2011 eddie.chen - * [WCXRP00000617] [MT6620 Wi-Fi][DRV/FW] Fix for sigma - * Fix the sta index in processing security frame - * Simple flow control for TC4 to avoid mgt frames for PS STA to occupy the TC4 - * Add debug message. - * - * 04 12 2011 cp.wu - * [WCXRP00000631] [MT6620 Wi-Fi][Driver] Add an API for QM to retrieve current TC counter value and processing frame - * dropping cases for TC4 path - * remove unused variables. - * - * 04 12 2011 cp.wu - * [WCXRP00000631] [MT6620 Wi-Fi][Driver] Add an API for QM to retrieve current TC counter value and processing frame - * dropping cases for TC4 path - * 1. add nicTxGetResource() API for QM to make decisions. - * 2. if management frames is decided by QM for dropping, the call back is invoked to indicate such a case. - * - * 03 17 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically continuous memory shortage - * after system running for a long period - * use pre-allocated buffer for storing enhanced interrupt response as well - * - * 03 15 2011 cp.wu - * [WCXRP00000559] [MT6620 Wi-Fi][Driver] Combine TX/RX DMA buffers into a single one to reduce physically continuous - * memory consumption - * 1. deprecate CFG_HANDLE_IST_IN_SDIO_CALLBACK - * 2. Use common coalescing buffer for both TX/RX directions - * - * - * 02 16 2011 cp.wu - * [WCXRP00000449] [MT6620 Wi-Fi][Driver] Refine CMD queue handling by adding an extra API for checking available count - * and modify behavior - * 1. add new API: nicTxGetFreeCmdCount() - * 2. when there is insufficient command descriptor, nicTxEnqueueMsdu() will drop command packets directly - * - * 01 24 2011 cp.wu - * [WCXRP00000382] [MT6620 Wi-Fi][Driver] Track forwarding packet number with notifying tx thread for serving - * 1. add an extra counter for tracking pending forward frames. - * 2. notify TX service thread as well when there is pending forward frame - * 3. correct build errors leaded by introduction of Wi-Fi direct separation module - * - * 01 12 2011 cp.wu - * [WCXRP00000356] [MT6620 Wi-Fi][Driver] fill mac header length for security frames 'cause hardware header translation - * needs such information - * fill mac header length information for 802.1x frames. - * - * 12 31 2010 cp.wu - * [WCXRP00000335] [MT6620 Wi-Fi][Driver] change to use milliseconds sleep instead of delay to avoid blocking to system - * scheduling - * change to use msleep() and shorten waiting interval to reduce blocking to other task while Wi-Fi driver is being - * loaded - * - * 11 01 2010 yarco.yang - * [WCXRP00000149] [MT6620 WI-Fi][Driver]Fine tune performance on MT6516 platform - * Add GPIO debug function - * - * 10 18 2010 cp.wu - * [WCXRP00000117] [MT6620 Wi-Fi][Driver] Add logic for suspending driver when MT6620 is not responding anymore - * 1. when wlanAdapterStop() failed to send POWER CTRL command to firmware, do not poll for ready bit dis-assertion - * 2. shorten polling count for shorter response time - * 3. if bad I/O operation is detected during TX resource polling, then further operation is aborted as well - * - * 10 06 2010 cp.wu - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * code reorganization to improve isolation between GLUE and CORE layers. - * - * 09 29 2010 wh.su - * [WCXRP00000072] [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue - * [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue. - * - * 09 27 2010 wh.su - * NULL - * since the u2TxByteCount_UserPriority will or another setting, keep the overall buffer for avoid error - * - * 09 24 2010 wh.su - * NULL - * [WCXRP000000058][MT6620 Wi-Fi][Driver] Fail to handshake with WAPI AP due the 802.1x frame send to fw with extra - * bytes padding. - * - * 09 01 2010 cp.wu - * NULL - * HIFSYS Clock Source Workaround - * - * 08 30 2010 cp.wu - * NULL - * API added: nicTxPendingPackets(), for simplifying porting layer - * - * 08 30 2010 cp.wu - * NULL - * eliminate klockwork errors - * - * 08 20 2010 wh.su - * NULL - * adding the eapol callback setting. - * - * 08 18 2010 yarco.yang - * NULL - * 1. Fixed HW checksum offload function not work under Linux issue. - * 2. Add debug message. - * - * 08 05 2010 yuche.tsai - * NULL - * . - * - * 08 03 2010 cp.wu - * NULL - * surpress compilation warning. - * - * 08 02 2010 jeffrey.chang - * NULL - * 1) modify tx service thread to avoid busy looping - * 2) add spin lock declartion for linux build - * - * 07 29 2010 cp.wu - * NULL - * simplify post-handling after TX_DONE interrupt is handled. - * - * 07 19 2010 jeffrey.chang - * - * Linux port modification - * - * 07 13 2010 cp.wu - * - * 1) MMPDUs are now sent to MT6620 by CMD queue for keeping strict order of 1X/MMPDU/CMD packets - * 2) integrate with qmGetFrameAction() for deciding which MMPDU/1X could pass checking for sending - * 2) enhance CMD_INFO_T descriptor number from 10 to 32 to avoid descriptor underflow under concurrent network - * operation - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 29 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * replace g_rQM with Adpater->rQM - * - * 06 25 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add API in que_mgt to retrieve sta-rec index for security frames. - * - * 06 24 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 802.1x and bluetooth-over-Wi-Fi security frames are now delievered to firmware via command path instead of data path. - * - * 06 23 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Merge g_arStaRec[] into adapter->arStaRec[] - * - * 06 22 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) add command warpper for STA-REC/BSS-INFO sync. - * 2) enhance command packet sending procedure for non-oid part - * 3) add command packet definitions for STA-REC/BSS-INFO sync. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add checking for TX descriptor poll. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * TX descriptors are now allocated once for reducing allocation overhead - * - * 06 18 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * change zero-padding for TX port access to HAL. - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * . - * - * 06 15 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * . - * - * 06 14 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * fill extra information for revised HIF_TX_HEADER. - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 10 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * change to enqueue TX frame infinitely. - * - * 06 09 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add TX_PACKET_MGMT to indicate the frame is coming from management modules - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 10 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * fill network type field while doing frame identification. - * - * 04 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * surpress compiler warning - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * Tag the packet for QoS on Tx path - * - * 03 30 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * remove driver-land statistics. - * - * 03 29 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * improve none-glue code portability - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port - * - * 03 24 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * generate information for OID_GEN_RCV_OK & OID_GEN_XMIT_OK - * * * * * - * -* 03 10 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * code clean: removing unused variables and structure definitions - * - * 03 08 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) add another spin-lock to protect MsduInfoList due to it might be accessed by different thread. - * * * * 2) change own-back acquiring procedure to wait for up to 16.67 seconds - * - * 03 02 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add mutex to avoid multiple access to qmTxQueue simultaneously. - * - * 02 26 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * avoid referring to NDIS-specific data structure directly from non-glue layer. - * - * 02 24 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add Ethernet destination address information in packet info for TX - * - * 02 10 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) remove unused function in nic_rx.c [which has been handled in que_mgt.c] - * * * * * * 2) firmware image length is now retrieved via NdisFileOpen - * * * * * * 3) firmware image is not structured by (P_IMG_SEC_HDR_T) anymore - * * * * * * 4) nicRxWaitResponse() revised - * * * * * * 5) another set of TQ counter default value is added for fw-download state - * * * * * * 6) Wi-Fi load address is now retrieved from registry too - * - * 02 09 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. Permanent and current MAC address are now retrieved by CMD/EVENT packets instead of hard-coded address - * * * * * * * * * 2. follow MSDN defined behavior when associates to another AP - * * * * * * * * * 3. for firmware download, packet size could be up to 2048 bytes - * - * 02 08 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * prepare for implementing fw download logic - * - * 01 27 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. eliminate improper variable in rHifInfo - * * * * * * * * * 2. block TX/ordinary OID when RF test mode is engaged - * * * * * * * * * 3. wait until firmware finish operation when entering into and leaving from RF test mode - * * * * * * * * * 4. correct some HAL implementation - * - * 01 13 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled the Burst_End Indication mechanism - * - * 01 13 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * TX: fill ucWlanHeaderLength/ucPktFormtId_Flags according to info provided by prMsduInfo - * - * 12 30 2009 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) According to CMD/EVENT documentation v0.8, - * * * * * * * * * * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used, - * * * * * * * * * * and result is retrieved by get ATInfo instead - * * * * * * * * * * 2) add 4 counter for recording aggregation statistics -** \main\maintrunk.MT6620WiFiDriver_Prj\44 2009-12-10 16:52:15 GMT mtk02752 -** remove unused API -** \main\maintrunk.MT6620WiFiDriver_Prj\43 2009-12-07 22:44:24 GMT mtk02752 -** correct assertion criterion -** \main\maintrunk.MT6620WiFiDriver_Prj\42 2009-12-07 21:15:52 GMT mtk02752 -** correct trivial mistake -** \main\maintrunk.MT6620WiFiDriver_Prj\41 2009-12-04 15:47:21 GMT mtk02752 -** + always append a dword of zero on TX path to avoid TX aggregation to triggered on uninitialized data -** + add more assertion for packet size check -** \main\maintrunk.MT6620WiFiDriver_Prj\40 2009-12-04 14:51:55 GMT mtk02752 -** nicTxMsduInfo(): save ptr for next entry before attaching to qDataPort -** \main\maintrunk.MT6620WiFiDriver_Prj\39 2009-12-04 11:54:54 GMT mtk02752 -** add 2 assertion for size check -** \main\maintrunk.MT6620WiFiDriver_Prj\38 2009-12-03 16:20:35 GMT mtk01461 -** Add debug message -** \main\maintrunk.MT6620WiFiDriver_Prj\37 2009-11-30 10:57:10 GMT mtk02752 -** 1st DW of WIFI_CMD_T is shared with HIF_TX_HEADER_T -** \main\maintrunk.MT6620WiFiDriver_Prj\36 2009-11-30 09:20:43 GMT mtk02752 -** use TC4 instead of TC5 for command packet -** \main\maintrunk.MT6620WiFiDriver_Prj\35 2009-11-27 11:08:11 GMT mtk02752 -** add flush for reset -** \main\maintrunk.MT6620WiFiDriver_Prj\34 2009-11-26 20:31:22 GMT mtk02752 -** fill prMsduInfo->ucUserPriority -** \main\maintrunk.MT6620WiFiDriver_Prj\33 2009-11-25 21:04:33 GMT mtk02752 -** fill u2SeqNo -** \main\maintrunk.MT6620WiFiDriver_Prj\32 2009-11-24 20:52:12 GMT mtk02752 -** integration with SD1's data path API -** \main\maintrunk.MT6620WiFiDriver_Prj\31 2009-11-24 19:54:25 GMT mtk02752 -** nicTxRetransmitOfOsSendQue & nicTxData but changed to use nicTxMsduInfoList -** \main\maintrunk.MT6620WiFiDriver_Prj\30 2009-11-23 17:53:18 GMT mtk02752 -** add nicTxCmd() for SD1_SD3_DATAPATH_INTEGRATION, which will append only HIF_TX_HEADER. seqNum, -** WIFI_CMD_T will be created inside oid handler -** \main\maintrunk.MT6620WiFiDriver_Prj\29 2009-11-20 15:10:24 GMT mtk02752 -** use TxAccquireResource instead of accessing TCQ directly. -** \main\maintrunk.MT6620WiFiDriver_Prj\28 2009-11-17 22:40:57 GMT mtk01084 -** \main\maintrunk.MT6620WiFiDriver_Prj\27 2009-11-17 17:35:40 GMT mtk02752 -** add nicTxMsduInfoList () implementation -** \main\maintrunk.MT6620WiFiDriver_Prj\26 2009-11-17 11:07:10 GMT mtk02752 -** add nicTxAdjustTcq() implementation -** \main\maintrunk.MT6620WiFiDriver_Prj\25 2009-11-16 22:28:38 GMT mtk02752 -** move aucFreeBufferCount/aucMaxNumOfBuffer into another structure -** \main\maintrunk.MT6620WiFiDriver_Prj\24 2009-11-16 21:45:32 GMT mtk02752 -** add SD1_SD3_DATAPATH_INTEGRATION data path handling -** \main\maintrunk.MT6620WiFiDriver_Prj\23 2009-11-13 13:29:56 GMT mtk01084 -** modify TX hdr format, fix tx retransmission issue -** \main\maintrunk.MT6620WiFiDriver_Prj\22 2009-11-11 10:36:21 GMT mtk01084 -** \main\maintrunk.MT6620WiFiDriver_Prj\21 2009-11-04 14:11:11 GMT mtk01084 -** modify TX SW data structure -** \main\maintrunk.MT6620WiFiDriver_Prj\20 2009-10-29 19:56:17 GMT mtk01084 -** modify HAL part -** \main\maintrunk.MT6620WiFiDriver_Prj\19 2009-10-13 21:59:23 GMT mtk01084 -** update for new HW design -** \main\maintrunk.MT6620WiFiDriver_Prj\18 2009-10-02 14:00:18 GMT mtk01725 -** \main\maintrunk.MT6620WiFiDriver_Prj\17 2009-05-20 12:26:06 GMT mtk01461 -** Assign SeqNum to CMD Packet -** \main\maintrunk.MT6620WiFiDriver_Prj\16 2009-05-19 10:54:04 GMT mtk01461 -** Add debug message -** \main\maintrunk.MT6620WiFiDriver_Prj\15 2009-05-12 09:41:55 GMT mtk01461 -** Fix Query Command need resp issue -** \main\maintrunk.MT6620WiFiDriver_Prj\14 2009-04-29 15:44:38 GMT mtk01461 -** Move OS dependent code to kalQueryTxOOBData() -** \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-04-28 10:40:03 GMT mtk01461 -** Add nicTxReleaseResource() for SDIO_STATUS_ENHANCE, and also fix the TX aggregation issue for 1x packet to TX1 port -** \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-04-21 09:50:47 GMT mtk01461 -** Update nicTxCmd() for moving wait RESP function call to wlanSendCommand() -** \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-04-17 19:56:32 GMT mtk01461 -** Move the CMD_INFO_T related function to cmd_buf.c -** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-04-17 18:14:40 GMT mtk01426 -** Update OOB query for TX packet -** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-04-14 15:51:32 GMT mtk01426 -** Support PKGUIO -** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-04-02 17:26:40 GMT mtk01461 -** Add virtual OOB for HIF LOOPBACK SW PRETEST -** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-04-01 10:54:43 GMT mtk01461 -** Add function for SDIO_TX_ENHANCE -** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-03-23 21:53:47 GMT mtk01461 -** Add code for retransmit of rOsSendQueue, mpSendPacket(), and add code for TX Checksum offload, Loopback Test. -** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-03-23 00:33:51 GMT mtk01461 -** Add code for TX Data & Cmd Packet -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-18 20:25:40 GMT mtk01461 -** Fix LINT warning -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-16 09:10:30 GMT mtk01461 -** Update TX PATH API -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:26:04 GMT mtk01426 -** Init for develop -** -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/que_mgt.c b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/que_mgt.c index dd00859d4608..a809e9754a44 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/nic/que_mgt.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/nic/que_mgt.c @@ -1,459 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/nic/que_mgt.c#1 -*/ - -/*! \file "que_mgt.c" - \brief TX/RX queues management - - The main tasks of queue management include TC-based HIF TX flow control, - adaptive TC quota adjustment, HIF TX grant scheduling, Power-Save - forwarding control, RX packet reordering, and RX BA agreement management. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: que_mgt.c -** -** 04 11 2013 yuche.tsai -** [ALPS00542142] [Pre-SQC][6627][W]use wifi direct press cancel connect, phone all stop. -** Drop the probe response packet when absent. -** -** 04 09 2013 yuche.tsai -** [ALPS00542142] [Pre-SQC][6627][W]use wifi direct press cancel connect, phone all stop. -** Fix CMD buffer short issue. -** -** 04 09 2013 yuche.tsai -** [ALPS00542142] [Pre-SQC][6627][W]use wifi direct press cancel connect, phone all stop. -** Fix CMD buffer short issue. - * - * 03 02 2012 terry.wu - * NULL - * Sync CFG80211 modification from branch 2,2. - * - * 02 23 2012 eddie.chen - * [WCXRP00001194] [MT6620][DRV/FW] follow admission control bit to change the enqueue rule - * Change the enqueue policy when ACM = 1. - * - * 11 22 2011 yuche.tsai - * NULL - * Code refine, remove one #if 0 code. - * - * 11 19 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Add xlog for tx - * - * 11 18 2011 yuche.tsai - * NULL - * CONFIG P2P support RSSI query, default turned off. - * - * 11 18 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Fix xlog format to hex format - * - * 11 17 2011 tsaiyuan.hsu - * [WCXRP00001115] [MT6620 Wi-Fi][DRV] avoid deactivating staRec when changing state 3 to 3. - * avoid deactivating staRec when changing state from 3 to 3. - * - * 11 11 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * add debug msg for xlog. - * - * 11 11 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * add debug counters of bb and ar for xlog. - * - * 11 10 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Use short name for xlog. - * - * 11 10 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Modify the QM xlog level and remove LOG_FUNC. - * - * 11 10 2011 chinglan.wang - * NULL - * [WiFi WPS]Can't switch to new AP via WPS PBC when there existing a connection to another AP. - * - * 11 09 2011 chinglan.wang - * NULL - * [WiFi direct]Can't make P2P connect via PBC. - * - * 11 08 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Add xlog function. - * - * 11 07 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * add debug counters and periodically dump counters for debugging. - * - * 11 01 2011 chinglan.wang - * NULL - * Modify the Wi-Fi method of the flush TX queue when disconnect the AP. - * If disconnect the AP and flush all the data frame in the TX queue, WPS cannot do the 4-way handshake to connect to - * the AP.. - * - * 10 25 2011 wh.su - * [WCXRP00001059] [MT6620 Wi-Fi][Driver][P2P] Fixed sometimes data (1x) will not indicate to upper layer due ba check - * un-expect - * let the Rx BA accept even the sta not valid. - * - * 09 28 2011 tsaiyuan.hsu - * [WCXRP00000900] [MT5931 Wi-Fi] Improve balance of TX and RX - * enlarge window size only by 4. - * - * 09 01 2011 tsaiyuan.hsu - * [WCXRP00000900] [MT5931 Wi-Fi] Improve balance of TX and RX - * set rx window size as twice buffer size. - * - * 08 23 2011 yuche.tsai - * NULL - * Fix multicast address list issue. - * - * 08 03 2011 tsaiyuan.hsu - * [WCXRP00000900] [MT5931 Wi-Fi] Improve balance of TX and RX - * force window size at least 16. - * - * 08 02 2011 yuche.tsai - * [WCXRP00000896] [Volunteer Patch][WiFi Direct][Driver] GO with multiple client, TX deauth to a disconnecting device - * issue. - * Fix GO send deauth frame issue. - * - * 07 26 2011 eddie.chen - * [WCXRP00000874] [MT5931][DRV] API for query the RX reorder queued packets counter - * API for query the RX reorder queued packets counter. - * - * 07 07 2011 eddie.chen - * [WCXRP00000834] [MT6620 Wi-Fi][DRV] Send 1x packet when peer STA is in PS. - * Add setEvent when free quota is updated. - * - * 07 05 2011 eddie.chen - * [WCXRP00000834] [MT6620 Wi-Fi][DRV] Send 1x packet when peer STA is in PS. - * Send 1x when peer STA is in PS. - * - * 05 31 2011 eddie.chen - * [WCXRP00000753] [MT5931 Wi-Fi][DRV] Adjust QM for MT5931 - * Fix the QM quota in MT5931. - * - * 05 11 2011 eddie.chen - * [WCXRP00000709] [MT6620 Wi-Fi][Driver] Check free number before copying broadcast packet - * Fix dest type when GO packet copying. - * - * 05 09 2011 yuche.tsai - * [WCXRP00000712] [Volunteer Patch][MT6620][Driver] Sending deauth issue when Hot spot is disabled. (GO is dissolved) - * Deauthentication frame is not bound to network active status. - * - * 05 09 2011 eddie.chen - * [WCXRP00000709] [MT6620 Wi-Fi][Driver] Check free number before copying broadcast packet - * Check free number before copying broadcast packet. - * - * 04 14 2011 eddie.chen - * [WCXRP00000603] [MT6620 Wi-Fi][DRV] Fix Klocwork warning - * Check the SW RFB free. Fix the compile warning.. - * - * 04 12 2011 eddie.chen - * [WCXRP00000617] [MT6620 Wi-Fi][DRV/FW] Fix for sigma - * Fix the sta index in processing security frame - * Simple flow control for TC4 to avoid mgt frames for PS STA to occupy the TC4 - * Add debug message. - * - * 04 11 2011 yuche.tsai - * [WCXRP00000627] [Volunteer Patch][MT6620][Driver] Pending MMPUD of P2P Network may crash system issue. - * Fix kernel panic issue when MMPDU of P2P is pending in driver. - * - * 04 08 2011 eddie.chen - * [WCXRP00000617] [MT6620 Wi-Fi][DRV/FW] Fix for sigma - * Fix for sigma - * - * 03 28 2011 eddie.chen - * [WCXRP00000603] [MT6620 Wi-Fi][DRV] Fix Klocwork warning - * Fix Klockwork warning. - * - * 03 28 2011 eddie.chen - * [WCXRP00000602] [MT6620 Wi-Fi][DRV] Fix wmm parameters in beacon for BOW - * Fix wmm parameters in beacon for BOW. - * - * 03 15 2011 eddie.chen - * [WCXRP00000554] [MT6620 Wi-Fi][DRV] Add sw control debug counter - * Add sw debug counter for QM. - * - * 02 23 2011 eddie.chen - * [WCXRP00000463] [MT6620 Wi-Fi][FW/Driver][Hotspot] Cannot update WMM PS STA's partital bitmap - * Fix parsing WMM INFO and bmp delivery bitmap definition. - * - * 02 17 2011 eddie.chen - * [WCXRP00000458] [MT6620 Wi-Fi][Driver] BOW Concurrent - ProbeResp was exist in other channel - * 1) Change GetFrameAction decision when BSS is absent. - * 2) Check channel and resource in processing ProbeRequest - * - * 02 08 2011 eddie.chen - * [WCXRP00000426] [MT6620 Wi-Fi][FW/Driver] Add STA aging timeout and defualtHwRatein AP mode - * Add event STA agint timeout - * - * 01 27 2011 tsaiyuan.hsu - * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support - * add roaming fsm - * 1. not support 11r, only use strength of signal to determine roaming. - * 2. not enable CFG_SUPPORT_ROAMING until completion of full test. - * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw - * 4. assume that change of link quality in smooth way. - * - * 01 25 2011 yuche.tsai - * [WCXRP00000388] [Volunteer Patch][MT6620][Driver/Fw] change Station Type in station record. - * Change Station Type in Station Record, Modify MACRO definition for getting station type & network type index & Role. - * - * 01 24 2011 eddie.chen - * [WCXRP00000385] [MT6620 Wi-Fi][DRV] Add destination decision for forwarding packets - * Remove comments. - * - * 01 24 2011 eddie.chen - * [WCXRP00000385] [MT6620 Wi-Fi][DRV] Add destination decision for forwarding packets - * Add destination decision in AP mode. - * - * 01 14 2011 wh.su - * [WCXRP00000099] [MT6620 Wi-Fi] [Driver] workaround to let the de-authentication can be send out[WCXRP00000326] - * [MT6620][Wi-Fi][Driver] check in the binary format gl_sec.o.new instead of use change type!!! - * Allow 802.1x can be send even the net is not active due the drver / fw sync issue. - * - * 01 13 2011 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, -Add per station flow control when STA is in PS - * Fix typo and compile error. - * - * 01 12 2011 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, -Add per station flow control when STA is in PS - * Fix WMM parameter condition for STA - * - * 01 12 2011 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, -Add per station flow control when STA is in PS - * 1) Check Bss if support QoS before adding WMMIE - * 2) Check if support prAdapter->rWifiVar QoS and uapsd in flow control - * - * 01 12 2011 george.huang - * [WCXRP00000355] [MT6620 Wi-Fi] Set WMM-PS related setting with qualifying AP capability - * Update MQM for WMM IE generation method - * - * 01 11 2011 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, -Add per station flow control when STA is in PS - - * Add per STA flow control when STA is in PS mode - * - * 01 03 2011 george.huang - * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function - * update prStaRec->fgIsUapsdSupported flag. - * - * 12 29 2010 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, -Add per station flow control when STA is in PS - - * Add WMM parameter for broadcast. - * - * 12 29 2010 eddie.chen - * [WCXRP00000322] Add WMM IE in beacon, -Add per station flow control when STA is in PS - - * 1) PS flow control event - * - * 2) WMM IE in beacon, assoc resp, probe resp - * - * 12 23 2010 george.huang - * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function - * 1. update WMM IE parsing, with ASSOC REQ handling - * 2. extend U-APSD parameter passing from driver to FW - * - * 10 14 2010 wh.su - * [WCXRP00000099] [MT6620 Wi-Fi] [Driver] workaround to let the de-authentication can be send out - * use the #14 and modify the add code for check MMPDU. - * - * 10 14 2010 wh.su - * [WCXRP00000099] [MT6620 Wi-Fi] [Driver] workaround to let the de-authentication can be send out - * only MMPDU not check the netActive flag. - * - * 10 14 2010 wh.su - * [WCXRP00000099] [MT6620 Wi-Fi] [Driver] workaround to let the de-authentication can be send out - * not check the netActive flag for mgmt . - * - * 10 04 2010 cp.wu - * [WCXRP00000077] [MT6620 Wi-Fi][Driver][FW] Eliminate use of ENUM_NETWORK_TYPE_T and replaced by - * ENUM_NETWORK_TYPE_INDEX_T only - * remove ENUM_NETWORK_TYPE_T definitions - * - * 09 21 2010 kevin.huang - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * Eliminate Linux Compile Warning - * - * 08 30 2010 yarco.yang - * NULL - * Fixed klockwork error message - * - * 08 18 2010 yarco.yang - * NULL - * 1. Fixed HW checksum offload function not work under Linux issue. - * 2. Add debug message. - * - * 08 10 2010 yarco.yang - * NULL - * Code refine - * - * 08 06 2010 yarco.yang - * NULL - * Update qmGetFrameAction() to allow P2P MGMT frame w/o STA_Record still can perform TX action - * - * 07 26 2010 cp.wu - * - * AIS-FSM FIX: return channel privilege even when the privilege is not granted yet - * QM: qmGetFrameAction() won't assert when corresponding STA-REC index is not found - * - * 07 20 2010 yarco.yang - * - * Add to SetEvent when BSS is from Absent to Present or STA from PS to Awake - * - * 07 16 2010 yarco.yang - * - * 1. Support BSS Absence/Presence Event - * 2. Support STA change PS mode Event - * 3. Support BMC forwarding for AP mode. - * - * 07 14 2010 yarco.yang - * - * 1. Remove CFG_MQM_MIGRATION - * 2. Add CMD_UPDATE_WMM_PARMS command - * - * 07 13 2010 yarco.yang - * - * [WPD00003849] - * [MT6620 and MT5931] SW Migration, add qmGetFrameAction() API for CMD Queue Processing - * - * 07 09 2010 yarco.yang - * - * [MT6620 and MT5931] SW Migration: Add ADDBA support - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 07 08 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * . - * - * 07 06 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Use fgInUse instead of fgIsValid for De-queue judgement - * - * 07 06 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * For MMPDU, STA_REC will be decided by caller module - * - * 07 06 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Add MGMT Packet type for HIF_TX_HEADER - * - * 06 29 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * replace g_rQM with Adpater->rQM - * - * 06 25 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * add API in que_mgt to retrieve sta-rec index for security frames. - * - * 06 23 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Merge g_arStaRec[] into adapter->arStaRec[] - * - * 06 21 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Support CFG_MQM_MIGRATION flag - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 03 31 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Refined the debug msg - * - * 03 30 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * comment out one assertion which refer to undefined data member. - * - * 03 30 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled adaptive TC resource control - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port - * -* 03 17 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Changed STA_REC index determination rules (DA=BMCAST always --> STA_REC_INDEX_BMCAST) - * - * 03 11 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Fixed buffer leak when processing BAR frames - * - * 03 02 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * For TX packets with STA_REC index = STA_REC_INDEX_NOT_FOUND, use TC5 - * - * 03 01 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Fixed STA_REC index determination bug (fgIsValid shall be checked) - * - * 02 25 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Refined function qmDetermineStaRecIndex() for BMCAST packets - * - * 02 25 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled multi-STA TX path with fairness - * - * 02 24 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled dynamically activating and deactivating STA_RECs - * - * 02 24 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Added code for dynamic activating and deactivating STA_RECs. - * - * 01 13 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled the 802.1x path - * - * 01 13 2010 tehuang.liu - * [WPD00001943]Create WiFi test driver framework on WinXP - * Enabled the Burst_End Indication mechanism -** \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-12-14 15:01:37 GMT MTK02468 -** Fixed casting for qmAddRxBaEntry() -** \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-12-10 16:51:03 GMT mtk02752 -** remove SD1_SD3.. flag -** \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-12-09 14:07:25 GMT MTK02468 -** Added RX buffer reordering functions -** \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-12-04 13:34:16 GMT MTK02468 -** Modified Flush Queue function to let queues be reinitialized -** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-12-04 13:18:25 GMT MTK02468 -** Added flushing per-Type queues code -** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-12-02 23:39:49 GMT MTK02468 -** Added Debug msgs and fixed incorrect assert -** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-11-26 23:50:27 GMT MTK02468 -** Bug fixing (qmDequeueTxPackets local variable initialization) -** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-11-26 09:39:25 GMT mtk02752 -** correct and surpress PREfast warning -** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-11-23 22:10:55 GMT mtk02468 -** Used SD1_SD3_DATAPATH_INTEGRATION -** \main\maintrunk.MT6620WiFiDriver_Prj\1 2009-11-23 22:02:30 GMT mtk02468 -** Initial version -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_bow.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_bow.c index 6f5c0bcdd90b..4703908131f5 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_bow.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_bow.c @@ -1,190 +1,16 @@ -/* -** Id: @(#) gl_bow.c@@ -*/ - -/*! \file gl_bow.c - \brief Main routines of Linux driver interface for 802.11 PAL (BT 3.0 + HS) - - This file contains the main routines of Linux driver for MediaTek Inc. 802.11 - Wireless LAN Adapters. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: gl_bow.c - * - * 02 16 2012 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * [ALPS00235223] [Rose][ICS][Cross Feature][AEE-IPANIC]The device reboot automatically and then the "KE" pops up - * after you turn on the "Airplane mode".(once) - * - * [Root Cause] - * PAL operates BOW char dev poll after BOW char dev is registered. - * - * [Solution] - * Rejects PAL char device operation after BOW is unregistered or when wlan GLUE_FLAG_HALT is set. - * - * This is a workaround for BOW driver robustness, happens only in ICS. - * - * Root cause should be fixed by CR [ALPS00231570] - * - * 02 03 2012 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * [ALPS00118114] [Rose][ICS][Free Test][Bluetooth]The "KE" pops up after you turn on the airplane mode.(5/5) - * - * [Root Cause] - * PAL operates BOW char dev poll after BOW char dev is registered. - * - * [Solution] - * Rejects PAL char device operation after BOW is unregistered. - * - * Happens only in ICS. - * - * Notified PAL owener to reivew MTKBT/PAL closing BOW char dev procedure. - * - * [Side Effect] - * None. - * - * 01 16 2012 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Support BOW for 5GHz band. - * - * 11 10 2011 cp.wu - * [WCXRP00001098] [MT6620 Wi-Fi][Driver] Replace printk by DBG LOG macros in linux porting layer - * 1. eliminaite direct calls to printk in porting layer. - * 2. replaced by DBGLOG, which would be XLOG on ALPS platforms. - * - * 10 25 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Modify ampc0 char device for major number 151 for all MT6575 projects. - * - * 07 28 2011 cp.wu - * [WCXRP00000884] [MT6620 Wi-Fi][Driver] Deprecate ioctl interface by unlocked ioctl - * unlocked_ioctl returns as long instead of int. - * - * 07 28 2011 cp.wu - * [WCXRP00000884] [MT6620 Wi-Fi][Driver] Deprecate ioctl interface by unlocked ioctl - * migrate to unlocked ioctl interface - * - * 04 12 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Add WMM IE for BOW initiator data. - * - * 04 10 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Change Link disconnection event procedure for hotspot and change skb length check to 1514 bytes. - * - * 04 09 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Change Link connection event procedure and change skb length check to 1512 bytes. - * - * 03 27 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Support multiple physical link. - * - * 03 06 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Sync BOW Driver to latest person development branch version.. - * - * 03 03 2011 jeffrey.chang - * [WCXRP00000512] [MT6620 Wi-Fi][Driver] modify the net device relative functions to support the H/W multiple queue - * support concurrent network - * - * 03 03 2011 jeffrey.chang - * [WCXRP00000512] [MT6620 Wi-Fi][Driver] modify the net device relative functions to support the H/W multiple queue - * replace alloc_netdev to alloc_netdev_mq for BoW - * - * 03 03 2011 jeffrey.chang - * [WCXRP00000512] [MT6620 Wi-Fi][Driver] modify the net device relative functions to support the H/W multiple queue - * modify net device relative functions to support multiple H/W queues - * - * 02 15 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Update net register and BOW for concurrent features. - * - * 02 10 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Fix kernel API change issue. - * Before ALPS 2.2 (2.2 included), kfifo_alloc() is - * struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask, spinlock_t *lock); - * After ALPS 2.3, kfifo_alloc() is changed to - * int kfifo_alloc(struct kfifo *fifo, unsigned int size, gfp_t gfp_mask); - * - * 02 09 2011 cp.wu - * [WCXRP00000430] [MT6620 Wi-Fi][Firmware][Driver] Create V1.2 branch for MT6620E1 and MT6620E3 - * create V1.2 driver branch based on label MT6620_WIFI_DRIVER_V1_2_110209_1031 - * with BOW and P2P enabled as default - * - * 02 08 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Replace kfifo_get and kfifo_put with kfifo_out and kfifo_in. - * Update BOW get MAC status, remove returning event for AIS network type. - * - * 01 12 2011 cp.wu - * [WCXRP00000357] [MT6620 Wi-Fi][Driver][Bluetooth over Wi-Fi] add another net device interface for BT AMP - * implementation of separate BT_OVER_WIFI data path. - * - * 01 12 2011 cp.wu - * [WCXRP00000356] [MT6620 Wi-Fi][Driver] fill mac header length for security frames 'cause hardware header translation - * needs such information - * fill mac header length information for 802.1x frames. - * - * 11 11 2010 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Fix BoW timer assert issue. - * - * 09 14 2010 chinghwa.yu - * NULL - * Add bowRunEventAAAComplete. - * - * 09 14 2010 cp.wu - * NULL - * correct typo: POLLOUT instead of POLL_OUT - * - * 09 13 2010 cp.wu - * NULL - * add waitq for poll() and read(). - * - * 08 24 2010 chinghwa.yu - * NULL - * Update BOW for the 1st time. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 05 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * change variable names for multiple physical link to match with coding convention - * - * 05 05 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * multiple BoW interfaces need to compare with peer address - * - * 04 28 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * change prefix for data structure used to communicate with 802.11 PAL - * to avoid ambiguous naming with firmware interface - * - * 04 28 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * fix kalIndicateBOWEvent. - * - * 04 27 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add multiple physical link support - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * * * * * * * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability - * * * * * * * * * * * * * * * * 2) command sequence number is now increased atomically - * * * * * * * * * * * * * * * * 3) private data could be hold and taken use for other purpose -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_cfg80211.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_cfg80211.c index b90291079d5d..368545892c45 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_cfg80211.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_cfg80211.c @@ -1,40 +1,16 @@ -/* -** Id: @(#) gl_cfg80211.c@@ -*/ - -/*! \file gl_cfg80211.c - \brief Main routines for supporintg MT6620 cfg80211 control interface - - This file contains the support routines of Linux driver for MediaTek Inc. 802.11 - Wireless LAN Adapters. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: gl_cfg80211.c -** -** 09 05 2013 cp.wu -** correct length to pass to wlanoidSetBssid() -** -** 09 04 2013 cp.wu -** fix typo -** -** 09 03 2013 cp.wu -** add path for reassociation -** -** 11 23 2012 yuche.tsai -** [ALPS00398671] [Acer-Tablet] Remove Wi-Fi Direct completely -** Fix bug of WiFi may reboot under user load, when WiFi Direct is removed.. -** -** 09 12 2012 wcpadmin -** [ALPS00276400] Remove MTK copyright and legal header on GPL/LGPL related packages -** . -** -** 08 30 2012 chinglan.wang -** [ALPS00349664] [6577JB][WIFI] Phone can not connect to AP secured with AES via WPS in 802.11n Only -** . - * -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c index e8c8e0ebe3f3..09b4c648e6a6 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c @@ -1,691 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/os/linux/gl_kal.c#3 -*/ - -/*! \file gl_kal.c - \brief GLUE Layer will export the required procedures here for internal driver stack. - - This file contains all routines which are exported from GLUE Layer to internal - driver stack. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: gl_kal.c -** -** 08 20 2012 yuche.tsai -** NULL -** Fix possible KE issue. - * - * 07 17 2012 yuche.tsai - * NULL - * Let netdev bring up. - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 06 13 2012 yuche.tsai - * NULL - * Update maintrunk driver. - * Add support for driver compose assoc request frame. - * - * 05 31 2012 terry.wu - * NULL - * . - * - * 03 26 2012 cp.wu - * [WCXRP00001187] [MT6620 Wi-Fi][Driver][Android] Add error handling while firmware image doesn't exist - * invoke put_cred() after get_current_cred() calls. - * - * 03 07 2012 yuche.tsai - * NULL - * Fix compile error when WiFi Direct is off. - * - * 03 02 2012 terry.wu - * NULL - * Snc CFG80211 modification for ICS migration from branch 2.2. - * - * 02 20 2012 cp.wu - * [WCXRP00001187] [MT6620 Wi-Fi][Driver][Android] Add error handling while firmware image doesn't exist - * do not need to invoke free() while firmware image file doesn't exist - * - * 01 05 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * Adding the related ioctl / wlan oid function to set the Tx power cfg. - * - * 01 02 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * Adding the proto type function for set_int set_tx_power and get int get_ch_list. - * - * 11 21 2011 cp.wu - * [WCXRP00001118] [MT6620 Wi-Fi][Driver] Corner case protections to pass Monkey testing - * 1. wlanoidQueryBssIdList might be passed with a non-zero length but a NULL pointer of buffer - * add more checking for such cases - * - * 2. kalSendComplete() might be invoked with a packet belongs to P2P network right after P2P is unregistered. - * add some tweaking to protect such cases because that net device has become invalid. - * - * 11 18 2011 yuche.tsai - * NULL - * CONFIG P2P support RSSI query, default turned off. - * - * 11 16 2011 yuche.tsai - * NULL - * Avoid using work thread. - * - * 11 10 2011 cp.wu - * [WCXRP00001098] [MT6620 Wi-Fi][Driver] Replace printk by DBG LOG macros in linux porting layer - * 1. eliminaite direct calls to printk in porting layer. - * 2. replaced by DBGLOG, which would be XLOG on ALPS platforms. - * - * 10 12 2011 wh.su - * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP - * adding the 802.11w related function and define . - * - * 09 23 2011 yuche.tsai - * [WCXRP00000998] [Volunteer Patch][WiFi Direct][FW] P2P Social Channel & country domain issue - * Regulation domain feature check in. - * - * 08 12 2011 cp.wu - * [WCXRP00000913] [MT6620 Wi-Fi] create repository of source code dedicated for MT6620 E6 ASIC - * load WIFI_RAM_CODE_E6 for MT6620 E6 ASIC. - * - * 07 18 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Add CMD/Event for RDD and BWCS. - * - * 06 13 2011 eddie.chen - * [WCXRP00000779] [MT6620 Wi-Fi][DRV] Add tx rx statistics in linux and use netif_rx_ni - * Add tx rx statistics and netif_rx_ni. - * - * 04 15 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Add BOW short range mode. - * - * 04 12 2011 cp.wu - * [WCXRP00000635] [MT6620 Wi-Fi][Driver] Clear pending security frames when QM clear pending data frames for dedicated - * network type - * clear pending security frames for dedicated network type when BSS is being deactivated/disconnected - * - * 04 08 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * correct i4TxPendingFrameNum decreasing. - * - * 03 23 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * apply multi-queue operation only for linux kernel > 2.6.26 - * - * 03 21 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * portability for compatible with linux 2.6.12. - * - * 03 21 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * improve portability for awareness of early version of linux kernel and wireless extension. - * - * 03 18 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically continuous memory shortage - * after system running for a long period - * refix ... - * - * 03 18 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically continuous memory shortage - * after system running for a long period - * correct compiling warning/error. - * - * 03 18 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically continuous memory shortage - * after system running for a long period - * add more robust fault tolerance design when pre-allocation failed. (rarely happen) - * - * 03 17 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically continuous memory shortage - * after system running for a long period - * use pre-allocated buffer for storing enhanced interrupt response as well - * - * 03 16 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically continuous memory shortage - * after system running for a long period - * 1. pre-allocate physical continuous buffer while module is being loaded - * 2. use pre-allocated physical continuous buffer for TX/RX DMA transfer - * - * The windows part remained the same as before, but added similar APIs to hide the difference. - * - * 03 15 2011 cp.wu - * [WCXRP00000559] [MT6620 Wi-Fi][Driver] Combine TX/RX DMA buffers into a single one to reduce physically continuous - * memory consumption - * 1. deprecate CFG_HANDLE_IST_IN_SDIO_CALLBACK - * 2. Use common coalescing buffer for both TX/RX directions - * - * - * 03 14 2011 jeffrey.chang - * [WCXRP00000546] [MT6620 Wi-Fi][MT6620 Wi-Fi][Driver] fix kernel build warning message - * fix kernel build warning message - * - * 03 07 2011 terry.wu - * [WCXRP00000521] [MT6620 Wi-Fi][Driver] Remove non-standard debug message - * Toggle non-standard debug messages to comments. - * - * 03 06 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Sync BOW Driver to latest person development branch version.. - * - * 03 03 2011 jeffrey.chang - * [WCXRP00000512] [MT6620 Wi-Fi][Driver] modify the net device relative functions to support the H/W multiple queue - * support concurrent network - * - * 03 03 2011 jeffrey.chang - * [WCXRP00000512] [MT6620 Wi-Fi][Driver] modify the net device relative functions to support the H/W multiple queue - * modify net device relative functions to support multiple H/W queues - * - * 03 02 2011 cp.wu - * [WCXRP00000503] [MT6620 Wi-Fi][Driver] Take RCPI brought by association response as initial RSSI right after - * connection is built. - * use RCPI brought by ASSOC-RESP after connection is built as initial RCPI to avoid using a uninitialized MAC-RX RCPI. - * - * 02 21 2011 cp.wu - * [WCXRP00000482] [MT6620 Wi-Fi][Driver] Simplify logic for checking NVRAM existence in driver domain - * simplify logic for checking NVRAM existence only once. - * - * 01 24 2011 cp.wu - * [WCXRP00000382] [MT6620 Wi-Fi][Driver] Track forwarding packet number with notifying tx thread for serving - * 1. add an extra counter for tracking pending forward frames. - * 2. notify TX service thread as well when there is pending forward frame - * 3. correct build errors leaded by introduction of Wi-Fi direct separation module - * - * 01 19 2011 cp.wu - * [WCXRP00000371] [MT6620 Wi-Fi][Driver] make linux glue layer portable for Android 2.3.1 with Linux 2.6.35.7 - * add compile option to check linux version 2.6.35 for different usage of system API to improve portability - * - * 01 12 2011 cp.wu - * [WCXRP00000357] [MT6620 Wi-Fi][Driver][Bluetooth over Wi-Fi] add another net device interface for BT AMP - * implementation of separate BT_OVER_WIFI data path. - * - * 01 10 2011 cp.wu - * [WCXRP00000349] [MT6620 Wi-Fi][Driver] make kalIoctl() of linux port as a thread safe API to avoid potential issues - * due to multiple access - * use mutex to protect kalIoctl() for thread safe. - * - * 11 26 2010 cp.wu - * [WCXRP00000209] [MT6620 Wi-Fi][Driver] Modify NVRAM checking mechanism to warning only with necessary data field - * checking - * 1. NVRAM error is now treated as warning only, thus normal operation is still available but extra scan result used - * to indicate user is attached - * 2. DPD and TX-PWR are needed fields from now on, if these 2 fields are not available then warning message is shown - * - * 11 04 2010 wh.su - * [WCXRP00000164] [MT6620 Wi-Fi][Driver] Support the p2p random SSID - * adding the p2p random ssid support. - * - * 11 02 2010 jeffrey.chang - * [WCXRP00000145] [MT6620 Wi-Fi][Driver] fix issue of byte endian in packet classifier which discards BoW packets - * . - * - * 11 01 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000150] [MT6620 Wi-Fi][Driver] - * Add implementation for querying current TX rate from firmware auto rate module - * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead - * 2) Remove CNM CH-RECOVER event handling - * 3) cfg read/write API renamed with kal prefix for unified naming rules. - * - * 11 01 2010 yarco.yang - * [WCXRP00000149] [MT6620 WI-Fi][Driver]Fine tune performance on MT6516 platform - * Add code to run WlanIST in SDIO callback. - * - * 10 26 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000137] [MT6620 Wi-Fi] [FW] - * Support NIC capability query command - * 1) update NVRAM content template to ver 1.02 - * 2) add compile option for querying NIC capability (default: off) - * 3) modify AIS 5GHz support to run-time option, which could be turned on by registry or NVRAM setting - * 4) correct auto-rate compiler error under linux (treat warning as error) - * 5) simplify usage of NVRAM and REG_INFO_T - * 6) add version checking between driver and firmware - * - * 10 25 2010 jeffrey.chang - * [WCXRP00000129] [MT6620] [Driver] Kernel panic when rmmod module on Andriod platform - * Remove redundant code which cause mismatch of power control release - * - * 10 25 2010 jeffrey.chang - * [WCXRP00000129] [MT6620] [Driver] Kernel panic when rmmod module on Andriod platform - * Remove redundant GLUE_HALT condfition to avoid unmatched release of power control - * - * 10 18 2010 jeffrey.chang - * [WCXRP00000116] [MT6620 Wi-Fi][Driver] Refine the set_scan ioctl to resolve the Android UI hanging issue - * refine the scan ioctl to prevent hanging of Android UI - * - * 10 18 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000086] [MT6620 Wi-Fi][Driver] - * The mac address is all zero at android - * complete implementation of Android NVRAM access - * - * 10 06 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * if there is NVRAM, then use MAC address on NVRAM as default MAC address. - * - * 10 06 2010 cp.wu - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * code reorganization to improve isolation between GLUE and CORE layers. - * - * 10 05 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * 1) add NVRAM access API - * 2) fake scanning result when NVRAM doesn't exist and/or version mismatch. (off by compiler option) - * 3) add OID implementation for NVRAM read/write service - * - * 09 21 2010 cp.wu - * [WCXRP00000053] [MT6620 Wi-Fi][Driver] Reset incomplete and might leads to BSOD when entering RF test with AIS - * associated - * Do a complete reset with STA-REC null checking for RF test re-entry - * - * 09 21 2010 kevin.huang - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * Eliminate Linux Compile Warning - * - * 09 07 2010 wh.su - * NULL - * adding the code for beacon/probe req/ probe rsp wsc ie at p2p. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 30 2010 cp.wu - * NULL - * API added: nicTxPendingPackets(), for simplifying porting layer - * - * 08 20 2010 yuche.tsai - * NULL - * Support second interface indicate when enabling P2P. - * - * 08 18 2010 yarco.yang - * NULL - * 1. Fixed HW checksum offload function not work under Linux issue. - * 2. Add debug message. - * - * 08 16 2010 jeffrey.chang - * NULL - * remove redundant code which cause kernel panic - * - * 08 16 2010 cp.wu - * NULL - * P2P packets are now marked when being queued into driver, and identified later without checking MAC address - * - * 08 02 2010 jeffrey.chang - * NULL - * 1) modify tx service thread to avoid busy looping - * 2) add spin lock declartion for linux build - * - * 07 29 2010 cp.wu - * NULL - * simplify post-handling after TX_DONE interrupt is handled. - * - * 07 28 2010 jeffrey.chang - * NULL - * 1) remove unused spinlocks - * 2) enable encyption ioctls - * 3) fix scan ioctl which may cause supplicant to hang - * - * 07 23 2010 cp.wu - * - * 1) re-enable AIS-FSM beacon timeout handling. - * 2) scan done API revised - * - * 07 23 2010 jeffrey.chang - * - * add new KAL api - * - * 07 23 2010 jeffrey.chang - * - * bug fix: allocate regInfo when disabling firmware download - * - * 07 23 2010 jeffrey.chang - * - * use glue layer api to decrease or increase counter atomically - * - * 07 22 2010 jeffrey.chang - * - * modify tx thread and remove some spinlock - * - * 07 22 2010 jeffrey.chang - * - * use different spin lock for security frame - * - * 07 22 2010 jeffrey.chang - * - * add new spinlock - * - * 07 19 2010 jeffrey.chang - * - * add spinlock for pending security frame count - * - * 07 19 2010 jeffrey.chang - * - * adjust the timer unit to microsecond - * - * 07 19 2010 jeffrey.chang - * - * timer should return value greater than zero - * - * 07 19 2010 jeffrey.chang - * - * add kal api for scanning done - * - * 07 19 2010 jeffrey.chang - * - * modify cmd/data path for new design - * - * 07 19 2010 jeffrey.chang - * - * add new kal api - * - * 07 19 2010 jeffrey.chang - * - * for linux driver migration - * - * 07 19 2010 jeffrey.chang - * - * Linux port modification - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 23 2010 yarco.yang - * [WPD00003837][MT6620]Data Path Refine - * Merge g_arStaRec[] into adapter->arStaRec[] - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * change MAC address updating logic. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 06 01 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * remove unused files. - * - * 05 29 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * fix private ioctl for rftest - * - * 05 29 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * workaround for fixing request_firmware() failure on android 2.1 - * - * 05 28 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * fix kernel panic when debug mode enabled - * - * 05 26 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * 1) Modify set mac address code - * 2) remove power management macro - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * 1) add timeout handler mechanism for pending command packets - * 2) add p2p add/removal key - * - * 05 14 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * Disable network interface after disassociation - * - * 05 10 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * fill network type field while doing frame identification. - * - * 05 07 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * prevent supplicant accessing driver during resume - * - * 04 27 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * identify BT Over Wi-Fi Security frame and mark it as 802.1X frame - * - * 04 27 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * 1) fix firmware download bug - * 2) remove query statistics for acelerating firmware download - * - * 04 27 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * follow Linux's firmware framework, and remove unused kal API - * - * 04 22 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * - * 1) modify rx path code for supporting Wi-Fi direct - * 2) modify config.h since Linux dont need to consider retaining packet - * - * 04 21 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * add for private ioctl support - * - * 04 15 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * change firmware name - * - * 04 14 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * flush pending TX packets while unloading driver - * - * 04 14 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * Set driver own before handling cmd queue - * - * 04 14 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * 1) prGlueInfo->pvInformationBuffer and prGlueInfo->u4InformationBufferLength are no longer used - * 2) fix ioctl - * - * 04 14 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * information buffer for query oid/ioctl is now buffered in prCmdInfo - * * * * * * * instead of glue-layer variable to improve multiple oid/ioctl capability - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * * * * * * * * * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler - * * * * * * * * * * * * * * * * * * capability - * * * * * * * * * * * * * * * * * * 2) command sequence number is now increased atomically - * * * * * * * * * * * * * * * * * * 3) private data could be hold and taken use for other purpose - * - * 04 09 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * fix spinlock usage - * - * 04 09 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * add spinlock for i4TxPendingFrameNum access - * - * 04 09 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * 1) add spinlock - * * 2) add KAPI for handling association info - * - * 04 09 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * fix spinlock usage - * - * 04 09 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * adding firmware download KAPI - * - * 04 07 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * Set MAC address from firmware - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1. free cmdinfo after command is emiited. - * 2. for BoW frames, user priority is extracted from sk_buff directly. - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * finish non-glue layer access to glue variables - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * accessing to firmware load/start address, and access to OID handling information - * * * are now handled in glue layer - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * rWlanInfo should be placed at adapter rather than glue due to most operations - * * * * * * * are done in adapter layer. - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access to prGlueInfo->eParamMediaStateIndicated from non-glue layer - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * (1)deliver the kalOidComplete status to upper layer - * (2) fix spin lock - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add KAL API: kalFlushPendingTxPackets(), and take use of the API - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access to prGlueInfo->rWlanInfo.eLinkAttr.ucMediaStreamMode from non-glue layer. - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * add timeout check in the kalOidComplete - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * improve none-glue code portability - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * code refine: fgTestMode should be at adapter rather than glue due to the device/fw is also involved - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access for prGlueInfo->fgIsCardRemoved in non-glue layer - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) for some OID, never do timeout expiration - * * * 2) add 2 kal API for later integration - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * raising the priority of processing interrupt - * - * 04 01 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * Bug fix: the tx thread will cause starvation of MMC thread, and the interrupt will never come in - * - * 03 30 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * emulate NDIS Pending OID facility - * - * 03 28 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * adding secondary command queue for improving non-glue code portability - * - * 03 26 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * [WPD00003826] Initial import for Linux port - * adding firmware download kal api - * - * 03 25 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add Bluetooth-over-Wifi frame header check - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port -** \main\maintrunk.MT5921\50 2009-09-28 20:19:08 GMT mtk01090 -** Add private ioctl to carry OID structures. Restructure public/private ioctl interfaces to Linux kernel. -** \main\maintrunk.MT5921\49 2009-08-18 22:56:44 GMT mtk01090 -** Add Linux SDIO (with mmc core) support. -** Add Linux 2.6.21, 2.6.25, 2.6.26. -** Fix compile warning in Linux. -** \main\maintrunk.MT5921\48 2009-06-23 23:18:58 GMT mtk01090 -** Add build option BUILD_USE_EEPROM and compile option CFG_SUPPORT_EXT_CONFIG for NVRAM support -** \main\maintrunk.MT5921\47 2008-11-19 11:55:43 GMT mtk01088 -** fixed some lint warning, and rename some variable with pre-fix to avoid the misunderstanding -** \main\maintrunk.MT5921\46 2008-09-02 21:07:42 GMT mtk01461 -** Remove ASSERT(pvBuf) in kalIndicateStatusAndComplete(), this parameter can be NULL -** \main\maintrunk.MT5921\45 2008-08-29 16:03:21 GMT mtk01088 -** remove non-used code for code review, add assert check -** \main\maintrunk.MT5921\44 2008-08-21 00:32:49 GMT mtk01461 -** \main\maintrunk.MT5921\43 2008-05-30 20:27:02 GMT mtk01461 -** Rename KAL function -** \main\maintrunk.MT5921\42 2008-05-30 15:47:29 GMT mtk01461 -** \main\maintrunk.MT5921\41 2008-05-30 15:13:04 GMT mtk01084 -** rename wlanoid -** \main\maintrunk.MT5921\40 2008-05-29 14:15:14 GMT mtk01084 -** remove un-used KAL function -** \main\maintrunk.MT5921\39 2008-05-03 15:17:30 GMT mtk01461 -** Move Query Media Status to GLUE -** \main\maintrunk.MT5921\38 2008-04-24 11:59:44 GMT mtk01461 -** change awake queue threshold and remove code which mark #if 0 -** \main\maintrunk.MT5921\37 2008-04-17 23:06:35 GMT mtk01461 -** Add iwpriv support for AdHocMode setting -** \main\maintrunk.MT5921\36 2008-04-08 15:38:56 GMT mtk01084 -** add KAL function to setting pattern search function enable/ disable -** \main\maintrunk.MT5921\35 2008-04-01 23:53:13 GMT mtk01461 -** Add comment -** \main\maintrunk.MT5921\34 2008-03-26 15:36:48 GMT mtk01461 -** Add update MAC Address for Linux -** \main\maintrunk.MT5921\33 2008-03-18 11:49:34 GMT mtk01084 -** update function for initial value access -** \main\maintrunk.MT5921\32 2008-03-18 10:25:22 GMT mtk01088 -** use kal update associate request at linux -** \main\maintrunk.MT5921\31 2008-03-06 23:43:08 GMT mtk01385 -** 1. add Query Registry Mac address function. -** \main\maintrunk.MT5921\30 2008-02-26 09:47:57 GMT mtk01084 -** modify KAL set network address/ checksum offload part -** \main\maintrunk.MT5921\29 2008-02-12 23:26:53 GMT mtk01461 -** Add debug option - Packet Order for Linux -** \main\maintrunk.MT5921\28 2008-01-09 17:54:43 GMT mtk01084 -** modify the argument of kalQueryPacketInfo() -** \main\maintrunk.MT5921\27 2007-12-24 16:02:03 GMT mtk01425 -** 1. Revise csum offload -** \main\maintrunk.MT5921\26 2007-11-30 17:03:36 GMT mtk01425 -** 1. Fix bugs -** -** \main\maintrunk.MT5921\25 2007-11-29 01:57:17 GMT mtk01461 -** Fix Windows RX multiple packet retain problem -** \main\maintrunk.MT5921\24 2007-11-20 11:24:07 GMT mtk01088 -** <workaround> CR90, not doing the netif_carrier_off to let supplicant 1x pkt can be rcv at hardstattXmit -** \main\maintrunk.MT5921\23 2007-11-09 16:36:44 GMT mtk01425 -** 1. Modify for CSUM offloading with Tx Fragment -** \main\maintrunk.MT5921\22 2007-11-07 18:37:39 GMT mtk01461 -** Add Tx Fragmentation Support -** \main\maintrunk.MT5921\21 2007-11-06 19:34:06 GMT mtk01088 -** add the WPS code, indicate the mgmt frame to upper layer -** \main\maintrunk.MT5921\20 2007-11-02 01:03:21 GMT mtk01461 -** Unify TX Path for Normal and IBSS Power Save + IBSS neighbor learning -** \main\maintrunk.MT5921\19 2007-10-30 11:59:38 GMT MTK01425 -** 1. Update wlanQueryInformation -** \main\maintrunk.MT5921\18 2007-10-30 10:44:57 GMT mtk01425 -** 1. Refine multicast list code -** 2. Refine TCP/IP csum offload code -** -** Revision 1.5 2007/07/17 13:01:18 MTK01088 -** add associate req and rsp function -** -** Revision 1.4 2007/07/13 05:19:19 MTK01084 -** provide timer set functions -** -** Revision 1.3 2007/06/27 02:18:51 MTK01461 -** Update SCAN_FSM, Initial(Can Load Module), Proc(Can do Reg R/W), TX API -** -** Revision 1.2 2007/06/25 06:16:24 MTK01461 -** Update illustrations, gl_init.c, gl_kal.c, gl_kal.h, gl_os.h and RX API -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c index f3fe00706cc9..23bbe1f66974 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c @@ -1,554 +1,16 @@ -/* -** Id: @(#) gl_p2p.c@@ -*/ - -/*! \file gl_p2p.c - \brief Main routines of Linux driver interface for Wi-Fi Direct - - This file contains the main routines of Linux driver for MediaTek Inc. 802.11 - Wireless LAN Adapters. -*/ - -/* -** Log: gl_p2p.c -** -** 09 12 2012 wcpadmin -** [ALPS00276400] Remove MTK copyright and legal header on GPL/LGPL related packages -** . -** -** 08 17 2012 yuche.tsai -** NULL -** Fix compile warning. -** -** 08 16 2012 yuche.tsai -** NULL -** Fix compile warning. -** -** 08 14 2012 yuche.tsai -** NULL -** FPB from ALPS.JB to phase 2 release. -** -** 07 26 2012 yuche.tsai -** [ALPS00324337] [ALPS.JB][Hot-Spot] Driver update for Hot-Spot -** Update driver code of ALPS.JB for hot-spot. -** -** 07 19 2012 yuche.tsai -** NULL -** Code update for JB. - * - * 07 17 2012 yuche.tsai - * NULL - * Fix compile error for JB. - * - * 07 17 2012 yuche.tsai - * NULL - * Let netdev bring up. - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 01 09 2012 terry.wu - * [WCXRP00001166] [Wi-Fi] [Driver] cfg80211 integration for p2p newtork - * cfg80211 integration for p2p network. - * - * 12 19 2011 terry.wu - * [WCXRP00001142] [Wi-Fi] [P2P Driver] XOR local admin bit to generate p2p net device MAC - * XOR local administrated bit to generate net device MAC of p2p network. - * - * 12 02 2011 yuche.tsai - * NULL - * Fix possible KE when unload p2p. - * - * 11 24 2011 yuche.tsai - * NULL - * Fix P2P IOCTL of multicast address bug, add low power driver stop control. - * - * 11 22 2011 yuche.tsai - * NULL - * Update RSSI link quality of P2P Network query method. (Bug fix) - * - * 11 19 2011 yuche.tsai - * NULL - * Add RSSI support for P2P network. - * - * 11 16 2011 yuche.tsai - * [WCXRP00001107] [Volunteer Patch][Driver] Large Network Type index assert in FW issue. - * Avoid using work thread in set p2p multicast address callback. - * - * 11 11 2011 yuche.tsai - * NULL - * Fix work thread cancel issue. - * - * 11 11 2011 yuche.tsai - * NULL - * Fix default device name issue. - * - * 11 08 2011 yuche.tsai - * [WCXRP00001094] [Volunteer Patch][Driver] Driver version & supplicant version query & set support for service - * discovery version check. - * Add support for driver version query & p2p supplicant verseion set. - * For new service discovery mechanism sync. - * - * 11 07 2011 yuche.tsai - * NULL - * [ALPS 00087243] KE in worker thread. - * The multicast address list is scheduled in worker thread. - * Before the worker thread is excuted, if P2P is unloaded, a KE may occur. - * - * 10 26 2011 terry.wu - * [WCXRP00001066] [MT6620 Wi-Fi] [P2P Driver] Fix P2P Oid Issue - * Fix some P2P OID functions didn't raise its flag "fgIsP2pOid" issue. - * - * 10 25 2011 cm.chang - * [WCXRP00001058] [All Wi-Fi][Driver] Fix sta_rec's phyTypeSet and OBSS scan in AP mode - * . - * - * 10 18 2011 yuche.tsai - * [WCXRP00001045] [WiFi Direct][Driver] Check 2.1 branch. - * Support Channel Query. - * - * 10 18 2011 yuche.tsai - * [WCXRP00001045] [WiFi Direct][Driver] Check 2.1 branch. - * New 2.1 branch +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ - * - * 08 26 2011 yuche.tsai - * NULL - * Fix bug of parsing secondary device list type issue. - * - * 08 24 2011 yuche.tsai - * [WCXRP00000919] [Volunteer Patch][WiFi Direct][Driver] Invitation New Feature. - * Invitation Abort. - * - * 08 23 2011 yuche.tsai - * NULL - * Fix multicast address list issue of P2P. - * - * 08 22 2011 chinglan.wang - * NULL - * Fix invitation indication bug.. - * - * 08 16 2011 cp.wu - * [WCXRP00000934] [MT6620 Wi-Fi][Driver][P2P] Wi-Fi hot spot with auto sparse channel residence - * auto channel decision for 2.4GHz hot spot mode - * - * 08 16 2011 chinglan.wang - * NULL - * Add the group id information in the invitation indication. - * - * 08 09 2011 yuche.tsai - * [WCXRP00000919] [Volunteer Patch][WiFi Direct][Driver] Invitation New Feature. - * Invitation Feature add on. - * - * 08 05 2011 yuche.tsai - * [WCXRP00000856] [Volunteer Patch][WiFi Direct][Driver] MT6620 WiFi Direct IOT Issue with BCM solution. - * Add Password ID check for quick connection. - * Also modify some connection policy. - * - * 07 18 2011 chinglan.wang - * NULL - * Add IOC_P2P_GO_WSC_IE (p2p capability). - * - * 06 14 2011 yuche.tsai - * NULL - * Add compile flag to disable persistent group support. - * - * 05 04 2011 chinglan.wang - * [WCXRP00000698] [MT6620 Wi-Fi][P2P][Driver] Add p2p invitation command for the p2p driver - * . - * - * 05 02 2011 yuche.tsai - * [WCXRP00000693] [Volunteer Patch][MT6620][Driver] Clear Formation Flag after TX lifetime timeout. - * Clear formation flag after formation timeout. - * - * 04 22 2011 george.huang - * [WCXRP00000621] [MT6620 Wi-Fi][Driver] Support P2P supplicant to set power mode - * . - * - * 04 21 2011 george.huang - * [WCXRP00000621] [MT6620 Wi-Fi][Driver] Support P2P supplicant to set power mode - * 1. Revise P2P power mode setting. - * 2. Revise fast-PS for concurrent - * - * 04 19 2011 wh.su - * NULL - * Adding length check before doing WPA RSN IE parsing for scan results indicate. - * - * 04 14 2011 yuche.tsai - * [WCXRP00000646] [Volunteer Patch][MT6620][FW/Driver] Sigma Test Modification for some test case. - * Connection flow refine for Sigma test. - * - * 04 08 2011 yuche.tsai - * [WCXRP00000624] [Volunteer Patch][MT6620][Driver] Add device discoverability support for GO. - * Add device discoverability support. - * - * 04 08 2011 george.huang - * [WCXRP00000621] [MT6620 Wi-Fi][Driver] Support P2P supplicant to set power mode - * separate settings of P2P and AIS - * - * 04 07 2011 terry.wu - * [WCXRP00000619] [MT6620 Wi-Fi][Driver] fix kernel panic may occur when removing wlan - * Fix kernel panic may occur when removing wlan driver. - * - * 03 31 2011 wh.su - * [WCXRP00000614] [MT6620 Wi-Fi][Driver] P2P: Update beacon content while setting WSC IE - * Update the wsc ie to beacon content. - * - * 03 25 2011 wh.su - * NULL - * add the sample code for set power mode and get power mode. - * - * 03 25 2011 yuche.tsai - * NULL - * Improve some error handleing. - * - * 03 22 2011 george.huang - * [WCXRP00000504] [MT6620 Wi-Fi][FW] Support Sigma CAPI for power saving related command - * link with supplicant commands - * - * 03 22 2011 yuche.tsai - * [WCXRP00000584] [Volunteer Patch][MT6620][Driver] Add beacon timeout support for WiFi Direct. - * Modify formation policy. - * - * 03 22 2011 yuche.tsai - * NULL - * Modify formation policy setting. - * - * 03 18 2011 yuche.tsai - * [WCXRP00000574] [Volunteer Patch][MT6620][Driver] Modify P2P FSM Connection Flow - * Modify connection flow after Group Formation Complete, or device connect to a GO. - * Instead of request channel & connect directly, we use scan to allocate channel bandwidth & connect after RX BCN. - * - * 03 15 2011 wh.su - * [WCXRP00000563] [MT6620 Wi-Fi] [P2P] Set local config method while set password Id ready - * set lccal config method method while set password Id ready. - * - * 03 15 2011 yuche.tsai - * [WCXRP00000560] [Volunteer Patch][MT6620][Driver] P2P Connection from UI using KEY/DISPLAY issue - * Fix some configure method issue. - * - * 03 15 2011 jeffrey.chang - * [WCXRP00000558] [MT6620 Wi-Fi][MT6620 Wi-Fi][Driver] refine the queue selection algorithm for WMM - * refine queue_select function - * - * 03 13 2011 wh.su - * [WCXRP00000530] [MT6620 Wi-Fi] [Driver] skip doing p2pRunEventAAAComplete after send assoc response Tx Done - * add code for avoid compiling warning. - * - * 03 10 2011 yuche.tsai - * NULL - * Add P2P API. - * - * 03 10 2011 terry.wu - * [WCXRP00000505] [MT6620 Wi-Fi][Driver/FW] WiFi Direct Integration - * Remove unnecessary assert and message. - * - * 03 08 2011 wh.su - * [WCXRP00000488] [MT6620 Wi-Fi][Driver] Support the SIGMA set p2p parameter to driver - * support the power save related p2p setting. - * - * 03 07 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * rename the define to anti_pviracy. - * - * 03 05 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * add the code to get the check rsponse and indicate to app. - * - * 03 03 2011 jeffrey.chang - * [WCXRP00000512] [MT6620 Wi-Fi][Driver] modify the net device relative functions to support the H/W multiple queue - * support concurrent network - * - * 03 03 2011 jeffrey.chang - * [WCXRP00000512] [MT6620 Wi-Fi][Driver] modify the net device relative functions to support the H/W multiple queue - * modify P2P's netdevice functions to support multiple H/W queues - * - * 03 03 2011 cp.wu - * [WCXRP00000283] [MT6620 Wi-Fi][Driver][Wi-Fi Direct] Implementation of interface for supporting Wi-Fi Direct Service - * Discovery - * for get request, the buffer length to be copied is header + payload. - * - * 03 02 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * add code to let the beacon and probe response for Auto GO WSC . - * - * 03 02 2011 cp.wu - * [WCXRP00000283] [MT6620 Wi-Fi][Driver][Wi-Fi Direct] Implementation of interface for supporting Wi-Fi Direct Service - * Discovery - * add a missed break. - * - * 03 01 2011 yuche.tsai - * [WCXRP00000501] [Volunteer Patch][MT6620][Driver] No common channel issue when doing GO formation - * Update channel issue when doing GO formation.. - * - * 02 25 2011 wh.su - * [WCXRP00000488] [MT6620 Wi-Fi][Driver] Support the SIGMA set p2p parameter to driver - * add the Operation channel setting. - * - * 02 23 2011 wh.su - * [WCXRP00000488] [MT6620 Wi-Fi][Driver] Support the SIGMA set p2p parameter to driver - * fixed the set int ioctl set index and value map to driver issue. - * - * 02 22 2011 wh.su - * [WCXRP00000488] [MT6620 Wi-Fi][Driver] Support the SIGMA set p2p parameter to driver - * adding the ioctl set int from supplicant, and can used to set the p2p parameters - * - * 02 21 2011 terry.wu - * [WCXRP00000476] [MT6620 Wi-Fi][Driver] Clean P2P scan list while removing P2P - * Clean P2P scan list while removing P2P. - * - * 02 18 2011 wh.su - * [WCXRP00000471] [MT6620 Wi-Fi][Driver] Add P2P Provison discovery append Config Method attribute at WSC IE - * fixed the ioctl setting that index not map to spec defined config method. - * - * 02 17 2011 wh.su - * [WCXRP00000471] [MT6620 Wi-Fi][Driver] Add P2P Provison discovery append Config Method attribute at WSC IE - * append the WSC IE config method attribute at provision discovery request. - * - * 02 17 2011 wh.su - * [WCXRP00000448] [MT6620 Wi-Fi][Driver] Fixed WSC IE not send out at probe request - * modify the structure pointer for set WSC IE. - * - * 02 16 2011 wh.su - * [WCXRP00000448] [MT6620 Wi-Fi][Driver] Fixed WSC IE not send out at probe request - * fixed the probe request send out without WSC IE issue (at P2P). - * - * 02 09 2011 cp.wu - * [WCXRP00000283] [MT6620 Wi-Fi][Driver][Wi-Fi Direct] Implementation of interface for supporting Wi-Fi Direct Service - * Discovery - * fix typo - * - * 02 09 2011 yuche.tsai - * [WCXRP00000431] [Volunteer Patch][MT6620][Driver] Add MLME support for deauthentication under AP(Hot-Spot) mode. - * Add Support for MLME deauthentication for Hot-Spot. - * - * 01 25 2011 terry.wu - * [WCXRP00000393] [MT6620 Wi-Fi][Driver] Add new module insert parameter - * Add a new module parameter to indicate current runnig mode, P2P or AP. - * - * 01 12 2011 yuche.tsai - * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue - * 1. Modify Channel Acquire Time of AP mode from 5s to 1s. - * 2. Call cnmP2pIsPermit() before active P2P network. - * 3. Add channel selection support for AP mode. - * - * 01 05 2011 cp.wu - * [WCXRP00000283] [MT6620 Wi-Fi][Driver][Wi-Fi Direct] Implementation of interface for supporting Wi-Fi Direct Service - * Discovery - * ioctl implementations for P2P Service Discovery - * - * 01 04 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc and vmalloc implementations to ease - * physically continuous memory demands - * separate kalMemAlloc() into virtually-continuous and physically-continuous type to ease slab system pressure - * - * 12 22 2010 cp.wu - * [WCXRP00000283] [MT6620 Wi-Fi][Driver][Wi-Fi Direct] Implementation of interface for supporting Wi-Fi Direct Service - * Discovery - * 1. header file restructure for more clear module isolation - * 2. add function interface definition for implementing Service Discovery callbacks - * - * 12 15 2010 cp.wu - * NULL - * invoke nicEnableInterrupt() before leaving from wlanAdapterStart() - * - * 12 08 2010 yuche.tsai - * [WCXRP00000245] [MT6620][Driver] Invitation & Provision Discovery Feature Check-in - * [WCXRP000000245][MT6620][Driver] Invitation Request Feature Add - * - * 11 30 2010 yuche.tsai - * NULL - * Invitation & Provision Discovery Indication. - * - * 11 17 2010 wh.su - * [WCXRP00000164] [MT6620 Wi-Fi][Driver] Support the p2p random SSID[WCXRP00000179] [MT6620 Wi-Fi][FW] Set the Tx - * lowest rate at wlan table for normal operation - * fixed some ASSERT check. - * - * 11 04 2010 wh.su - * [WCXRP00000164] [MT6620 Wi-Fi][Driver] Support the p2p random SSID - * adding the p2p random ssid support. - * - * 10 20 2010 wh.su - * [WCXRP00000124] [MT6620 Wi-Fi] [Driver] Support the dissolve P2P Group - * Add the code to support disconnect p2p group - * - * 10 04 2010 wh.su - * [WCXRP00000081] [MT6620][Driver] Fix the compiling error at WinXP while enable P2P - * add a kal function for set cipher. - * - * 10 04 2010 wh.su - * [WCXRP00000081] [MT6620][Driver] Fix the compiling error at WinXP while enable P2P - * fixed compiling error while enable p2p. - * - * 09 28 2010 wh.su - * NULL - * [WCXRP00000069][MT6620 Wi-Fi][Driver] Fix some code for phase 1 P2P Demo. - * - * 09 21 2010 kevin.huang - * [WCXRP00000054] [MT6620 Wi-Fi][Driver] Restructure driver for second Interface - * Isolate P2P related function for Hardware Software Bundle - * - * 09 21 2010 kevin.huang - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * Eliminate Linux Compile Warning - * - * 09 10 2010 george.huang - * NULL - * update iwpriv LP related - * - * 09 10 2010 wh.su - * NULL - * fixed the compiling error at win XP. - * - * 09 09 2010 cp.wu - * NULL - * add WPS/WPA/RSN IE for Wi-Fi Direct scanning result. - * - * 09 07 2010 wh.su - * NULL - * adding the code for beacon/probe req/ probe rsp wsc ie at p2p. - * - * 09 06 2010 wh.su - * NULL - * let the p2p can set the privacy bit at beacon and rsn ie at assoc req at key handshake state. - * - * 08 25 2010 cp.wu - * NULL - * add netdev_ops(NDO) for linux kernel 2.6.31 or greater - * - * 08 23 2010 cp.wu - * NULL - * revise constant definitions to be matched with implementation (original cmd-event definition is deprecated) - * - * 08 20 2010 cp.wu - * NULL - * correct typo. - * - * 08 20 2010 yuche.tsai - * NULL - * Invert Connection request provision status parameter. - * - * 08 19 2010 cp.wu - * NULL - * add set mac address interface for further possibilities of wpa_supplicant overriding interface address. - * - * 08 18 2010 cp.wu - * NULL - * modify pwp ioctls attribution by removing FIXED_SIZE. - * - * 08 18 2010 jeffrey.chang - * NULL - * support multi-function sdio - * - * 08 17 2010 cp.wu - * NULL - * correct p2p net device registration with NULL pointer access issue. - * - * 08 16 2010 cp.wu - * NULL - * P2P packets are now marked when being queued into driver, and identified later without checking MAC address - * - * 08 16 2010 cp.wu - * NULL - * add subroutines for P2P to set multicast list. - * - * 08 16 2010 george.huang - * NULL - * add wext handlers to link P2P set PS profile/ network address function (TBD) - * - * 08 16 2010 cp.wu - * NULL - * revised implementation of Wi-Fi Direct io controls. - * - * 08 12 2010 cp.wu - * NULL - * follow-up with ioctl interface update for Wi-Fi Direct application - * - * 08 06 2010 cp.wu - * NULL - * driver hook modifications corresponding to ioctl interface change. - * - * 08 03 2010 cp.wu - * NULL - * add basic support for ioctl of getting scan result. (only address and SSID are reporterd though) - * - * 08 03 2010 cp.wu - * NULL - * [Wi-Fi Direct Driver Hook] change event indication API to be consistent with supplicant - * - * 08 03 2010 cp.wu - * NULL - * surpress compilation warning. - * - * 08 03 2010 cp.wu - * NULL - * [Wi-Fi Direct] add framework for driver hooks - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 23 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * p2p interface revised to be sync. with HAL - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 06 01 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add ioctl to configure scan mode for p2p connection - * - * 05 31 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add cfg80211 interface, which is to replace WE, for further extension - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * implement private io controls for Wi-Fi Direct - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * implement get scan result. - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add basic handling framework for wireless extension ioctls. - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * 1) add timeout handler mechanism for pending command packets - * 2) add p2p add/removal key - * - * 05 14 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * implement wireless extension ioctls in iw_handler form. - * - * 05 14 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add ioctl framework for Wi-Fi Direct by reusing wireless extension ioctls as well - * - * 05 11 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * p2p ioctls revised. - * - * 05 11 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add ioctl for controlling p2p scan phase parameters - * - * 05 10 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * implement basic wi-fi direct framework - * - * 05 07 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add basic framework for implementating P2P driver hook. - * -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_kal.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_kal.c index 47573b515cbe..adbb9fb98ae9 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_kal.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p_kal.c @@ -1,11 +1,16 @@ -/* -** Id: @(#) gl_p2p_cfg80211.c@@ -*/ - -/*! \file gl_p2p_kal.c - \brief +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_vendor.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_vendor.c index f686b74095bd..4207c527df56 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_vendor.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_vendor.c @@ -1,40 +1,16 @@ -/* -** Id: @(#) gl_cfg80211.c@@ -*/ - -/*! \file gl_cfg80211.c - \brief Main routines for supporintg MT6620 cfg80211 control interface +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ - This file contains the support routines of Linux driver for MediaTek Inc. 802.11 - Wireless LAN Adapters. -*/ - -/* -** Log: gl_cfg80211.c -** -** 09 05 2013 cp.wu -** correct length to pass to wlanoidSetBssid() -** -** 09 04 2013 cp.wu -** fix typo -** -** 09 03 2013 cp.wu -** add path for reassociation -** -** 11 23 2012 yuche.tsai -** [ALPS00398671] [Acer-Tablet] Remove Wi-Fi Direct completely -** Fix bug of WiFi may reboot under user load, when WiFi Direct is removed.. -** -** 09 12 2012 wcpadmin -** [ALPS00276400] Remove MTK copyright and legal header on GPL/LGPL related packages -** . -** -** 08 30 2012 chinglan.wang -** [ALPS00349664] [6577JB][WIFI] Phone can not connect to AP secured with AES via WPS in 802.11n Only -** . - * -** -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext.c index 1e2fc60ed0f8..7635e15a219b 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext.c @@ -1,376 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/os/linux/gl_wext.c#3 -*/ - -/*! \file gl_wext.c - \brief ioctl() (mostly Linux Wireless Extensions) routines for STA driver. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: gl_wext.c - * - * 06 13 2012 yuche.tsai - * NULL - * Update maintrunk driver. - * Add support for driver compose assoc request frame. - * - * 01 16 2012 wh.su - * [WCXRP00001170] [MT6620 Wi-Fi][Driver] Adding the related code for set/get band ioctl - * Adding the template code for set / get band IOCTL (with ICS supplicant_6).. - * - * 01 05 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * Adding the related ioctl / wlan oid function to set the Tx power cfg. - * - * 01 02 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * Adding the proto type function for set_int set_tx_power and get int get_ch_list. - * - * 11 10 2011 cp.wu - * [WCXRP00001098] [MT6620 Wi-Fi][Driver] Replace printk by DBG LOG macros in linux porting layer - * 1. eliminaite direct calls to printk in porting layer. - * 2. replaced by DBGLOG, which would be XLOG on ALPS platforms. - * - * 10 12 2011 wh.su - * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP - * adding the 802.11w related function and define . - * - * 09 23 2011 tsaiyuan.hsu - * [WCXRP00000979] [MT6620 Wi-Fi][DRV]] stop attempting to connect to config AP after D3 state - * avoid entering D3 state after deep sleep. - * - * 07 28 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings - * Add BWCS cmd and event. - * - * 07 27 2011 wh.su - * [WCXRP00000877] [MT6620 Wi-Fi][Driver] Remove the netif_carry_ok check for avoid the wpa_supplicant fail to query - * the ap address - * Remove the netif check while query bssid and ssid - * - * 07 26 2011 chinglan.wang - * NULL - * [MT6620][WiFi Driver] Do not include the WSC IE in the association info packet when not do the wps connection.. - * - * 07 18 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Add CMD/Event for RDD and BWCS. - * - * 05 17 2011 eddie.chen - * [WCXRP00000603] [MT6620 Wi-Fi][DRV] Fix Klocwork warning - * Initialize the vairlabes. - * - * 05 11 2011 jeffrey.chang - * [WCXRP00000718] [MT6620 Wi-Fi] modify the behavior of setting tx power - * modify set_tx_pow ioctl - * - * 03 29 2011 terry.wu - * [WCXRP00000610] [MT 6620 Wi-Fi][Driver] Fix klocwork waring - * [MT6620 Wi-Fi][Driver] Fix klocwork warning. Add Null pointer check on wext_get_essid. Limit the upper bound of - * essid storage array. - * - * 03 21 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * improve portability for awareness of early version of linux kernel and wireless extension. - * - * 03 17 2011 chinglan.wang - * [WCXRP00000570] [MT6620 Wi-Fi][Driver] Add Wi-Fi Protected Setup v2.0 feature - * . - * - * 03 07 2011 terry.wu - * [WCXRP00000521] [MT6620 Wi-Fi][Driver] Remove non-standard debug message - * Toggle non-standard debug messages to comments. - * - * 02 21 2011 wh.su - * [WCXRP00000483] [MT6620 Wi-Fi][Driver] Check the kalIoctl return value before doing the memory copy at linux get - * essid - * fixed the potential error to do a larget memory copy while wlanoid get essid not actually running. - * - * 02 08 2011 george.huang - * [WCXRP00000422] [MT6620 Wi-Fi][Driver] support query power mode OID handler - * Support querying power mode OID. - * - * 01 29 2011 wh.su - * [WCXRP00000408] [MT6620 Wi-Fi][Driver] Not doing memory alloc while ioctl set ie with length 0 - * not doing mem alloc. while set ie length already 0 - * - * 01 20 2011 eddie.chen - * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control - * Remove debug text. - * - * 01 20 2011 eddie.chen - * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control - * Adjust OID order. - * - * 01 20 2011 eddie.chen - * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control - * Add Oid for sw control debug command - * - * 01 11 2011 chinglan.wang - * NULL - * Modify to reslove the CR :[ALPS00028994] Use WEP security to connect Marvell 11N AP. Connection establish - * successfully. - * Use the WPS function to connect AP, the privacy bit always is set to 1. . - * - * 01 07 2011 cm.chang - * [WCXRP00000336] [MT6620 Wi-Fi][Driver] Add test mode commands in normal phone operation - * Add a new compiling option to control if MCR read/write is permitted - * - * 01 04 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc and vmalloc implementations to ease - * physically continuous memory demands - * separate kalMemAlloc() into virtually-continuous and physically-continuous types - * to ease slab system pressure - * - * 01 04 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc and vmalloc implementations to ease - * physically continuous memory demands - * separate kalMemAlloc() into virtually-continuous and physically-continuous type to ease slab system pressure - * - * 12 31 2010 cm.chang - * [WCXRP00000336] [MT6620 Wi-Fi][Driver] Add test mode commands in normal phone operation - * Add some iwpriv commands to support test mode operation - * - * 12 15 2010 george.huang - * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function - * Support set PS profile and set WMM-PS related iwpriv. - * - * 12 15 2010 george.huang - * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function - * Allow change PS profile function (through wext_set_power()). - * - * 12 14 2010 jeffrey.chang - * [WCXRP00000262] [MT6620 Wi-Fi][Driver] modify the scan request ioctl to handle hidden SSID - * handle hidden SSID - * - * 12 13 2010 chinglan.wang - * NULL - * Add WPS 1.0 feature flag to enable the WPS 1.0 function. - * - * 12 07 2010 cm.chang - * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant - * Fix compiling error - * - * 12 07 2010 cm.chang - * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant - * 1. Country code is from NVRAM or supplicant - * 2. Change band definition in CMD/EVENT. - * - * 11 30 2010 cp.wu - * [WCXRP00000213] [MT6620 Wi-Fi][Driver] Implement scanning with specified SSID for wpa_supplicant with ap_scan=1 - * . - * - * 11 08 2010 wh.su - * [WCXRP00000171] [MT6620 Wi-Fi][Driver] Add message check code same behavior as mt5921 - * add the message check code from mt5921. - * - * 10 19 2010 jeffrey.chang - * [WCXRP00000121] [MT6620 Wi-Fi][Driver] Temporarily disable set power mode ioctl which may cause 6620 to enter power - * saving - * Temporarily disable set power mode ioctl which may cause MT6620 to enter power saving - * - * 10 18 2010 jeffrey.chang - * [WCXRP00000116] [MT6620 Wi-Fi][Driver] Refine the set_scan ioctl to resolve the Android UI hanging issue - * refine the scan ioctl to prevent hanging of Android UI - * - * 10 01 2010 wh.su - * [WCXRP00000067] [MT6620 Wi-Fi][Driver] Support the android+ WAPI function - * add the scan result with wapi ie. - * - * 09 30 2010 wh.su - * [WCXRP00000072] [MT6620 Wi-Fi][Driver] Fix TKIP Counter Measure EAPoL callback register issue - * fixed the wapi ie assigned issue. - * - * 09 27 2010 wh.su - * NULL - * [WCXRP00000067][MT6620 Wi-Fi][Driver] Support the android+ WAPI function. - * - * 09 21 2010 kevin.huang - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * Eliminate Linux Compile Warning - * - * 09 09 2010 cp.wu - * NULL - * add WPS/WPA/RSN IE for Wi-Fi Direct scanning result. - * - * 09 06 2010 cp.wu - * NULL - * Androi/Linux: return current operating channel information - * - * 09 01 2010 wh.su - * NULL - * adding the wapi support for integration test. - * - * 08 02 2010 jeffrey.chang - * NULL - * enable remove key ioctl - * - * 08 02 2010 jeffrey.chang - * NULL - * 1) modify tx service thread to avoid busy looping - * 2) add spin lock declartion for linux build - * - * 07 28 2010 jeffrey.chang - * NULL - * 1) enable encyption ioctls - * 2) temporarily disable remove keys ioctl to prevent TX1 busy - * - * 07 28 2010 jeffrey.chang - * NULL - * 1) remove unused spinlocks - * 2) enable encyption ioctls - * 3) fix scan ioctl which may cause supplicant to hang - * - * 07 19 2010 jeffrey.chang - * - * add kal api for scanning done - * - * 07 19 2010 jeffrey.chang - * - * for linux driver migration - * - * 07 19 2010 jeffrey.chang - * - * Linux port modification - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 28 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * remove unused macro and debug messages - * - * 05 14 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * Add dissassoication support for wpa supplicant - * - * 04 22 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * - * 1) modify rx path code for supporting Wi-Fi direct - * 2) modify config.h since Linux dont need to consider retaining packet - * - * 04 21 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * add for private ioctl support - * - * 04 19 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * Add ioctl of power management - * - * 04 19 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * remove debug message - * - * 04 14 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * 1) prGlueInfo->pvInformationBuffer and prGlueInfo->u4InformationBufferLength are no longer used - * * 2) fix ioctl - * - * 04 12 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * remove debug messages for pre-release - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * rWlanInfo should be placed at adapter rather than glue due to most operations - * * * * * * * * are done in adapter layer. - * - * 04 02 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * fix ioctl type - * - * 04 01 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * enable pmksa cache operation - * - * 03 31 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * fix ioctl which may cause cmdinfo memory leak - * - * 03 31 2010 wh.su - * [WPD00003816][MT6620 Wi-Fi] Adding the security support - * modify the wapi related code for new driver's design. - * - * 03 30 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * emulate NDIS Pending OID facility - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port -** \main\maintrunk.MT5921\38 2009-10-08 10:33:22 GMT mtk01090 -** Avoid accessing private data of net_device directly. Replace with netdev_priv(). -** Add more checking for input parameters and pointers. -** \main\maintrunk.MT5921\37 2009-09-29 16:49:48 GMT mtk01090 -** Remove unused variables -** \main\maintrunk.MT5921\36 2009-09-28 20:19:11 GMT mtk01090 -** Add private ioctl to carry OID structures. Restructure public/private ioctl interfaces to Linux kernel. -** \main\maintrunk.MT5921\35 2009-09-03 11:42:30 GMT mtk01088 -** adding the wapi ioctl support -** \main\maintrunk.MT5921\34 2009-08-18 22:56:50 GMT mtk01090 -** Add Linux SDIO (with mmc core) support. -** Add Linux 2.6.21, 2.6.25, 2.6.26. -** Fix compile warning in Linux. -** \main\maintrunk.MT5921\33 2009-05-14 22:43:47 GMT mtk01089 -** fix compiling warning -** \main\maintrunk.MT5921\32 2009-05-07 22:26:18 GMT mtk01089 -** Add mandatory and private IO control for Linux BWCS -** \main\maintrunk.MT5921\31 2009-02-07 15:11:14 GMT mtk01088 -** fixed the compiling error -** \main\maintrunk.MT5921\30 2009-02-07 14:46:51 GMT mtk01088 -** add the privacy setting from linux supplicant ap selection -** \main\maintrunk.MT5921\29 2008-11-19 15:18:50 GMT mtk01088 -** fixed the compling error -** \main\maintrunk.MT5921\28 2008-11-19 11:56:18 GMT mtk01088 -** rename some variable with pre-fix to avoid the misunderstanding -** \main\maintrunk.MT5921\27 2008-08-29 16:59:43 GMT mtk01088 -** fixed compiling error -** \main\maintrunk.MT5921\26 2008-08-29 14:55:53 GMT mtk01088 -** adjust the code for meet the coding style, and add assert check -** \main\maintrunk.MT5921\25 2008-06-02 11:15:19 GMT mtk01461 -** Update after wlanoidSetPowerMode changed -** \main\maintrunk.MT5921\24 2008-05-30 15:13:12 GMT mtk01084 -** rename wlanoid -** \main\maintrunk.MT5921\23 2008-03-28 10:40:28 GMT mtk01461 -** Add set desired rate in Linux STD IOCTL -** \main\maintrunk.MT5921\22 2008-03-18 10:31:24 GMT mtk01088 -** add pmkid ioctl and indicate -** \main\maintrunk.MT5921\21 2008-03-11 15:21:24 GMT mtk01461 -** \main\maintrunk.MT5921\20 2008-03-11 14:50:55 GMT mtk01461 -** Refine WPS related priv ioctl for unified interface -** -** \main\maintrunk.MT5921\19 2008-03-06 16:30:41 GMT mtk01088 -** move the configuration code from set essid function, -** remove the non-used code -** \main\maintrunk.MT5921\18 2008-02-21 15:47:09 GMT mtk01461 -** Fix CR[489] -** \main\maintrunk.MT5921\17 2008-02-12 23:38:31 GMT mtk01461 -** Add Set Frequency & Channel oid support for Linux -** \main\maintrunk.MT5921\16 2008-01-24 12:07:34 GMT mtk01461 -** \main\maintrunk.MT5921\15 2008-01-24 12:00:10 GMT mtk01461 -** Modify the wext_essid for set up correct information for IBSS, and fix the wrong input ptr for prAdapter -** \main\maintrunk.MT5921\14 2007-12-06 09:30:12 GMT mtk01425 -** 1. Branch Test -** \main\maintrunk.MT5921\13 2007-12-04 18:07:59 GMT mtk01461 -** fix typo -** \main\maintrunk.MT5921\12 2007-11-30 17:10:21 GMT mtk01425 -** 1. Fix compiling erros -** -** \main\maintrunk.MT5921\11 2007-11-27 10:43:22 GMT mtk01425 -** 1. Add WMM-PS setting -** \main\maintrunk.MT5921\10 2007-11-06 20:33:32 GMT mtk01088 -** fixed the compiler error -** \main\maintrunk.MT5921\9 2007-11-06 19:33:15 GMT mtk01088 -** add WPS code -** \main\maintrunk.MT5921\8 2007-10-30 12:00:44 GMT MTK01425 -** 1. Update wlanQueryInformation -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext_priv.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext_priv.c index 2b6c3df84594..1a5bc3be06db 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext_priv.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_wext_priv.c @@ -1,207 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/os/linux/gl_wext_priv.c#4 -*/ - -/*! \file gl_wext_priv.c - \brief This file includes private ioctl support. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: gl_wext_priv.c - * - * 07 17 2012 yuche.tsai - * NULL - * Let netdev bring up. - * - * 06 13 2012 yuche.tsai - * NULL - * Update maintrunk driver. - * Add support for driver compose assoc request frame. - * - * 03 20 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * [WCXRP00001202] [MT6628 Wi-Fi][FW] Adding the New PN init code - * use return to avoid the ioctl return not supported - * - * 03 02 2012 terry.wu - * NULL - * Snc CFG80211 modification for ICS migration from branch 2.2. - * - * 01 16 2012 wh.su - * [WCXRP00001170] [MT6620 Wi-Fi][Driver] Adding the related code for set/get band ioctl - * Adding the template code for set / get band IOCTL (with ICS supplicant_6).. - * - * 01 05 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * Adding the related ioctl / wlan oid function to set the Tx power cfg. - * - * 01 02 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * Adding the proto type function for set_int set_tx_power and get int get_ch_list. - * - * 11 10 2011 cp.wu - * [WCXRP00001098] [MT6620 Wi-Fi][Driver] Replace printk by DBG LOG macros in linux porting layer - * 1. eliminaite direct calls to printk in porting layer. - * 2. replaced by DBGLOG, which would be XLOG on ALPS platforms. - * - * 11 02 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings - * Fixed typo. - * - * 09 20 2011 chinglan.wang - * [WCXRP00000989] [WiFi Direct] [Driver] Add a new io control API to start the formation for the sigma test. - * . - * - * 07 28 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings - * Add BWCS cmd and event. - * - * 07 18 2011 chinghwa.yu - * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm - * Add CMD/Event for RDD and BWCS. - * - * 03 17 2011 chinglan.wang - * [WCXRP00000570] [MT6620 Wi-Fi][Driver] Add Wi-Fi Protected Setup v2.0 feature - * . - * - * 03 07 2011 terry.wu - * [WCXRP00000521] [MT6620 Wi-Fi][Driver] Remove non-standard debug message - * Toggle non-standard debug messages to comments. - * - * 01 27 2011 cm.chang - * [WCXRP00000402] [MT6620 Wi-Fi][Driver] Enable MCR read/write by iwpriv by default - * . - * - * 01 26 2011 wh.su - * [WCXRP00000396] [MT6620 Wi-Fi][Driver] Support Sw Ctrl ioctl at linux - * adding the SW cmd ioctl support, use set/get structure ioctl. - * - * 01 20 2011 eddie.chen - * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control - * Adjust OID order. - * - * 01 20 2011 eddie.chen - * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control - * Add Oid for sw control debug command - * - * 01 07 2011 cm.chang - * [WCXRP00000336] [MT6620 Wi-Fi][Driver] Add test mode commands in normal phone operation - * Add a new compiling option to control if MCR read/write is permitted - * - * 12 31 2010 cm.chang - * [WCXRP00000336] [MT6620 Wi-Fi][Driver] Add test mode commands in normal phone operation - * Add some iwpriv commands to support test mode operation - * - * 12 15 2010 george.huang - * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function - * Support set PS profile and set WMM-PS related iwpriv. - * - * 11 08 2010 wh.su - * [WCXRP00000171] [MT6620 Wi-Fi][Driver] Add message check code same behavior as mt5921 - * add the message check code from mt5921. - * - * 10 18 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * [WCXRP00000086] [MT6620 Wi-Fi][Driver] The mac address is all zero at android - * complete implementation of Android NVRAM access - * - * 09 24 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * correct typo for NVRAM access. - * - * 09 23 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * add skeleton for NVRAM integration - * - * 08 04 2010 cp.wu - * NULL - * revert changelist #15371, efuse read/write access will be done by RF test approach - * - * 08 04 2010 cp.wu - * NULL - * add OID definitions for EFUSE read/write access. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 06 01 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * enable OID_CUSTOM_MTK_WIFI_TEST for RFTest & META tool - * - * 05 29 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * fix private ioctl for rftest - * - * 04 21 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * add for private ioctl support -** \main\maintrunk.MT5921\32 2009-10-08 10:33:25 GMT mtk01090 -** Avoid accessing private data of net_device directly. Replace with netdev_priv(). Add more checking for input -** parameters and pointers. -** \main\maintrunk.MT5921\31 2009-09-29 16:46:21 GMT mtk01090 -** Remove unused functions -** \main\maintrunk.MT5921\30 2009-09-29 14:46:47 GMT mtk01090 -** Fix compile warning -** \main\maintrunk.MT5921\29 2009-09-29 14:28:48 GMT mtk01090 -** Fix compile warning -** \main\maintrunk.MT5921\28 2009-09-28 22:21:38 GMT mtk01090 -** Refine lines to suppress compile warning -** \main\maintrunk.MT5921\27 2009-09-28 20:19:14 GMT mtk01090 -** Add private ioctl to carry OID structures. Restructure public/private ioctl interfaces to Linux kernel. -** \main\maintrunk.MT5921\26 2009-08-18 22:56:53 GMT mtk01090 -** Add Linux SDIO (with mmc core) support. -** Add Linux 2.6.21, 2.6.25, 2.6.26. -** Fix compile warning in Linux. -** \main\maintrunk.MT5921\25 2009-05-07 22:26:15 GMT mtk01089 -** Add mandatory and private IO control for Linux BWCS -** \main\maintrunk.MT5921\24 2009-04-29 10:07:05 GMT mtk01088 -** fixed the compiling error at linux -** \main\maintrunk.MT5921\23 2009-04-24 09:09:45 GMT mtk01088 -** mark the code not used at linux supplicant v0.6.7 -** \main\maintrunk.MT5921\22 2008-11-24 21:03:51 GMT mtk01425 -** 1. Add PTA_ENABLED flag -** \main\maintrunk.MT5921\21 2008-08-29 14:55:59 GMT mtk01088 -** adjust the code for meet the coding style, and add assert check -** \main\maintrunk.MT5921\20 2008-07-16 15:23:20 GMT mtk01104 -** Support GPIO2 mode -** \main\maintrunk.MT5921\19 2008-07-15 17:43:11 GMT mtk01084 -** modify variable name -** \main\maintrunk.MT5921\18 2008-07-14 14:37:58 GMT mtk01104 -** Add exception handle about length in function priv_set_struct() -** \main\maintrunk.MT5921\17 2008-07-14 13:55:32 GMT mtk01104 -** Support PRIV_CMD_BT_COEXIST -** \main\maintrunk.MT5921\16 2008-07-09 00:20:15 GMT mtk01461 -** Add priv oid to support WMM_PS_TEST -** \main\maintrunk.MT5921\15 2008-06-02 11:15:22 GMT mtk01461 -** Update after wlanoidSetPowerMode changed -** \main\maintrunk.MT5921\14 2008-05-30 19:31:07 GMT mtk01461 -** Add IOCTL for Power Mode -** \main\maintrunk.MT5921\13 2008-05-30 18:57:15 GMT mtk01461 -** Not use wlanoidSetCSUMOffloadForLinux() -** \main\maintrunk.MT5921\12 2008-05-30 15:13:18 GMT mtk01084 -** rename wlanoid -** \main\maintrunk.MT5921\11 2008-05-29 14:16:31 GMT mtk01084 -** rename for wlanoidSetBeaconIntervalForLinux -** \main\maintrunk.MT5921\10 2008-04-17 23:06:37 GMT mtk01461 -** Add iwpriv support for AdHocMode setting -** \main\maintrunk.MT5921\9 2008-03-31 21:00:55 GMT mtk01461 -** Add priv IOCTL for VOIP setting -** \main\maintrunk.MT5921\8 2008-03-31 13:49:43 GMT mtk01461 -** Add priv ioctl to turn on / off roaming -** \main\maintrunk.MT5921\7 2008-03-26 15:35:14 GMT mtk01461 -** Add CSUM offload priv ioctl for Linux -** \main\maintrunk.MT5921\6 2008-03-11 14:50:59 GMT mtk01461 -** Unify priv ioctl -** \main\maintrunk.MT5921\5 2007-11-06 19:32:30 GMT mtk01088 -** add WPS code -** \main\maintrunk.MT5921\4 2007-10-30 12:01:39 GMT MTK01425 -** 1. Update wlanQueryInformation and wlanSetInformation -*/ /******************************************************************************* * C O M P I L E R F L A G S diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/hif/ahb/include/hif.h b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/hif/ahb/include/hif.h index 1507d5560040..7c3aa91d3be7 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/hif/ahb/include/hif.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/hif/ahb/include/hif.h @@ -1,62 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/os/linux/hif/sdio/include/hif.h#1 -*/ - -/*! \file "hif.h" - \brief Functions for the driver to register bus and setup the IRQ - - Functions for the driver to register bus and setup the IRQ -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: hif.h - * - * 11 01 2010 yarco.yang - * [WCXRP00000149] [MT6620 WI-Fi][Driver]Fine tune performance on MT6516 platform - * Add GPIO debug function - * - * 10 19 2010 jeffrey.chang - * [WCXRP00000120] [MT6620 Wi-Fi][Driver] Refine linux kernel module to the license of MTK propietary and enable MTK - * HIF by default - * Refine linux kernel module to the license of MTK and enable MTK HIF - * - * 08 18 2010 jeffrey.chang - * NULL - * support multi-function sdio - * - * 08 17 2010 cp.wu - * NULL - * add ENE SDIO host workaround for x86 linux platform. - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port -** \main\maintrunk.MT5921\4 2009-10-20 17:38:28 GMT mtk01090 -** Refine driver unloading and clean up procedure. Block requests, stop main thread and clean up queued requests, -** and then stop hw. -** \main\maintrunk.MT5921\3 2009-09-28 20:19:20 GMT mtk01090 -** Add private ioctl to carry OID structures. Restructure public/private ioctl interfaces to Linux kernel. -** \main\maintrunk.MT5921\2 2009-08-18 22:57:05 GMT mtk01090 -** Add Linux SDIO (with mmc core) support. -** Add Linux 2.6.21, 2.6.25, 2.6.26. -** Fix compile warning in Linux. -** \main\maintrunk.MT5921\2 2008-09-22 23:18:17 GMT mtk01461 -** Update driver for code review -** Revision 1.1 2007/07/05 07:25:33 MTK01461 -** Add Linux initial code, modify doc, add 11BB, RF init code -** -** Revision 1.3 2007/06/27 02:18:51 MTK01461 -** Update SCAN_FSM, Initial(Can Load Module), Proc(Can do Reg R/W), TX API -** -*/ #ifndef _HIF_H #define _HIF_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_cfg80211.h b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_cfg80211.h index 43c2ffa105d4..141b8468bc16 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_cfg80211.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_cfg80211.h @@ -1,26 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/os/linux/include/gl_cfg80211.h#1 -*/ - -/*! \file gl_cfg80211.h - \brief This file is for Portable Driver linux cfg80211 support. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: gl_cfg80211.h -** -** 09 03 2013 cp.wu -** add path for reassociation -** -** 09 12 2012 wcpadmin -** [ALPS00276400] Remove MTK copyright and legal header on GPL/LGPL related packages -** . -** -** 08 30 2012 chinglan.wang -** [ALPS00349664] [6577JB][WIFI] Phone can not connect to AP secured with AES via WPS in 802.11n Only -** . - * -*/ #ifndef _GL_CFG80211_H #define _GL_CFG80211_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h index 29ff0663a522..75a3648c3475 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h @@ -1,527 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/os/linux/include/gl_kal.h#1 -*/ - -/*! \file gl_kal.h - \brief Declaration of KAL functions - kal*() which is provided by GLUE Layer. - - Any definitions in this file will be shared among GLUE Layer and internal Driver Stack. -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: gl_kal.h - * - * 06 13 2012 yuche.tsai - * NULL - * Update maintrunk driver. - * Add support for driver compose assoc request frame. - * - * 04 12 2012 terry.wu - * NULL - * Add AEE message support - * 1) Show AEE warning(red screen) if SDIO access error occurs - - * - * 03 02 2012 terry.wu - * NULL - * Snc CFG80211 modification for ICS migration from branch 2.2. - * - * 02 06 2012 wh.su - * [WCXRP00001177] [MT6620 Wi-Fi][Driver][2.2] Adding the query channel filter for AP mode - * adding the channel query filter for AP mode. - * - * 01 02 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * Adding the proto type function for set_int set_tx_power and get int get_ch_list. - * - * 12 13 2011 cm.chang - * [WCXRP00001136] [All Wi-Fi][Driver] Add wake lock for pending timer - * Add wake lock if timer timeout value is smaller than 5 seconds - * - * 11 24 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * adjust the code for Non-DBG and no XLOG. - * - * 11 22 2011 cp.wu - * [WCXRP00001120] [MT6620 Wi-Fi][Driver] Modify roaming to AIS state transition from synchronous to asynchronous - * approach to avoid incomplete state termination - * 1. change RDD related compile option brace position. - * 2. when roaming is triggered, ask AIS to transit immediately only when AIS is in Normal TR state without join - * timeout timer ticking - * 3. otherwise, insert AIS_REQUEST into pending request queue - * - * 11 11 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * modify the xlog related code. - * - * 11 10 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Modify the QM xlog level and remove LOG_FUNC. - * - * 11 10 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * Using the new XLOG define for dum Memory. - * - * 11 08 2011 eddie.chen - * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog) - * Add xlog function. - * - * 11 08 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * add debug counters, eCurPsProf, for PS. - * - * 11 08 2011 cm.chang - * NULL - * Add RLM and CNM debug message for XLOG - * - * 11 07 2011 tsaiyuan.hsu - * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered - * add debug counters and periodically dump counters for debugging. - * - * 11 03 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * Add dumpMemory8 at XLOG support. - * - * 11 02 2011 wh.su - * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG - * adding the code for XLOG. - * - * 10 12 2011 wh.su - * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP - * adding the 802.11w related function and define . - * - * 04 18 2011 terry.wu - * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED - * Remove flag CFG_WIFI_DIRECT_MOVED. - * - * 04 12 2011 cp.wu - * [WCXRP00000635] [MT6620 Wi-Fi][Driver] Clear pending security frames when QM clear pending data frames for dedicated - * network type - * include link.h for linux's port. - * - * 04 12 2011 cp.wu - * [WCXRP00000635] [MT6620 Wi-Fi][Driver] Clear pending security frames when QM clear pending data frames for dedicated - * network type - * clear pending security frames for dedicated network type when BSS is being deactivated/disconnected - * - * 04 01 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * 1. simplify config.h due to aggregation options could be also applied for eHPI/SPI interface - * 2. use spin-lock instead of semaphore for protecting eHPI access because of possible access from ISR - * 3. request_irq() API has some changes between linux kernel 2.6.12 and 2.6.26 - * - * 03 16 2011 cp.wu - * [WCXRP00000562] [MT6620 Wi-Fi][Driver] I/O buffer pre-allocation to avoid physically continuous memory shortage - * after system running for a long period - * 1. pre-allocate physical continuous buffer while module is being loaded - * 2. use pre-allocated physical continuous buffer for TX/RX DMA transfer - * - * The windows part remained the same as before, but added similar APIs to hide the difference. - * - * 03 10 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Add BOW table. - * - * 03 07 2011 terry.wu - * [WCXRP00000521] [MT6620 Wi-Fi][Driver] Remove non-standard debug message - * Toggle non-standard debug messages to comments. - * - * 03 06 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Sync BOW Driver to latest person development branch version.. - * - * 03 02 2011 cp.wu - * [WCXRP00000503] [MT6620 Wi-Fi][Driver] Take RCPI brought by association response as initial RSSI right after - * connection is built. - * use RCPI brought by ASSOC-RESP after connection is built as initial RCPI to avoid using a uninitialized MAC-RX RCPI. - * - * 02 24 2011 cp.wu - * [WCXRP00000490] [MT6620 Wi-Fi][Driver][Win32] modify kalMsleep() implementation because NdisMSleep() won't sleep - * long enough for specified interval such as 500ms - * modify cnm_timer and hem_mbox APIs to be thread safe to ease invoking restrictions - * - * 01 12 2011 cp.wu - * [WCXRP00000357] [MT6620 Wi-Fi][Driver][Bluetooth over Wi-Fi] add another net device interface for BT AMP - * implementation of separate BT_OVER_WIFI data path. - * - * 01 04 2011 cp.wu - * [WCXRP00000338] [MT6620 Wi-Fi][Driver] Separate kalMemAlloc into kmalloc and vmalloc implementations to ease - * physically continuous memory demands - * separate kalMemAlloc() into virtually-continuous and physically-continuous type to ease slab system pressure - * - * 12 31 2010 cp.wu - * [WCXRP00000335] [MT6620 Wi-Fi][Driver] change to use milliseconds sleep instead of delay to avoid blocking to system - * scheduling - * change to use msleep() and shorten waiting interval to reduce blocking to other task while Wi-Fi driver is being - * loaded - * - * 12 31 2010 jeffrey.chang - * [WCXRP00000332] [MT6620 Wi-Fi][Driver] add kal sleep function for delay which use blocking call - * modify the implementation of kalDelay to msleep - * - * 12 22 2010 cp.wu - * [WCXRP00000283] [MT6620 Wi-Fi][Driver][Wi-Fi Direct] Implementation of interface for supporting Wi-Fi Direct Service - * Discovery - * 1. header file restructure for more clear module isolation - * 2. add function interface definition for implementing Service Discovery callbacks - * - * 11 30 2010 yuche.tsai - * NULL - * Invitation & Provision Discovery Indication. - * - * 11 26 2010 cp.wu - * [WCXRP00000209] [MT6620 Wi-Fi][Driver] Modify NVRAM checking mechanism to warning only with necessary data field - * checking - * 1. NVRAM error is now treated as warning only, thus normal operation is still available but extra scan result used - * to indicate user is attached - * 2. DPD and TX-PWR are needed fields from now on, if these 2 fields are not available then warning message is shown - * - * 11 08 2010 cp.wu - * [WCXRP00000166] [MT6620 Wi-Fi][Driver] use SDIO CMD52 for enabling/disabling interrupt to reduce transaction period - * change to use CMD52 for enabling/disabling interrupt to reduce SDIO transaction time - * - * 11 01 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000150] [MT6620 Wi-Fi][Driver] - * Add implementation for querying current TX rate from firmware auto rate module - * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead - * 2) Remove CNM CH-RECOVER event handling - * 3) cfg read/write API renamed with kal prefix for unified naming rules. - * - * 10 05 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * 1) add NVRAM access API - * 2) fake scanning result when NVRAM doesn't exist and/or version mismatch. (off by compiler option) - * 3) add OID implementation for NVRAM read/write service - * - * 10 04 2010 wh.su - * [WCXRP00000081] [MT6620][Driver] Fix the compiling error at WinXP while enable P2P - * add a kal function for set cipher. - * - * 10 04 2010 wh.su - * [WCXRP00000081] [MT6620][Driver] Fix the compiling error at WinXP while enable P2P - * fixed compiling error while enable p2p. - * - * 09 28 2010 wh.su - * NULL - * [WCXRP00000069][MT6620 Wi-Fi][Driver] Fix some code for phase 1 P2P Demo. - * - * 09 21 2010 cp.wu - * [WCXRP00000053] [MT6620 Wi-Fi][Driver] Reset incomplete and might leads to BSOD when entering RF test with AIS - * associated - * Do a complete reset with STA-REC null checking for RF test re-entry - * - * 09 21 2010 kevin.huang - * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning - * Eliminate Linux Compile Warning - * - * 09 10 2010 wh.su - * NULL - * fixed the compiling error at win XP. - * - * 09 07 2010 wh.su - * NULL - * adding the code for beacon/probe req/ probe rsp wsc ie at p2p. - * - * 09 06 2010 wh.su - * NULL - * let the p2p can set the privacy bit at beacon and rsn ie at assoc req at key handshake state. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 08 06 2010 cp.wu - * NULL - * driver hook modifications corresponding to ioctl interface change. - * - * 08 03 2010 cp.wu - * NULL - * [Wi-Fi Direct Driver Hook] change event indication API to be consistent with supplicant - * - * 08 03 2010 cp.wu - * NULL - * [Wi-Fi Direct] add framework for driver hooks - * - * 08 02 2010 jeffrey.chang - * NULL - * modify kalSetEvent declaration - * - * 07 29 2010 cp.wu - * NULL - * simplify post-handling after TX_DONE interrupt is handled. - * - * 07 23 2010 cp.wu - * - * 1) re-enable AIS-FSM beacon timeout handling. - * 2) scan done API revised - * - * 07 23 2010 jeffrey.chang - * - * fix kal header file - * - * 07 22 2010 jeffrey.chang - * - * use different spin lock for security frame - * - * 07 22 2010 jeffrey.chang - * - * add new spinlock - * - * 07 19 2010 jeffrey.chang - * - * add kal api for scanning done - * - * 07 19 2010 jeffrey.chang - * - * modify cmd/data path for new design - * - * 07 19 2010 jeffrey.chang - * - * add new kal api - * - * 07 19 2010 jeffrey.chang - * - * Linux port modification - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 21 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * change MAC address updating logic. - * - * 06 18 2010 cm.chang - * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver - * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf - * - * 06 11 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * 1) migrate assoc.c. - * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness - * 3) add configuration options for CNM_MEM and RSN modules - * 4) add data path for management frames - * 5) eliminate rPacketInfo of MSDU_INFO_T - * - * 06 07 2010 cp.wu - * [WPD00003833][MT6620 and MT5931] Driver migration - * gl_kal merged - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add basic handling framework for wireless extension ioctls. - * - * 05 11 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add ioctl for controlling p2p scan phase parameters - * - * 05 10 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * fill network type field while doing frame identification. - * - * 05 10 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * implement basic wi-fi direct framework - * - * 05 07 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add basic framework for implementating P2P driver hook. - * - * 05 07 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * modify kalMemAlloc method - * - * 04 28 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * change prefix for data structure used to communicate with 802.11 PAL - * to avoid ambiguous naming with firmware interface - * - * 04 27 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add multiple physical link support - * - * 04 27 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * follow Linux's firmware framework, and remove unused kal API - * - * 04 22 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * when acquiring driver-own, wait for up to 8 seconds. - * - * 04 22 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * - * 1) modify rx path code for supporting Wi-Fi direct - * 2) modify config.h since Linux dont need to consider retaining packet - * - * 04 21 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * add for private ioctl support - * - * 04 20 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * don't need SPIN_LOCK_PWR_CTRL anymore, it will raise IRQL - * * and cause SdBusSubmitRequest running at DISPATCH_LEVEL as well. - * - * 04 14 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * information buffer for query oid/ioctl is now buffered in prCmdInfo - * * * * * * * * instead of glue-layer variable to improve multiple oid/ioctl capability - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * * * * * * * * * * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler - * * * * * * * * * * * * * * * * * * * capability - * * * * * * * * * * * * * * * * * * * 2) command sequence number is now increased atomically - * * * * * * * * * * * * * * * * * * * 3) private data could be hold and taken use for other purpose - * - * 04 09 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * 1) add spinlock - * * * 2) add KAPI for handling association info - * - * 04 09 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * adding firmware download KAPI - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * finish non-glue layer access to glue variables - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * accessing to firmware load/start address, and access to OID handling information - * * * * are now handled in glue layer - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * rWlanInfo should be placed at adapter rather than glue due to most operations - * * * * * * * * * are done in adapter layer. - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access to prGlueInfo->eParamMediaStateIndicated from non-glue layer - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * add KAL API: kalFlushPendingTxPackets(), and take use of the API - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access to prGlueInfo->rWlanInfo.eLinkAttr.ucMediaStreamMode from non-glue layer. - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * improve none-glue code portability - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * code refine: fgTestMode should be at adapter rather than glue due to the device/fw is also involved - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) for some OID, never do timeout expiration - * * * * 2) add 2 kal API for later integration - * - * 03 30 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * emulate NDIS Pending OID facility - * - * 03 26 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * [WPD00003826] Initial import for Linux port - * adding firmware download KAPI - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port -** \main\maintrunk.MT5921\41 2009-09-28 20:19:23 GMT mtk01090 -** Add private ioctl to carry OID structures. Restructure public/private ioctl interfaces to Linux kernel. -** \main\maintrunk.MT5921\40 2009-08-18 22:57:09 GMT mtk01090 -** Add Linux SDIO (with mmc core) support. -** Add Linux 2.6.21, 2.6.25, 2.6.26. -** Fix compile warning in Linux. -** \main\maintrunk.MT5921\39 2009-06-23 23:19:15 GMT mtk01090 -** Add build option BUILD_USE_EEPROM and compile option CFG_SUPPORT_EXT_CONFIG for NVRAM support -** \main\maintrunk.MT5921\38 2009-02-09 14:03:17 GMT mtk01090 -** Add KAL function kalDevSetPowerState(). It is not implemented yet. Only add an empty macro. -** -** \main\maintrunk.MT5921\37 2009-01-22 13:05:59 GMT mtk01088 -** new defeine to got 1x value at packet reserved field -** \main\maintrunk.MT5921\36 2008-12-08 16:15:02 GMT mtk01461 -** Add kalQueryValidBufferLength() macro -** \main\maintrunk.MT5921\35 2008-11-13 20:33:15 GMT mtk01104 -** Remove lint warning -** \main\maintrunk.MT5921\34 2008-10-22 11:05:52 GMT mtk01461 -** Remove unused macro -** \main\maintrunk.MT5921\33 2008-10-16 15:48:17 GMT mtk01461 -** Update driver to fix lint warning -** \main\maintrunk.MT5921\32 2008-09-02 11:50:51 GMT mtk01461 -** SPIN_LOCK_SDIO_DDK_TX_QUE -** \main\maintrunk.MT5921\31 2008-08-29 15:58:30 GMT mtk01088 -** remove non-used function for code refine -** \main\maintrunk.MT5921\30 2008-08-21 00:33:29 GMT mtk01461 -** Update for Driver Review -** \main\maintrunk.MT5921\29 2008-06-19 13:29:14 GMT mtk01425 -** 1. Add declaration of SPIN_LOCK_SDIO_DDK_TX_QUE and SPIN_LOCK_SDIO_DDK_RX_QUE -** \main\maintrunk.MT5921\28 2008-05-30 20:27:34 GMT mtk01461 -** Rename KAL function -** \main\maintrunk.MT5921\27 2008-05-30 14:42:05 GMT mtk01461 -** Remove WMM Assoc Flag in KAL -** \main\maintrunk.MT5921\26 2008-05-29 14:15:18 GMT mtk01084 -** remove un-used function -** \main\maintrunk.MT5921\25 2008-04-23 14:02:20 GMT mtk01084 -** modify KAL port access function prototype -** \main\maintrunk.MT5921\24 2008-04-17 23:06:41 GMT mtk01461 -** Add iwpriv support for AdHocMode setting -** \main\maintrunk.MT5921\23 2008-04-08 15:38:50 GMT mtk01084 -** add KAL function to setting pattern search function enable/ disable -** \main\maintrunk.MT5921\22 2008-03-26 15:34:48 GMT mtk01461 -** Add update MAC address func -** \main\maintrunk.MT5921\21 2008-03-18 15:56:15 GMT mtk01084 -** update ENUM_NIC_INITIAL_PARAM_E -** \main\maintrunk.MT5921\20 2008-03-18 11:49:28 GMT mtk01084 -** update function for initial value access -** \main\maintrunk.MT5921\19 2008-03-18 10:21:31 GMT mtk01088 -** use kal update associate request at linux -** \main\maintrunk.MT5921\18 2008-03-14 18:03:41 GMT mtk01084 -** refine register and port access function -** \main\maintrunk.MT5921\17 2008-03-11 14:51:02 GMT mtk01461 -** Add copy_to(from)_user macro -** \main\maintrunk.MT5921\16 2008-03-06 23:42:21 GMT mtk01385 -** 1. add Query Registry Mac address function. -** \main\maintrunk.MT5921\15 2008-02-26 09:48:04 GMT mtk01084 -** modify KAL set network address/ checksum offload part -** \main\maintrunk.MT5921\14 2008-01-09 17:54:58 GMT mtk01084 -** Modify the argument of kalQueryPacketInfo -** \main\maintrunk.MT5921\13 2007-11-29 02:05:20 GMT mtk01461 -** Fix Windows RX multiple packet retain problem -** \main\maintrunk.MT5921\12 2007-11-26 19:43:45 GMT mtk01461 -** Add OS_TIMESTAMP macro -** -** \main\maintrunk.MT5921\11 2007-11-09 16:36:15 GMT mtk01425 -** 1. Modify for CSUM offloading with Tx Fragment -** \main\maintrunk.MT5921\10 2007-11-07 18:38:37 GMT mtk01461 -** Add Tx Fragmentation Support -** \main\maintrunk.MT5921\9 2007-11-06 19:36:50 GMT mtk01088 -** add the WPS related code -** \main\maintrunk.MT5921\8 2007-11-02 01:03:57 GMT mtk01461 -** Unify TX Path for Normal and IBSS Power Save + IBSS neighbor learning -** Revision 1.4 2007/07/05 07:25:33 MTK01461 -** Add Linux initial code, modify doc, add 11BB, RF init code -** -** Revision 1.3 2007/06/27 02:18:50 MTK01461 -** Update SCAN_FSM, Initial(Can Load Module), Proc(Can do Reg R/W), TX API -** -** Revision 1.2 2007/06/25 06:16:23 MTK01461 -** Update illustrations, gl_init.c, gl_kal.c, gl_kal.h, gl_os.h and RX API -** -*/ #ifndef _GL_KAL_H #define _GL_KAL_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_os.h b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_os.h index cf162df3644a..6436ffd1fadd 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_os.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_os.h @@ -1,434 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/os/linux/include/gl_os.h#2 -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/*! \file gl_os.h - \brief List the external reference to OS for GLUE Layer. - - In this file we define the data structure - GLUE_INFO_T to store those objects - we acquired from OS - e.g. TIMER, SPINLOCK, NET DEVICE ... . And all the - external reference (header file, extern func() ..) to OS for GLUE Layer should - also list down here. -*/ - -/* -** Log: gl_os.h -** -** 08 20 2012 yuche.tsai -** NULL -** Fix possible KE issue. -** -** 08 20 2012 yuche.tsai -** [ALPS00339327] [Rose][6575JB][BSP Package][Free Test][KE][WIFI]There is no response when you tap the turn off/on -** button,wait a minutes, the device will reboot automatically and "KE" will pop up. -** Fix possible KE when netlink operate mgmt frame register. - * - * 04 12 2012 terry.wu - * NULL - * Add AEE message support - * 1) Show AEE warning(red screen) if SDIO access error occurs - - * - * 03 02 2012 terry.wu - * NULL - * Enable CFG80211 Support. - * - * 01 05 2012 wh.su - * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function - * Adding the related ioctl / wlan oid function to set the Tx power cfg. - * - * 12 13 2011 cm.chang - * [WCXRP00001136] [All Wi-Fi][Driver] Add wake lock for pending timer - * Add wake lock if timer timeout value is smaller than 5 seconds - * - * 11 18 2011 yuche.tsai - * NULL - * CONFIG P2P support RSSI query, default turned off. - * - * 11 16 2011 yuche.tsai - * NULL - * Avoid using work thread. - * - * 11 11 2011 yuche.tsai - * NULL - * Fix work thread cancel issue. - * - * 10 12 2011 wh.su - * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP - * adding the 802.11w related function and define . - * - * 09 29 2011 terry.wu - * NULL - * Show DRV_NAME by chip id. - * - * 04 18 2011 terry.wu - * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED - * Remove flag CFG_WIFI_DIRECT_MOVED. - * - * 03 29 2011 cp.wu - * [WCXRP00000598] [MT6620 Wi-Fi][Driver] Implementation of interface for communicating with user space process for - * RESET_START and RESET_END events - * implement kernel-to-userspace communication via generic netlink socket for whole-chip resetting mechanism - * - * 03 21 2011 cp.wu - * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer - * portability improvement - * - * 03 17 2011 chinglan.wang - * [WCXRP00000570] [MT6620 Wi-Fi][Driver] Add Wi-Fi Protected Setup v2.0 feature - * . - * - * 03 03 2011 jeffrey.chang - * [WCXRP00000512] [MT6620 Wi-Fi][Driver] modify the net device relative functions to support the H/W multiple queue - * support concurrent network - * - * 03 03 2011 jeffrey.chang - * [WCXRP00000512] [MT6620 Wi-Fi][Driver] modify the net device relative functions to support the H/W multiple queue - * modify net device relative functions to support multiple H/W queues - * - * 03 02 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * Add security check code. - * - * 02 21 2011 cp.wu - * [WCXRP00000482] [MT6620 Wi-Fi][Driver] Simplify logic for checking NVRAM existence in driver domain - * simplify logic for checking NVRAM existence only once. - * - * 02 16 2011 jeffrey.chang - * NULL - * Add query ipv4 and ipv6 address during early suspend and late resume - * - * 02 10 2011 chinghwa.yu - * [WCXRP00000065] Update BoW design and settings - * Fix kernel API change issue. - * Before ALPS 2.2 (2.2 included), kfifo_alloc() is - * struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask, spinlock_t *lock); - * After ALPS 2.3, kfifo_alloc() is changed to - * int kfifo_alloc(struct kfifo *fifo, unsigned int size, gfp_t gfp_mask); - * - * 02 09 2011 wh.su - * [WCXRP00000433] [MT6620 Wi-Fi][Driver] Remove WAPI structure define for avoid P2P module with structure miss-align - * pointer issue - * always pre-allio WAPI related structure for align p2p module. - * - * 02 09 2011 terry.wu - * [WCXRP00000383] [MT6620 Wi-Fi][Driver] Separate WiFi and P2P driver into two modules - * Halt p2p module init and exit until TxThread finished p2p register and unregister. - * - * 02 01 2011 cm.chang - * [WCXRP00000415] [MT6620 Wi-Fi][Driver] Check if any memory leakage happens when uninitializing in DGB mode - * . - * - * 01 27 2011 cm.chang - * [WCXRP00000402] [MT6620 Wi-Fi][Driver] Enable MCR read/write by iwpriv by default - * . - * - * 01 12 2011 cp.wu - * [WCXRP00000357] [MT6620 Wi-Fi][Driver][Bluetooth over Wi-Fi] add another net device interface for BT AMP - * implementation of separate BT_OVER_WIFI data path. - * - * 01 12 2011 cp.wu - * [WCXRP00000356] [MT6620 Wi-Fi][Driver] fill mac header length for security frames 'cause hardware header translation - * needs such information - * fill mac header length information for 802.1x frames. - * - * 01 11 2011 chinglan.wang - * NULL - * Modify to reslove the CR :[ALPS00028994] Use WEP security to connect Marvell 11N AP. Connection establish - * successfully. - * Use the WPS function to connect AP, the privacy bit always is set to 1. - * - * 01 10 2011 cp.wu - * [WCXRP00000349] [MT6620 Wi-Fi][Driver] make kalIoctl() of linux port as a thread safe API to avoid potential issues - * due to multiple access - * use mutex to protect kalIoctl() for thread safe. - * - * 01 05 2011 cp.wu - * [WCXRP00000283] [MT6620 Wi-Fi][Driver][Wi-Fi Direct] Implementation of interface for supporting Wi-Fi Direct Service - * Discovery - * ioctl implementations for P2P Service Discovery - * - * 11 04 2010 wh.su - * [WCXRP00000164] [MT6620 Wi-Fi][Driver] Support the p2p random SSID - * adding the p2p random ssid support. - * - * 10 18 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000086] [MT6620 Wi-Fi][Driver] - * The mac address is all zero at android - * complete implementation of Android NVRAM access - * - * 09 28 2010 wh.su - * NULL - * [WCXRP00000069][MT6620 Wi-Fi][Driver] Fix some code for phase 1 P2P Demo. - * - * 09 23 2010 cp.wu - * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check - * add skeleton for NVRAM integration - * - * 09 13 2010 cp.wu - * NULL - * add waitq for poll() and read(). - * - * 09 07 2010 wh.su - * NULL - * adding the code for beacon/probe req/ probe rsp wsc ie at p2p. - * - * 09 06 2010 wh.su - * NULL - * let the p2p can set the privacy bit at beacon and rsn ie at assoc req at key handshake state. - * - * 09 03 2010 kevin.huang - * NULL - * Refine #include sequence and solve recursive/nested #include issue - * - * 09 01 2010 wh.su - * NULL - * adding the wapi support for integration test. - * - * 08 31 2010 kevin.huang - * NULL - * Use LINK LIST operation to process SCAN result - * - * 08 23 2010 cp.wu - * NULL - * revise constant definitions to be matched with implementation (original cmd-event definition is deprecated) - * - * 08 16 2010 cp.wu - * NULL - * P2P packets are now marked when being queued into driver, and identified later without checking MAC address - * - * 08 16 2010 cp.wu - * NULL - * revised implementation of Wi-Fi Direct io controls. - * - * 08 11 2010 cp.wu - * NULL - * 1) do not use in-stack variable for beacon updating. (for MAUI porting) - * 2) extending scanning result to 64 instead of 48 - * - * 08 06 2010 cp.wu - * NULL - * driver hook modifications corresponding to ioctl interface change. - * - * 08 03 2010 cp.wu - * NULL - * [Wi-Fi Direct] add framework for driver hooks - * - * 08 02 2010 jeffrey.chang - * NULL - * 1) modify tx service thread to avoid busy looping - * 2) add spin lock declartion for linux build - * - * 07 23 2010 jeffrey.chang - * - * add new KAL api - * - * 07 22 2010 jeffrey.chang - * - * modify tx thread and remove some spinlock - * - * 07 19 2010 jeffrey.chang - * - * add security frame pending count - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 06 01 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add ioctl to configure scan mode for p2p connection - * - * 05 31 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add cfg80211 interface, which is to replace WE, for further extension - * - * 05 14 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add ioctl framework for Wi-Fi Direct by reusing wireless extension ioctls as well - * - * 05 11 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * p2p ioctls revised. - * - * 05 11 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add ioctl for controlling p2p scan phase parameters - * - * 05 10 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * implement basic wi-fi direct framework - * - * 05 07 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * prevent supplicant accessing driver during resume - * - * 05 07 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add basic framework for implementating P2P driver hook. - * - * 05 05 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * change variable names for multiple physical link to match with coding convention - * - * 04 27 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * identify BT Over Wi-Fi Security frame and mark it as 802.1X frame - * - * 04 27 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add multiple physical link support - * - * 04 27 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * 1) fix firmware download bug - * 2) remove query statistics for acelerating firmware download - * - * 04 27 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * follow Linux's firmware framework, and remove unused kal API - * - * 04 23 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * surpress compiler warning - * - * 04 19 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * supporting power management - * - * 04 14 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * pvInformationBuffer and u4InformationBufferLength are no longer in glue - * - * 04 13 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add framework for BT-over-Wi-Fi support. - * * * * * * * * * * * * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple - * * * * * * * * * * * * * * * * * * * * handler capability - * * * * * * * * * * * * * * * * * * * * 2) command sequence number is now increased atomically - * * * * * * * * * * * * * * * * * * * * 3) private data could be hold and taken use for other - * * * * * * * * * * * * * * * * * * * * purpose - * - * 04 07 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * rWlanInfo should be placed at adapter rather than glue due to most operations - * * * * * * * * * * are done in adapter layer. - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * Tag the packet for QoS on Tx path - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * (1)deliver the kalOidComplete status to upper layer - * * (2) fix spin lock - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * add timeout check in the kalOidComplete - * - * 04 06 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * improve none-glue code portability - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * code refine: fgTestMode should be at adapter rather than glue due to the device/fw is also involved - * - * 04 06 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * eliminate direct access for prGlueInfo->fgIsCardRemoved in non-glue layer - * - * 03 30 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * emulate NDIS Pending OID facility - * - * 03 26 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * [WPD00003826] Initial import for Linux port - * adding firmware download related data type - * - * 03 25 2010 cp.wu - * [WPD00001943]Create WiFi test driver framework on WinXP - * 1) correct OID_802_11_CONFIGURATION with frequency setting behavior. - * * * * the frequency is used for adhoc connection only - * * * * 2) update with SD1 v0.9 CMD/EVENT documentation - * - * 03 25 2010 cp.wu - * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support - * add Bluetooth-over-Wifi frame header check - * - * 03 24 2010 jeffrey.chang - * [WPD00003826]Initial import for Linux port - * initial import for Linux port -** \main\maintrunk.MT5921\30 2009-10-20 17:38:31 GMT mtk01090 -** Refine driver unloading and clean up procedure. Block requests, stop main thread and clean up queued requests, -** and then stop hw. -** \main\maintrunk.MT5921\29 2009-10-08 10:33:33 GMT mtk01090 -** Avoid accessing private data of net_device directly. Replace with netdev_priv(). Add more checking for input -** parameters and pointers. -** \main\maintrunk.MT5921\28 2009-09-28 20:19:26 GMT mtk01090 -** Add private ioctl to carry OID structures. Restructure public/private ioctl interfaces to Linux kernel. -** \main\maintrunk.MT5921\27 2009-08-18 22:57:12 GMT mtk01090 -** Add Linux SDIO (with mmc core) support. -** Add Linux 2.6.21, 2.6.25, 2.6.26. -** Fix compile warning in Linux. -** \main\maintrunk.MT5921\26 2009-07-06 21:42:25 GMT mtk01088 -** fixed the compiling error at linux -** \main\maintrunk.MT5921\25 2009-07-06 20:51:46 GMT mtk01088 -** adding the wapi 1x ether type define -** \main\maintrunk.MT5921\24 2009-06-23 23:19:18 GMT mtk01090 -** Add build option BUILD_USE_EEPROM and compile option CFG_SUPPORT_EXT_CONFIG for NVRAM support -** \main\maintrunk.MT5921\23 2009-02-07 15:05:06 GMT mtk01088 -** add the privacy flag to ingo driver the supplicant selected ap's security -** \main\maintrunk.MT5921\22 2009-02-05 15:34:09 GMT mtk01088 -** fixed the compiling error for using bits marco for only one parameter -** \main\maintrunk.MT5921\21 2009-01-22 13:02:13 GMT mtk01088 -** data frame is or not 802.1x value share with tid, using the same reserved byte, provide the function to set and get -** \main\maintrunk.MT5921\20 2008-10-24 12:04:16 GMT mtk01088 -** move the config.h from precomp.h to here for lint check -** \main\maintrunk.MT5921\19 2008-09-22 23:19:02 GMT mtk01461 -** Update driver for code review -** \main\maintrunk.MT5921\18 2008-09-05 17:25:13 GMT mtk01461 -** Update Driver for Code Review -** \main\maintrunk.MT5921\17 2008-08-01 13:32:47 GMT mtk01084 -** Prevent redundent driver assertion in driver logic when BUS is detached -** \main\maintrunk.MT5921\16 2008-05-30 14:41:43 GMT mtk01461 -** Remove WMM Assoc Flag in KAL -** \main\maintrunk.MT5921\15 2008-05-29 14:16:25 GMT mtk01084 -** remoev un-used variable -** \main\maintrunk.MT5921\14 2008-05-03 15:17:14 GMT mtk01461 -** Add Media Status variable in Glue Layer -** \main\maintrunk.MT5921\13 2008-04-24 11:58:41 GMT mtk01461 -** change threshold to 256 -** \main\maintrunk.MT5921\12 2008-03-11 14:51:05 GMT mtk01461 -** Remove redundant GL_CONN_INFO_T -** \main\maintrunk.MT5921\11 2008-01-07 15:07:41 GMT mtk01461 -** Adjust the netif stop threshold to 150 -** \main\maintrunk.MT5921\10 2007-11-26 19:43:46 GMT mtk01461 -** Add OS_TIMESTAMP macro -** -** \main\maintrunk.MT5921\9 2007-11-07 18:38:38 GMT mtk01461 -** Move definition -** \main\maintrunk.MT5921\8 2007-11-02 01:04:00 GMT mtk01461 -** Unify TX Path for Normal and IBSS Power Save + IBSS neighbor learning -** Revision 1.5 2007/07/12 11:04:28 MTK01084 -** update macro to delay for ms order -** -** Revision 1.4 2007/07/05 07:25:34 MTK01461 -** Add Linux initial code, modify doc, add 11BB, RF init code -** -** Revision 1.3 2007/06/27 02:18:51 MTK01461 -** Update SCAN_FSM, Initial(Can Load Module), Proc(Can do Reg R/W), TX API -** -** Revision 1.2 2007/06/25 06:16:24 MTK01461 -** Update illustrations, gl_init.c, gl_kal.c, gl_kal.h, gl_os.h and RX API -** -*/ #ifndef _GL_OS_H #define _GL_OS_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_p2p_ioctl.h b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_p2p_ioctl.h index 69ca42b04184..8d7f234123a8 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_p2p_ioctl.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_p2p_ioctl.h @@ -1,213 +1,16 @@ -/* -** Id: //Department/DaVinci/TRUNK/WiFi_P2P_Driver/os/linux/include/gl_p2p_ioctl.h#9 -*/ - -/*! \file gl_p2p_ioctl.h - \brief This file is for custom ioctls for Wi-Fi Direct only -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/* -** Log: gl_p2p_ioctl.h -** -** 07 26 2012 yuche.tsai -** [ALPS00324337] [ALPS.JB][Hot-Spot] Driver update for Hot-Spot -** Update driver code of ALPS.JB for hot-spot. -** -** 07 19 2012 yuche.tsai -** NULL -** Code update for JB. - * - * 07 17 2012 yuche.tsai - * NULL - * Compile no error before trial run. - * - * 06 07 2011 yuche.tsai - * [WCXRP00000763] [Volunteer Patch][MT6620][Driver] RX Service Discovery Frame under AP mode Issue - * Fix RX SD request under AP mode issue. - * - * 03 25 2011 wh.su - * NULL - * Fix P2P IOCTL of multicast address bug, add low power driver stop control. - * - * 11 22 2011 yuche.tsai - * NULL - * Update RSSI link quality of P2P Network query method. (Bug fix) - * - * 11 19 2011 yuche.tsai - * NULL - * Add RSSI support for P2P network. - * - * 11 11 2011 yuche.tsai - * NULL - * Fix work thread cancel issue. - * - * 11 08 2011 yuche.tsai - * [WCXRP00001094] [Volunteer Patch][Driver] Driver version & supplicant version query & set support for service - * discovery version check. - * Add support for driver version query & p2p supplicant verseion set. - * For new service discovery mechanism sync. - * - * 10 25 2011 cm.chang - * [WCXRP00001058] [All Wi-Fi][Driver] Fix sta_rec's phyTypeSet and OBSS scan in AP mode - * . - * - * 10 18 2011 yuche.tsai - * [WCXRP00001045] [WiFi Direct][Driver] Check 2.1 branch. - * New 2.1 branch - - * - * 08 16 2011 chinglan.wang - * NULL - * Add the group id information in the invitation indication. - * - * 08 09 2011 yuche.tsai - * [WCXRP00000919] [Volunteer Patch][WiFi Direct][Driver] Invitation New Feature. - * Invitation Feature add on. - * - * 05 04 2011 chinglan.wang - * [WCXRP00000698] [MT6620 Wi-Fi][P2P][Driver] Add p2p invitation command for the p2p driver - * . - * - * 03 29 2011 wh.su - * [WCXRP00000095] [MT6620 Wi-Fi] [FW] Refine the P2P GO send broadcast protected code - * add the set power and get power function sample. - * - * 03 22 2011 george.huang - * [WCXRP00000504] [MT6620 Wi-Fi][FW] Support Sigma CAPI for power saving related command - * link with supplicant commands - * - * 03 07 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * rename the define to anti_pviracy. - * - * 03 02 2011 wh.su - * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code - * Add Security check related code. - * - * 03 01 2011 wh.su - * [WCXRP00000488] [MT6620 Wi-Fi][Driver] Support the SIGMA set p2p parameter to driver - * fixed the ioctl sumcmd to meet the p2p_supplicant setting. - * - * 02 23 2011 wh.su - * [WCXRP00000488] [MT6620 Wi-Fi][Driver] Support the SIGMA set p2p parameter to driver - * adding the ioctl set int define for p2p parameter. - * - * 02 22 2011 wh.su - * [WCXRP00000488] [MT6620 Wi-Fi][Driver] Support the SIGMA set p2p parameter to driver - * adding the ioctl set int from supplicant, and can used to set the p2p parameters - * - * 02 17 2011 wh.su - * [WCXRP00000448] [MT6620 Wi-Fi][Driver] Fixed WSC IE not send out at probe request - * adjust the set wsc ie structure. - * - * 01 05 2011 cp.wu - * [WCXRP00000283] [MT6620 Wi-Fi][Driver][Wi-Fi Direct] Implementation of interface for supporting Wi-Fi Direct Service - * Discovery - * ioctl implementations for P2P Service Discovery - * - * 12 22 2010 cp.wu - * [WCXRP00000283] [MT6620 Wi-Fi][Driver][Wi-Fi Direct] Implementation of interface for supporting Wi-Fi Direct Service - * Discovery - * 1. header file restructure for more clear module isolation - * 2. add function interface definition for implementing Service Discovery callbacks - * - * 12 15 2010 cp.wu - * NULL - * invoke nicEnableInterrupt() before leaving from wlanAdapterStart() - * - * 12 07 2010 cp.wu - * [WCXRP00000237] [MT6620 Wi-Fi][Wi-Fi Direct][Driver] Add interface for supporting service discovery - * define a pair of i/o control for multiplexing layer - * - * 11 04 2010 wh.su - * [WCXRP00000164] [MT6620 Wi-Fi][Driver] Support the p2p random SSID - * adding the p2p random ssid support. - * - * 10 20 2010 wh.su - * [WCXRP00000124] [MT6620 Wi-Fi] [Driver] Support the dissolve P2P Group - * Add the code to support disconnect p2p group - * - * 09 21 2010 kevin.huang - * [WCXRP00000054] [MT6620 Wi-Fi][Driver] Restructure driver for second Interface - * Isolate P2P related function for Hardware Software Bundle - * - * 09 10 2010 george.huang - * NULL - * update iwpriv LP related - * - * 09 07 2010 wh.su - * NULL - * adding the code for beacon/probe req/ probe rsp wsc ie at p2p. - * - * 08 25 2010 cp.wu - * NULL - * add netdev_ops(NDO) for linux kernel 2.6.31 or greater - * - * 08 20 2010 yuche.tsai - * NULL - * Refine a function parameter name. - * - * 08 19 2010 cp.wu - * NULL - * add set mac address interface for further possibilities of wpa_supplicant overriding interface address. - * - * 08 16 2010 george.huang - * NULL - * add wext handlers to link P2P set PS profile/ network address function (TBD) - * - * 08 16 2010 cp.wu - * NULL - * revised implementation of Wi-Fi Direct io controls. - * - * 08 12 2010 cp.wu - * NULL - * follow-up with ioctl interface update for Wi-Fi Direct application - * - * 08 06 2010 cp.wu - * NULL - * driver hook modifications corresponding to ioctl interface change. - * - * 08 03 2010 cp.wu - * NULL - * [Wi-Fi Direct] add framework for driver hooks - * - * 07 08 2010 cp.wu - * - * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository. - * - * 06 06 2010 kevin.huang - * [WPD00003832][MT6620 5931] Create driver base - * [MT6620 5931] Create driver base - * - * 06 01 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add ioctl to configure scan mode for p2p connection - * - * 05 31 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add cfg80211 interface, which is to replace WE, for further extension - * - * 05 17 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * implement get scan result. - * - * 05 14 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * implement wireless extension ioctls in iw_handler form. - * - * 05 14 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add ioctl framework for Wi-Fi Direct by reusing wireless extension ioctls as well - * - * 05 11 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * p2p ioctls revised. - * - * 05 11 2010 cp.wu - * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support - * add ioctl for controlling p2p scan phase parameters - * -*/ #ifndef _GL_P2P_IOCTL_H #define _GL_P2P_IOCTL_H diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_rst.h b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_rst.h index f24ceee9e921..e53fd085652c 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_rst.h +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_rst.h @@ -1,11 +1,16 @@ -/* -** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/os/linux/include/gl_rst.h#1 -*/ +/*--------------------------------------------------------------- +* Copyright (C) 2016 MediaTek Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See http://www.gnu.org/licenses/gpl-2.0.html for more details. +----------------------------------------------------*/ -/*! \file gl_rst.h - \brief Declaration of functions and finite state machine for - MT6620 Whole-Chip Reset Mechanism -*/ #ifndef _GL_RST_H #define _GL_RST_H |