summaryrefslogtreecommitdiff
path: root/wilink_6_1/stad
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2009-08-14 18:51:52 -0700
committerLorenzo Colitti <lorenzo@google.com>2009-08-17 15:36:00 -0700
commitf1afff14b14abc2bafc344803cdee62ad83c7a27 (patch)
treed541d025ad9fd8d448fbfb06b6d191c15a4fc44f /wilink_6_1/stad
parentcbee36d244ec74eb778b1445749e337d7edcc6dd (diff)
downloadti-f1afff14b14abc2bafc344803cdee62ad83c7a27.tar.gz
Sholes wireless driver fixes.
1. Ignore broadcast frames we sent ourselves, as per the 802.11 standard. 2. In an effort to avoid data copies, the driver uses skbuffs incorrectly, updating skb->data directly without updating skb->tail. Update the tail pointer as well. 3. Correct spelling mistakes in some frequently-seen log messages.
Diffstat (limited to 'wilink_6_1/stad')
-rw-r--r--wilink_6_1/stad/src/Connection_Managment/sme.c11
-rw-r--r--wilink_6_1/stad/src/Data_link/rx.c20
2 files changed, 23 insertions, 8 deletions
diff --git a/wilink_6_1/stad/src/Connection_Managment/sme.c b/wilink_6_1/stad/src/Connection_Managment/sme.c
index 87ef57b..b48151d 100644
--- a/wilink_6_1/stad/src/Connection_Managment/sme.c
+++ b/wilink_6_1/stad/src/Connection_Managment/sme.c
@@ -559,7 +559,7 @@ void sme_ScanResultCB (TI_HANDLE hSme, EScanCncnResultStatus eStatus,
{
if (TI_OK != scanResultTable_UpdateEntry (pSme->hScanResultTable, pFrameInfo->bssId, pFrameInfo))
{
- TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ScanResultCB: unable to update specific enrty for BSSID %02x:%02x:%02x:%02x:%02x:%02x\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
+ TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ScanResultCB: unable to update specific entry for BSSID %02x:%02x:%02x:%02x:%02x:%02x\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
}
}
}
@@ -567,7 +567,7 @@ void sme_ScanResultCB (TI_HANDLE hSme, EScanCncnResultStatus eStatus,
{
if (TI_OK != scanResultTable_UpdateEntry (pSme->hScanResultTable, pFrameInfo->bssId, pFrameInfo))
{
- TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ScanResultCB: unable to update enrty for BSSID %02x:%02x:%02x:%02x:%02x:%02x because table is full\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
+ TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ScanResultCB: unable to update entry for BSSID %02x:%02x:%02x:%02x:%02x:%02x because table is full\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
}
}
}
@@ -576,7 +576,7 @@ void sme_ScanResultCB (TI_HANDLE hSme, EScanCncnResultStatus eStatus,
{
if (TI_OK != scanResultTable_UpdateEntry (pSme->hScanResultTable, pFrameInfo->bssId, pFrameInfo))
{
- TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ScanResultCB: unable to update application scan enrty for BSSID %02x:%02x:%02x:%02x:%02x:%02x\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
+ TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_ScanResultCB: unable to update application scan entry for BSSID %02x:%02x:%02x:%02x:%02x:%02x\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
}
}
break;
@@ -712,7 +712,7 @@ void sme_AppScanResult (TI_HANDLE hSme, EScanCncnResultStatus eStatus,
if (TI_OK != scanResultTable_UpdateEntry (pSme->hScanResultTable, pFrameInfo->bssId, pFrameInfo))
{
- TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_AppScanResult: unable to update enrty for BSSID %02x:%02x:%02x:%02x:%02x:%02x because table is full\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
+ TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_AppScanResult: unable to update entry for BSSID %02x:%02x:%02x:%02x:%02x:%02x because table is full\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
}
break;
@@ -760,7 +760,7 @@ void sme_MeansurementScanResult (TI_HANDLE hSme, EScanCncnResultStatus eStatus,
if (TI_OK != scanResultTable_UpdateEntry (pSme->hScanResultTable, pFrameInfo->bssId, pFrameInfo))
{
- TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_MeansurementScanResult: unable to update enrty for BSSID %02x:%02x:%02x:%02x:%02x:%02x because table is full\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
+ TRACE6(pSme->hReport, REPORT_SEVERITY_ERROR , "sme_MeansurementScanResult: unable to update entry for BSSID %02x:%02x:%02x:%02x:%02x:%02x because table is full\n", (*pFrameInfo->bssId)[ 0 ], (*pFrameInfo->bssId)[ 1 ], (*pFrameInfo->bssId)[ 2 ], (*pFrameInfo->bssId)[ 3 ], (*pFrameInfo->bssId)[ 4 ], (*pFrameInfo->bssId)[ 5 ]);
}
break;
@@ -971,4 +971,3 @@ void SME_Disconnect (TI_HANDLE hSme)
/* now send a disconnect event */
genSM_Event (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme);
}
-
diff --git a/wilink_6_1/stad/src/Data_link/rx.c b/wilink_6_1/stad/src/Data_link/rx.c
index b619735..9e7fc33 100644
--- a/wilink_6_1/stad/src/Data_link/rx.c
+++ b/wilink_6_1/stad/src/Data_link/rx.c
@@ -44,6 +44,7 @@
#include "osApi.h"
#include "timer.h"
#include "DataCtrl_Api.h"
+#include "Ctrl.h"
#include "802_11Defs.h"
#include "Ethernet.h"
#include "report.h"
@@ -1223,8 +1224,8 @@ static void rxData_rcvPacketData(TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxA
{
rxData_t *pRxData = (rxData_t *)hRxData;
TEthernetHeader *pEthernetHeader;
- TI_UINT16 EventMask = 0;
-
+ TI_UINT16 EventMask = 0;
+ TFwInfo *pFwInfo;
TRACE0(pRxData->hReport, REPORT_SEVERITY_INFORMATION, " rxData_rcvPacketData() : Received DATA frame tranferred to OS\n");
@@ -1255,6 +1256,21 @@ static void rxData_rcvPacketData(TI_HANDLE hRxData, void *pBuffer, TRxAttr* pRxA
RxBufFree(pRxData->hOs, pBuffer);
return;
}
+
+ /*
+ * Discard multicast/broadcast frames that we sent ourselves.
+ * Per IEEE 802.11-2007 section 9.2.7: "STAs shall filter out
+ * broadcast/multicast messages that contain their address as
+ * the source address."
+ */
+ pFwInfo = TWD_GetFWInfo (pRxData->hTWD);
+ if (MAC_EQUAL(pFwInfo->macAddress, pEthernetHeader->src))
+ {
+ pRxData->rxDataDbgCounters.excludedFrameCounter++;
+ /* free Buffer */
+ RxBufFree(pRxData->hOs, pBuffer);
+ return;
+ }
}
/* update traffic monitor parameters */