svn commit: r193870 - projects/mesh11s/sys/net80211
Rui Paulo
rpaulo at FreeBSD.org
Tue Jun 9 23:04:44 UTC 2009
Author: rpaulo
Date: Tue Jun 9 23:04:43 2009
New Revision: 193870
URL: http://svn.freebsd.org/changeset/base/193870
Log:
Exchange ioctl setter/getter for recently added ioctls.
Sponsored by: The FreeBSD Foundation
Modified:
projects/mesh11s/sys/net80211/ieee80211_mesh.c
Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_mesh.c Tue Jun 9 22:33:34 2009 (r193869)
+++ projects/mesh11s/sys/net80211/ieee80211_mesh.c Tue Jun 9 23:04:43 2009 (r193870)
@@ -1393,16 +1393,10 @@ mesh_ioctl_get80211(struct ieee80211vap
error = copyout(tmpmeshid, ireq->i_data, ireq->i_len);
break;
case IEEE80211_IOC_MESH_AP:
- if (ireq->i_val)
- vap->iv_meshflags |= IEEE80211_MFLAGS_AP;
- else
- vap->iv_meshflags &= ~IEEE80211_MFLAGS_AP;
+ ireq->i_val = (vap->iv_meshflags & IEEE80211_MFLAGS_AP) != 0;
break;
case IEEE80211_IOC_MESH_FWRD:
- if (ireq->i_val)
- vap->iv_meshflags |= IEEE80211_MFLAGS_FWRD;
- else
- vap->iv_meshflags &= ~IEEE80211_MFLAGS_FWRD;
+ ireq->i_val = (vap->iv_meshflags & IEEE80211_MFLAGS_FWRD) != 0;
break;
default:
return ENOSYS;
@@ -1434,10 +1428,16 @@ mesh_ioctl_set80211(struct ieee80211vap
memcpy(vap->iv_meshid, tmpmeshid, ireq->i_len);
break;
case IEEE80211_IOC_MESH_AP:
- ireq->i_val = (vap->iv_meshflags & IEEE80211_MFLAGS_AP) != 0;
+ if (ireq->i_val)
+ vap->iv_meshflags |= IEEE80211_MFLAGS_AP;
+ else
+ vap->iv_meshflags &= ~IEEE80211_MFLAGS_AP;
break;
case IEEE80211_IOC_MESH_FWRD:
- ireq->i_val = (vap->iv_meshflags & IEEE80211_MFLAGS_FWRD) != 0;
+ if (ireq->i_val)
+ vap->iv_meshflags |= IEEE80211_MFLAGS_FWRD;
+ else
+ vap->iv_meshflags &= ~IEEE80211_MFLAGS_FWRD;
break;
default:
return ENOSYS;
More information about the svn-src-projects
mailing list