Changeset 35227


Ignore:
Timestamp:
2013-01-18T16:19:11+01:00 (5 years ago)
Author:
jogo
Message:

generic: rtl8366_smi: only assign pvid if no pvid was set yet

Only assign a pvid if the current pvid is 0. Fixes using mixed tagged
and untagged traffic on a port and the untagged vlan isn't the last one
of which the port is a member.

Tested on RTL8366S and RTL8367R.

Fixes #8501.

Signed-off-by: Jonas Gorski <jogo@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c

    r34816 r35227  
    11101110        port = &val->value.ports[0]; 
    11111111        for (i = 0; i < val->len; i++, port++) { 
     1112                int pvid; 
    11121113                member |= BIT(port->id); 
    11131114 
     
    11191120                 * initialize the port VLAN ID here. 
    11201121                 */ 
    1121                 err = rtl8366_set_pvid(smi, port->id, val->port_vlan); 
     1122                err = rtl8366_get_pvid(smi, port->id, &pvid); 
    11221123                if (err < 0) 
    11231124                        return err; 
     1125                if (pvid == 0) { 
     1126                        err = rtl8366_set_pvid(smi, port->id, val->port_vlan); 
     1127                        if (err < 0) 
     1128                                return err; 
     1129                } 
    11241130        } 
    11251131 
Note: See TracChangeset for help on using the changeset viewer.