• Julian Wiedmann's avatar
    s390/qeth: simplify L3 dev_id logic · 8ec1e247
    Julian Wiedmann authored
    The logic that deals with errors from qeth_l3_get_unique_id() is quite
    complex: it sets card->unique_id to 0xfffe, additionally flags it as
    UNIQUE_ID_NOT_BY_CARD and later takes this flag as cue to not propagate
    card->unique_id to dev->dev_id. With dev->dev_id thus holding 0,
    addrconf_ifid_eui48() applies its default behaviour.
    
    Get rid of all the special bit masks, and just return the old uid in
    case of an error. For the vast majority of cases this will be 0 (and so
    we still get the desired default behaviour) - with the rare exception
    where qeth_l3_get_unique_id() might have been called earlier but the
    initialization then failed at a later point.
    Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8ec1e247
qeth_l3_main.c 57.2 KB