RDMA/nes: Fix for incorrect multicast address in the perfect filter table
authorTatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Tue, 13 Nov 2012 22:20:41 +0000 (22:20 +0000)
committerRoland Dreier <roland@purestorage.com>
Thu, 22 Nov 2012 08:49:14 +0000 (00:49 -0800)
Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/nes/nes_nic.c

index 0564be757d82740842ca6e6582f8eeead8bf1d9a..9542e1644a5c1beff7559da4096d734912193209 100644 (file)
@@ -944,12 +944,13 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
                                          addr,
                                          perfect_filter_register_address+(mc_index * 8),
                                          mc_nic_index);
-                               macaddr_high  = ((u16) addr[0]) << 8;
-                               macaddr_high += (u16) addr[1];
-                               macaddr_low   = ((u32) addr[2]) << 24;
-                               macaddr_low  += ((u32) addr[3]) << 16;
-                               macaddr_low  += ((u32) addr[4]) << 8;
-                               macaddr_low  += (u32) addr[5];
+                               macaddr_high  = ((u8) addr[0]) << 8;
+                               macaddr_high += (u8) addr[1];
+                               macaddr_low   = ((u8) addr[2]) << 24;
+                               macaddr_low  += ((u8) addr[3]) << 16;
+                               macaddr_low  += ((u8) addr[4]) << 8;
+                               macaddr_low  += (u8) addr[5];
+
                                nes_write_indexed(nesdev,
                                                perfect_filter_register_address+(mc_index * 8),
                                                macaddr_low);