Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa4dfae0 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

igb: change pba size determination from if to switch statement



As additional hardware is added to the igb driver it is easier to support
the expansion via switch statements instead of using nested ifs.  For
this reason I am changing this to a switch statement.

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a8564f03
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -888,11 +888,14 @@ void igb_reset(struct igb_adapter *adapter)
	/* Repartition Pba for greater than 9k mtu
	 * To take effect CTRL.RST is required.
	 */
	if (mac->type != e1000_82576) {
	pba = E1000_PBA_34K;
	}
	else {
	switch (mac->type) {
	case e1000_82576:
		pba = E1000_PBA_64K;
		break;
	case e1000_82575:
	default:
		pba = E1000_PBA_34K;
		break;
	}

	if ((adapter->max_frame_size > ETH_FRAME_LEN + ETH_FCS_LEN) &&