linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] compat-wireless: backport pm_qos_{add,remove,update}_request
@ 2010-05-10 21:24 Hauke Mehrtens
  2010-05-10 21:24 ` [PATCH 2/2] compat-wireless: make patches apply again Hauke Mehrtens
  2010-05-10 22:24 ` [PATCH 1/2] compat-wireless: backport pm_qos_{add,remove,update}_request Luis R. Rodriguez
  0 siblings, 2 replies; 11+ messages in thread
From: Hauke Mehrtens @ 2010-05-10 21:24 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens


Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
I have not found a way to backport these changes without using these ifdef.
 patches/28-pm-qos-params.patch |   89 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 89 insertions(+), 0 deletions(-)
 create mode 100644 patches/28-pm-qos-params.patch

diff --git a/patches/28-pm-qos-params.patch b/patches/28-pm-qos-params.patch
new file mode 100644
index 0000000..4c3966a
--- /dev/null
+++ b/patches/28-pm-qos-params.patch
@@ -0,0 +1,89 @@
+--- a/drivers/net/wireless/ipw2x00/ipw2100.c
++++ b/drivers/net/wireless/ipw2x00/ipw2100.c
+@@ -174,7 +174,9 @@ that only one external action is invoked
+ #define DRV_DESCRIPTION	"Intel(R) PRO/Wireless 2100 Network Driver"
+ #define DRV_COPYRIGHT	"Copyright(c) 2003-2006 Intel Corporation"
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ struct pm_qos_request_list *ipw2100_pm_qos_req;
++#endif
+ 
+ /* Debugging stuff */
+ #ifdef CONFIG_IPW2100_DEBUG
+@@ -1741,7 +1743,11 @@ static int ipw2100_up(struct ipw2100_pri
+ 	/* the ipw2100 hardware really doesn't want power management delays
+ 	 * longer than 175usec
+ 	 */
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 	pm_qos_update_request(ipw2100_pm_qos_req, 175);
++#else
++	pm_qos_update_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100", 175);
++#endif
+ 
+ 	/* If the interrupt is enabled, turn it off... */
+ 	spin_lock_irqsave(&priv->low_lock, flags);
+@@ -1889,7 +1895,12 @@ static void ipw2100_down(struct ipw2100_
+ 	ipw2100_disable_interrupts(priv);
+ 	spin_unlock_irqrestore(&priv->low_lock, flags);
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 	pm_qos_update_request(ipw2100_pm_qos_req, PM_QOS_DEFAULT_VALUE);
++#else
++	pm_qos_update_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100",
++			PM_QOS_DEFAULT_VALUE);
++#endif
+ 
+ 	/* We have to signal any supplicant if we are disassociating */
+ 	if (associated)
+@@ -6674,7 +6685,11 @@ static int __init ipw2100_init(void)
+ 	if (ret)
+ 		goto out;
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 	ipw2100_pm_qos_req = pm_qos_add_request(PM_QOS_CPU_DMA_LATENCY,
++#else
++	pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100",
++#endif
+ 			PM_QOS_DEFAULT_VALUE);
+ #ifdef CONFIG_IPW2100_DEBUG
+ 	ipw2100_debug_level = debug;
+@@ -6697,7 +6712,11 @@ static void __exit ipw2100_exit(void)
+ 			   &driver_attr_debug_level);
+ #endif
+ 	pci_unregister_driver(&ipw2100_pci_driver);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 	pm_qos_remove_request(ipw2100_pm_qos_req);
++#else
++	pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100");
++#endif
+ }
+ 
+ module_init(ipw2100_init);
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -509,7 +509,11 @@ void ieee80211_recalc_ps(struct ieee8021
+ 		s32 beaconint_us;
+ 
+ 		if (latency < 0)
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 			latency = pm_qos_request(PM_QOS_NETWORK_LATENCY);
++#else
++			latency = pm_qos_requirement(PM_QOS_NETWORK_LATENCY);
++#endif
+ 
+ 		beaconint_us = ieee80211_tu_to_usec(
+ 					found->vif.bss_conf.beacon_int);
+--- a/net/mac80211/scan.c
++++ b/net/mac80211/scan.c
+@@ -510,7 +510,11 @@ static int ieee80211_scan_state_decision
+ 		bad_latency = time_after(jiffies +
+ 				ieee80211_scan_get_channel_time(next_chan),
+ 				local->leave_oper_channel_time +
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 				usecs_to_jiffies(pm_qos_request(PM_QOS_NETWORK_LATENCY)));
++#else
++				usecs_to_jiffies(pm_qos_requirement(PM_QOS_NETWORK_LATENCY)));
++#endif
+ 
+ 		listen_int_exceeded = time_after(jiffies +
+ 				ieee80211_scan_get_channel_time(next_chan),
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH 1/2] compat-wireless: backport sock_recv_ts_and_drops in compat
@ 2010-10-18 20:36 Hauke Mehrtens
  2010-10-18 20:36 ` [PATCH 2/2] compat-wireless: make patches apply again Hauke Mehrtens
  0 siblings, 1 reply; 11+ messages in thread
From: Hauke Mehrtens @ 2010-10-18 20:36 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens


Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/16-bluetooth.patch |   60 +++++++++++++------------------------------
 1 files changed, 18 insertions(+), 42 deletions(-)

diff --git a/patches/16-bluetooth.patch b/patches/16-bluetooth.patch
index 8bdc530..e58ccc6 100644
--- a/patches/16-bluetooth.patch
+++ b/patches/16-bluetooth.patch
@@ -56,19 +56,7 @@ here still, but for now we keep this here.
  		bt_sock_reclassify_lock(sock, proto);
  		module_put(bt_proto[proto]->owner);
  	}
-@@ -257,7 +265,11 @@ int bt_sock_recvmsg(struct kiocb *iocb, 
- 	skb_reset_transport_header(skb);
- 	err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
- 	if (err == 0)
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32))
- 		sock_recv_ts_and_drops(msg, sk, skb);
-+#else
-+		sock_recv_timestamp(msg, sk, skb);
-+#endif
- 
- 	skb_free_datagram(sk, skb);
- 
-@@ -336,7 +348,11 @@ int bt_sock_ioctl(struct socket *sock, u
+@@ -445,7 +457,11 @@ int bt_sock_ioctl(struct socket *sock, u
  		if (sk->sk_state == BT_LISTEN)
  			return -EINVAL;
  
@@ -138,7 +126,7 @@ here still, but for now we keep this here.
  
 --- a/net/bluetooth/hci_sysfs.c
 +++ b/net/bluetooth/hci_sysfs.c
-@@ -71,7 +71,11 @@ static struct attribute_group bt_link_gr
+@@ -69,7 +69,11 @@ static struct attribute_group bt_link_gr
  	.attrs = bt_link_attrs,
  };
  
@@ -150,7 +138,7 @@ here still, but for now we keep this here.
  	&bt_link_group,
  	NULL
  };
-@@ -129,7 +133,11 @@ static void del_conn(struct work_struct 
+@@ -127,7 +131,11 @@ static void del_conn(struct work_struct 
  		dev = device_find_child(&conn->dev, NULL, __match_tty);
  		if (!dev)
  			break;
@@ -162,7 +150,7 @@ here still, but for now we keep this here.
  		put_device(dev);
  	}
  
-@@ -381,7 +389,11 @@ static struct attribute_group bt_host_gr
+@@ -377,7 +385,11 @@ static struct attribute_group bt_host_gr
  	.attrs = bt_host_attrs,
  };
  
@@ -287,7 +275,7 @@ here still, but for now we keep this here.
  static int hidp_parse(struct hid_device *hid)
  {
  	struct hidp_session *session = hid->driver_data;
-@@ -815,6 +896,7 @@ fault:
+@@ -811,6 +892,7 @@ fault:
  
  	return err;
  }
@@ -295,7 +283,7 @@ here still, but for now we keep this here.
  
  int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock)
  {
-@@ -833,6 +915,39 @@ int hidp_add_connection(struct hidp_conn
+@@ -829,6 +911,39 @@ int hidp_add_connection(struct hidp_conn
  
  	BT_DBG("rd_data %p rd_size %d", req->rd_data, req->rd_size);
  
@@ -335,7 +323,7 @@ here still, but for now we keep this here.
  	down_write(&hidp_session_sem);
  
  	s = __hidp_get_session(&bt_sk(ctrl_sock->sk)->dst);
-@@ -860,6 +975,7 @@ int hidp_add_connection(struct hidp_conn
+@@ -856,6 +971,7 @@ int hidp_add_connection(struct hidp_conn
  	session->flags   = req->flags & (1 << HIDP_BLUETOOTH_VENDOR_ID);
  	session->idle_to = req->idle_to;
  
@@ -343,7 +331,7 @@ here still, but for now we keep this here.
  	if (req->rd_size > 0) {
  		err = hidp_setup_hid(session, req);
  		if (err && err != -ENODEV)
-@@ -871,6 +987,16 @@ int hidp_add_connection(struct hidp_conn
+@@ -867,6 +983,16 @@ int hidp_add_connection(struct hidp_conn
  		if (err < 0)
  			goto purge;
  	}
@@ -360,7 +348,7 @@ here still, but for now we keep this here.
  
  	__hidp_link_session(session);
  
-@@ -902,6 +1028,7 @@ unlink:
+@@ -898,6 +1024,7 @@ unlink:
  		session->input = NULL;
  	}
  
@@ -368,7 +356,7 @@ here still, but for now we keep this here.
  	if (session->hid) {
  		hid_destroy_device(session->hid);
  		session->hid = NULL;
-@@ -913,10 +1040,15 @@ unlink:
+@@ -909,10 +1036,15 @@ unlink:
  purge:
  	skb_queue_purge(&session->ctrl_transmit);
  	skb_queue_purge(&session->intr_transmit);
@@ -384,7 +372,7 @@ here still, but for now we keep this here.
  	input_free_device(session->input);
  	kfree(session);
  	return err;
-@@ -1006,6 +1138,7 @@ int hidp_get_conninfo(struct hidp_connin
+@@ -1002,6 +1134,7 @@ int hidp_get_conninfo(struct hidp_connin
  	return err;
  }
  
@@ -392,7 +380,7 @@ here still, but for now we keep this here.
  static const struct hid_device_id hidp_table[] = {
  	{ HID_BLUETOOTH_DEVICE(HID_ANY_ID, HID_ANY_ID) },
  	{ }
-@@ -1015,6 +1148,7 @@ static struct hid_driver hidp_driver = {
+@@ -1011,6 +1144,7 @@ static struct hid_driver hidp_driver = {
  	.name = "generic-bluetooth",
  	.id_table = hidp_table,
  };
@@ -400,7 +388,7 @@ here still, but for now we keep this here.
  
  static int __init hidp_init(void)
  {
-@@ -1024,11 +1158,14 @@ static int __init hidp_init(void)
+@@ -1020,11 +1154,14 @@ static int __init hidp_init(void)
  
  	BT_INFO("HIDP (Human Interface Emulation) ver %s", VERSION);
  
@@ -415,7 +403,7 @@ here still, but for now we keep this here.
  	if (ret)
  		goto err_drv;
  
-@@ -1036,13 +1173,16 @@ static int __init hidp_init(void)
+@@ -1032,13 +1169,16 @@ static int __init hidp_init(void)
  err_drv:
  	hid_unregister_driver(&hidp_driver);
  err:
@@ -448,19 +436,7 @@ here still, but for now we keep this here.
  {
  	struct sock *sk;
  
-@@ -711,7 +716,11 @@ static int rfcomm_sock_recvmsg(struct ki
- 		copied += chunk;
- 		size   -= chunk;
- 
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32))
- 		sock_recv_ts_and_drops(msg, sk, skb);
-+#else
-+		sock_recv_timestamp(msg, sk, skb);
-+#endif
- 
- 		if (!(flags & MSG_PEEK)) {
- 			atomic_sub(chunk, &sk->sk_rmem_alloc);
-@@ -774,7 +783,11 @@ static int rfcomm_sock_setsockopt_old(st
+@@ -682,7 +687,11 @@ static int rfcomm_sock_setsockopt_old(st
  	return err;
  }
  
@@ -474,7 +450,7 @@ here still, but for now we keep this here.
  	struct bt_security sec;
 --- a/net/bluetooth/rfcomm/tty.c
 +++ b/net/bluetooth/rfcomm/tty.c
-@@ -731,8 +731,12 @@ static int rfcomm_tty_open(struct tty_st
+@@ -729,8 +729,12 @@ static int rfcomm_tty_open(struct tty_st
  	remove_wait_queue(&dev->wait, &wait);
  
  	if (err == 0)
@@ -487,7 +463,7 @@ here still, but for now we keep this here.
  
  	rfcomm_tty_copy_pending(dev);
  
-@@ -752,7 +756,11 @@ static void rfcomm_tty_close(struct tty_
+@@ -750,7 +754,11 @@ static void rfcomm_tty_close(struct tty_
  
  	if (atomic_dec_and_test(&dev->opened)) {
  		if (dev->tty_dev->parent)
@@ -598,7 +574,7 @@ here still, but for now we keep this here.
  		return -EPERM;
  
  	sock->ops = &l2cap_sock_ops;
-@@ -2022,7 +2030,11 @@ static int l2cap_sock_setsockopt_old(str
+@@ -2042,7 +2050,11 @@ static int l2cap_sock_setsockopt_old(str
  	return err;
  }
  
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH 1/2] compat-wireless: Remove extra config option for kfifo.
@ 2011-04-07 14:39 Hauke Mehrtens
  2011-04-07 14:39 ` [PATCH 2/2] compat-wireless: make patches apply again Hauke Mehrtens
  0 siblings, 1 reply; 11+ messages in thread
From: Hauke Mehrtens @ 2011-04-07 14:39 UTC (permalink / raw)
  To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

kfifo is now build when CONFIG_COMPAT_KERNEL_36 is set.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 config.mk |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/config.mk b/config.mk
index 5f861ca..846d2e0 100644
--- a/config.mk
+++ b/config.mk
@@ -107,11 +107,6 @@ ifdef CONFIG_FW_LOADER
 endif #CONFIG_FW_LOADER
 endif #CONFIG_COMPAT_KERNEL_33
 
-ifdef CONFIG_COMPAT_KERNEL_36
-CONFIG_COMPAT_KFIFO=m
-endif #CONFIG_COMPAT_KERNEL_36
-
-
 # Wireless subsystem stuff
 CONFIG_MAC80211=m
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH 1/2] compat-wireless: add config var for CORDIC and CRC8
@ 2011-11-24 19:47 Hauke Mehrtens
  2011-11-24 19:47 ` [PATCH 2/2] compat-wireless: make patches apply again Hauke Mehrtens
  0 siblings, 1 reply; 11+ messages in thread
From: Hauke Mehrtens @ 2011-11-24 19:47 UTC (permalink / raw)
  To: mcgrof, mcgrof; +Cc: linux-wireless, Hauke Mehrtens

Sometimes the kernel version compat-wireless is build against has
support for cordic and crc8 in its source, but these modules where not
build when the kernel was build, because no one selected them. They are
needed for the bcmsmac driver and they should be build every time when
there is not an kernel module already.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 config.mk |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk
index 05edb79..5eabc51 100644
--- a/config.mk
+++ b/config.mk
@@ -657,6 +657,14 @@ endif #CONFIG_CRC7
 
 CONFIG_MWIFIEX=m
 
+ifndef CONFIG_CORDIC
+CONFIG_COMPAT_CORDIC=y
+endif #CONFIG_CORDIC
+
+ifndef CONFIG_CRC8
+CONFIG_COMPAT_CRC8=y
+endif #CONFIG_CRC8
+
 ifdef CONFIG_COMPAT_KERNEL_2_6_27
 CONFIG_LIBERTAS=n
 else #CONFIG_COMPAT_KERNEL_2_6_27
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-11-24 19:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10 21:24 [PATCH 1/2] compat-wireless: backport pm_qos_{add,remove,update}_request Hauke Mehrtens
2010-05-10 21:24 ` [PATCH 2/2] compat-wireless: make patches apply again Hauke Mehrtens
2010-05-12  8:20   ` Bruno Randolf
2010-05-12 16:28     ` Luis R. Rodriguez
2010-05-13  1:00       ` Bruno Randolf
2010-05-13  1:06         ` Luis R. Rodriguez
2010-05-10 22:24 ` [PATCH 1/2] compat-wireless: backport pm_qos_{add,remove,update}_request Luis R. Rodriguez
  -- strict thread matches above, loose matches on Subject: below --
2010-10-18 20:36 [PATCH 1/2] compat-wireless: backport sock_recv_ts_and_drops in compat Hauke Mehrtens
2010-10-18 20:36 ` [PATCH 2/2] compat-wireless: make patches apply again Hauke Mehrtens
2011-04-07 14:39 [PATCH 1/2] compat-wireless: Remove extra config option for kfifo Hauke Mehrtens
2011-04-07 14:39 ` [PATCH 2/2] compat-wireless: make patches apply again Hauke Mehrtens
2011-04-15  0:56   ` Luis R. Rodriguez
2011-11-24 19:47 [PATCH 1/2] compat-wireless: add config var for CORDIC and CRC8 Hauke Mehrtens
2011-11-24 19:47 ` [PATCH 2/2] compat-wireless: make patches apply again Hauke Mehrtens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).