Skip to content

Conversation

@mrek-msft
Copy link

Intended to fix !119105.

Copilot AI review requested due to automatic review settings January 19, 2026 13:20
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 19, 2026
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 19, 2026
@mrek-msft
Copy link
Author

@dotnet-policy-service agree company="Microsoft"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes an issue where baud rate bitmask values from Windows drivers were being incorrectly interpreted as decimal values, causing validation errors. Some device drivers (like Silicon Labs USB to UART converters) return a decimal baud rate value instead of a bitmask, while Windows documentation specifies bitmasks should be used.

Changes:

  • Added a new helper method ConvertMaxBaudBitMaskToBaudRate to intelligently interpret the dwMaxBaud field as either a bitmask or decimal value
  • Updated the BaudRate property setter to use the converted value for validation
  • Updated the SerialStream constructor to use the converted value for validation

@huoyaoyuan huoyaoyuan added area-System.IO.Ports and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jan 19, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-io-ports
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.IO.Ports community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SerialStream.Windows.cs treats dwMaxBaud as a baud rate when it's defined as an enum

2 participants