linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] compat-wireless: miscellaneous fixes
@ 2010-08-17 18:31 Hauke Mehrtens
  2010-08-17 18:31 ` [PATCH 1/3] compat-wireless: deactivate namespace Hauke Mehrtens
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Hauke Mehrtens @ 2010-08-17 18:31 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens

This was build tested in combination with the patches to compat.

Hauke Mehrtens (3):
  compat-wireless: deactivate namespace
  compat-wireless: make compat-2.6.37.c build
  compat-wireless: fix hidp_output_raw_report

 config.mk                       |    2 +-
 patches/16-bluetooth.patch      |   37 +++++++++++++++++++++++--------------
 patches/32-remove-ns-type.patch |   28 ++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 15 deletions(-)
 create mode 100644 patches/32-remove-ns-type.patch


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

* [PATCH 1/3] compat-wireless: deactivate namespace
  2010-08-17 18:31 [PATCH 0/3] compat-wireless: miscellaneous fixes Hauke Mehrtens
@ 2010-08-17 18:31 ` Hauke Mehrtens
  2010-08-17 18:31 ` [PATCH 2/3] compat-wireless: make compat-2.6.37.c build Hauke Mehrtens
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Hauke Mehrtens @ 2010-08-17 18:31 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens

Namespace support was introduced with kernel 2.6.35 in struct class.
Deactivate it for older kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/32-remove-ns-type.patch |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100644 patches/32-remove-ns-type.patch

diff --git a/patches/32-remove-ns-type.patch b/patches/32-remove-ns-type.patch
new file mode 100644
index 0000000..b35c927
--- /dev/null
+++ b/patches/32-remove-ns-type.patch
@@ -0,0 +1,28 @@
+--- a/net/wireless/sysfs.c
++++ b/net/wireless/sysfs.c
+@@ -110,12 +110,14 @@ static int wiphy_resume(struct device *d
+ 	return ret;
+ }
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ static const void *wiphy_namespace(struct device *d)
+ {
+ 	struct wiphy *wiphy = container_of(d, struct wiphy, dev);
+ 
+ 	return wiphy_net(wiphy);
+ }
++#endif
+ 
+ struct class ieee80211_class = {
+ 	.name = "ieee80211",
+@@ -127,8 +129,10 @@ struct class ieee80211_class = {
+ #endif
+ 	.suspend = wiphy_suspend,
+ 	.resume = wiphy_resume,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 	.ns_type = &net_ns_type_operations,
+ 	.namespace = wiphy_namespace,
++#endif
+ };
+ 
+ int wiphy_sysfs_init(void)
-- 
1.7.0.4


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

* [PATCH 2/3] compat-wireless: make compat-2.6.37.c build
  2010-08-17 18:31 [PATCH 0/3] compat-wireless: miscellaneous fixes Hauke Mehrtens
  2010-08-17 18:31 ` [PATCH 1/3] compat-wireless: deactivate namespace Hauke Mehrtens
@ 2010-08-17 18:31 ` Hauke Mehrtens
  2010-08-17 18:31 ` [PATCH 3/3] compat-wireless: fix hidp_output_raw_report Hauke Mehrtens
  2010-08-17 22:02 ` [PATCH 0/3] compat-wireless: miscellaneous fixes Luis R. Rodriguez
  3 siblings, 0 replies; 7+ messages in thread
From: Hauke Mehrtens @ 2010-08-17 18:31 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens

This is needed to set CONFIG_COMPAT_KERNEL_37

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

diff --git a/config.mk b/config.mk
index 777ebd3..edfeca2 100644
--- a/config.mk
+++ b/config.mk
@@ -20,7 +20,7 @@ endif
 # as I suspect all users of this package want 802.11e (WME) and
 # 802.11n (HT) support.
 ifneq ($(wildcard $(KLIB_BUILD)/Makefile),)
-COMPAT_LATEST_VERSION = 35
+COMPAT_LATEST_VERSION = 37
 KERNEL_SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
 COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
 $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
-- 
1.7.0.4


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

* [PATCH 3/3] compat-wireless: fix hidp_output_raw_report
  2010-08-17 18:31 [PATCH 0/3] compat-wireless: miscellaneous fixes Hauke Mehrtens
  2010-08-17 18:31 ` [PATCH 1/3] compat-wireless: deactivate namespace Hauke Mehrtens
  2010-08-17 18:31 ` [PATCH 2/3] compat-wireless: make compat-2.6.37.c build Hauke Mehrtens
@ 2010-08-17 18:31 ` Hauke Mehrtens
  2010-08-17 22:02 ` [PATCH 0/3] compat-wireless: miscellaneous fixes Luis R. Rodriguez
  3 siblings, 0 replies; 7+ messages in thread
From: Hauke Mehrtens @ 2010-08-17 18:31 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens

The report_type parameter was added with kenrel 2.6.34

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

diff --git a/patches/16-bluetooth.patch b/patches/16-bluetooth.patch
index 522b680..29d990a 100644
--- a/patches/16-bluetooth.patch
+++ b/patches/16-bluetooth.patch
@@ -180,19 +180,28 @@ here still, but for now we keep this here.
  	return hidp_queue_report(session, buf, rsize);
  }
  
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
  static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count,
  		unsigned char report_type)
  {
-@@ -332,6 +333,7 @@ static int hidp_output_raw_report(struct
+@@ -332,6 +333,16 @@ static int hidp_output_raw_report(struct
  		return -ENOMEM;
  	return count;
  }
++#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
++static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count)
++{
++	if (hidp_send_ctrl_message(hid->driver_data,
++			HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE,
++			data, count))
++		return -ENOMEM;
++	return count;
++}
 +#endif
  
  static void hidp_idle_timeout(unsigned long arg)
  {
-@@ -596,10 +598,16 @@ static int hidp_session(void *arg)
+@@ -596,10 +607,16 @@ static int hidp_session(void *arg)
  		session->input = NULL;
  	}
  
@@ -213,7 +222,7 @@ here still, but for now we keep this here.
  
  	/* Wakeup user-space polling for socket errors */
  	session->intr_sock->sk->sk_err = EUNATCH;
-@@ -711,6 +719,70 @@ static void hidp_close(struct hid_device
+@@ -711,6 +728,70 @@ static void hidp_close(struct hid_device
  {
  }
  
@@ -284,7 +293,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 +887,7 @@ fault:
+@@ -815,6 +896,7 @@ fault:
  
  	return err;
  }
@@ -292,7 +301,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 +906,39 @@ int hidp_add_connection(struct hidp_conn
+@@ -833,6 +915,39 @@ int hidp_add_connection(struct hidp_conn
  
  	BT_DBG("rd_data %p rd_size %d", req->rd_data, req->rd_size);
  
@@ -332,7 +341,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 +966,7 @@ int hidp_add_connection(struct hidp_conn
+@@ -860,6 +975,7 @@ int hidp_add_connection(struct hidp_conn
  	session->flags   = req->flags & (1 << HIDP_BLUETOOTH_VENDOR_ID);
  	session->idle_to = req->idle_to;
  
@@ -340,7 +349,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 +978,16 @@ int hidp_add_connection(struct hidp_conn
+@@ -871,6 +987,16 @@ int hidp_add_connection(struct hidp_conn
  		if (err < 0)
  			goto purge;
  	}
@@ -357,7 +366,7 @@ here still, but for now we keep this here.
  
  	__hidp_link_session(session);
  
-@@ -902,6 +1019,7 @@ unlink:
+@@ -902,6 +1028,7 @@ unlink:
  		session->input = NULL;
  	}
  
@@ -365,7 +374,7 @@ here still, but for now we keep this here.
  	if (session->hid) {
  		hid_destroy_device(session->hid);
  		session->hid = NULL;
-@@ -913,10 +1031,15 @@ unlink:
+@@ -913,10 +1040,15 @@ unlink:
  purge:
  	skb_queue_purge(&session->ctrl_transmit);
  	skb_queue_purge(&session->intr_transmit);
@@ -381,7 +390,7 @@ here still, but for now we keep this here.
  	input_free_device(session->input);
  	kfree(session);
  	return err;
-@@ -1006,6 +1129,7 @@ int hidp_get_conninfo(struct hidp_connin
+@@ -1006,6 +1138,7 @@ int hidp_get_conninfo(struct hidp_connin
  	return err;
  }
  
@@ -389,7 +398,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 +1139,7 @@ static struct hid_driver hidp_driver = {
+@@ -1015,6 +1148,7 @@ static struct hid_driver hidp_driver = {
  	.name = "generic-bluetooth",
  	.id_table = hidp_table,
  };
@@ -397,7 +406,7 @@ here still, but for now we keep this here.
  
  static int __init hidp_init(void)
  {
-@@ -1024,11 +1149,14 @@ static int __init hidp_init(void)
+@@ -1024,11 +1158,14 @@ static int __init hidp_init(void)
  
  	BT_INFO("HIDP (Human Interface Emulation) ver %s", VERSION);
  
@@ -412,7 +421,7 @@ here still, but for now we keep this here.
  	if (ret)
  		goto err_drv;
  
-@@ -1036,13 +1164,16 @@ static int __init hidp_init(void)
+@@ -1036,13 +1173,16 @@ static int __init hidp_init(void)
  err_drv:
  	hid_unregister_driver(&hidp_driver);
  err:
-- 
1.7.0.4


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

* Re: [PATCH 0/3] compat-wireless: miscellaneous fixes
  2010-08-17 18:31 [PATCH 0/3] compat-wireless: miscellaneous fixes Hauke Mehrtens
                   ` (2 preceding siblings ...)
  2010-08-17 18:31 ` [PATCH 3/3] compat-wireless: fix hidp_output_raw_report Hauke Mehrtens
@ 2010-08-17 22:02 ` Luis R. Rodriguez
  2010-08-17 22:56   ` Hauke Mehrtens
  3 siblings, 1 reply; 7+ messages in thread
From: Luis R. Rodriguez @ 2010-08-17 22:02 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless, mcgrof

On Tue, Aug 17, 2010 at 11:31 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> This was build tested in combination with the patches to compat.
>
> Hauke Mehrtens (3):
>  compat-wireless: deactivate namespace
>  compat-wireless: make compat-2.6.37.c build
>  compat-wireless: fix hidp_output_raw_report

Great thanks! Applied and pushed all out. Are any of these stable
fixes into the respective stable branches of compat-wireless.git? How
about the compat.git ones?

  Luis

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

* Re: [PATCH 0/3] compat-wireless: miscellaneous fixes
  2010-08-17 22:02 ` [PATCH 0/3] compat-wireless: miscellaneous fixes Luis R. Rodriguez
@ 2010-08-17 22:56   ` Hauke Mehrtens
  2010-08-17 23:48     ` Luis R. Rodriguez
  0 siblings, 1 reply; 7+ messages in thread
From: Hauke Mehrtens @ 2010-08-17 22:56 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless, mcgrof

Am 18.08.2010 00:02, schrieb Luis R. Rodriguez:
> On Tue, Aug 17, 2010 at 11:31 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> This was build tested in combination with the patches to compat.
>>
>> Hauke Mehrtens (3):
>>  compat-wireless: deactivate namespace
>>  compat-wireless: make compat-2.6.37.c build
>>  compat-wireless: fix hidp_output_raw_report
> 
> Great thanks! Applied and pushed all out. Are any of these stable
> fixes into the respective stable branches of compat-wireless.git? How
> about the compat.git ones?
> 
>   Luis

Thanks for applying.

Only compat-wireless: fix hidp_output_raw_report is needed in stable.
The other patches are not needed in stable for now, they are for some
changes made after 2.6.36.

Hauke

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

* Re: [PATCH 0/3] compat-wireless: miscellaneous fixes
  2010-08-17 22:56   ` Hauke Mehrtens
@ 2010-08-17 23:48     ` Luis R. Rodriguez
  0 siblings, 0 replies; 7+ messages in thread
From: Luis R. Rodriguez @ 2010-08-17 23:48 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless, mcgrof

On Tue, Aug 17, 2010 at 3:56 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> Am 18.08.2010 00:02, schrieb Luis R. Rodriguez:
>> On Tue, Aug 17, 2010 at 11:31 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>>> This was build tested in combination with the patches to compat.
>>>
>>> Hauke Mehrtens (3):
>>>  compat-wireless: deactivate namespace
>>>  compat-wireless: make compat-2.6.37.c build
>>>  compat-wireless: fix hidp_output_raw_report
>>
>> Great thanks! Applied and pushed all out. Are any of these stable
>> fixes into the respective stable branches of compat-wireless.git? How
>> about the compat.git ones?
>>
>>   Luis
>
> Thanks for applying.
>
> Only compat-wireless: fix hidp_output_raw_report is needed in stable.
> The other patches are not needed in stable for now, they are for some
> changes made after 2.6.36.

OK cool, pushed this in for a new stable release for 2.6.36-rc1 so we
get a -2 now:

http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.36/compat-wireless-2.6.36-rc1-2.tar.bz2

  Luis

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

end of thread, other threads:[~2010-08-17 23:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-17 18:31 [PATCH 0/3] compat-wireless: miscellaneous fixes Hauke Mehrtens
2010-08-17 18:31 ` [PATCH 1/3] compat-wireless: deactivate namespace Hauke Mehrtens
2010-08-17 18:31 ` [PATCH 2/3] compat-wireless: make compat-2.6.37.c build Hauke Mehrtens
2010-08-17 18:31 ` [PATCH 3/3] compat-wireless: fix hidp_output_raw_report Hauke Mehrtens
2010-08-17 22:02 ` [PATCH 0/3] compat-wireless: miscellaneous fixes Luis R. Rodriguez
2010-08-17 22:56   ` Hauke Mehrtens
2010-08-17 23:48     ` Luis R. Rodriguez

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).