60c60
< int cbaud = B2400;			/* default bps */
---
> int cbaud = B38400;			/* default bps */
97c97,98
< 	"57600",57600,	B50,
---
> 	"57600",57600,	B57600,
> 	"115200",115200,  B115200,
102a104,111
> #	include <linux/termios.h>	/* must include serial_struct */
> #	include <linux/tty.h>		/* must include ASYNC_SPD* consts */
> #	define BPS38400	7		/* "38400" pos in bps_tbl */
> #	define BPS57600	8		/* "57600" pos in bps_tbl */
> #	define BPS115200	9	/* "115200" pos in bps_tbl */
> 
> static struct serial_struct ser_io;
> 
178a188
> 	static ecbaud=BPS38400;
187c197,222
< 				tcsetattr( mfd, TCSANOW, &pmode );
---
> 				if(i>=BPS38400) {
> 					if(ioctl(mfd,TIOCGSERIAL,&ser_io)<0) 
> 						return FAILURE;
> 					switch(i) {
> 					case BPS38400:
> 						ser_io.flags &= ~ASYNC_SPD_MASK;
> 						ecbaud=BPS38400;
> 						break;
> 					case BPS57600:
> 						ser_io.flags &= ~ASYNC_SPD_MASK;
> 						ser_io.flags |= ASYNC_SPD_HI;
> 						ecbaud=BPS57600;
> 						break;
> 					case BPS115200:
> 						ser_io.flags &= ~ASYNC_SPD_MASK;
> 						ser_io.flags |= ASYNC_SPD_VHI;
> 						ecbaud=BPS115200;
> 						break;
> 					}
> 				}
> 				cfsetospeed(&pmode, cbaud);
> 				cfsetispeed(&pmode, cbaud);
> 				tcsetattr(mfd,TCSADRAIN,&pmode);
> 				if(cbaud==B38400)
> 					if(ioctl(mfd,TIOCSSERIAL,&ser_io)<0)
> 						return FAILURE;
198c233,237
< 		if ((pmode.c_cflag & CBAUD) == bps_tbl[i].cbaud)
---
> 		if ((pmode.c_cflag & CBAUD) == bps_tbl[i].cbaud) {
> #ifdef linux
> 			if(bps_tbl[i].cbaud==B38400)
> 				i=ecbaud;
> #endif
200c239
< 		
---
> 		}	
