TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech World > Internet & Networking

Notices

Can NDIS Miniport driver use UART as its lower edge?

Internet & Networking


Reply
 
Thread Tools Display Modes
Old 29-07-2009, 03:10 PM   #1
Newbie
 
Join Date: May 2009
Age: 25
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 Primemarshal is an unknown quantity at this point


OS: Windows XP Windows Vista


Angry Can NDIS Miniport driver use UART as its lower edge?


Dear Guys,
I'm trying to write a miniport driver for wifi device, and its lower edge is UART interface, but when I debugging , I found that system wouldn't call my MiniportInitalize function I specified in DriverEntry.
The DriverEntry function's code is below:

///////////////////////////////////////////////////////////////////////////////////////////////////
// DriverEntry
// Installable driver initialization entry point.
// This entry point is called directly by the I/O system.
//
// Arguments:
// IN DriverObject
// pointer to the driver object
//
// IN RegistryPath
// pointer to a unicode string representing the path,
// to driver-specific key in the registry.
//
// Return Value:
// Status
//
NDIS_STATUS DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
)
{
NDIS_STATUS status;
NDIS_HANDLE wrapperHandle;
NDIS_MINIPORT_CHARACTERISTICS miniportChars;
UartWifiDebugPrint(DBG_INIT, DBG_TRACE, __FUNCTION__"++");
UartWifiDebugPrint(DBG_INIT, DBG_INFO, "Compiled at %s on %s", __TIME__, __DATE__);
#ifdef DBG
// DbgBreakPoint();
#endif
// register our driver with NDIS
NdisMInitializeWrapper(&wrapperHandle, DriverObject, RegistryPath, NULL);
if (wrapperHandle == NULL)
{
status = NDIS_STATUS_FAILURE;
UartWifiDebugPrint(DBG_INIT, DBG_ERR, __FUNCTION__"--. STATUS %x", status);
return status;
}
// fill in miniport characteristics structure with our handlers
NdisZeroMemory(&miniportChars, sizeof(NDIS_MINIPORT_CHARACTERISTICS));
// TODO: set ndis version
miniportChars.MajorNdisVersion = 5;
#ifdef NDIS51_MINIPORT
miniportChars.MinorNdisVersion = 1;
#else
miniportChars.MinorNdisVersion = 0;
#endif
miniportChars.CheckForHangHandler = UartWifiCheckForHang;
miniportChars.HaltHandler = UartWifiHalt;
miniportChars.InitializeHandler = UartWifiInitialize;
miniportChars.QueryInformationHandler = UartWifiQueryInformation;
// reconfigure handler currently is never called by NDIS
// miniportChars.ReconfigureHandler = UartWifiReconfigure;
miniportChars.ResetHandler = UartWifiReset;
miniportChars.ReturnPacketHandler = UartWifiReturnPacket;

miniportChars.SendPacketsHandler = UartWifiSendPackets;

miniportChars.SetInformationHandler = UartWifiSetInformation;
miniportChars.AllocateCompleteHandler = UartWifiAllocateComplete;
// interrupt handlers
miniportChars.HandleInterruptHandler = UartWifiHandleInterrupt;
miniportChars.ISRHandler = UartWifiISR;
// miniportChars.DisableInterruptHandler = UartWifiDisableInterrupt;
// miniportChars.EnableInterruptHandler = UartWifiEnableInterrupt;
#ifdef NDIS51_MINIPORT
miniportChars.CancelSendPacketsHandler = UartWifiCancelSendPackets;
miniportChars.PnPEventNotifyHandler = UartWifiPnPEventNotify;
miniportChars.AdapterShutdownHandler = UartWifiAdapterShutdown;
#endif
// register our miniport handlers
status = NdisMRegisterMiniport(wrapperHandle, &miniportChars, sizeof(NDIS_MINIPORT_CHARACTERISTICS));
if (status != NDIS_STATUS_SUCCESS)
{
NdisTerminateWrapper(wrapperHandle, NULL);
}
UartWifiDebugPrint(DBG_INIT, DBG_TRACE, __FUNCTION__"--. STATUS %x", status);
return status;
}

Is there anything wrong? Or the Miniport driver cann't communicates with UART interface on PC?
Primemarshal is offline   Reply With Quote
Old 04-08-2009, 06:51 PM   #2
Network Dude
 
Petrowhisky's Avatar
 
Join Date: Nov 2005
Location: http://www.corenetworkz.com
Posts: 133
Thanks: 5
Thanked 13 Times in 11 Posts
Rep Power: 5 Petrowhisky will become famous soon enoughPetrowhisky will become famous soon enough


OS: Windows XP Windows Vista Linux


Re: Can NDIS Miniport driver use UART as its lower edge?

I think this post is in wrong place !! It best suits in programming section than in networking section
__________________
Internet Technology Blog
Petrowhisky is offline   Reply With Quote
Reply

Tags
driver, miniport, ndis, uart

Thread Tools
Display Modes



< Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 10:08 PM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional