Commit a989fcd6 authored by pintu's avatar pintu

Fixes for m7610u_sta driver for Cisco Linksys AE6000 wifi dongle for Linux x64...

Fixes for m7610u_sta driver for Cisco Linksys AE6000 wifi dongle for Linux x64 bit platform, Ubuntu 14.04 LTS x64 bit
parent e203a47a
......@@ -14,7 +14,7 @@ endif
# rt8592(for rt85592), mt7650e, mt7630e, mt7610e, mt7650u, mt7630u, mt7610u
ifeq ($(CHIPSET),)
CHIPSET = mt7650u mt7630u mt7610u
CHIPSET = mt7610u
endif
MODULE = $(word 1, $(CHIPSET))
......
......@@ -6,7 +6,7 @@ CountryCode=
ChannelGeography=1
SSID=11n-AP
NetworkType=Infra
WirelessMode=5
WirelessMode=8
EfuseBufferMode=0
Channel=0
BeaconPeriod=100
......@@ -17,7 +17,7 @@ RTSThreshold=2347
FragThreshold=2346
TxBurst=1
PktAggregate=0
WmmCapable=1
WmmCapable=0
AckPolicy=0;0;0;0
AuthMode=OPEN
EncrypType=NONE
......
......@@ -1573,7 +1573,7 @@ static VOID NICInitMT76x0RFRegisters(RTMP_ADAPTER *pAd)
E2: B0.R21<0>: xo_cxo<0>, B0.R22<7:0>: xo_cxo<8:1>
*/
RFValue = (UCHAR)(pAd->RfFreqOffset & 0xFF);
RFValue = min(RFValue, 0xBF); /* Max of 9-bit built-in crystal oscillator C1 code */
RFValue = min(RFValue, (UCHAR)0xBF); /* Max of 9-bit built-in crystal oscillator C1 code */
rlt_rf_write(pAd, RF_BANK0, RF_R22, RFValue);
rlt_rf_read(pAd, RF_BANK0, RF_R22, &RFValue);
......
......@@ -27,6 +27,8 @@
#ifdef RTMP_MAC_USB
#define usb_buffer_alloc(a, b, c, d) usb_alloc_coherent(a, b, c, d)
#define usb_buffer_free(a, b, c, d) usb_free_coherent(a, b, c, d)
#include "rt_config.h"
......
......@@ -1802,17 +1802,17 @@ int RtmpPasswordHash(PSTRING password, PUCHAR ssid, INT ssidlength, PUCHAR outpu
Return Value:
Note:
Output KDF-Length (K, label, Context) where
Output \A1\F6 KDF-Length (K, label, Context) where
Input: K, a 256-bit key derivation key
label, a string identifying the purpose of the keys derived using this KDF
Context, a bit string that provides context to identify the derived key
Length, the length of the derived key in bits
Output: a Length-bit derived key
result ""
iterations (Length+255)/256
result \A1\F6 ""
iterations \A1\F6 (Length+255)/256
do i = 1 to iterations
result result || HMAC-SHA256(K, i || label || Context || Length)
result \A1\F6 result || HMAC-SHA256(K, i || label || Context || Length)
od
return first Length bits of result, and securely delete all unused bits
......@@ -2480,7 +2480,7 @@ VOID RTMPMakeRSNIE(
UCHAR PrimaryRsnie;
BOOLEAN bMixCipher = FALSE; /* indicate the pairwise and group cipher are different*/
UCHAR p_offset;
WPA_MIX_PAIR_CIPHER FlexibleCipher = MIX_CIPHER_NOTUSE; /* it provide the more flexible cipher combination in WPA-WPA2 and TKIPAES mode*/
WPA_MIX_PAIR_CIPHER FlexibleCipher = WPA_TKIPAES_WPA2_TKIPAES; /* it provide the more flexible cipher combination in WPA-WPA2 and TKIPAES mode*/
rsnielen_cur_p = NULL;
rsnielen_ex_cur_p = NULL;
......
......@@ -535,8 +535,8 @@ VOID MlmeResetRalinkCounters(
#endif /* RALINK_ATE */
/* for performace enchanement */
NdisZeroMemory(&pAd->RalinkCounters,
(UINT32)&pAd->RalinkCounters.OneSecEnd -
(UINT32)&pAd->RalinkCounters.OneSecStart);
(ULONG)&pAd->RalinkCounters.OneSecEnd -
(ULONG)&pAd->RalinkCounters.OneSecStart);
return;
}
......
......@@ -37,7 +37,7 @@
USB_DEVICE_ID rtusb_dev_id[] = {
#ifdef MT76x0
{USB_DEVICE(0x148F,0x7610)}, /* MT7610U */
{USB_DEVICE(0x0E8D,0x7610)}, /* MT7610U */
{USB_DEVICE(0x13B1,0x003E)}, /* MT7610U */
{USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7630, 0xff, 0x2, 0xff)}, /* MT7630U */
{USB_DEVICE_AND_INTERFACE_INFO(0x0E8D, 0x7650, 0xff, 0x2, 0xff)}, /* MT7650U */
#endif
......
......@@ -6,7 +6,7 @@ CountryCode=
ChannelGeography=1
SSID=11n-AP
NetworkType=Infra
WirelessMode=5
WirelessMode=8
EfuseBufferMode=0
Channel=0
BeaconPeriod=100
......@@ -17,7 +17,7 @@ RTSThreshold=2347
FragThreshold=2346
TxBurst=1
PktAggregate=0
WmmCapable=1
WmmCapable=0
AckPolicy=0;0;0;0
AuthMode=OPEN
EncrypType=NONE
......
/*
*************************************************************************
* Ralink Tech Inc.
* 5F., No.36, Taiyuan St., Jhubei City,
* Hsinchu County 302,
* Taiwan, R.O.C.
*
* (c) Copyright 2002-2010, Ralink Technology, Inc.
*
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* 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 the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
*************************************************************************/
/* AUTO GEN PLEASE DO NOT MODIFY IT */
/* AUTO GEN PLEASE DO NOT MODIFY IT */
UCHAR MT7650_FirmwareImage[] = {
......
......@@ -277,8 +277,8 @@ typedef struct file* RTMP_OS_FD;
typedef struct _OS_FS_INFO_
{
int fsuid;
int fsgid;
kuid_t fsuid;
kgid_t fsgid;
mm_segment_t fs;
} OS_FS_INFO;
......@@ -880,11 +880,20 @@ void linux_pci_unmap_single(void *handle, ra_dma_addr_t dma_addr, size_t size, i
#define SET_OS_PKT_LEN(_pkt, _len) \
(RTPKT_TO_OSPKT(_pkt)->len) = (_len)
#ifdef NET_SKBUFF_DATA_USES_OFFSET
#define GET_OS_PKT_DATATAIL(_pkt) \
(RTPKT_TO_OSPKT(_pkt)->head + (ULONG)RTPKT_TO_OSPKT(_pkt)->tail)
#define SET_OS_PKT_DATATAIL(_pkt, _start, _len) \
((RTPKT_TO_OSPKT(_pkt))->tail) = (ULONG)_start - (ULONG)(RTPKT_TO_OSPKT(_pkt)->head) + (_len)
#else
#define GET_OS_PKT_DATATAIL(_pkt) \
(RTPKT_TO_OSPKT(_pkt)->tail)
#define SET_OS_PKT_DATATAIL(_pkt, _start, _len) \
((RTPKT_TO_OSPKT(_pkt))->tail) = (PUCHAR)((_start) + (_len))
((RTPKT_TO_OSPKT(_pkt))->tail) = (ULONG)((_start) + (_len))
#endif
#define GET_OS_PKT_HEAD(_pkt) \
(RTPKT_TO_OSPKT(_pkt)->head)
......
......@@ -23,12 +23,12 @@ HAS_APCLI=n
# Support Wpa_Supplicant
# i.e. wpa_supplicant -Dralink
HAS_WPA_SUPPLICANT=n
HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Maganger
# i.e. wpa_supplicant -Dwext
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
#Support Net interface block while Tx-Sw queue full
HAS_BLOCK_NET_IF=n
......@@ -660,7 +660,7 @@ ifeq ($(HAS_CSO_SUPPORT), y)
WFLAGS += -DCONFIG_CSO_SUPPORT -DCONFIG_TSO_SUPPORT
endif
CHIPSET_DAT = 2860
CHIPSET_DAT = 2870
endif
ifneq ($(or $(findstring mt7662e,$(CHIPSET)),$(findstring mt7612e,$(CHIPSET))),)
......
......@@ -497,9 +497,9 @@ PNDIS_PACKET duplicate_pkt(
MEM_DBG_PKT_ALLOC_INC(skb);
skb_reserve(skb, 2);
NdisMoveMemory(skb->tail, pHeader802_3, HdrLen);
NdisMoveMemory(GET_OS_PKT_DATATAIL(skb), pHeader802_3, HdrLen);
skb_put(skb, HdrLen);
NdisMoveMemory(skb->tail, pData, DataSize);
NdisMoveMemory(GET_OS_PKT_DATATAIL(skb), pData, DataSize);
skb_put(skb, DataSize);
skb->dev = pNetDev; /*get_netdev_from_bssid(pAd, FromWhichBSSID); */
pPacket = OSPKT_TO_RTPKT(skb);
......@@ -650,7 +650,7 @@ PNDIS_PACKET ClonePacket(
pClonedPkt->dev = pRxPkt->dev;
pClonedPkt->data = pData;
pClonedPkt->len = DataSize;
pClonedPkt->tail = pClonedPkt->data + pClonedPkt->len;
SET_OS_PKT_DATATAIL(pClonedPkt, pClonedPkt->data, pClonedPkt->len);
ASSERT(DataSize < 1530);
}
return pClonedPkt;
......@@ -695,7 +695,7 @@ void wlan_802_11_to_802_3_packet(
pOSPkt->dev = pNetDev;
pOSPkt->data = pData;
pOSPkt->len = DataSize;
pOSPkt->tail = pOSPkt->data + pOSPkt->len;
SET_OS_PKT_DATATAIL(pOSPkt, pOSPkt->data, pOSPkt->len);
/* copy 802.3 header */
......@@ -1105,9 +1105,10 @@ static inline void __RtmpOSFSInfoChange(OS_FS_INFO * pOSFSInfo, BOOLEAN bSet)
pOSFSInfo->fsuid = current->fsuid;
pOSFSInfo->fsgid = current->fsgid;
current->fsuid = current->fsgid = 0;
#else
pOSFSInfo->fsuid = current_fsuid();
pOSFSInfo->fsgid = current_fsgid();
pOSFSInfo->fsgid = current_fsgid();
#endif
pOSFSInfo->fs = get_fs();
set_fs(KERNEL_DS);
......
......@@ -39,7 +39,7 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Paul Lin <paul_lin@ralinktech.com>");
MODULE_DESCRIPTION("RT2870 Wireless Lan Linux Driver");
MODULE_LICENSE("GPL");
#ifdef CONFIG_STA_SUPPORT
#ifdef MODULE_VERSION
MODULE_VERSION(STA_DRIVER_VERSION);
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment