aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_3ad.c
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2007-10-19 02:41:04 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:53 -0400
commit1c3f0b8e07de78a86f2dce911f5e245845ce40a8 (patch)
tree6ecefa9d2777c79e759f56c533533463ba83206e /drivers/net/bonding/bond_3ad.c
parent68318b8e0b61f98f0be833cc862ab6dee69348b4 (diff)
Change struct marker users
Prior to use struct marker in the linux kernel markers, we need to clean two drivers which use this structure name. Change bonding driver types : - struct marker to struct bond_marker. - marker_t to bond_marker_t. - marker_header to bond_marker_header. - marker_header_t to bond_marker_header_t. Change qla4xxx struct marker_entry usage : - Change struct marker_entry for struct qla4_marker_entry. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Chad Tindel <ctindel@users.sourceforge.net> Cc: Jay Vosburgh <fubar@us.ibm.com> Cc: David Somayajulu <david.somayajulu@qlogic.com> Cc: James Bottomley <James.Bottomley@SteelEye.com> Cc: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r--drivers/net/bonding/bond_3ad.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 7a045a37056e..084f0292ea6e 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -126,7 +126,7 @@ static struct aggregator *__get_active_agg(struct aggregator *aggregator);
126 126
127// ================= main 802.3ad protocol functions ================== 127// ================= main 802.3ad protocol functions ==================
128static int ad_lacpdu_send(struct port *port); 128static int ad_lacpdu_send(struct port *port);
129static int ad_marker_send(struct port *port, struct marker *marker); 129static int ad_marker_send(struct port *port, struct bond_marker *marker);
130static void ad_mux_machine(struct port *port); 130static void ad_mux_machine(struct port *port);
131static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port); 131static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port);
132static void ad_tx_machine(struct port *port); 132static void ad_tx_machine(struct port *port);
@@ -139,8 +139,8 @@ static void ad_initialize_port(struct port *port, int lacp_fast);
139static void ad_initialize_lacpdu(struct lacpdu *Lacpdu); 139static void ad_initialize_lacpdu(struct lacpdu *Lacpdu);
140static void ad_enable_collecting_distributing(struct port *port); 140static void ad_enable_collecting_distributing(struct port *port);
141static void ad_disable_collecting_distributing(struct port *port); 141static void ad_disable_collecting_distributing(struct port *port);
142static void ad_marker_info_received(struct marker *marker_info, struct port *port); 142static void ad_marker_info_received(struct bond_marker *marker_info, struct port *port);
143static void ad_marker_response_received(struct marker *marker, struct port *port); 143static void ad_marker_response_received(struct bond_marker *marker, struct port *port);
144 144
145 145
146///////////////////////////////////////////////////////////////////////////////// 146/////////////////////////////////////////////////////////////////////////////////
@@ -889,12 +889,12 @@ static int ad_lacpdu_send(struct port *port)
889 * Returns: 0 on success 889 * Returns: 0 on success
890 * < 0 on error 890 * < 0 on error
891 */ 891 */
892static int ad_marker_send(struct port *port, struct marker *marker) 892static int ad_marker_send(struct port *port, struct bond_marker *marker)
893{ 893{
894 struct slave *slave = port->slave; 894 struct slave *slave = port->slave;
895 struct sk_buff *skb; 895 struct sk_buff *skb;
896 struct marker_header *marker_header; 896 struct bond_marker_header *marker_header;
897 int length = sizeof(struct marker_header); 897 int length = sizeof(struct bond_marker_header);
898 struct mac_addr lacpdu_multicast_address = AD_MULTICAST_LACPDU_ADDR; 898 struct mac_addr lacpdu_multicast_address = AD_MULTICAST_LACPDU_ADDR;
899 899
900 skb = dev_alloc_skb(length + 16); 900 skb = dev_alloc_skb(length + 16);
@@ -909,7 +909,7 @@ static int ad_marker_send(struct port *port, struct marker *marker)
909 skb->network_header = skb->mac_header + ETH_HLEN; 909 skb->network_header = skb->mac_header + ETH_HLEN;
910 skb->protocol = PKT_TYPE_LACPDU; 910 skb->protocol = PKT_TYPE_LACPDU;
911 911
912 marker_header = (struct marker_header *)skb_put(skb, length); 912 marker_header = (struct bond_marker_header *)skb_put(skb, length);
913 913
914 marker_header->ad_header.destination_address = lacpdu_multicast_address; 914 marker_header->ad_header.destination_address = lacpdu_multicast_address;
915 /* Note: source addres is set to be the member's PERMANENT address, because we use it 915 /* Note: source addres is set to be the member's PERMANENT address, because we use it
@@ -1709,7 +1709,7 @@ static void ad_disable_collecting_distributing(struct port *port)
1709 */ 1709 */
1710static void ad_marker_info_send(struct port *port) 1710static void ad_marker_info_send(struct port *port)
1711{ 1711{
1712 struct marker marker; 1712 struct bond_marker marker;
1713 u16 index; 1713 u16 index;
1714 1714
1715 // fill the marker PDU with the appropriate values 1715 // fill the marker PDU with the appropriate values
@@ -1742,13 +1742,14 @@ static void ad_marker_info_send(struct port *port)
1742 * @port: the port we're looking at 1742 * @port: the port we're looking at
1743 * 1743 *
1744 */ 1744 */
1745static void ad_marker_info_received(struct marker *marker_info,struct port *port) 1745static void ad_marker_info_received(struct bond_marker *marker_info,
1746 struct port *port)
1746{ 1747{
1747 struct marker marker; 1748 struct bond_marker marker;
1748 1749
1749 // copy the received marker data to the response marker 1750 // copy the received marker data to the response marker
1750 //marker = *marker_info; 1751 //marker = *marker_info;
1751 memcpy(&marker, marker_info, sizeof(struct marker)); 1752 memcpy(&marker, marker_info, sizeof(struct bond_marker));
1752 // change the marker subtype to marker response 1753 // change the marker subtype to marker response
1753 marker.tlv_type=AD_MARKER_RESPONSE_SUBTYPE; 1754 marker.tlv_type=AD_MARKER_RESPONSE_SUBTYPE;
1754 // send the marker response 1755 // send the marker response
@@ -1767,7 +1768,8 @@ static void ad_marker_info_received(struct marker *marker_info,struct port *port
1767 * response for marker PDU's, in this stage, but only to respond to marker 1768 * response for marker PDU's, in this stage, but only to respond to marker
1768 * information. 1769 * information.
1769 */ 1770 */
1770static void ad_marker_response_received(struct marker *marker, struct port *port) 1771static void ad_marker_response_received(struct bond_marker *marker,
1772 struct port *port)
1771{ 1773{
1772 marker=NULL; // just to satisfy the compiler 1774 marker=NULL; // just to satisfy the compiler
1773 port=NULL; // just to satisfy the compiler 1775 port=NULL; // just to satisfy the compiler
@@ -2164,15 +2166,15 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u
2164 case AD_TYPE_MARKER: 2166 case AD_TYPE_MARKER:
2165 // No need to convert fields to Little Endian since we don't use the marker's fields. 2167 // No need to convert fields to Little Endian since we don't use the marker's fields.
2166 2168
2167 switch (((struct marker *)lacpdu)->tlv_type) { 2169 switch (((struct bond_marker *)lacpdu)->tlv_type) {
2168 case AD_MARKER_INFORMATION_SUBTYPE: 2170 case AD_MARKER_INFORMATION_SUBTYPE:
2169 dprintk("Received Marker Information on port %d\n", port->actor_port_number); 2171 dprintk("Received Marker Information on port %d\n", port->actor_port_number);
2170 ad_marker_info_received((struct marker *)lacpdu, port); 2172 ad_marker_info_received((struct bond_marker *)lacpdu, port);
2171 break; 2173 break;
2172 2174
2173 case AD_MARKER_RESPONSE_SUBTYPE: 2175 case AD_MARKER_RESPONSE_SUBTYPE:
2174 dprintk("Received Marker Response on port %d\n", port->actor_port_number); 2176 dprintk("Received Marker Response on port %d\n", port->actor_port_number);
2175 ad_marker_response_received((struct marker *)lacpdu, port); 2177 ad_marker_response_received((struct bond_marker *)lacpdu, port);
2176 break; 2178 break;
2177 2179
2178 default: 2180 default: