[PATCH] hostap: Confusing variable name "rts" for fragmentation

Pavel Roskin proski
Thu Oct 13 13:48:47 PDT 2005


Confusing variable name "rts" for fragmentation

prism2_ioctl_giwrts() and prism2_ioctl_siwfrag() use argument called
rts, which has nothing to do with rts.  It would be much better to call
it "frag" to show that it's fragmentation data.

Signed-off-by: Pavel Roskin <proski at gnu.org>

--- driver/modules/hostap_ioctl.c
+++ driver/modules/hostap_ioctl.c
@@ -606,20 +606,20 @@ static int prism2_ioctl_giwrts(struct ne
 
 static int prism2_ioctl_siwfrag(struct net_device *dev,
 				struct iw_request_info *info,
-				struct iw_param *rts, char *extra)
+				struct iw_param *frag, char *extra)
 {
 	struct hostap_interface *iface = dev->priv;
 	local_info_t *local = iface->local;
 	u16 val;
 
-	if (rts->disabled)
+	if (frag->disabled)
 		val = __constant_cpu_to_le16(2346);
-	else if (rts->value < 256 || rts->value > 2346)
+	else if (frag->value < 256 || frag->value > 2346)
 		return -EINVAL;
 	else
-		val = __cpu_to_le16(rts->value & ~0x1); /* even numbers only */
+		val = __cpu_to_le16(frag->value & ~0x1); /* even numbers only */
 
-	local->fragm_threshold = rts->value & ~0x1;
+	local->fragm_threshold = frag->value & ~0x1;
 	if (local->func->set_rid(dev, HFA384X_RID_FRAGMENTATIONTHRESHOLD, &val,
 				 2)
 	    || local->func->reset_port(dev))
@@ -630,7 +630,7 @@ static int prism2_ioctl_siwfrag(struct n
 
 static int prism2_ioctl_giwfrag(struct net_device *dev,
 				struct iw_request_info *info,
-				struct iw_param *rts, char *extra)
+				struct iw_param *frag, char *extra)
 {
 	struct hostap_interface *iface = dev->priv;
 	local_info_t *local = iface->local;
@@ -640,9 +640,9 @@ static int prism2_ioctl_giwfrag(struct n
 				 &val, 2, 1) < 0)
 		return -EINVAL;
 
-	rts->value = __le16_to_cpu(val);
-	rts->disabled = (rts->value == 2346);
-	rts->fixed = 1;
+	frag->value = __le16_to_cpu(val);
+	frag->disabled = (frag->value == 2346);
+	frag->fixed = 1;
 
 	return 0;
 }


-- 
Regards,
Pavel Roskin





More information about the Hostap mailing list