stty Type: setting in a driver

I’m writing a serial driver, and I’m trying to get stty to work properly with it. It makes two devctl calls, DCMD_CHR_TCGETATTR, and DCMD_CHR_TTY_INFO. The first call requests struct termios and the second struct _ttyinfo. I fill these in. stty reports Type: (Unknown) and refuses to display the baud rate returned in the first call.

I can’t find a way to set the type. Does anyone have any idea how to do this, or know perhaps where I could find the source to a serial driver?

Thanks

Are you writing a serial driver from scratch or are you using the char DDK? I think the char DDK contains the source to the serial driver.

From Scratch