Re: [BlueZ] monitor: Fix the incorrect vendor name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

On 4/14/21, 3:09 AM, "Marcel Holtmann" <marcel@xxxxxxxxxxxx> wrote:

    Hi Tedd,

    > This patch fixes the vendor name is alwasy shown as "Microsoft" even
    > though a different vendor.
    > 
    > < HCI Command: Microsoft Secure Send (0x3f|0x0009) plen 249
    >        Type: Data fragment (0x01)
    >> HCI Event: Command Complete (0x0e) plen 4
    >      Microsoft Secure Send (0x3f|0x0009) ncmd 31
    >        Status: Success (0x00)
    > ---
    > monitor/packet.c | 12 +++---------
    > 1 file changed, 3 insertions(+), 9 deletions(-)
    > 
    > diff --git a/monitor/packet.c b/monitor/packet.c
    > index d729a01cc..91d2294ff 100644
    > --- a/monitor/packet.c
    > +++ b/monitor/packet.c
    > @@ -9325,18 +9325,12 @@ static const char *get_supported_command(int bit)
    > 
    > static const char *current_vendor_str(void)
    > {
    > -	uint16_t manufacturer, msft_opcode;
    > +	uint16_t manufacturer;
    > 
    > -	if (index_current < MAX_INDEX) {
    > +	if (index_current < MAX_INDEX)
    > 		manufacturer = index_list[index_current].manufacturer;
    > -		msft_opcode = index_list[index_current].msft_opcode;
    > -	} else {
    > +	else
    > 		manufacturer = fallback_manufacturer;
    > -		msft_opcode = BT_HCI_CMD_NOP;
    > -	}
    > -
    > -	if (msft_opcode != BT_HCI_CMD_NOP)
    > -		return "Microsoft";

    seems we have a bug here, but the fix can not be correct either. If we are running on Intel firmware and the Microsoft extension is used, it should show Microsoft and not Intel for the vendor commands.

I submitted v2 and I think I took care of the msft_opcode handling but I realized that the msft_event_opcode is also like msft_opcode - each vendor will have a different value.
I know the msft_event_code for Intel, which is 0x50, but don't know for Realtek. (Do you happen to know?)

I changed the v2 to RFC for your further comments.

    Regards

    Marcel

Regards,
Tedd





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux