Skip to content

REALTEK_RTL8195AM defines DEVICE_EMAC flag for WiFi driver #7257

@SeppoTakalo

Description

@SeppoTakalo

Description

As explained in porting sections, device should provide EMAC::get_default_instance() only if it is pure Ethernet. Please see:
https://os.mbed.com/docs/v5.9/reference/ethernet-port.html

Also, device should enable EMAC flag in targets.json only if its pure Ethernet. Please see:
https://github.com/ARMmbed/mbed-os/tree/master/features/netsocket/emac-drivers#device_emac

REALTEK_RTL8195AM does both for WiFi interface. It provides EMAC::get_default_instance() and also enables EMAC flag in the device_has section. Both should be removed and #7246 should be fixed by providing default WiFi interface, like this:

#include "RTWInterface.h"

WiFiInterface *WiFiInterface::get_target_default_instance()
{
    static RTWInterface wifi;
    return &wifi;
}

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions