Lines Matching refs:mac_addr

368 static void nibble_swap_every_byte(unsigned char *mac_addr)  in nibble_swap_every_byte()  argument
372 mac_addr[i] = ((mac_addr[i] & 0x0f) << 4) | in nibble_swap_every_byte()
373 ((mac_addr[i] & 0xf0) >> 4); in nibble_swap_every_byte()
377 static void inverse_every_nibble(unsigned char *mac_addr) in inverse_every_nibble() argument
381 mac_addr[i] = flip_8_bits(mac_addr[i]); in inverse_every_nibble()
399 unsigned char mac_addr[ETH_ALEN]; in hash_function() local
404 memcpy(mac_addr, mac_addr_orig, ETH_ALEN); in hash_function()
406 nibble_swap_every_byte(mac_addr); in hash_function()
407 inverse_every_nibble(mac_addr); in hash_function()
409 addr0 = (mac_addr[5] >> 2) & 0x3f; in hash_function()
410 addr1 = (mac_addr[5] & 0x03) | (((mac_addr[4] & 0x7f)) << 2); in hash_function()
411 addr2 = ((mac_addr[4] & 0x80) >> 7) | mac_addr[3] << 1; in hash_function()
412 addr3 = (mac_addr[2] & 0xff) | ((mac_addr[1] & 1) << 8); in hash_function()
437 const unsigned char *mac_addr, in add_del_hash_entry() argument
445 new_low = (((mac_addr[1] >> 4) & 0xf) << 15) in add_del_hash_entry()
446 | (((mac_addr[1] >> 0) & 0xf) << 11) in add_del_hash_entry()
447 | (((mac_addr[0] >> 4) & 0xf) << 7) in add_del_hash_entry()
448 | (((mac_addr[0] >> 0) & 0xf) << 3) in add_del_hash_entry()
449 | (((mac_addr[3] >> 4) & 0x1) << 31) in add_del_hash_entry()
450 | (((mac_addr[3] >> 0) & 0xf) << 27) in add_del_hash_entry()
451 | (((mac_addr[2] >> 4) & 0xf) << 23) in add_del_hash_entry()
452 | (((mac_addr[2] >> 0) & 0xf) << 19) in add_del_hash_entry()
456 new_high = (((mac_addr[5] >> 4) & 0xf) << 15) in add_del_hash_entry()
457 | (((mac_addr[5] >> 0) & 0xf) << 11) in add_del_hash_entry()
458 | (((mac_addr[4] >> 4) & 0xf) << 7) in add_del_hash_entry()
459 | (((mac_addr[4] >> 0) & 0xf) << 3) in add_del_hash_entry()
460 | (((mac_addr[3] >> 5) & 0x7) << 0); in add_del_hash_entry()
467 entry = start + hash_function(mac_addr); in add_del_hash_entry()