diff for duplicates of <200711170007.01676.mboton.lkml@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 101b3d9..2e5b4dd 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,11 +1,10 @@ This patch adds power management support in mac80211. -This allows us to enable power management through the "iwconfig <device= -> power=20 +This allows us to enable power management through the "iwconfig <device> power <off/on>" command. The code is based on "mac80211-10.0.0" but it is a little bit modified. -Signed-off-by: Miguel Bot=C3=B3n <mboton@gmail.com> +Signed-off-by: Miguel Botón <mboton@gmail.com> diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 5fcc4c1..c82b6fa 100644 @@ -16,33 +15,30 @@ index 5fcc4c1..c82b6fa 100644 u8 antenna_sel_tx; u8 antenna_sel_rx; + -+ u8 power_management_enable; /* flag to enable/disable power manag= -ement=20 ++ u8 power_management_enable; /* flag to enable/disable power management */ }; -=20 + /** -diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_io= -ctl.c +diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index 6caa3ec..f5eebec 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c -@@ -674,6 +687,46 @@ static int ieee80211_ioctl_giwtxpower(struct net_d= -evice=20 +@@ -674,6 +687,46 @@ static int ieee80211_ioctl_giwtxpower(struct net_device *dev, return 0; } -=20 + +static int ieee80211_ioctl_siwpower(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, + char *extra) +{ -+ struct ieee80211_local *local =3D wdev_priv(dev->ieee80211_ptr); -+ struct ieee80211_conf *conf =3D &local->hw.conf; ++ struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); ++ struct ieee80211_conf *conf = &local->hw.conf; + + if (wrqu->power.disabled) { -+ conf->power_management_enable =3D 0; ++ conf->power_management_enable = 0; + return ieee80211_hw_config(local); + } + @@ -55,7 +51,7 @@ evice=20 + return -EINVAL; + } + -+ conf->power_management_enable =3D 1; ++ conf->power_management_enable = 1; + + return ieee80211_hw_config(local); +} @@ -65,10 +61,10 @@ evice=20 + union iwreq_data *wrqu, + char *extra) +{ -+ struct ieee80211_local *local =3D wdev_priv(dev->ieee80211_ptr); -+ struct ieee80211_conf *conf =3D &local->hw.conf; ++ struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); ++ struct ieee80211_conf *conf = &local->hw.conf; + -+ wrqu->power.disabled =3D !conf->power_management_enable; ++ wrqu->power.disabled = !conf->power_management_enable; + + return 0; +} @@ -76,7 +72,7 @@ evice=20 static int ieee80211_ioctl_siwrts(struct net_device *dev, struct iw_request_info *info, struct iw_param *rts, char *extra) -@@ -1111,8 +1166,8 @@ static const iw_handler ieee80211_handler[] =3D +@@ -1111,8 +1166,8 @@ static const iw_handler ieee80211_handler[] = (iw_handler) ieee80211_ioctl_giwretry, /* SIOCGIWRETRY */ (iw_handler) ieee80211_ioctl_siwencode, /* SIOCSIWENCODE */ (iw_handler) ieee80211_ioctl_giwencode, /* SIOCGIWENCODE */ @@ -89,10 +85,5 @@ evice=20 (iw_handler) ieee80211_ioctl_siwgenie, /* SIOCSIWGENIE */ ---=20 - Miguel Bot=C3=B3n -- -To unsubscribe from this list: send the line "unsubscribe linux-wireles= -s" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html +-- + Miguel Botón diff --git a/a/content_digest b/N1/content_digest index 7f83497..8060005 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -9,12 +9,11 @@ "b\0" "This patch adds power management support in mac80211.\n" "\n" - "This allows us to enable power management through the \"iwconfig <device=\n" - "> power=20\n" + "This allows us to enable power management through the \"iwconfig <device> power \n" "<off/on>\" command.\n" "The code is based on \"mac80211-10.0.0\" but it is a little bit modified.\n" "\n" - "Signed-off-by: Miguel Bot=C3=B3n <mboton@gmail.com>\n" + "Signed-off-by: Miguel Bot\303\263n <mboton@gmail.com>\n" "\n" "diff --git a/include/net/mac80211.h b/include/net/mac80211.h\n" "index 5fcc4c1..c82b6fa 100644\n" @@ -25,33 +24,30 @@ " \tu8 antenna_sel_tx;\n" " \tu8 antenna_sel_rx;\n" "+\n" - "+\tu8 power_management_enable; /* flag to enable/disable power manag=\n" - "ement=20\n" + "+\tu8 power_management_enable; /* flag to enable/disable power management \n" "*/\n" " };\n" - "=20\n" + " \n" " /**\n" - "diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_io=\n" - "ctl.c\n" + "diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c\n" "index 6caa3ec..f5eebec 100644\n" "--- a/net/mac80211/ieee80211_ioctl.c\n" "+++ b/net/mac80211/ieee80211_ioctl.c\n" - "@@ -674,6 +687,46 @@ static int ieee80211_ioctl_giwtxpower(struct net_d=\n" - "evice=20\n" + "@@ -674,6 +687,46 @@ static int ieee80211_ioctl_giwtxpower(struct net_device \n" "*dev,\n" " \treturn 0;\n" " }\n" - "=20\n" + " \n" "+static int ieee80211_ioctl_siwpower(struct net_device *dev,\n" "+\t\t\t\t struct iw_request_info *info,\n" "+\t\t\t\t union iwreq_data *wrqu,\n" "+\t\t\t\t char *extra)\n" "+{\n" - "+\tstruct ieee80211_local *local =3D wdev_priv(dev->ieee80211_ptr);\n" - "+\tstruct ieee80211_conf *conf =3D &local->hw.conf;\n" + "+\tstruct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);\n" + "+\tstruct ieee80211_conf *conf = &local->hw.conf;\n" "+\n" "+\tif (wrqu->power.disabled) {\n" - "+\t\tconf->power_management_enable =3D 0;\n" + "+\t\tconf->power_management_enable = 0;\n" "+\t\treturn ieee80211_hw_config(local);\n" "+\t}\n" "+\n" @@ -64,7 +60,7 @@ "+\t\treturn -EINVAL;\n" "+\t}\n" "+\n" - "+\tconf->power_management_enable =3D 1;\n" + "+\tconf->power_management_enable = 1;\n" "+\n" "+\treturn ieee80211_hw_config(local);\n" "+}\n" @@ -74,10 +70,10 @@ "+\t\t\t\t union iwreq_data *wrqu,\n" "+\t\t\t\t char *extra)\n" "+{\n" - "+\tstruct ieee80211_local *local =3D wdev_priv(dev->ieee80211_ptr);\n" - "+\tstruct ieee80211_conf *conf =3D &local->hw.conf;\n" + "+\tstruct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);\n" + "+\tstruct ieee80211_conf *conf = &local->hw.conf;\n" "+\n" - "+\twrqu->power.disabled =3D !conf->power_management_enable;\n" + "+\twrqu->power.disabled = !conf->power_management_enable;\n" "+\n" "+\treturn 0;\n" "+}\n" @@ -85,7 +81,7 @@ " static int ieee80211_ioctl_siwrts(struct net_device *dev,\n" " \t\t\t\t struct iw_request_info *info,\n" " \t\t\t\t struct iw_param *rts, char *extra)\n" - "@@ -1111,8 +1166,8 @@ static const iw_handler ieee80211_handler[] =3D\n" + "@@ -1111,8 +1166,8 @@ static const iw_handler ieee80211_handler[] =\n" " \t(iw_handler) ieee80211_ioctl_giwretry,\t\t/* SIOCGIWRETRY */\n" " \t(iw_handler) ieee80211_ioctl_siwencode,\t\t/* SIOCSIWENCODE */\n" " \t(iw_handler) ieee80211_ioctl_giwencode,\t\t/* SIOCGIWENCODE */\n" @@ -98,12 +94,7 @@ " \t(iw_handler) ieee80211_ioctl_siwgenie,\t\t/* SIOCSIWGENIE */\n" "\n" "\n" - "--=20\n" - "\tMiguel Bot=C3=B3n\n" - "-\n" - "To unsubscribe from this list: send the line \"unsubscribe linux-wireles=\n" - "s\" in\n" - "the body of a message to majordomo@vger.kernel.org\n" - More majordomo info at http://vger.kernel.org/majordomo-info.html + "-- \n" + "\tMiguel Bot\303\263n" -a86c040f7298e44c937cbb37fac3bed6baa5297a0a79be089e4f0a9825d6209a +92e94817b1b0737a3b6bd8e6b293763bd6146f692e7c89783ff8b0a94e2cdbe7
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.