From 44706a520f6527c67e7f8b741812f11464babda2 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Sat, 30 Mar 2013 00:53:58 +0100 Subject: [PATCH] split patches This splits all patches into per-file patches. I've added the little tool I wrote as well (but it's hard to use). Signed-off-by: Johannes Berg --- lib/splitpatch.py | 20 + .../INFO} | 11 - .../drivers_gpu_drm_i915_intel_fb.c | 11 + .../drm/01-dma_buf_ops-addition.patch | 41 - .../drm/01-dma_buf_ops-addition/INFO | 10 + .../drivers_gpu_drm_drm_prime.c | 14 + .../drivers_gpu_drm_i915_i915_gem_dmabuf.c | 17 + .../drm/02-revert-vm_mmap.patch | 94 -- .../drm/02-revert-vm_mmap/INFO | 5 + .../drivers_gpu_drm_drm_bufs.c | 31 + .../drivers_gpu_drm_i810_i810_dma.c | 37 + .../drivers_gpu_drm_i915_i915_gem.c | 21 + .../drm/03-swiotlb.patch | 83 - .../collateral-evolutions/drm/03-swiotlb/INFO | 5 + .../drivers_gpu_drm_nouveau_nouveau_bo.c | 31 + .../drivers_gpu_drm_radeon_radeon_ttm.c | 47 + .../drm/04-revert-prime-support.patch | 347 ---- .../drm/04-revert-prime-support/INFO | 8 + .../drivers_gpu_drm_drm_drv.c | 13 + .../drivers_gpu_drm_drm_fops.c | 24 + .../drivers_gpu_drm_drm_gem.c | 28 + .../drivers_gpu_drm_drm_prime.c | 16 + .../drivers_gpu_drm_i915_i915_drv.c | 27 + .../drivers_gpu_drm_i915_i915_gem.c | 23 + .../drivers_gpu_drm_i915_i915_gem_dmabuf.c | 15 + .../drivers_gpu_drm_nouveau_nouveau_bo.c | 38 + .../drivers_gpu_drm_nouveau_nouveau_drm.c | 30 + .../drivers_gpu_drm_nouveau_nouveau_gem.c | 13 + .../drivers_gpu_drm_nouveau_nouveau_prime.c | 16 + .../drivers_gpu_drm_radeon_radeon_drv.c | 31 + .../drivers_gpu_drm_radeon_radeon_gem.c | 13 + .../drivers_gpu_drm_radeon_radeon_prime.c | 15 + .../drivers_gpu_drm_radeon_radeon_ttm.c | 37 + .../drm/05-i915-define-acpi-video-class/INFO | 4 + .../drivers_gpu_drm_i915_intel_opregion.c} | 6 +- .../drm/06-rename-config-options.patch | 207 --- .../drivers_gpu_drm_Makefile | 72 + .../drivers_gpu_drm_ast_Makefile | 9 + .../drivers_gpu_drm_cirrus_Makefile | 8 + .../drivers_gpu_drm_drm_crtc_helper.c | 11 + .../drivers_gpu_drm_gma500_Makefile | 8 + .../drivers_gpu_drm_i2c_Makefile | 16 + .../drivers_gpu_drm_i810_Makefile | 8 + .../drivers_gpu_drm_i915_Makefile | 10 + .../drivers_gpu_drm_mgag200_Makefile | 8 + .../drivers_gpu_drm_nouveau_Makefile | 12 + .../drivers_gpu_drm_nouveau_nouveau_display.h | 11 + .../drivers_gpu_drm_radeon_Makefile | 10 + .../drivers_gpu_drm_ttm_Makefile | 8 + .../drivers_gpu_drm_via_Makefile | 8 + .../drivers_gpu_drm_vmwgfx_Makefile | 8 + .../{07-intel-gtt.patch => 07-intel-gtt/INFO} | 18 - .../drivers_gpu_drm_i915_i915_gem.c | 18 + .../INFO} | 16 - .../drivers_gpu_drm_i915_i915_gem.c | 16 + .../09-nouveau-compatify-kconfig-vars.patch | 153 -- .../09-nouveau-compatify-kconfig-vars/INFO | 3 + ...drivers_gpu_drm_nouveau_core_core_option.c | 11 + ...gpu_drm_nouveau_core_include_core_client.h | 11 + ...gpu_drm_nouveau_core_include_core_device.h | 11 + ...gpu_drm_nouveau_core_include_core_engctx.h | 11 + ...gpu_drm_nouveau_core_include_core_engine.h | 11 + ...gpu_drm_nouveau_core_include_core_gpuobj.h | 11 + ...gpu_drm_nouveau_core_include_core_namedb.h | 11 + ...gpu_drm_nouveau_core_include_core_object.h | 20 + ...gpu_drm_nouveau_core_include_core_parent.h | 11 + ...gpu_drm_nouveau_core_include_core_printk.h | 20 + ...gpu_drm_nouveau_core_include_core_subdev.h | 11 + ..._drm_nouveau_core_include_subdev_instmem.h | 11 + .../INFO | 3 + .../drivers_gpu_drm_radeon_radeon_bios.c} | 5 +- .../drivers_gpu_drm_drm_modes.c} | 0 .../collateral-evolutions/drm/98-pr_fmt.patch | 189 --- .../collateral-evolutions/drm/98-pr_fmt/INFO | 6 + .../98-pr_fmt/drivers_gpu_drm_drm_fb_helper.c | 14 + .../98-pr_fmt/drivers_gpu_drm_i915_i915_dma.c | 18 + .../98-pr_fmt/drivers_gpu_drm_i915_i915_irq.c | 13 + .../drivers_gpu_drm_i915_intel_opregion.c | 13 + .../drivers_gpu_drm_i915_intel_panel.c | 13 + .../drivers_gpu_drm_ttm_ttm_agp_backend.c | 13 + .../98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo.c | 16 + .../98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo_vm.c | 13 + .../drivers_gpu_drm_ttm_ttm_memory.c | 16 + .../drivers_gpu_drm_ttm_ttm_object.c | 15 + .../drivers_gpu_drm_ttm_ttm_page_alloc.c | 13 + .../drivers_gpu_drm_ttm_ttm_page_alloc_dma.c | 13 + .../98-pr_fmt/drivers_gpu_drm_ttm_ttm_tt.c | 13 + .../drm/99-change-makefile/INFO | 2 + .../drivers_gpu_drm_Makefile} | 4 +- .../network/0001-netdev_ops.patch | 290 ---- .../network/0001-netdev_ops/INFO | 38 + ...rs_net_ethernet_atheros_atl1c_atl1c_main.c | 11 + ...rs_net_ethernet_atheros_atl1e_atl1e_main.c | 11 + .../drivers_net_ethernet_atheros_atlx_atl1.c | 11 + .../drivers_net_ethernet_atheros_atlx_atl2.c | 11 + .../drivers_net_ethernet_broadcom_b44.c | 11 + .../drivers_net_usb_rndis_host.c | 11 + .../0001-netdev_ops/drivers_net_usb_usbnet.c | 11 + .../drivers_net_wireless_ath_ath6kl_main.c | 11 + .../drivers_net_wireless_ath_wil6210_netdev.c | 11 + .../drivers_net_wireless_ipw2x00_ipw2100.c | 11 + .../drivers_net_wireless_ipw2x00_ipw2200.c | 20 + .../drivers_net_wireless_libertas_main.c | 11 + .../drivers_net_wireless_libertas_mesh.c | 11 + .../drivers_net_wireless_mac80211_hwsim.c | 11 + .../drivers_net_wireless_mwifiex_main.c | 11 + .../drivers_net_wireless_orinoco_main.c | 14 + .../drivers_net_wireless_rndis_wlan.c | 11 + .../net_bluetooth_bnep_netdev.c | 11 + .../0001-netdev_ops/net_mac80211_iface.c | 29 + .../0001-netdev_ops/net_wireless_wext-core.c | 13 + .../network/0002-net-misc.patch | 68 - .../network/0002-net-misc/INFO | 8 + .../drivers_net_usb_rndis_host.c | 14 + .../drivers_net_wireless_libertas_defs.h | 17 + .../0002-net-misc/net_bluetooth_bnep_netdev.c | 15 + .../0002-net-misc/net_mac80211_iface.c | 14 + ...0003-netdev-needed_headroom_tailroom.patch | 36 - .../0003-netdev-needed_headroom_tailroom/INFO | 4 + .../drivers_net_wireless_orinoco_main.c | 14 + .../net_mac80211_iface.c | 18 + .../network/0004-wext-namespace/INFO | 4 + .../net_wireless_wext-core.c} | 10 +- .../network/0005-netlink-portid/INFO | 42 + .../drivers_net_wireless_mac80211_hwsim.c | 24 + .../net_wireless_nl80211.c} | 118 +- .../INFO} | 18 - .../net_wireless_nl80211.c | 18 + .../network/02-ksize/INFO | 12 + .../drivers_net_wireless_orinoco_wext.c} | 14 +- .../network/03-rfkill.patch | 66 - .../network/03-rfkill/INFO | 30 + .../network/03-rfkill/net_rfkill_Makefile | 14 + .../network/03-rfkill/net_rfkill_core.c | 11 + .../network/03-rfkill/net_rfkill_input.c | 11 + .../network/04-netns.patch | 149 -- .../network/04-netns/INFO | 6 + .../network/04-netns/net_wireless_core.c | 86 + .../network/04-netns/net_wireless_nl80211.c | 12 + .../network/04-netns/net_wireless_wext-core.c | 31 + .../network/04-netns/net_wireless_wext-proc.c | 14 + .../network/05-usb.patch | 26 - .../collateral-evolutions/network/05-usb/INFO | 2 + .../drivers_net_wireless_ath_ath9k_hif_usb.c | 12 + .../05-usb/drivers_net_wireless_p54_p54usb.c | 12 + .../network/06-header-changes.patch | 176 -- .../network/06-header-changes/INFO | 6 + ...drivers_net_wireless_ath_ath6kl_cfg80211.c | 10 + ...drivers_net_wireless_ath_ath6kl_htc_pipe.c | 13 + .../drivers_net_wireless_b43_phy_common.h | 12 + .../drivers_net_wireless_mwifiex_usb.c | 10 + .../drivers_net_wireless_rtlwifi_base.c | 10 + .../drivers_net_wireless_ti_wl1251_main.c | 12 + .../drivers_net_wireless_ti_wl1251_spi.c | 12 + .../drivers_net_wireless_ti_wlcore_event.c | 10 + .../drivers_net_wireless_ti_wlcore_scan.c | 10 + .../06-header-changes/include_net_mac80211.h | 10 + .../net_bluetooth_bnep_sock.c | 10 + .../net_bluetooth_hci_sock.c | 10 + .../net_bluetooth_hidp_sock.c | 10 + .../06-header-changes/net_mac80211_key.c | 12 + .../06-header-changes/net_mac80211_pm.c | 9 + .../06-header-changes/net_wireless_util.c | 10 + .../network/07-change-default-rate-alg/INFO | 12 + .../net_mac80211_rate.c} | 16 +- .../network/08-rename-config-options.patch | 192 --- .../network/08-rename-config-options/INFO | 21 + .../drivers_net_wireless_Makefile | 25 + .../drivers_net_wireless_ath_ath9k_Makefile | 11 + .../drivers_net_wireless_ath_ath9k_init.c | 11 + .../drivers_net_wireless_ath_ath9k_rc.h | 11 + .../drivers_net_wireless_iwlegacy_Makefile | 11 + .../drivers_net_wireless_iwlegacy_common.h | 11 + .../drivers_net_wireless_libertas_Makefile | 9 + .../drivers_net_wireless_mwifiex_Makefile | 11 + .../drivers_net_wireless_ti_wl1251_Makefile | 12 + .../drivers_net_wireless_zd1211rw_Makefile | 8 + .../include_net_bluetooth_rfcomm.h | 11 + .../net_bluetooth_Makefile | 11 + .../net_bluetooth_hidp_Makefile | 10 + .../net_bluetooth_rfcomm_Makefile | 8 + .../net_bluetooth_rfcomm_sock.c | 11 + .../network/09-cfg80211-wext-padding.patch | 62 - .../network/09-cfg80211-wext-padding/INFO | 30 + .../include_net_cfg80211.h | 12 + .../net_wireless_core.c | 20 + .../network/09-threaded-irq.patch | 181 --- .../network/09-threaded-irq/INFO | 6 + .../drivers_net_wireless_b43_b43.h | 12 + .../drivers_net_wireless_b43_main.c | 45 + ...ivers_net_wireless_iwlwifi_pcie_internal.h | 12 + .../drivers_net_wireless_iwlwifi_pcie_trans.c | 41 + .../drivers_net_wireless_ti_wlcore_main.c | 52 + .../drivers_net_wireless_ti_wlcore_wlcore.h | 13 + .../10-add-wext-handlers-to-netdev/INFO | 18 + .../net_wireless_core.c} | 22 +- .../network/11-dev-pm-ops.patch | 379 ----- .../network/11-dev-pm-ops/INFO | 9 + .../11-dev-pm-ops/drivers_bcma_host_pci.c | 25 + ...rs_net_ethernet_atheros_atl1c_atl1c_main.c | 25 + .../drivers_net_ethernet_atheros_atlx_atl1.c | 25 + .../drivers_net_wireless_ath_ath5k_pci.c | 25 + .../drivers_net_wireless_ath_ath9k_pci.c | 25 + .../drivers_net_wireless_iwlegacy_3945-mac.c | 15 + .../drivers_net_wireless_iwlegacy_4965-mac.c | 15 + .../drivers_net_wireless_iwlegacy_common.c | 20 + .../drivers_net_wireless_iwlegacy_common.h | 17 + .../drivers_net_wireless_iwlwifi_pcie_drv.c | 25 + .../drivers_net_wireless_libertas_if_spi.c | 28 + .../drivers_net_wireless_p54_p54pci.c | 25 + ...rivers_net_wireless_rtlwifi_rtl8192ce_sw.c | 25 + ...rivers_net_wireless_rtlwifi_rtl8192de_sw.c | 25 + ...rivers_net_wireless_rtlwifi_rtl8192se_sw.c | 25 + ...rivers_net_wireless_rtlwifi_rtl8723ae_sw.c | 25 + .../drivers_net_wireless_ipw2x00_ipw2100.c} | 2 +- .../12-mac80211-disable-tx-status/INFO | 6 + .../net_mac80211_tx.c} | 10 +- .../network/14-device-type.patch | 56 - .../network/14-device-type/INFO | 8 + .../14-device-type/drivers_net_usb_usbnet.c | 20 + .../14-device-type/net_bluetooth_bnep_core.c | 14 + .../14-device-type/net_wireless_core.c | 14 + .../network/15-symbol-export-conflicts/INFO | 3 + .../net_mac80211_rx.c} | 5 +- .../network/16-bluetooth.patch | 575 ------- .../network/16-bluetooth/INFO | 3 + .../drivers_bluetooth_hci_ldisc.c | 28 + .../16-bluetooth/net_bluetooth_af_bluetooth.c | 39 + .../16-bluetooth/net_bluetooth_bnep_sock.c | 15 + .../16-bluetooth/net_bluetooth_cmtp_capi.c | 14 + .../16-bluetooth/net_bluetooth_cmtp_sock.c | 15 + .../16-bluetooth/net_bluetooth_hci_sock.c | 29 + .../16-bluetooth/net_bluetooth_hci_sysfs.c | 38 + .../16-bluetooth/net_bluetooth_hidp_core.c | 220 +++ .../16-bluetooth/net_bluetooth_hidp_sock.c | 15 + .../16-bluetooth/net_bluetooth_l2cap_sock.c | 41 + .../16-bluetooth/net_bluetooth_rfcomm_sock.c | 28 + .../16-bluetooth/net_bluetooth_rfcomm_tty.c | 63 + .../network/16-bluetooth/net_bluetooth_sco.c | 27 + .../network/17-netdev-queue/INFO | 14 + .../net_mac80211_iface.c} | 18 +- .../network/18-rename-usb-net-symbols.patch | 53 - .../network/18-rename-usb-net-symbols/INFO | 6 + .../drivers_net_usb_Makefile | 25 + .../drivers_net_usb_cdc_ether.c | 11 + .../drivers_net_wireless_Makefile | 11 + .../network/21-capi-proc_fops/INFO | 3 + .../net_bluetooth_cmtp_capi.c} | 9 +- .../INFO} | 13 - .../network/22-multiqueue/net_mac80211_tx.c | 13 + .../network/24-pcmcia.patch | 1414 ----------------- .../24-pcmcia/drivers_bluetooth_bluecard_cs.c | 191 +++ .../24-pcmcia/drivers_bluetooth_bt3c_cs.c | 180 +++ .../24-pcmcia/drivers_bluetooth_btuart_cs.c | 204 +++ .../24-pcmcia/drivers_bluetooth_dtl1_cs.c | 178 +++ .../drivers_net_wireless_b43_pcmcia.c | 82 + .../drivers_net_wireless_libertas_if_cs.c | 163 ++ .../drivers_net_wireless_orinoco_orinoco_cs.c | 207 +++ ...drivers_net_wireless_orinoco_spectrum_cs.c | 195 +++ .../network/24-pcmcia/drivers_ssb_main.c | 14 + .../network/25-multicast-list_head.patch | 872 ---------- .../network/25-multicast-list_head/INFO | 13 + ...rs_net_ethernet_atheros_atl1c_atl1c_main.c | 14 + ...rs_net_ethernet_atheros_atl1e_atl1e_main.c | 14 + .../drivers_net_ethernet_atheros_atlx_atl2.c | 14 + .../drivers_net_ethernet_atheros_atlx_atlx.c | 14 + .../drivers_net_ethernet_broadcom_b44.c | 14 + .../drivers_net_wireless_adm8211.c | 41 + ...vers_net_wireless_ath_ath5k_mac80211-ops.c | 55 + .../drivers_net_wireless_ath_ath6kl_main.c | 38 + .../drivers_net_wireless_ath_carl9170_main.c | 38 + ...et_wireless_brcm80211_brcmfmac_dhd_linux.c | 14 + .../drivers_net_wireless_libertas_main.c | 37 + .../drivers_net_wireless_libertas_tf_main.c | 39 + .../drivers_net_wireless_mwifiex_debugfs.c | 14 + .../drivers_net_wireless_mwifiex_sta_ioctl.c | 14 + .../drivers_net_wireless_mwl8k.c | 88 + .../drivers_net_wireless_orinoco_hw.c | 14 + .../drivers_net_wireless_orinoco_hw.h | 12 + .../drivers_net_wireless_p54_main.c | 45 + .../drivers_net_wireless_rndis_wlan.c | 14 + ...drivers_net_wireless_rtl818x_rtl8180_dev.c | 22 + ...drivers_net_wireless_rtl818x_rtl8187_dev.c | 20 + .../drivers_net_wireless_ti_wlcore_main.c | 64 + .../drivers_net_wireless_zd1211rw_zd_mac.c | 37 + .../include_net_mac80211.h | 27 + .../net_bluetooth_bnep_netdev.c | 16 + .../net_mac80211_driver-ops.h | 62 + .../net_mac80211_ieee80211_i.h | 15 + .../net_mac80211_iface.c | 37 + .../net_mac80211_main.c | 26 + .../network/26-sdio-quirks.patch | 32 - .../network/26-sdio-quirks/INFO | 2 + .../drivers_net_wireless_libertas_if_sdio.c | 18 + .../drivers_net_wireless_mwifiex_sdio.c | 12 + .../network/27-hermes-read-pda-conflict.patch | 56 - .../network/27-hermes-read-pda-conflict/INFO | 3 + .../drivers_net_wireless_orinoco_fw.c | 20 + .../drivers_net_wireless_orinoco_hermes.c | 11 + .../drivers_net_wireless_orinoco_hermes.h | 11 + ...drivers_net_wireless_orinoco_orinoco_usb.c | 11 + .../network/29-sdio_no_suspend.patch | 199 --- .../network/29-sdio_no_suspend/INFO | 5 + .../drivers_bluetooth_btmrvl_sdio.c | 28 + .../drivers_net_wireless_ath_ath6kl_sdio.c | 47 + ...wireless_brcm80211_brcmfmac_bcmsdh_sdmmc.c | 38 + .../drivers_net_wireless_libertas_if_sdio.c | 29 + .../drivers_net_wireless_mwifiex_sdio.c | 52 + .../INFO} | 22 - .../30-bridge-port/net_wireless_nl80211.c | 11 + .../30-bridge-port/net_wireless_util.c | 11 + .../net_wireless_sysfs.c} | 4 +- .../network/35-fix-makefile-includes.patch | 71 - .../network/35-fix-makefile-includes/INFO | 4 + ...s_net_wireless_brcm80211_brcmfmac_Makefile | 13 + ...s_net_wireless_brcm80211_brcmsmac_Makefile | 15 + ...s_net_wireless_brcm80211_brcmutil_Makefile | 13 + ...vers_net_wireless_rtl818x_rtl8180_Makefile | 8 + ...vers_net_wireless_rtl818x_rtl8187_Makefile | 8 + .../net_wireless_Makefile | 10 + .../network/36-workqueue/INFO | 3 + .../net_mac80211_main.c} | 5 +- .../drivers_net_wireless_ath_main.c} | 4 +- .../network/38-led-max-brightness.patch | 36 - .../drivers_net_wireless_iwlegacy_common.c | 12 + .../drivers_net_wireless_iwlwifi_dvm_led.c | 12 + .../drivers_net_wireless_iwlwifi_mvm_led.c | 12 + .../network/39-remove_blink_set.patch | 56 - .../drivers_net_wireless_iwlegacy_common.c | 28 + .../drivers_net_wireless_iwlwifi_dvm_led.c | 28 + .../network/40-netdev-hw-features.patch | 372 ----- .../network/40-netdev-hw-features/INFO | 20 + ...net_ethernet_atheros_atl1c_atl1c_ethtool.c | 28 + ...rs_net_ethernet_atheros_atl1c_atl1c_main.c | 72 + ...net_ethernet_atheros_atl1e_atl1e_ethtool.c | 14 + ...rs_net_ethernet_atheros_atl1e_atl1e_main.c | 57 + .../drivers_net_ethernet_atheros_atlx_atl1.c | 53 + .../drivers_net_ethernet_atheros_atlx_atl2.c | 71 + .../drivers_net_ethernet_atheros_atlx_atlx.c | 17 + .../drivers_net_wireless_ath_ath6kl_main.c | 40 + .../net_wireless_nl80211.c} | 2 +- .../drivers_net_wireless_ipw2x00_ipw2100.c} | 2 +- .../44-deactivate-mac80211-tracing/INFO | 2 + .../net_mac80211_Makefile | 13 + .../net_wireless_Makefile} | 17 +- .../drivers_net_wireless_ti_wl12xx_main.c} | 2 +- .../network/46-use_other_workqueue/INFO | 4 + .../net_bluetooth_hci_core.c} | 6 +- .../47-no_trans_start_on_netdev_queue/INFO | 4 + .../drivers_net_wireless_mwifiex_init.c} | 6 +- .../48-use_skb_get_queue_mapping.patch | 38 - .../network/48-use_skb_get_queue_mapping/INFO | 4 + .../drivers_net_wireless_b43_main.c | 17 + .../drivers_net_wireless_b43legacy_main.c | 17 + .../network/50-libertas-olpc-ec-wakeup/INFO | 5 + .../drivers_net_wireless_libertas_if_usb.c} | 9 +- .../{52-tty-dev.patch => 52-tty-dev/INFO} | 13 - .../52-tty-dev/drivers_bluetooth_hci_ldisc.c | 13 + .../network/53-pr_fmt.patch | 715 --------- .../network/53-pr_fmt/INFO | 3 + .../53-pr_fmt/drivers_bcma_bcma_private.h | 15 + .../drivers_net_ethernet_broadcom_b44.c | 14 + .../drivers_net_wireless_ath_ath5k_ani.c | 14 + .../drivers_net_wireless_ath_ath5k_attach.c | 13 + .../drivers_net_wireless_ath_ath5k_base.c | 13 + .../drivers_net_wireless_ath_ath5k_debug.c | 13 + .../drivers_net_wireless_ath_ath5k_desc.c | 14 + .../drivers_net_wireless_ath_ath5k_dma.c | 14 + .../drivers_net_wireless_ath_ath5k_eeprom.c | 13 + .../drivers_net_wireless_ath_ath5k_initvals.c | 14 + .../drivers_net_wireless_ath_ath5k_led.c | 13 + ...vers_net_wireless_ath_ath5k_mac80211-ops.c | 17 + .../drivers_net_wireless_ath_ath5k_pci.c | 13 + .../drivers_net_wireless_ath_ath5k_phy.c | 13 + .../drivers_net_wireless_ath_ath5k_qcu.c | 14 + .../drivers_net_wireless_ath_ath5k_reset.c | 15 + .../drivers_net_wireless_ath_ath5k_sysfs.c | 10 + ...drivers_net_wireless_ath_ath6kl_cfg80211.c | 13 + .../drivers_net_wireless_ath_ath6kl_init.c | 13 + .../drivers_net_wireless_ath_ath6kl_main.c | 14 + .../drivers_net_wireless_ath_ath6kl_txrx.c | 14 + ...vers_net_wireless_ath_ath9k_htc_drv_init.c | 14 + .../drivers_net_wireless_ath_ath9k_htc_hst.c | 14 + .../drivers_net_wireless_ath_ath9k_init.c | 13 + .../drivers_net_wireless_ath_ath9k_pci.c | 13 + .../53-pr_fmt/drivers_net_wireless_ath_main.c | 14 + .../53-pr_fmt/drivers_net_wireless_ath_regd.c | 14 + ..._net_wireless_brcm80211_brcmsmac_aiutils.c | 13 + ..._wireless_brcm80211_brcmsmac_mac80211_if.c | 13 + ...ers_net_wireless_brcm80211_brcmsmac_main.c | 13 + ...et_wireless_brcm80211_brcmsmac_phy_phy_n.c | 14 + ...rs_net_wireless_brcm80211_brcmutil_utils.c | 13 + .../drivers_net_wireless_iwlegacy_3945-mac.c | 14 + .../drivers_net_wireless_iwlegacy_4965-mac.c | 14 + .../drivers_net_wireless_iwlwifi_dvm_main.c | 13 + .../drivers_net_wireless_iwlwifi_pcie_drv.c | 13 + .../drivers_net_wireless_libertas_cfg.c | 13 + .../drivers_net_wireless_libertas_if_cs.c | 13 + .../drivers_net_wireless_libertas_if_sdio.c | 14 + .../drivers_net_wireless_libertas_if_spi.c | 13 + .../drivers_net_wireless_libertas_if_usb.c | 13 + .../drivers_net_wireless_libertas_main.c | 13 + .../drivers_net_wireless_libertas_mesh.c | 10 + .../drivers_net_wireless_libertas_rx.c | 13 + .../drivers_net_wireless_libertas_tf_cmd.c | 13 + .../drivers_net_wireless_libertas_tf_if_usb.c | 16 + .../drivers_net_wireless_libertas_tf_main.c | 13 + .../drivers_net_wireless_rtlwifi_wifi.h | 13 + .../network/53-pr_fmt/net_bluetooth_lib.c | 14 + .../network/53-pr_fmt/net_wireless_core.c | 13 + .../network/53-pr_fmt/net_wireless_lib80211.c | 13 + .../net_wireless_lib80211_crypt_tkip.c | 13 + .../network/53-pr_fmt/net_wireless_reg.c | 14 + .../INFO} | 12 - .../54-get_ts_info/drivers_net_usb_usbnet.c | 12 + .../network/55-iwlwifi-msg-trace-fix/INFO | 5 + .../drivers_net_wireless_iwlwifi_iwl-debug.c} | 11 +- .../net_mac80211_trace.c} | 8 +- .../network/57-iwlwifi-debug-fix/INFO | 5 + .../drivers_net_wireless_iwlwifi_iwl-debug.c} | 7 +- .../network/61-netdev-addr_assign_type.patch | 31 - .../network/61-netdev-addr_assign_type/INFO | 7 + ...rs_net_ethernet_atheros_atl1c_atl1c_main.c | 12 + .../drivers_net_ethernet_atheros_atlx_atl1.c | 12 + .../network/62-usb_driver_lpm.patch | 276 ---- .../drivers_bluetooth_ath3k.c | 12 + .../drivers_bluetooth_bcm203x.c | 12 + .../drivers_bluetooth_bfusb.c | 12 + .../drivers_bluetooth_bpa10x.c | 12 + .../drivers_bluetooth_btusb.c | 12 + .../drivers_net_usb_cdc_ether.c | 12 + .../drivers_net_usb_rndis_host.c | 12 + .../drivers_net_wireless_at76c50x-usb.c | 12 + .../drivers_net_wireless_ath_ath6kl_usb.c | 12 + .../drivers_net_wireless_ath_ath9k_hif_usb.c | 12 + .../drivers_net_wireless_ath_carl9170_usb.c | 12 + ...vers_net_wireless_brcm80211_brcmfmac_usb.c | 12 + .../drivers_net_wireless_libertas_if_usb.c | 12 + .../drivers_net_wireless_libertas_tf_if_usb.c | 12 + ...drivers_net_wireless_orinoco_orinoco_usb.c | 12 + .../drivers_net_wireless_p54_p54usb.c | 12 + .../drivers_net_wireless_rndis_wlan.c | 12 + .../drivers_net_wireless_rt2x00_rt2500usb.c | 12 + .../drivers_net_wireless_rt2x00_rt2800usb.c | 12 + .../drivers_net_wireless_rt2x00_rt73usb.c | 12 + ...drivers_net_wireless_rtl818x_rtl8187_dev.c | 12 + ...rivers_net_wireless_rtlwifi_rtl8192cu_sw.c | 12 + .../drivers_net_wireless_zd1211rw_zd_usb.c | 12 + .../network/63-tty-termios.patch | 49 - .../network/63-tty-termios/INFO | 21 + .../drivers_bluetooth_hci_ath.c | 14 + .../63-tty-termios/net_bluetooth_rfcomm_tty.c | 14 + .../network/64-b44-32bit-stats/INFO | 14 + .../drivers_net_ethernet_broadcom_b44.c} | 18 +- .../network/65-ignore-dismantle/INFO | 9 + .../drivers_net_wireless_libertas_main.c} | 11 +- .../INFO} | 11 - .../include_linux_rfkill_backport.h | 11 + .../drivers_net_wireless_ath_ath5k_led.c} | 0 .../network/67-ipv6-dev-list/INFO | 8 + .../drivers_net_wireless_iwlwifi_mvm_d3.c} | 10 +- .../network/69-wowlan-no-socket/INFO | 2 + .../net_wireless_nl80211.c} | 4 +- .../network/70-umode_t-api-change.patch | 28 - .../drivers_gpu_drm_drm_sysfs.c | 14 + .../drivers_net_wireless_ath_ath9k_debug.c | 14 + .../drivers_net_wireless_ti_wlcore_main.c} | 2 +- .../network/99-change-makefiles.patch | 102 -- .../network/99-change-makefiles/INFO | 5 + .../drivers_misc_eeprom_Makefile | 10 + .../drivers_net_usb_Makefile | 38 + .../drivers_net_wireless_Makefile | 35 + .../99-change-makefiles/net_wireless_Makefile | 14 + 473 files changed, 8218 insertions(+), 8198 deletions(-) create mode 100755 lib/splitpatch.py rename patches/collateral-evolutions/drm/{0001-fb-info-vt_switch.patch => 0001-fb-info-vt_switch/INFO} (80%) create mode 100644 patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.c delete mode 100644 patches/collateral-evolutions/drm/01-dma_buf_ops-addition.patch create mode 100644 patches/collateral-evolutions/drm/01-dma_buf_ops-addition/INFO create mode 100644 patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_drm_prime.c create mode 100644 patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_i915_i915_gem_dmabuf.c delete mode 100644 patches/collateral-evolutions/drm/02-revert-vm_mmap.patch create mode 100644 patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO create mode 100644 patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.c create mode 100644 patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.c create mode 100644 patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i915_i915_gem.c delete mode 100644 patches/collateral-evolutions/drm/03-swiotlb.patch create mode 100644 patches/collateral-evolutions/drm/03-swiotlb/INFO create mode 100644 patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_nouveau_nouveau_bo.c create mode 100644 patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_radeon_radeon_ttm.c delete mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support.patch create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/INFO create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_drv.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_fops.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_gem.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_prime.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_drv.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem_dmabuf.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_bo.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_drm.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_gem.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_prime.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_drv.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_gem.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_prime.c create mode 100644 patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_ttm.c create mode 100644 patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/INFO rename patches/collateral-evolutions/drm/{05-i915-define-acpi-video-class.patch => 05-i915-define-acpi-video-class/drivers_gpu_drm_i915_intel_opregion.c} (62%) delete mode 100644 patches/collateral-evolutions/drm/06-rename-config-options.patch create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ast_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_cirrus_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_drm_crtc_helper.c create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_gma500_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i2c_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i810_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i915_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_mgag200_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_nouveau_display.h create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_radeon_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ttm_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_via_Makefile create mode 100644 patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_vmwgfx_Makefile rename patches/collateral-evolutions/drm/{07-intel-gtt.patch => 07-intel-gtt/INFO} (64%) create mode 100644 patches/collateral-evolutions/drm/07-intel-gtt/drivers_gpu_drm_i915_i915_gem.c rename patches/collateral-evolutions/drm/{08-shmem_truncate_range.patch => 08-shmem_truncate_range/INFO} (70%) create mode 100644 patches/collateral-evolutions/drm/08-shmem_truncate_range/drivers_gpu_drm_i915_i915_gem.c delete mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars.patch create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/INFO create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_core_option.c create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_client.h create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_device.h create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engctx.h create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engine.h create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_gpuobj.h create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_namedb.h create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_object.h create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_parent.h create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_printk.h create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_subdev.h create mode 100644 patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_subdev_instmem.h create mode 100644 patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO rename patches/collateral-evolutions/drm/{10-radeon-revert-acpi-table-size-check.patch => 10-radeon-revert-acpi-table-size-check/drivers_gpu_drm_radeon_radeon_bios.c} (81%) rename patches/collateral-evolutions/drm/{11-videomode-includes.patch => 11-videomode-includes/drivers_gpu_drm_drm_modes.c} (100%) delete mode 100644 patches/collateral-evolutions/drm/98-pr_fmt.patch create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/INFO create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_drm_fb_helper.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_dma.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_irq.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_opregion.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_panel.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_agp_backend.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo_vm.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_memory.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_object.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc_dma.c create mode 100644 patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_tt.c create mode 100644 patches/collateral-evolutions/drm/99-change-makefile/INFO rename patches/collateral-evolutions/drm/{99-change-makefile.patch => 99-change-makefile/drivers_gpu_drm_Makefile} (89%) delete mode 100644 patches/collateral-evolutions/network/0001-netdev_ops.patch create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/INFO create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atl1c_atl1c_main.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atl1e_atl1e_main.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atlx_atl1.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atlx_atl2.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_broadcom_b44.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_usb_rndis_host.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_usb_usbnet.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ath_ath6kl_main.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ath_wil6210_netdev.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ipw2x00_ipw2100.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ipw2x00_ipw2200.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_libertas_main.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_libertas_mesh.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_mac80211_hwsim.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_mwifiex_main.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_orinoco_main.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_rndis_wlan.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/net_bluetooth_bnep_netdev.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/net_mac80211_iface.c create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/net_wireless_wext-core.c delete mode 100644 patches/collateral-evolutions/network/0002-net-misc.patch create mode 100644 patches/collateral-evolutions/network/0002-net-misc/INFO create mode 100644 patches/collateral-evolutions/network/0002-net-misc/drivers_net_usb_rndis_host.c create mode 100644 patches/collateral-evolutions/network/0002-net-misc/drivers_net_wireless_libertas_defs.h create mode 100644 patches/collateral-evolutions/network/0002-net-misc/net_bluetooth_bnep_netdev.c create mode 100644 patches/collateral-evolutions/network/0002-net-misc/net_mac80211_iface.c delete mode 100644 patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom.patch create mode 100644 patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/INFO create mode 100644 patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/drivers_net_wireless_orinoco_main.c create mode 100644 patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/net_mac80211_iface.c create mode 100644 patches/collateral-evolutions/network/0004-wext-namespace/INFO rename patches/collateral-evolutions/network/{0004-wext-namespace.patch => 0004-wext-namespace/net_wireless_wext-core.c} (83%) create mode 100644 patches/collateral-evolutions/network/0005-netlink-portid/INFO create mode 100644 patches/collateral-evolutions/network/0005-netlink-portid/drivers_net_wireless_mac80211_hwsim.c rename patches/collateral-evolutions/network/{0005-netlink-portid.patch => 0005-netlink-portid/net_wireless_nl80211.c} (63%) rename patches/collateral-evolutions/network/{0006-disable-dump-adjust-on-old-kernels.patch => 0006-disable-dump-adjust-on-old-kernels/INFO} (69%) create mode 100644 patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels/net_wireless_nl80211.c create mode 100644 patches/collateral-evolutions/network/02-ksize/INFO rename patches/collateral-evolutions/network/{02-ksize.patch => 02-ksize/drivers_net_wireless_orinoco_wext.c} (65%) delete mode 100644 patches/collateral-evolutions/network/03-rfkill.patch create mode 100644 patches/collateral-evolutions/network/03-rfkill/INFO create mode 100644 patches/collateral-evolutions/network/03-rfkill/net_rfkill_Makefile create mode 100644 patches/collateral-evolutions/network/03-rfkill/net_rfkill_core.c create mode 100644 patches/collateral-evolutions/network/03-rfkill/net_rfkill_input.c delete mode 100644 patches/collateral-evolutions/network/04-netns.patch create mode 100644 patches/collateral-evolutions/network/04-netns/INFO create mode 100644 patches/collateral-evolutions/network/04-netns/net_wireless_core.c create mode 100644 patches/collateral-evolutions/network/04-netns/net_wireless_nl80211.c create mode 100644 patches/collateral-evolutions/network/04-netns/net_wireless_wext-core.c create mode 100644 patches/collateral-evolutions/network/04-netns/net_wireless_wext-proc.c delete mode 100644 patches/collateral-evolutions/network/05-usb.patch create mode 100644 patches/collateral-evolutions/network/05-usb/INFO create mode 100644 patches/collateral-evolutions/network/05-usb/drivers_net_wireless_ath_ath9k_hif_usb.c create mode 100644 patches/collateral-evolutions/network/05-usb/drivers_net_wireless_p54_p54usb.c delete mode 100644 patches/collateral-evolutions/network/06-header-changes.patch create mode 100644 patches/collateral-evolutions/network/06-header-changes/INFO create mode 100644 patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ath_ath6kl_cfg80211.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ath_ath6kl_htc_pipe.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_b43_phy_common.h create mode 100644 patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_mwifiex_usb.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_rtlwifi_base.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wl1251_main.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wl1251_spi.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wlcore_event.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wlcore_scan.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/include_net_mac80211.h create mode 100644 patches/collateral-evolutions/network/06-header-changes/net_bluetooth_bnep_sock.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/net_bluetooth_hci_sock.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/net_bluetooth_hidp_sock.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/net_mac80211_key.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/net_mac80211_pm.c create mode 100644 patches/collateral-evolutions/network/06-header-changes/net_wireless_util.c create mode 100644 patches/collateral-evolutions/network/07-change-default-rate-alg/INFO rename patches/collateral-evolutions/network/{07-change-default-rate-alg.patch => 07-change-default-rate-alg/net_mac80211_rate.c} (56%) delete mode 100644 patches/collateral-evolutions/network/08-rename-config-options.patch create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/INFO create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_Makefile create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_Makefile create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_init.c create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_rc.h create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_iwlegacy_Makefile create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_iwlegacy_common.h create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_libertas_Makefile create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_mwifiex_Makefile create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ti_wl1251_Makefile create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_zd1211rw_Makefile create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/include_net_bluetooth_rfcomm.h create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_Makefile create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_hidp_Makefile create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_rfcomm_Makefile create mode 100644 patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_rfcomm_sock.c delete mode 100644 patches/collateral-evolutions/network/09-cfg80211-wext-padding.patch create mode 100644 patches/collateral-evolutions/network/09-cfg80211-wext-padding/INFO create mode 100644 patches/collateral-evolutions/network/09-cfg80211-wext-padding/include_net_cfg80211.h create mode 100644 patches/collateral-evolutions/network/09-cfg80211-wext-padding/net_wireless_core.c delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq.patch create mode 100644 patches/collateral-evolutions/network/09-threaded-irq/INFO create mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_b43.h create mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_main.c create mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_internal.h create mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_trans.c create mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main.c create mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_wlcore.h create mode 100644 patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev/INFO rename patches/collateral-evolutions/network/{10-add-wext-handlers-to-netdev.patch => 10-add-wext-handlers-to-netdev/net_wireless_core.c} (52%) delete mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops.patch create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/INFO create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_bcma_host_pci.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_atl1c_atl1c_main.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_atlx_atl1.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_ath_ath5k_pci.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_ath_ath9k_pci.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_3945-mac.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_4965-mac.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_common.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_common.h create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlwifi_pcie_drv.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_libertas_if_spi.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_p54_p54pci.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192ce_sw.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192de_sw.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192se_sw.c create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8723ae_sw.c rename patches/collateral-evolutions/network/{12-iw_handler-changes.patch => 12-iw_handler-changes/drivers_net_wireless_ipw2x00_ipw2100.c} (88%) create mode 100644 patches/collateral-evolutions/network/12-mac80211-disable-tx-status/INFO rename patches/collateral-evolutions/network/{12-mac80211-disable-tx-status.patch => 12-mac80211-disable-tx-status/net_mac80211_tx.c} (52%) delete mode 100644 patches/collateral-evolutions/network/14-device-type.patch create mode 100644 patches/collateral-evolutions/network/14-device-type/INFO create mode 100644 patches/collateral-evolutions/network/14-device-type/drivers_net_usb_usbnet.c create mode 100644 patches/collateral-evolutions/network/14-device-type/net_bluetooth_bnep_core.c create mode 100644 patches/collateral-evolutions/network/14-device-type/net_wireless_core.c create mode 100644 patches/collateral-evolutions/network/15-symbol-export-conflicts/INFO rename patches/collateral-evolutions/network/{15-symbol-export-conflicts.patch => 15-symbol-export-conflicts/net_mac80211_rx.c} (67%) delete mode 100644 patches/collateral-evolutions/network/16-bluetooth.patch create mode 100644 patches/collateral-evolutions/network/16-bluetooth/INFO create mode 100644 patches/collateral-evolutions/network/16-bluetooth/drivers_bluetooth_hci_ldisc.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_af_bluetooth.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_bnep_sock.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_cmtp_capi.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_cmtp_sock.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sock.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sysfs.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_core.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_sock.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_l2cap_sock.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_sock.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_tty.c create mode 100644 patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_sco.c create mode 100644 patches/collateral-evolutions/network/17-netdev-queue/INFO rename patches/collateral-evolutions/network/{17-netdev-queue.patch => 17-netdev-queue/net_mac80211_iface.c} (54%) delete mode 100644 patches/collateral-evolutions/network/18-rename-usb-net-symbols.patch create mode 100644 patches/collateral-evolutions/network/18-rename-usb-net-symbols/INFO create mode 100644 patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_usb_Makefile create mode 100644 patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_usb_cdc_ether.c create mode 100644 patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_wireless_Makefile create mode 100644 patches/collateral-evolutions/network/21-capi-proc_fops/INFO rename patches/collateral-evolutions/network/{21-capi-proc_fops.patch => 21-capi-proc_fops/net_bluetooth_cmtp_capi.c} (85%) rename patches/collateral-evolutions/network/{22-multiqueue.patch => 22-multiqueue/INFO} (76%) create mode 100644 patches/collateral-evolutions/network/22-multiqueue/net_mac80211_tx.c delete mode 100644 patches/collateral-evolutions/network/24-pcmcia.patch create mode 100644 patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_bluecard_cs.c create mode 100644 patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_bt3c_cs.c create mode 100644 patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_btuart_cs.c create mode 100644 patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_dtl1_cs.c create mode 100644 patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_b43_pcmcia.c create mode 100644 patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_libertas_if_cs.c create mode 100644 patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_orinoco_orinoco_cs.c create mode 100644 patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_orinoco_spectrum_cs.c create mode 100644 patches/collateral-evolutions/network/24-pcmcia/drivers_ssb_main.c delete mode 100644 patches/collateral-evolutions/network/25-multicast-list_head.patch create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/INFO create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atl1c_atl1c_main.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atl1e_atl1e_main.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atlx_atl2.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atlx_atlx.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_broadcom_b44.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_adm8211.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_ath5k_mac80211-ops.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_ath6kl_main.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_carl9170_main.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_brcm80211_brcmfmac_dhd_linux.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_libertas_main.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_libertas_tf_main.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwifiex_debugfs.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwifiex_sta_ioctl.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwl8k.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_orinoco_hw.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_orinoco_hw.h create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_p54_main.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rndis_wlan.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rtl818x_rtl8180_dev.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rtl818x_rtl8187_dev.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ti_wlcore_main.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_zd1211rw_zd_mac.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/include_net_mac80211.h create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/net_bluetooth_bnep_netdev.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_driver-ops.h create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_ieee80211_i.h create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_iface.c create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_main.c delete mode 100644 patches/collateral-evolutions/network/26-sdio-quirks.patch create mode 100644 patches/collateral-evolutions/network/26-sdio-quirks/INFO create mode 100644 patches/collateral-evolutions/network/26-sdio-quirks/drivers_net_wireless_libertas_if_sdio.c create mode 100644 patches/collateral-evolutions/network/26-sdio-quirks/drivers_net_wireless_mwifiex_sdio.c delete mode 100644 patches/collateral-evolutions/network/27-hermes-read-pda-conflict.patch create mode 100644 patches/collateral-evolutions/network/27-hermes-read-pda-conflict/INFO create mode 100644 patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_fw.c create mode 100644 patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_hermes.c create mode 100644 patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_hermes.h create mode 100644 patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_orinoco_usb.c delete mode 100644 patches/collateral-evolutions/network/29-sdio_no_suspend.patch create mode 100644 patches/collateral-evolutions/network/29-sdio_no_suspend/INFO create mode 100644 patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_bluetooth_btmrvl_sdio.c create mode 100644 patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_ath_ath6kl_sdio.c create mode 100644 patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_brcm80211_brcmfmac_bcmsdh_sdmmc.c create mode 100644 patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_libertas_if_sdio.c create mode 100644 patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_mwifiex_sdio.c rename patches/collateral-evolutions/network/{30-bridge-port.patch => 30-bridge-port/INFO} (56%) create mode 100644 patches/collateral-evolutions/network/30-bridge-port/net_wireless_nl80211.c create mode 100644 patches/collateral-evolutions/network/30-bridge-port/net_wireless_util.c rename patches/collateral-evolutions/network/{32-remove-ns-type.patch => 32-remove-ns-type/net_wireless_sysfs.c} (83%) delete mode 100644 patches/collateral-evolutions/network/35-fix-makefile-includes.patch create mode 100644 patches/collateral-evolutions/network/35-fix-makefile-includes/INFO create mode 100644 patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmfmac_Makefile create mode 100644 patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmsmac_Makefile create mode 100644 patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmutil_Makefile create mode 100644 patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_rtl818x_rtl8180_Makefile create mode 100644 patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_rtl818x_rtl8187_Makefile create mode 100644 patches/collateral-evolutions/network/35-fix-makefile-includes/net_wireless_Makefile create mode 100644 patches/collateral-evolutions/network/36-workqueue/INFO rename patches/collateral-evolutions/network/{36-workqueue.patch => 36-workqueue/net_mac80211_main.c} (58%) rename patches/collateral-evolutions/network/{37-vsnprintk.patch => 37-vsnprintk/drivers_net_wireless_ath_main.c} (84%) delete mode 100644 patches/collateral-evolutions/network/38-led-max-brightness.patch create mode 100644 patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlegacy_common.c create mode 100644 patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlwifi_dvm_led.c create mode 100644 patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlwifi_mvm_led.c delete mode 100644 patches/collateral-evolutions/network/39-remove_blink_set.patch create mode 100644 patches/collateral-evolutions/network/39-remove_blink_set/drivers_net_wireless_iwlegacy_common.c create mode 100644 patches/collateral-evolutions/network/39-remove_blink_set/drivers_net_wireless_iwlwifi_dvm_led.c delete mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features.patch create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/INFO create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1c_atl1c_ethtool.c create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1c_atl1c_main.c create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1e_atl1e_ethtool.c create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1e_atl1e_main.c create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atl1.c create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atl2.c create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atlx.c create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_wireless_ath_ath6kl_main.c rename patches/collateral-evolutions/network/{42-netlink_seq.patch => 42-netlink_seq/net_wireless_nl80211.c} (82%) rename patches/collateral-evolutions/network/{43-rename_pm_qos_request.patch => 43-rename_pm_qos_request/drivers_net_wireless_ipw2x00_ipw2100.c} (87%) create mode 100644 patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/INFO create mode 100644 patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/net_mac80211_Makefile rename patches/collateral-evolutions/network/{44-deactivate-mac80211-tracing.patch => 44-deactivate-mac80211-tracing/net_wireless_Makefile} (56%) rename patches/collateral-evolutions/network/{45-remove-platform-id-table.patch => 45-remove-platform-id-table/drivers_net_wireless_ti_wl12xx_main.c} (95%) create mode 100644 patches/collateral-evolutions/network/46-use_other_workqueue/INFO rename patches/collateral-evolutions/network/{46-use_other_workqueue.patch => 46-use_other_workqueue/net_bluetooth_hci_core.c} (78%) create mode 100644 patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue/INFO rename patches/collateral-evolutions/network/{47-no_trans_start_on_netdev_queue.patch => 47-no_trans_start_on_netdev_queue/drivers_net_wireless_mwifiex_init.c} (57%) delete mode 100644 patches/collateral-evolutions/network/48-use_skb_get_queue_mapping.patch create mode 100644 patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/INFO create mode 100644 patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/drivers_net_wireless_b43_main.c create mode 100644 patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/drivers_net_wireless_b43legacy_main.c create mode 100644 patches/collateral-evolutions/network/50-libertas-olpc-ec-wakeup/INFO rename patches/collateral-evolutions/network/{50-libertas-olpc-ec-wakeup.patch => 50-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.c} (50%) rename patches/collateral-evolutions/network/{52-tty-dev.patch => 52-tty-dev/INFO} (57%) create mode 100644 patches/collateral-evolutions/network/52-tty-dev/drivers_bluetooth_hci_ldisc.c delete mode 100644 patches/collateral-evolutions/network/53-pr_fmt.patch create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/INFO create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_bcma_bcma_private.h create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_ethernet_broadcom_b44.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_ani.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_attach.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_base.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_debug.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_desc.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_dma.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_eeprom.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_initvals.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_led.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_mac80211-ops.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_pci.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_phy.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_qcu.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_reset.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_sysfs.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_cfg80211.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_init.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_main.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_txrx.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_htc_drv_init.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_htc_hst.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_init.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_pci.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_main.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_regd.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_aiutils.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_mac80211_if.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_main.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_phy_phy_n.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmutil_utils.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlegacy_3945-mac.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlegacy_4965-mac.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlwifi_dvm_main.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlwifi_pcie_drv.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_cfg.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_cs.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_sdio.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_spi.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_usb.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_main.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_mesh.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_rx.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_cmd.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_if_usb.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_main.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_rtlwifi_wifi.h create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/net_bluetooth_lib.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/net_wireless_core.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/net_wireless_lib80211.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/net_wireless_lib80211_crypt_tkip.c create mode 100644 patches/collateral-evolutions/network/53-pr_fmt/net_wireless_reg.c rename patches/collateral-evolutions/network/{54-get_ts_info.patch => 54-get_ts_info/INFO} (72%) create mode 100644 patches/collateral-evolutions/network/54-get_ts_info/drivers_net_usb_usbnet.c create mode 100644 patches/collateral-evolutions/network/55-iwlwifi-msg-trace-fix/INFO rename patches/collateral-evolutions/network/{55-iwlwifi-msg-trace-fix.patch => 55-iwlwifi-msg-trace-fix/drivers_net_wireless_iwlwifi_iwl-debug.c} (77%) rename patches/collateral-evolutions/network/{56-mac80211-trace-fix.patch => 56-mac80211-trace-fix/net_mac80211_trace.c} (83%) create mode 100644 patches/collateral-evolutions/network/57-iwlwifi-debug-fix/INFO rename patches/collateral-evolutions/network/{57-iwlwifi-debug-fix.patch => 57-iwlwifi-debug-fix/drivers_net_wireless_iwlwifi_iwl-debug.c} (58%) delete mode 100644 patches/collateral-evolutions/network/61-netdev-addr_assign_type.patch create mode 100644 patches/collateral-evolutions/network/61-netdev-addr_assign_type/INFO create mode 100644 patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_atl1c_atl1c_main.c create mode 100644 patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_atlx_atl1.c delete mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm.patch create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_ath3k.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bcm203x.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bfusb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bpa10x.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_btusb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ether.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_rndis_host.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_at76c50x-usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_ath6kl_usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_ath9k_hif_usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_carl9170_usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_brcm80211_brcmfmac_usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_libertas_if_usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_libertas_tf_if_usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_orinoco_orinoco_usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_p54_p54usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rndis_wlan.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt2500usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt2800usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt73usb.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtl818x_rtl8187_dev.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtlwifi_rtl8192cu_sw.c create mode 100644 patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_zd1211rw_zd_usb.c delete mode 100644 patches/collateral-evolutions/network/63-tty-termios.patch create mode 100644 patches/collateral-evolutions/network/63-tty-termios/INFO create mode 100644 patches/collateral-evolutions/network/63-tty-termios/drivers_bluetooth_hci_ath.c create mode 100644 patches/collateral-evolutions/network/63-tty-termios/net_bluetooth_rfcomm_tty.c create mode 100644 patches/collateral-evolutions/network/64-b44-32bit-stats/INFO rename patches/collateral-evolutions/network/{64-b44-32bit-stats.patch => 64-b44-32bit-stats/drivers_net_ethernet_broadcom_b44.c} (65%) create mode 100644 patches/collateral-evolutions/network/65-ignore-dismantle/INFO rename patches/collateral-evolutions/network/{65-ignore-dismantle.patch => 65-ignore-dismantle/drivers_net_wireless_libertas_main.c} (50%) rename patches/collateral-evolutions/network/{66-uapi-changes.patch => 66-uapi-changes/INFO} (75%) create mode 100644 patches/collateral-evolutions/network/66-uapi-changes/include_linux_rfkill_backport.h rename patches/collateral-evolutions/network/{67-fix-section-mismatch.patch => 67-fix-section-mismatch/drivers_net_wireless_ath_ath5k_led.c} (100%) create mode 100644 patches/collateral-evolutions/network/67-ipv6-dev-list/INFO rename patches/collateral-evolutions/network/{67-ipv6-dev-list.patch => 67-ipv6-dev-list/drivers_net_wireless_iwlwifi_mvm_d3.c} (61%) create mode 100644 patches/collateral-evolutions/network/69-wowlan-no-socket/INFO rename patches/collateral-evolutions/network/{69-wowlan-no-socket.patch => 69-wowlan-no-socket/net_wireless_nl80211.c} (75%) delete mode 100644 patches/collateral-evolutions/network/70-umode_t-api-change.patch create mode 100644 patches/collateral-evolutions/network/70-umode_t-api-change/drivers_gpu_drm_drm_sysfs.c create mode 100644 patches/collateral-evolutions/network/70-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.c rename patches/collateral-evolutions/network/{71-bin_attribute-api-change.patch => 71-bin_attribute-api-change/drivers_net_wireless_ti_wlcore_main.c} (88%) delete mode 100644 patches/collateral-evolutions/network/99-change-makefiles.patch create mode 100644 patches/collateral-evolutions/network/99-change-makefiles/INFO create mode 100644 patches/collateral-evolutions/network/99-change-makefiles/drivers_misc_eeprom_Makefile create mode 100644 patches/collateral-evolutions/network/99-change-makefiles/drivers_net_usb_Makefile create mode 100644 patches/collateral-evolutions/network/99-change-makefiles/drivers_net_wireless_Makefile create mode 100644 patches/collateral-evolutions/network/99-change-makefiles/net_wireless_Makefile diff --git a/lib/splitpatch.py b/lib/splitpatch.py new file mode 100755 index 000000000000..09e5814d4f69 --- /dev/null +++ b/lib/splitpatch.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +import patch, sys + +ps = patch.fromfile(sys.argv[1]) +f = open('INFO', 'w') +f.write(''.join(ps.items[0].header)) +f.close() + +for p in ps.items: + s = p.source[2:].replace('/', '_') + f = open(s, 'w') + f.write('--- %s\n' % p.source) + f.write('+++ %s\n' % p.target) + for h in p.hunks: + f.write('@@ -%d,%d +%d,%d @@\n' % ( + h.startsrc, h.linessrc, + h.starttgt, h.linestgt)) + f.write(''.join(h.text)) + f.close() diff --git a/patches/collateral-evolutions/drm/0001-fb-info-vt_switch.patch b/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/INFO similarity index 80% rename from patches/collateral-evolutions/drm/0001-fb-info-vt_switch.patch rename to patches/collateral-evolutions/drm/0001-fb-info-vt_switch/INFO index ae1b2cb3989e..cb9dd679d214 100644 --- a/patches/collateral-evolutions/drm/0001-fb-info-vt_switch.patch +++ b/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/INFO @@ -42,14 +42,3 @@ Date: Tue Mar 26 09:25:45 2013 -0700 Reviewed-by: Rodrigo Vivi Signed-off-by: Daniel Vetter ---- a/drivers/gpu/drm/i915/intel_fb.c -+++ b/drivers/gpu/drm/i915/intel_fb.c -@@ -151,7 +151,7 @@ static int intelfb_create(struct drm_fb_ - info->screen_size = size; - - /* This driver doesn't need a VT switch to restore the mode on resume */ -- info->skip_vt_switch = true; -+ fb_enable_skip_vt_switch(info); - - drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); - drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); diff --git a/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.c b/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.c new file mode 100644 index 000000000000..2038f5622f03 --- /dev/null +++ b/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.c @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/i915/intel_fb.c ++++ b/drivers/gpu/drm/i915/intel_fb.c +@@ -151,7 +151,7 @@ + info->screen_size = size; + + /* This driver doesn't need a VT switch to restore the mode on resume */ +- info->skip_vt_switch = true; ++ fb_enable_skip_vt_switch(info); + + drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); + drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); diff --git a/patches/collateral-evolutions/drm/01-dma_buf_ops-addition.patch b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition.patch deleted file mode 100644 index 3493e12b7422..000000000000 --- a/patches/collateral-evolutions/drm/01-dma_buf_ops-addition.patch +++ /dev/null @@ -1,41 +0,0 @@ -Assign vmap, vunmap and mmap fields in dma_buf_ops structs only -if kernel version >= 3.5.0 as they are added in 3.5. The begin_cpu_access -was added as of the original dma-buf code via 3.4. - -mcgrof@frijol ~/linux-next (git::master)$ git describe --contains fc13020e086bfedf2afb95c91c026d5af1f80107 -v3.4-rc1~57^2~3 - -Note that the dma-buf itself was added with 3.4. It is not available -on kernels < 3.4. - ---- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c -+++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c -@@ -216,10 +216,14 @@ static const struct dma_buf_ops i915_dma - .kmap_atomic = i915_gem_dmabuf_kmap_atomic, - .kunmap = i915_gem_dmabuf_kunmap, - .kunmap_atomic = i915_gem_dmabuf_kunmap_atomic, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .mmap = i915_gem_dmabuf_mmap, - .vmap = i915_gem_dmabuf_vmap, - .vunmap = i915_gem_dmabuf_vunmap, -+#endif -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - .begin_cpu_access = i915_gem_begin_cpu_access, -+#endif - }; - - struct dma_buf *i915_gem_prime_export(struct drm_device *dev, ---- a/drivers/gpu/drm/drm_prime.c -+++ b/drivers/gpu/drm/drm_prime.c -@@ -152,9 +152,11 @@ static const struct dma_buf_ops drm_gem_ - .kmap_atomic = drm_gem_dmabuf_kmap_atomic, - .kunmap = drm_gem_dmabuf_kunmap, - .kunmap_atomic = drm_gem_dmabuf_kunmap_atomic, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .mmap = drm_gem_dmabuf_mmap, - .vmap = drm_gem_dmabuf_vmap, - .vunmap = drm_gem_dmabuf_vunmap, -+#endif - }; - - /** diff --git a/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/INFO b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/INFO new file mode 100644 index 000000000000..d46c6b1b8db5 --- /dev/null +++ b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/INFO @@ -0,0 +1,10 @@ +Assign vmap, vunmap and mmap fields in dma_buf_ops structs only +if kernel version >= 3.5.0 as they are added in 3.5. The begin_cpu_access +was added as of the original dma-buf code via 3.4. + +mcgrof@frijol ~/linux-next (git::master)$ git describe --contains fc13020e086bfedf2afb95c91c026d5af1f80107 +v3.4-rc1~57^2~3 + +Note that the dma-buf itself was added with 3.4. It is not available +on kernels < 3.4. + diff --git a/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_drm_prime.c b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_drm_prime.c new file mode 100644 index 000000000000..cb332cacc40f --- /dev/null +++ b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_drm_prime.c @@ -0,0 +1,14 @@ +--- a/drivers/gpu/drm/drm_prime.c ++++ b/drivers/gpu/drm/drm_prime.c +@@ -152,9 +152,11 @@ + .kmap_atomic = drm_gem_dmabuf_kmap_atomic, + .kunmap = drm_gem_dmabuf_kunmap, + .kunmap_atomic = drm_gem_dmabuf_kunmap_atomic, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .mmap = drm_gem_dmabuf_mmap, + .vmap = drm_gem_dmabuf_vmap, + .vunmap = drm_gem_dmabuf_vunmap, ++#endif + }; + + /** diff --git a/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_i915_i915_gem_dmabuf.c b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_i915_i915_gem_dmabuf.c new file mode 100644 index 000000000000..48a2537740f7 --- /dev/null +++ b/patches/collateral-evolutions/drm/01-dma_buf_ops-addition/drivers_gpu_drm_i915_i915_gem_dmabuf.c @@ -0,0 +1,17 @@ +--- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c ++++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c +@@ -216,10 +216,14 @@ + .kmap_atomic = i915_gem_dmabuf_kmap_atomic, + .kunmap = i915_gem_dmabuf_kunmap, + .kunmap_atomic = i915_gem_dmabuf_kunmap_atomic, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .mmap = i915_gem_dmabuf_mmap, + .vmap = i915_gem_dmabuf_vmap, + .vunmap = i915_gem_dmabuf_vunmap, ++#endif ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + .begin_cpu_access = i915_gem_begin_cpu_access, ++#endif + }; + + struct dma_buf *i915_gem_prime_export(struct drm_device *dev, diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap.patch b/patches/collateral-evolutions/drm/02-revert-vm_mmap.patch deleted file mode 100644 index 81fc1cc93b76..000000000000 --- a/patches/collateral-evolutions/drm/02-revert-vm_mmap.patch +++ /dev/null @@ -1,94 +0,0 @@ -vm_mmap() and vm_munmap() were introduced in kernels >= 3.4.0. Revert -those changes for versions older than that. - -These can't be backported as they rely on non-exported symbols. - ---- a/drivers/gpu/drm/drm_bufs.c -+++ b/drivers/gpu/drm/drm_bufs.c -@@ -1541,6 +1541,20 @@ int drm_mapbufs(struct drm_device *dev, - retcode = -EINVAL; - goto done; - } -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ virtual = do_mmap(file_priv->filp, 0, map->size, -+ PROT_READ | PROT_WRITE, -+ MAP_SHARED, -+ token); -+ up_write(¤t->mm->mmap_sem); -+ } else { -+ down_write(¤t->mm->mmap_sem); -+ virtual = do_mmap(file_priv->filp, 0, dma->byte_count, -+ PROT_READ | PROT_WRITE, -+ MAP_SHARED, 0); -+ up_write(¤t->mm->mmap_sem); -+#else - virtual = vm_mmap(file_priv->filp, 0, map->size, - PROT_READ | PROT_WRITE, - MAP_SHARED, -@@ -1549,6 +1563,7 @@ int drm_mapbufs(struct drm_device *dev, - virtual = vm_mmap(file_priv->filp, 0, dma->byte_count, - PROT_READ | PROT_WRITE, - MAP_SHARED, 0); -+#endif - } - if (virtual > -1024UL) { - /* Real error */ ---- a/drivers/gpu/drm/i810/i810_dma.c -+++ b/drivers/gpu/drm/i810/i810_dma.c -@@ -135,9 +135,17 @@ static int i810_map_buffer(struct drm_bu - old_fops = file_priv->filp->f_op; - file_priv->filp->f_op = &i810_buffer_fops; - dev_priv->mmap_buffer = buf; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ buf_priv->virtual = (void *)do_mmap(file_priv->filp, 0, buf->total, -+ PROT_READ | PROT_WRITE, -+ MAP_SHARED, buf->bus_address); -+ up_write(¤t->mm->mmap_sem); -+#else - buf_priv->virtual = (void *)vm_mmap(file_priv->filp, 0, buf->total, - PROT_READ | PROT_WRITE, - MAP_SHARED, buf->bus_address); -+#endif - dev_priv->mmap_buffer = NULL; - file_priv->filp->f_op = old_fops; - if (IS_ERR(buf_priv->virtual)) { -@@ -158,9 +166,15 @@ static int i810_unmap_buffer(struct drm_ - if (buf_priv->currently_mapped != I810_BUF_MAPPED) - return -EINVAL; - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ retcode = do_munmap(current->mm, (unsigned long)buf_priv->virtual, -+ (size_t) buf->total); -+ up_write(¤t->mm->mmap_sem); -+#else - retcode = vm_munmap((unsigned long)buf_priv->virtual, - (size_t) buf->total); -- -+#endif - buf_priv->currently_mapped = I810_BUF_UNMAPPED; - buf_priv->virtual = NULL; - ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -1294,10 +1294,17 @@ i915_gem_mmap_ioctl(struct drm_device *d - drm_gem_object_unreference_unlocked(obj); - return -EINVAL; - } -- -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ addr = do_mmap(obj->filp, 0, args->size, -+ PROT_READ | PROT_WRITE, MAP_SHARED, -+ args->offset); -+ up_write(¤t->mm->mmap_sem); -+#else - addr = vm_mmap(obj->filp, 0, args->size, - PROT_READ | PROT_WRITE, MAP_SHARED, - args->offset); -+#endif - drm_gem_object_unreference_unlocked(obj); - if (IS_ERR((void *)addr)) - return addr; diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO b/patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO new file mode 100644 index 000000000000..977b4b79fe31 --- /dev/null +++ b/patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO @@ -0,0 +1,5 @@ +vm_mmap() and vm_munmap() were introduced in kernels >= 3.4.0. Revert +those changes for versions older than that. + +These can't be backported as they rely on non-exported symbols. + diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.c b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.c new file mode 100644 index 000000000000..af4681c37ffc --- /dev/null +++ b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.c @@ -0,0 +1,31 @@ +--- a/drivers/gpu/drm/drm_bufs.c ++++ b/drivers/gpu/drm/drm_bufs.c +@@ -1541,6 +1541,20 @@ + retcode = -EINVAL; + goto done; + } ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) ++ down_write(¤t->mm->mmap_sem); ++ virtual = do_mmap(file_priv->filp, 0, map->size, ++ PROT_READ | PROT_WRITE, ++ MAP_SHARED, ++ token); ++ up_write(¤t->mm->mmap_sem); ++ } else { ++ down_write(¤t->mm->mmap_sem); ++ virtual = do_mmap(file_priv->filp, 0, dma->byte_count, ++ PROT_READ | PROT_WRITE, ++ MAP_SHARED, 0); ++ up_write(¤t->mm->mmap_sem); ++#else + virtual = vm_mmap(file_priv->filp, 0, map->size, + PROT_READ | PROT_WRITE, + MAP_SHARED, +@@ -1549,6 +1563,7 @@ + virtual = vm_mmap(file_priv->filp, 0, dma->byte_count, + PROT_READ | PROT_WRITE, + MAP_SHARED, 0); ++#endif + } + if (virtual > -1024UL) { + /* Real error */ diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.c b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.c new file mode 100644 index 000000000000..c27615ef05ae --- /dev/null +++ b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.c @@ -0,0 +1,37 @@ +--- a/drivers/gpu/drm/i810/i810_dma.c ++++ b/drivers/gpu/drm/i810/i810_dma.c +@@ -135,9 +135,17 @@ + old_fops = file_priv->filp->f_op; + file_priv->filp->f_op = &i810_buffer_fops; + dev_priv->mmap_buffer = buf; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) ++ down_write(¤t->mm->mmap_sem); ++ buf_priv->virtual = (void *)do_mmap(file_priv->filp, 0, buf->total, ++ PROT_READ | PROT_WRITE, ++ MAP_SHARED, buf->bus_address); ++ up_write(¤t->mm->mmap_sem); ++#else + buf_priv->virtual = (void *)vm_mmap(file_priv->filp, 0, buf->total, + PROT_READ | PROT_WRITE, + MAP_SHARED, buf->bus_address); ++#endif + dev_priv->mmap_buffer = NULL; + file_priv->filp->f_op = old_fops; + if (IS_ERR(buf_priv->virtual)) { +@@ -158,9 +166,15 @@ + if (buf_priv->currently_mapped != I810_BUF_MAPPED) + return -EINVAL; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) ++ down_write(¤t->mm->mmap_sem); ++ retcode = do_munmap(current->mm, (unsigned long)buf_priv->virtual, ++ (size_t) buf->total); ++ up_write(¤t->mm->mmap_sem); ++#else + retcode = vm_munmap((unsigned long)buf_priv->virtual, + (size_t) buf->total); +- ++#endif + buf_priv->currently_mapped = I810_BUF_UNMAPPED; + buf_priv->virtual = NULL; + diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i915_i915_gem.c b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i915_i915_gem.c new file mode 100644 index 000000000000..d29b39b7b36a --- /dev/null +++ b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i915_i915_gem.c @@ -0,0 +1,21 @@ +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -1294,10 +1294,17 @@ + drm_gem_object_unreference_unlocked(obj); + return -EINVAL; + } +- ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) ++ down_write(¤t->mm->mmap_sem); ++ addr = do_mmap(obj->filp, 0, args->size, ++ PROT_READ | PROT_WRITE, MAP_SHARED, ++ args->offset); ++ up_write(¤t->mm->mmap_sem); ++#else + addr = vm_mmap(obj->filp, 0, args->size, + PROT_READ | PROT_WRITE, MAP_SHARED, + args->offset); ++#endif + drm_gem_object_unreference_unlocked(obj); + if (IS_ERR((void *)addr)) + return addr; diff --git a/patches/collateral-evolutions/drm/03-swiotlb.patch b/patches/collateral-evolutions/drm/03-swiotlb.patch deleted file mode 100644 index 8554da5421b6..000000000000 --- a/patches/collateral-evolutions/drm/03-swiotlb.patch +++ /dev/null @@ -1,83 +0,0 @@ - -swiotlb_nr_tbl() was available since 3.2 but was exported since 3.3. -Since it uses an internal global state variable, it is impossible -to backport it to compat.git. So revert the changes. - ---- a/drivers/gpu/drm/nouveau/nouveau_bo.c -+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c -@@ -1374,11 +1374,13 @@ nouveau_ttm_tt_populate(struct ttm_tt *t - } - #endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) { - return ttm_dma_populate((void *)ttm, dev->dev); - } - #endif -+#endif - - r = ttm_pool_populate(ttm); - if (r) { -@@ -1424,12 +1426,14 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt - } - #endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) { - ttm_dma_unpopulate((void *)ttm, dev->dev); - return; - } - #endif -+#endif - - for (i = 0; i < ttm->num_pages; i++) { - if (ttm_dma->dma_address[i]) { ---- a/drivers/gpu/drm/radeon/radeon_ttm.c -+++ b/drivers/gpu/drm/radeon/radeon_ttm.c -@@ -603,11 +603,13 @@ static int radeon_ttm_tt_populate(struct - } - #endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) { - return ttm_dma_populate(>t->ttm, rdev->dev); - } - #endif -+#endif - - r = ttm_pool_populate(ttm); - if (r) { -@@ -649,12 +651,14 @@ static void radeon_ttm_tt_unpopulate(str - } - #endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) { - ttm_dma_unpopulate(>t->ttm, rdev->dev); - return; - } - #endif -+#endif - - for (i = 0; i < ttm->num_pages; i++) { - if (gtt->ttm.dma_address[i]) { -@@ -877,6 +881,7 @@ static int radeon_ttm_debugfs_init(struc - radeon_mem_types_list[i].show = &ttm_page_alloc_debugfs; - radeon_mem_types_list[i].driver_features = 0; - radeon_mem_types_list[i++].data = NULL; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) { - sprintf(radeon_mem_types_names[i], "ttm_dma_page_pool"); -@@ -886,6 +891,7 @@ static int radeon_ttm_debugfs_init(struc - radeon_mem_types_list[i++].data = NULL; - } - #endif -+#endif - return radeon_debugfs_add_files(rdev, radeon_mem_types_list, i); - - #endif diff --git a/patches/collateral-evolutions/drm/03-swiotlb/INFO b/patches/collateral-evolutions/drm/03-swiotlb/INFO new file mode 100644 index 000000000000..5b7265f0fc2a --- /dev/null +++ b/patches/collateral-evolutions/drm/03-swiotlb/INFO @@ -0,0 +1,5 @@ + +swiotlb_nr_tbl() was available since 3.2 but was exported since 3.3. +Since it uses an internal global state variable, it is impossible +to backport it to compat.git. So revert the changes. + diff --git a/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_nouveau_nouveau_bo.c b/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_nouveau_nouveau_bo.c new file mode 100644 index 000000000000..b8dd50698f9c --- /dev/null +++ b/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_nouveau_nouveau_bo.c @@ -0,0 +1,31 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_bo.c ++++ b/drivers/gpu/drm/nouveau/nouveau_bo.c +@@ -1374,11 +1374,13 @@ + } + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + #ifdef CONFIG_SWIOTLB + if (swiotlb_nr_tbl()) { + return ttm_dma_populate((void *)ttm, dev->dev); + } + #endif ++#endif + + r = ttm_pool_populate(ttm); + if (r) { +@@ -1424,12 +1426,14 @@ + } + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + #ifdef CONFIG_SWIOTLB + if (swiotlb_nr_tbl()) { + ttm_dma_unpopulate((void *)ttm, dev->dev); + return; + } + #endif ++#endif + + for (i = 0; i < ttm->num_pages; i++) { + if (ttm_dma->dma_address[i]) { diff --git a/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_radeon_radeon_ttm.c b/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_radeon_radeon_ttm.c new file mode 100644 index 000000000000..9094dfd8ca7f --- /dev/null +++ b/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_radeon_radeon_ttm.c @@ -0,0 +1,47 @@ +--- a/drivers/gpu/drm/radeon/radeon_ttm.c ++++ b/drivers/gpu/drm/radeon/radeon_ttm.c +@@ -603,11 +603,13 @@ + } + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + #ifdef CONFIG_SWIOTLB + if (swiotlb_nr_tbl()) { + return ttm_dma_populate(>t->ttm, rdev->dev); + } + #endif ++#endif + + r = ttm_pool_populate(ttm); + if (r) { +@@ -649,12 +651,14 @@ + } + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + #ifdef CONFIG_SWIOTLB + if (swiotlb_nr_tbl()) { + ttm_dma_unpopulate(>t->ttm, rdev->dev); + return; + } + #endif ++#endif + + for (i = 0; i < ttm->num_pages; i++) { + if (gtt->ttm.dma_address[i]) { +@@ -877,6 +881,7 @@ + radeon_mem_types_list[i].show = &ttm_page_alloc_debugfs; + radeon_mem_types_list[i].driver_features = 0; + radeon_mem_types_list[i++].data = NULL; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + #ifdef CONFIG_SWIOTLB + if (swiotlb_nr_tbl()) { + sprintf(radeon_mem_types_names[i], "ttm_dma_page_pool"); +@@ -886,6 +891,7 @@ + radeon_mem_types_list[i++].data = NULL; + } + #endif ++#endif + return radeon_debugfs_add_files(rdev, radeon_mem_types_list, i); + + #endif diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support.patch b/patches/collateral-evolutions/drm/04-revert-prime-support.patch deleted file mode 100644 index 5ceeb7907333..000000000000 --- a/patches/collateral-evolutions/drm/04-revert-prime-support.patch +++ /dev/null @@ -1,347 +0,0 @@ -Disable PRIME support in core drm, radeon, nouveau and i915 for -kernels < 3.4.0. - -PRIME depends on dma-buf which is added to the kernel with 3.3 but -the one in 3.3 is mostly stub, e.g. it is a skeleton API which -is highly modified in 3.4. So disable PRIME for kernels < 3.4.0, -not < 3.3.0. - ---- a/drivers/gpu/drm/drm_drv.c -+++ b/drivers/gpu/drm/drm_drv.c -@@ -137,8 +137,10 @@ static struct drm_ioctl_desc drm_ioctls[ - - DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, DRM_CONTROL_ALLOW|DRM_UNLOCKED), - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_AUTH|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_AUTH|DRM_UNLOCKED), -+#endif - - DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPLANERESOURCES, drm_mode_getplane_res, DRM_CONTROL_ALLOW|DRM_UNLOCKED), - DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, DRM_CONTROL_ALLOW|DRM_UNLOCKED), ---- a/drivers/gpu/drm/drm_fops.c -+++ b/drivers/gpu/drm/drm_fops.c -@@ -284,8 +284,10 @@ static int drm_open_helper(struct inode - if (dev->driver->driver_features & DRIVER_GEM) - drm_gem_open(dev, priv); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (drm_core_check_feature(dev, DRIVER_PRIME)) - drm_prime_init_file_private(&priv->prime); -+#endif - - if (dev->driver->open) { - ret = dev->driver->open(dev, priv); -@@ -538,8 +540,10 @@ int drm_release(struct inode *inode, str - if (dev->driver->postclose) - dev->driver->postclose(dev, file_priv); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (drm_core_check_feature(dev, DRIVER_PRIME)) - drm_prime_destroy_file_private(&file_priv->prime); -+#endif - - put_pid(file_priv->pid); - kfree(file_priv); ---- a/drivers/gpu/drm/drm_gem.c -+++ b/drivers/gpu/drm/drm_gem.c -@@ -35,7 +35,9 @@ - #include - #include - #include -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - #include -+#endif - #include - - /** @file drm_gem.c -@@ -204,6 +206,7 @@ EXPORT_SYMBOL(drm_gem_object_alloc); - static void - drm_gem_remove_prime_handles(struct drm_gem_object *obj, struct drm_file *filp) - { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (obj->import_attach) { - drm_prime_remove_imported_buf_handle(&filp->prime, - obj->import_attach->dmabuf); -@@ -212,6 +215,7 @@ drm_gem_remove_prime_handles(struct drm_ - drm_prime_remove_imported_buf_handle(&filp->prime, - obj->export_dma_buf); - } -+#endif - } - - /** ---- a/drivers/gpu/drm/drm_prime.c -+++ b/drivers/gpu/drm/drm_prime.c -@@ -26,6 +26,8 @@ - * - */ - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -+ - #include - #include - #include -@@ -532,3 +534,4 @@ void drm_prime_remove_imported_buf_handl - mutex_unlock(&prime_fpriv->lock); - } - EXPORT_SYMBOL(drm_prime_remove_imported_buf_handle); -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ ---- a/drivers/gpu/drm/nouveau/nouveau_prime.c -+++ b/drivers/gpu/drm/nouveau/nouveau_prime.c -@@ -22,6 +22,8 @@ - * Authors: Dave Airlie - */ - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -+ - #include - - #include "nouveau_drm.h" -@@ -93,3 +95,4 @@ int nouveau_gem_prime_pin(struct drm_gem - - return 0; - } -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ ---- a/drivers/gpu/drm/radeon/radeon_prime.c -+++ b/drivers/gpu/drm/radeon/radeon_prime.c -@@ -23,6 +23,7 @@ - * - * Authors: Alex Deucher - */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - #include - - #include "radeon.h" -@@ -96,3 +97,4 @@ int radeon_gem_prime_pin(struct drm_gem_ - - return 0; - } -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ ---- a/drivers/gpu/drm/radeon/radeon_drv.c -+++ b/drivers/gpu/drm/radeon/radeon_drv.c -@@ -374,8 +374,10 @@ static const struct file_operations rade - static struct drm_driver kms_driver = { - .driver_features = - DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | -- DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_GEM | -- DRIVER_PRIME, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -+ DRIVER_PRIME | -+#endif -+ DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_GEM, - .dev_priv_size = 0, - .load = radeon_driver_load_kms, - .firstopen = radeon_driver_firstopen_kms, -@@ -410,6 +412,7 @@ static struct drm_driver kms_driver = { - .dumb_destroy = radeon_mode_dumb_destroy, - .fops = &radeon_driver_kms_fops, - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - .prime_handle_to_fd = drm_gem_prime_handle_to_fd, - .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_export = drm_gem_prime_export, -@@ -419,6 +422,7 @@ static struct drm_driver kms_driver = { - .gem_prime_import_sg_table = radeon_gem_prime_import_sg_table, - .gem_prime_vmap = radeon_gem_prime_vmap, - .gem_prime_vunmap = radeon_gem_prime_vunmap, -+#endif - - .name = DRIVER_NAME, - .desc = DRIVER_DESC, ---- a/drivers/gpu/drm/radeon/radeon_gem.c -+++ b/drivers/gpu/drm/radeon/radeon_gem.c -@@ -41,8 +41,10 @@ void radeon_gem_object_free(struct drm_g - struct radeon_bo *robj = gem_to_radeon_bo(gobj); - - if (robj) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (robj->gem_base.import_attach) - drm_prime_gem_destroy(&robj->gem_base, robj->tbo.sg); -+#endif - radeon_bo_unref(&robj); - } - } ---- a/drivers/gpu/drm/radeon/radeon_ttm.c -+++ b/drivers/gpu/drm/radeon/radeon_ttm.c -@@ -584,17 +584,21 @@ static int radeon_ttm_tt_populate(struct - struct radeon_ttm_tt *gtt = (void *)ttm; - unsigned i; - int r; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); -+#endif - - if (ttm->state != tt_unpopulated) - return 0; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (slave && ttm->sg) { - drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, - gtt->ttm.dma_address, ttm->num_pages); - ttm->state = tt_unbound; - return 0; - } -+#endif - - rdev = radeon_get_rdev(ttm->bdev); - #if __OS_HAS_AGP -@@ -638,10 +642,12 @@ static void radeon_ttm_tt_unpopulate(str - struct radeon_device *rdev; - struct radeon_ttm_tt *gtt = (void *)ttm; - unsigned i; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); - - if (slave) - return; -+#endif - - rdev = radeon_get_rdev(ttm->bdev); - #if __OS_HAS_AGP ---- a/drivers/gpu/drm/nouveau/nouveau_bo.c -+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c -@@ -1352,11 +1352,14 @@ nouveau_ttm_tt_populate(struct ttm_tt *t - struct drm_device *dev; - unsigned i; - int r; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); -+#endif - - if (ttm->state != tt_unpopulated) - return 0; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (slave && ttm->sg) { - /* make userspace faulting work */ - drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, -@@ -1364,6 +1367,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *t - ttm->state = tt_unbound; - return 0; - } -+#endif - - drm = nouveau_bdev(ttm->bdev); - dev = drm->dev; -@@ -1411,10 +1415,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt - struct nouveau_drm *drm; - struct drm_device *dev; - unsigned i; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); - - if (slave) - return; -+#endif - - drm = nouveau_bdev(ttm->bdev); - dev = drm->dev; ---- a/drivers/gpu/drm/nouveau/nouveau_drm.c -+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c -@@ -662,7 +662,10 @@ driver = { - .driver_features = - DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG | - DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | -- DRIVER_MODESET | DRIVER_PRIME, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) -+ DRIVER_PRIME | -+#endif -+ DRIVER_MODESET, - - .load = nouveau_drm_load, - .unload = nouveau_drm_unload, -@@ -688,6 +691,7 @@ driver = { - .ioctls = nouveau_ioctls, - .fops = &nouveau_driver_fops, - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - .prime_handle_to_fd = drm_gem_prime_handle_to_fd, - .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_export = drm_gem_prime_export, -@@ -697,6 +701,7 @@ driver = { - .gem_prime_import_sg_table = nouveau_gem_prime_import_sg_table, - .gem_prime_vmap = nouveau_gem_prime_vmap, - .gem_prime_vunmap = nouveau_gem_prime_vunmap, -+#endif - - .gem_init_object = nouveau_gem_object_new, - .gem_free_object = nouveau_gem_object_del, ---- a/drivers/gpu/drm/nouveau/nouveau_gem.c -+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c -@@ -55,8 +55,10 @@ nouveau_gem_object_del(struct drm_gem_ob - nouveau_bo_unpin(nvbo); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (gem->import_attach) - drm_prime_gem_destroy(gem, nvbo->bo.sg); -+#endif - - ttm_bo_unref(&bo); - ---- a/drivers/gpu/drm/i915/i915_drv.c -+++ b/drivers/gpu/drm/i915/i915_drv.c -@@ -1058,7 +1058,11 @@ static struct drm_driver driver = { - */ - .driver_features = - DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR |*/ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME, -+#else -+ DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM, -+#endif - .load = i915_driver_load, - .unload = i915_driver_unload, - .open = i915_driver_open, -@@ -1081,10 +1085,12 @@ static struct drm_driver driver = { - .gem_free_object = i915_gem_free_object, - .gem_vm_ops = &i915_gem_vm_ops, - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - .prime_handle_to_fd = drm_gem_prime_handle_to_fd, - .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_export = i915_gem_prime_export, - .gem_prime_import = i915_gem_prime_import, -+#endif - - .dumb_create = i915_gem_dumb_create, - .dumb_map_offset = i915_gem_mmap_gtt, ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -34,7 +34,9 @@ - #include - #include - #include -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - #include -+#endif - - static void i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj); - static void i915_gem_object_flush_cpu_write_domain(struct drm_i915_gem_object *obj); -@@ -3825,8 +3827,10 @@ void i915_gem_free_object(struct drm_gem - - BUG_ON(obj->pages); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - if (obj->base.import_attach) - drm_prime_gem_destroy(&obj->base, NULL); -+#endif - - drm_gem_object_release(&obj->base); - i915_gem_info_remove_obj(dev_priv, obj->base.size); ---- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c -+++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c -@@ -23,6 +23,7 @@ - * Authors: - * Dave Airlie - */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) - #include - #include "i915_drv.h" - #include -@@ -307,3 +308,4 @@ fail_detach: - dma_buf_detach(dma_buf, attach); - return ERR_PTR(ret); - } -+#endif diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/INFO b/patches/collateral-evolutions/drm/04-revert-prime-support/INFO new file mode 100644 index 000000000000..94cafb7d92d1 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/INFO @@ -0,0 +1,8 @@ +Disable PRIME support in core drm, radeon, nouveau and i915 for +kernels < 3.4.0. + +PRIME depends on dma-buf which is added to the kernel with 3.3 but +the one in 3.3 is mostly stub, e.g. it is a skeleton API which +is highly modified in 3.4. So disable PRIME for kernels < 3.4.0, +not < 3.3.0. + diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_drv.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_drv.c new file mode 100644 index 000000000000..36b173010db5 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_drv.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/drm_drv.c ++++ b/drivers/gpu/drm/drm_drv.c +@@ -137,8 +137,10 @@ + + DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, DRM_CONTROL_ALLOW|DRM_UNLOCKED), + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_AUTH|DRM_UNLOCKED), + DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_AUTH|DRM_UNLOCKED), ++#endif + + DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPLANERESOURCES, drm_mode_getplane_res, DRM_CONTROL_ALLOW|DRM_UNLOCKED), + DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, DRM_CONTROL_ALLOW|DRM_UNLOCKED), diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_fops.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_fops.c new file mode 100644 index 000000000000..b847d9e64be1 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_fops.c @@ -0,0 +1,24 @@ +--- a/drivers/gpu/drm/drm_fops.c ++++ b/drivers/gpu/drm/drm_fops.c +@@ -284,8 +284,10 @@ + if (dev->driver->driver_features & DRIVER_GEM) + drm_gem_open(dev, priv); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (drm_core_check_feature(dev, DRIVER_PRIME)) + drm_prime_init_file_private(&priv->prime); ++#endif + + if (dev->driver->open) { + ret = dev->driver->open(dev, priv); +@@ -538,8 +540,10 @@ + if (dev->driver->postclose) + dev->driver->postclose(dev, file_priv); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (drm_core_check_feature(dev, DRIVER_PRIME)) + drm_prime_destroy_file_private(&file_priv->prime); ++#endif + + put_pid(file_priv->pid); + kfree(file_priv); diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_gem.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_gem.c new file mode 100644 index 000000000000..322739c8522a --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_gem.c @@ -0,0 +1,28 @@ +--- a/drivers/gpu/drm/drm_gem.c ++++ b/drivers/gpu/drm/drm_gem.c +@@ -35,7 +35,9 @@ + #include + #include + #include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + #include ++#endif + #include + + /** @file drm_gem.c +@@ -204,6 +206,7 @@ + static void + drm_gem_remove_prime_handles(struct drm_gem_object *obj, struct drm_file *filp) + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (obj->import_attach) { + drm_prime_remove_imported_buf_handle(&filp->prime, + obj->import_attach->dmabuf); +@@ -212,6 +215,7 @@ + drm_prime_remove_imported_buf_handle(&filp->prime, + obj->export_dma_buf); + } ++#endif + } + + /** diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_prime.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_prime.c new file mode 100644 index 000000000000..f440d6de3250 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_drm_prime.c @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/drm_prime.c ++++ b/drivers/gpu/drm/drm_prime.c +@@ -26,6 +26,8 @@ + * + */ + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ++ + #include + #include + #include +@@ -532,3 +534,4 @@ + mutex_unlock(&prime_fpriv->lock); + } + EXPORT_SYMBOL(drm_prime_remove_imported_buf_handle); ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_drv.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_drv.c new file mode 100644 index 000000000000..6b9ae9dc3c34 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_drv.c @@ -0,0 +1,27 @@ +--- a/drivers/gpu/drm/i915/i915_drv.c ++++ b/drivers/gpu/drm/i915/i915_drv.c +@@ -1058,7 +1058,11 @@ + */ + .driver_features = + DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR |*/ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME, ++#else ++ DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM, ++#endif + .load = i915_driver_load, + .unload = i915_driver_unload, + .open = i915_driver_open, +@@ -1081,10 +1085,12 @@ + .gem_free_object = i915_gem_free_object, + .gem_vm_ops = &i915_gem_vm_ops, + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + .prime_handle_to_fd = drm_gem_prime_handle_to_fd, + .prime_fd_to_handle = drm_gem_prime_fd_to_handle, + .gem_prime_export = i915_gem_prime_export, + .gem_prime_import = i915_gem_prime_import, ++#endif + + .dumb_create = i915_gem_dumb_create, + .dumb_map_offset = i915_gem_mmap_gtt, diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem.c new file mode 100644 index 000000000000..4182342c1fdf --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem.c @@ -0,0 +1,23 @@ +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -34,7 +34,9 @@ + #include + #include + #include ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + #include ++#endif + + static void i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj); + static void i915_gem_object_flush_cpu_write_domain(struct drm_i915_gem_object *obj); +@@ -3825,8 +3827,10 @@ + + BUG_ON(obj->pages); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (obj->base.import_attach) + drm_prime_gem_destroy(&obj->base, NULL); ++#endif + + drm_gem_object_release(&obj->base); + i915_gem_info_remove_obj(dev_priv, obj->base.size); diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem_dmabuf.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem_dmabuf.c new file mode 100644 index 000000000000..8cc6e021d8be --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_i915_i915_gem_dmabuf.c @@ -0,0 +1,15 @@ +--- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c ++++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c +@@ -23,6 +23,7 @@ + * Authors: + * Dave Airlie + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + #include + #include "i915_drv.h" + #include +@@ -307,3 +308,4 @@ + dma_buf_detach(dma_buf, attach); + return ERR_PTR(ret); + } ++#endif diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_bo.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_bo.c new file mode 100644 index 000000000000..d4c4feebc230 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_bo.c @@ -0,0 +1,38 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_bo.c ++++ b/drivers/gpu/drm/nouveau/nouveau_bo.c +@@ -1352,11 +1352,14 @@ + struct drm_device *dev; + unsigned i; + int r; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); ++#endif + + if (ttm->state != tt_unpopulated) + return 0; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (slave && ttm->sg) { + /* make userspace faulting work */ + drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, +@@ -1364,6 +1367,7 @@ + ttm->state = tt_unbound; + return 0; + } ++#endif + + drm = nouveau_bdev(ttm->bdev); + dev = drm->dev; +@@ -1411,10 +1415,12 @@ + struct nouveau_drm *drm; + struct drm_device *dev; + unsigned i; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); + + if (slave) + return; ++#endif + + drm = nouveau_bdev(ttm->bdev); + dev = drm->dev; diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_drm.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_drm.c new file mode 100644 index 000000000000..c2dcb6ca6b87 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_drm.c @@ -0,0 +1,30 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_drm.c ++++ b/drivers/gpu/drm/nouveau/nouveau_drm.c +@@ -662,7 +662,10 @@ + .driver_features = + DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG | + DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | +- DRIVER_MODESET | DRIVER_PRIME, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ++ DRIVER_PRIME | ++#endif ++ DRIVER_MODESET, + + .load = nouveau_drm_load, + .unload = nouveau_drm_unload, +@@ -688,6 +691,7 @@ + .ioctls = nouveau_ioctls, + .fops = &nouveau_driver_fops, + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + .prime_handle_to_fd = drm_gem_prime_handle_to_fd, + .prime_fd_to_handle = drm_gem_prime_fd_to_handle, + .gem_prime_export = drm_gem_prime_export, +@@ -697,6 +701,7 @@ + .gem_prime_import_sg_table = nouveau_gem_prime_import_sg_table, + .gem_prime_vmap = nouveau_gem_prime_vmap, + .gem_prime_vunmap = nouveau_gem_prime_vunmap, ++#endif + + .gem_init_object = nouveau_gem_object_new, + .gem_free_object = nouveau_gem_object_del, diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_gem.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_gem.c new file mode 100644 index 000000000000..7795a12023a3 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_gem.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_gem.c ++++ b/drivers/gpu/drm/nouveau/nouveau_gem.c +@@ -55,8 +55,10 @@ + nouveau_bo_unpin(nvbo); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (gem->import_attach) + drm_prime_gem_destroy(gem, nvbo->bo.sg); ++#endif + + ttm_bo_unref(&bo); + diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_prime.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_prime.c new file mode 100644 index 000000000000..e4765b3c3abc --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_nouveau_nouveau_prime.c @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_prime.c ++++ b/drivers/gpu/drm/nouveau/nouveau_prime.c +@@ -22,6 +22,8 @@ + * Authors: Dave Airlie + */ + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ++ + #include + + #include "nouveau_drm.h" +@@ -93,3 +95,4 @@ + + return 0; + } ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_drv.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_drv.c new file mode 100644 index 000000000000..0ad62d61f704 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_drv.c @@ -0,0 +1,31 @@ +--- a/drivers/gpu/drm/radeon/radeon_drv.c ++++ b/drivers/gpu/drm/radeon/radeon_drv.c +@@ -374,8 +374,10 @@ + static struct drm_driver kms_driver = { + .driver_features = + DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | +- DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_GEM | +- DRIVER_PRIME, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ++ DRIVER_PRIME | ++#endif ++ DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_GEM, + .dev_priv_size = 0, + .load = radeon_driver_load_kms, + .firstopen = radeon_driver_firstopen_kms, +@@ -410,6 +412,7 @@ + .dumb_destroy = radeon_mode_dumb_destroy, + .fops = &radeon_driver_kms_fops, + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + .prime_handle_to_fd = drm_gem_prime_handle_to_fd, + .prime_fd_to_handle = drm_gem_prime_fd_to_handle, + .gem_prime_export = drm_gem_prime_export, +@@ -419,6 +422,7 @@ + .gem_prime_import_sg_table = radeon_gem_prime_import_sg_table, + .gem_prime_vmap = radeon_gem_prime_vmap, + .gem_prime_vunmap = radeon_gem_prime_vunmap, ++#endif + + .name = DRIVER_NAME, + .desc = DRIVER_DESC, diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_gem.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_gem.c new file mode 100644 index 000000000000..457d8d2155e2 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_gem.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/radeon/radeon_gem.c ++++ b/drivers/gpu/drm/radeon/radeon_gem.c +@@ -41,8 +41,10 @@ + struct radeon_bo *robj = gem_to_radeon_bo(gobj); + + if (robj) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (robj->gem_base.import_attach) + drm_prime_gem_destroy(&robj->gem_base, robj->tbo.sg); ++#endif + radeon_bo_unref(&robj); + } + } diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_prime.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_prime.c new file mode 100644 index 000000000000..291eea65c5f0 --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_prime.c @@ -0,0 +1,15 @@ +--- a/drivers/gpu/drm/radeon/radeon_prime.c ++++ b/drivers/gpu/drm/radeon/radeon_prime.c +@@ -23,6 +23,7 @@ + * + * Authors: Alex Deucher + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + #include + + #include "radeon.h" +@@ -96,3 +97,4 @@ + + return 0; + } ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ diff --git a/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_ttm.c b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_ttm.c new file mode 100644 index 000000000000..4bbabe38887e --- /dev/null +++ b/patches/collateral-evolutions/drm/04-revert-prime-support/drivers_gpu_drm_radeon_radeon_ttm.c @@ -0,0 +1,37 @@ +--- a/drivers/gpu/drm/radeon/radeon_ttm.c ++++ b/drivers/gpu/drm/radeon/radeon_ttm.c +@@ -584,17 +584,21 @@ + struct radeon_ttm_tt *gtt = (void *)ttm; + unsigned i; + int r; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); ++#endif + + if (ttm->state != tt_unpopulated) + return 0; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + if (slave && ttm->sg) { + drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages, + gtt->ttm.dma_address, ttm->num_pages); + ttm->state = tt_unbound; + return 0; + } ++#endif + + rdev = radeon_get_rdev(ttm->bdev); + #if __OS_HAS_AGP +@@ -638,10 +642,12 @@ + struct radeon_device *rdev; + struct radeon_ttm_tt *gtt = (void *)ttm; + unsigned i; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) + bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); + + if (slave) + return; ++#endif + + rdev = radeon_get_rdev(ttm->bdev); + #if __OS_HAS_AGP diff --git a/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/INFO b/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/INFO new file mode 100644 index 000000000000..ebc94292ec68 --- /dev/null +++ b/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/INFO @@ -0,0 +1,4 @@ +The definition of ACPI_VIDEO_CLASS was moved from video.c +to video.h in 3.1. Define it here to fix build for kernels older +than 3.1. + diff --git a/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class.patch b/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/drivers_gpu_drm_i915_intel_opregion.c similarity index 62% rename from patches/collateral-evolutions/drm/05-i915-define-acpi-video-class.patch rename to patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/drivers_gpu_drm_i915_intel_opregion.c index cf7eb389c766..8cbce3363904 100644 --- a/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class.patch +++ b/patches/collateral-evolutions/drm/05-i915-define-acpi-video-class/drivers_gpu_drm_i915_intel_opregion.c @@ -1,10 +1,6 @@ -The definition of ACPI_VIDEO_CLASS was moved from video.c -to video.h in 3.1. Define it here to fix build for kernels older -than 3.1. - --- a/drivers/gpu/drm/i915/intel_opregion.c +++ b/drivers/gpu/drm/i915/intel_opregion.c -@@ -307,6 +307,9 @@ static int intel_opregion_video_event(st +@@ -307,6 +307,9 @@ struct acpi_bus_event *event = data; int ret = NOTIFY_OK; diff --git a/patches/collateral-evolutions/drm/06-rename-config-options.patch b/patches/collateral-evolutions/drm/06-rename-config-options.patch deleted file mode 100644 index 93397d820f03..000000000000 --- a/patches/collateral-evolutions/drm/06-rename-config-options.patch +++ /dev/null @@ -1,207 +0,0 @@ ---- a/drivers/gpu/drm/Makefile -+++ b/drivers/gpu/drm/Makefile -@@ -15,41 +15,41 @@ drm-y := drm_auth.o drm_buffer.o d - drm_trace_points.o drm_global.o drm_prime.o - - drm-$(CONFIG_COMPAT) += drm_ioc32.o --drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o -+drm-$(CONFIG_COMPAT_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o - drm-$(CONFIG_PCI) += ati_pcigart.o - - drm-usb-y := drm_usb.o - - drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o drm_dp_helper.o --drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o --drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o -+drm_kms_helper-$(CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o -+drm_kms_helper-$(CONFIG_COMPAT_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o - --obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o -+obj-$(CONFIG_COMPAT_DRM_KMS_HELPER) += drm_kms_helper.o - - CFLAGS_drm_trace_points.o := -I$(src) - --obj-$(CONFIG_DRM) += drm.o --obj-$(CONFIG_DRM_USB) += drm_usb.o --obj-$(CONFIG_DRM_TTM) += ttm/ --obj-$(CONFIG_DRM_TDFX) += tdfx/ --obj-$(CONFIG_DRM_R128) += r128/ --obj-$(CONFIG_DRM_RADEON)+= radeon/ --obj-$(CONFIG_DRM_MGA) += mga/ --obj-$(CONFIG_DRM_I810) += i810/ --obj-$(CONFIG_DRM_I915) += i915/ --obj-$(CONFIG_DRM_MGAG200) += mgag200/ --obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/ --obj-$(CONFIG_DRM_SIS) += sis/ --obj-$(CONFIG_DRM_SAVAGE)+= savage/ --obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/ --obj-$(CONFIG_DRM_VIA) +=via/ --obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/ --obj-$(CONFIG_DRM_EXYNOS) +=exynos/ --obj-$(CONFIG_DRM_GMA500) += gma500/ --obj-$(CONFIG_DRM_UDL) += udl/ --obj-$(CONFIG_DRM_AST) += ast/ --obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/ --obj-$(CONFIG_DRM_TEGRA) += tegra/ --obj-$(CONFIG_DRM_OMAP) += omapdrm/ --obj-$(CONFIG_DRM_TILCDC) += tilcdc/ -+obj-$(CONFIG_COMPAT_DRM) += drm.o -+obj-$(CONFIG_COMPAT_DRM_USB) += drm_usb.o -+obj-$(CONFIG_COMPAT_DRM_TTM) += ttm/ -+obj-$(CONFIG_COMPAT_DRM_TDFX) += tdfx/ -+obj-$(CONFIG_COMPAT_DRM_R128) += r128/ -+obj-$(CONFIG_COMPAT_DRM_RADEON)+= radeon/ -+obj-$(CONFIG_COMPAT_DRM_MGA) += mga/ -+obj-$(CONFIG_COMPAT_DRM_I810) += i810/ -+obj-$(CONFIG_COMPAT_DRM_I915) += i915/ -+obj-$(CONFIG_COMPAT_DRM_MGAG200) += mgag200/ -+obj-$(CONFIG_COMPAT_DRM_CIRRUS_QEMU) += cirrus/ -+obj-$(CONFIG_COMPAT_DRM_SIS) += sis/ -+obj-$(CONFIG_COMPAT_DRM_SAVAGE)+= savage/ -+obj-$(CONFIG_COMPAT_DRM_VMWGFX)+= vmwgfx/ -+obj-$(CONFIG_COMPAT_DRM_VIA) +=via/ -+obj-$(CONFIG_COMPAT_DRM_NOUVEAU) +=nouveau/ -+obj-$(CONFIG_COMPAT_DRM_EXYNOS) +=exynos/ -+obj-$(CONFIG_COMPAT_DRM_GMA500) += gma500/ -+obj-$(CONFIG_COMPAT_DRM_UDL) += udl/ -+obj-$(CONFIG_COMPAT_DRM_AST) += ast/ -+obj-$(CONFIG_COMPAT_DRM_SHMOBILE) +=shmobile/ -+obj-$(CONFIG_COMPAT_DRM_TEGRA) += tegra/ -+obj-$(CONFIG_COMPAT_DRM_OMAP) += omapdrm/ -+obj-$(CONFIG_COMPAT_DRM_TILCDC) += tilcdc/ - obj-y += i2c/ ---- a/drivers/gpu/drm/ast/Makefile -+++ b/drivers/gpu/drm/ast/Makefile -@@ -6,4 +6,4 @@ ccflags-y := -Iinclude/drm - - ast-y := ast_drv.o ast_main.o ast_mode.o ast_fb.o ast_ttm.o ast_post.o - --obj-$(CONFIG_DRM_AST) := ast.o -\ No newline at end of file -+obj-$(CONFIG_COMPAT_DRM_AST) := ast.o ---- a/drivers/gpu/drm/cirrus/Makefile -+++ b/drivers/gpu/drm/cirrus/Makefile -@@ -2,4 +2,4 @@ ccflags-y := -Iinclude/drm - cirrus-y := cirrus_main.o cirrus_mode.o \ - cirrus_drv.o cirrus_fbdev.o cirrus_ttm.o - --obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus.o -+obj-$(CONFIG_COMPAT_DRM_CIRRUS_QEMU) += cirrus.o ---- a/drivers/gpu/drm/drm_crtc_helper.c -+++ b/drivers/gpu/drm/drm_crtc_helper.c -@@ -152,7 +152,7 @@ int drm_helper_probe_single_connector_mo - goto prune; - } - --#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE -+#ifdef CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE - count = drm_load_edid_firmware(connector); - if (count == 0) - #endif ---- a/drivers/gpu/drm/gma500/Makefile -+++ b/drivers/gpu/drm/gma500/Makefile -@@ -49,4 +49,4 @@ gma500_gfx-$(CONFIG_DRM_MEDFIELD) += mdf - mdfld_tmd_vid.o \ - tc35876x-dsi-lvds.o - --obj-$(CONFIG_DRM_GMA500) += gma500_gfx.o -+obj-$(CONFIG_COMPAT_DRM_GMA500) += gma500_gfx.o ---- a/drivers/gpu/drm/i2c/Makefile -+++ b/drivers/gpu/drm/i2c/Makefile -@@ -1,10 +1,10 @@ - ccflags-y := -Iinclude/drm - - ch7006-y := ch7006_drv.o ch7006_mode.o --obj-$(CONFIG_DRM_I2C_CH7006) += ch7006.o -+obj-$(CONFIG_COMPAT_DRM_I2C_CH7006) += ch7006.o - - sil164-y := sil164_drv.o --obj-$(CONFIG_DRM_I2C_SIL164) += sil164.o -+obj-$(CONFIG_COMPAT_DRM_I2C_SIL164) += sil164.o - - tda998x-y := tda998x_drv.o --obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o -+obj-$(CONFIG_COMPAT_DRM_I2C_NXP_TDA998X) += tda998x.o ---- a/drivers/gpu/drm/i810/Makefile -+++ b/drivers/gpu/drm/i810/Makefile -@@ -5,4 +5,4 @@ - ccflags-y := -Iinclude/drm - i810-y := i810_drv.o i810_dma.o - --obj-$(CONFIG_DRM_I810) += i810.o -+obj-$(CONFIG_COMPAT_DRM_I810) += i810.o ---- a/drivers/gpu/drm/i915/Makefile -+++ b/drivers/gpu/drm/i915/Makefile -@@ -48,6 +48,6 @@ i915-$(CONFIG_COMPAT) += i915_ioc32.o - - i915-$(CONFIG_ACPI) += intel_acpi.o - --obj-$(CONFIG_DRM_I915) += i915.o -+obj-$(CONFIG_COMPAT_DRM_I915) += i915.o - - CFLAGS_i915_trace_points.o := -I$(src) ---- a/drivers/gpu/drm/mgag200/Makefile -+++ b/drivers/gpu/drm/mgag200/Makefile -@@ -2,4 +2,4 @@ ccflags-y := -Iinclude/drm - mgag200-y := mgag200_main.o mgag200_mode.o \ - mgag200_drv.o mgag200_fb.o mgag200_i2c.o mgag200_ttm.o - --obj-$(CONFIG_DRM_MGAG200) += mgag200.o -+obj-$(CONFIG_COMPAT_DRM_MGAG200) += mgag200.o ---- a/drivers/gpu/drm/nouveau/Makefile -+++ b/drivers/gpu/drm/nouveau/Makefile -@@ -241,7 +241,7 @@ nouveau-$(CONFIG_COMPAT) += nouveau_ioc3 - ifdef CONFIG_X86 - nouveau-$(CONFIG_ACPI) += nouveau_acpi.o - endif --nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o -+nouveau-$(CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o - nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o - --obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o -+obj-$(CONFIG_COMPAT_DRM_NOUVEAU)+= nouveau.o ---- a/drivers/gpu/drm/nouveau/nouveau_display.h -+++ b/drivers/gpu/drm/nouveau/nouveau_display.h -@@ -73,7 +73,7 @@ int nouveau_display_dumb_destroy(struct - - void nouveau_hdmi_mode_set(struct drm_encoder *, struct drm_display_mode *); - --#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT -+#ifdef CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT - extern int nouveau_backlight_init(struct drm_device *); - extern void nouveau_backlight_exit(struct drm_device *); - #else ---- a/drivers/gpu/drm/radeon/Makefile -+++ b/drivers/gpu/drm/radeon/Makefile -@@ -82,6 +82,6 @@ radeon-$(CONFIG_COMPAT) += radeon_ioc32. - radeon-$(CONFIG_VGA_SWITCHEROO) += radeon_atpx_handler.o - radeon-$(CONFIG_ACPI) += radeon_acpi.o - --obj-$(CONFIG_DRM_RADEON)+= radeon.o -+obj-$(CONFIG_COMPAT_DRM_RADEON)+= radeon.o - - CFLAGS_radeon_trace_points.o := -I$(src) ---- a/drivers/gpu/drm/ttm/Makefile -+++ b/drivers/gpu/drm/ttm/Makefile -@@ -11,4 +11,4 @@ ifeq ($(CONFIG_SWIOTLB),y) - ttm-y += ttm_page_alloc_dma.o - endif - --obj-$(CONFIG_DRM_TTM) += ttm.o -+obj-$(CONFIG_COMPAT_DRM_TTM) += ttm.o ---- a/drivers/gpu/drm/via/Makefile -+++ b/drivers/gpu/drm/via/Makefile -@@ -5,4 +5,4 @@ - ccflags-y := -Iinclude/drm - via-y := via_irq.o via_drv.o via_map.o via_mm.o via_dma.o via_verifier.o via_video.o via_dmablit.o - --obj-$(CONFIG_DRM_VIA) +=via.o -+obj-$(CONFIG_COMPAT_DRM_VIA) +=via.o ---- a/drivers/gpu/drm/vmwgfx/Makefile -+++ b/drivers/gpu/drm/vmwgfx/Makefile -@@ -8,4 +8,4 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr. - vmwgfx_fence.o vmwgfx_dmabuf.o vmwgfx_scrn.o vmwgfx_context.o \ - vmwgfx_surface.o - --obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o -+obj-$(CONFIG_COMPAT_DRM_VMWGFX) := vmwgfx.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_Makefile new file mode 100644 index 000000000000..e319947da4ed --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_Makefile @@ -0,0 +1,72 @@ +--- a/drivers/gpu/drm/Makefile ++++ b/drivers/gpu/drm/Makefile +@@ -15,41 +15,41 @@ + drm_trace_points.o drm_global.o drm_prime.o + + drm-$(CONFIG_COMPAT) += drm_ioc32.o +-drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o ++drm-$(CONFIG_COMPAT_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o + drm-$(CONFIG_PCI) += ati_pcigart.o + + drm-usb-y := drm_usb.o + + drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o drm_dp_helper.o +-drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o +-drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o ++drm_kms_helper-$(CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o ++drm_kms_helper-$(CONFIG_COMPAT_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o + +-obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o ++obj-$(CONFIG_COMPAT_DRM_KMS_HELPER) += drm_kms_helper.o + + CFLAGS_drm_trace_points.o := -I$(src) + +-obj-$(CONFIG_DRM) += drm.o +-obj-$(CONFIG_DRM_USB) += drm_usb.o +-obj-$(CONFIG_DRM_TTM) += ttm/ +-obj-$(CONFIG_DRM_TDFX) += tdfx/ +-obj-$(CONFIG_DRM_R128) += r128/ +-obj-$(CONFIG_DRM_RADEON)+= radeon/ +-obj-$(CONFIG_DRM_MGA) += mga/ +-obj-$(CONFIG_DRM_I810) += i810/ +-obj-$(CONFIG_DRM_I915) += i915/ +-obj-$(CONFIG_DRM_MGAG200) += mgag200/ +-obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/ +-obj-$(CONFIG_DRM_SIS) += sis/ +-obj-$(CONFIG_DRM_SAVAGE)+= savage/ +-obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/ +-obj-$(CONFIG_DRM_VIA) +=via/ +-obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/ +-obj-$(CONFIG_DRM_EXYNOS) +=exynos/ +-obj-$(CONFIG_DRM_GMA500) += gma500/ +-obj-$(CONFIG_DRM_UDL) += udl/ +-obj-$(CONFIG_DRM_AST) += ast/ +-obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/ +-obj-$(CONFIG_DRM_TEGRA) += tegra/ +-obj-$(CONFIG_DRM_OMAP) += omapdrm/ +-obj-$(CONFIG_DRM_TILCDC) += tilcdc/ ++obj-$(CONFIG_COMPAT_DRM) += drm.o ++obj-$(CONFIG_COMPAT_DRM_USB) += drm_usb.o ++obj-$(CONFIG_COMPAT_DRM_TTM) += ttm/ ++obj-$(CONFIG_COMPAT_DRM_TDFX) += tdfx/ ++obj-$(CONFIG_COMPAT_DRM_R128) += r128/ ++obj-$(CONFIG_COMPAT_DRM_RADEON)+= radeon/ ++obj-$(CONFIG_COMPAT_DRM_MGA) += mga/ ++obj-$(CONFIG_COMPAT_DRM_I810) += i810/ ++obj-$(CONFIG_COMPAT_DRM_I915) += i915/ ++obj-$(CONFIG_COMPAT_DRM_MGAG200) += mgag200/ ++obj-$(CONFIG_COMPAT_DRM_CIRRUS_QEMU) += cirrus/ ++obj-$(CONFIG_COMPAT_DRM_SIS) += sis/ ++obj-$(CONFIG_COMPAT_DRM_SAVAGE)+= savage/ ++obj-$(CONFIG_COMPAT_DRM_VMWGFX)+= vmwgfx/ ++obj-$(CONFIG_COMPAT_DRM_VIA) +=via/ ++obj-$(CONFIG_COMPAT_DRM_NOUVEAU) +=nouveau/ ++obj-$(CONFIG_COMPAT_DRM_EXYNOS) +=exynos/ ++obj-$(CONFIG_COMPAT_DRM_GMA500) += gma500/ ++obj-$(CONFIG_COMPAT_DRM_UDL) += udl/ ++obj-$(CONFIG_COMPAT_DRM_AST) += ast/ ++obj-$(CONFIG_COMPAT_DRM_SHMOBILE) +=shmobile/ ++obj-$(CONFIG_COMPAT_DRM_TEGRA) += tegra/ ++obj-$(CONFIG_COMPAT_DRM_OMAP) += omapdrm/ ++obj-$(CONFIG_COMPAT_DRM_TILCDC) += tilcdc/ + obj-y += i2c/ diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ast_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ast_Makefile new file mode 100644 index 000000000000..cac1b9ef27bf --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ast_Makefile @@ -0,0 +1,9 @@ +--- a/drivers/gpu/drm/ast/Makefile ++++ b/drivers/gpu/drm/ast/Makefile +@@ -6,4 +6,4 @@ + + ast-y := ast_drv.o ast_main.o ast_mode.o ast_fb.o ast_ttm.o ast_post.o + +-obj-$(CONFIG_DRM_AST) := ast.o +\ No newline at end of file ++obj-$(CONFIG_COMPAT_DRM_AST) := ast.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_cirrus_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_cirrus_Makefile new file mode 100644 index 000000000000..44b1712484e7 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_cirrus_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/cirrus/Makefile ++++ b/drivers/gpu/drm/cirrus/Makefile +@@ -2,4 +2,4 @@ + cirrus-y := cirrus_main.o cirrus_mode.o \ + cirrus_drv.o cirrus_fbdev.o cirrus_ttm.o + +-obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus.o ++obj-$(CONFIG_COMPAT_DRM_CIRRUS_QEMU) += cirrus.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_drm_crtc_helper.c b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_drm_crtc_helper.c new file mode 100644 index 000000000000..f64e47580a6e --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_drm_crtc_helper.c @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/drm_crtc_helper.c ++++ b/drivers/gpu/drm/drm_crtc_helper.c +@@ -152,7 +152,7 @@ + goto prune; + } + +-#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE ++#ifdef CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE + count = drm_load_edid_firmware(connector); + if (count == 0) + #endif diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_gma500_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_gma500_Makefile new file mode 100644 index 000000000000..77355a01b949 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_gma500_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/gma500/Makefile ++++ b/drivers/gpu/drm/gma500/Makefile +@@ -49,4 +49,4 @@ + mdfld_tmd_vid.o \ + tc35876x-dsi-lvds.o + +-obj-$(CONFIG_DRM_GMA500) += gma500_gfx.o ++obj-$(CONFIG_COMPAT_DRM_GMA500) += gma500_gfx.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i2c_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i2c_Makefile new file mode 100644 index 000000000000..ae6689fb3002 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i2c_Makefile @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/i2c/Makefile ++++ b/drivers/gpu/drm/i2c/Makefile +@@ -1,10 +1,10 @@ + ccflags-y := -Iinclude/drm + + ch7006-y := ch7006_drv.o ch7006_mode.o +-obj-$(CONFIG_DRM_I2C_CH7006) += ch7006.o ++obj-$(CONFIG_COMPAT_DRM_I2C_CH7006) += ch7006.o + + sil164-y := sil164_drv.o +-obj-$(CONFIG_DRM_I2C_SIL164) += sil164.o ++obj-$(CONFIG_COMPAT_DRM_I2C_SIL164) += sil164.o + + tda998x-y := tda998x_drv.o +-obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o ++obj-$(CONFIG_COMPAT_DRM_I2C_NXP_TDA998X) += tda998x.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i810_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i810_Makefile new file mode 100644 index 000000000000..e6b763704ea7 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i810_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/i810/Makefile ++++ b/drivers/gpu/drm/i810/Makefile +@@ -5,4 +5,4 @@ + ccflags-y := -Iinclude/drm + i810-y := i810_drv.o i810_dma.o + +-obj-$(CONFIG_DRM_I810) += i810.o ++obj-$(CONFIG_COMPAT_DRM_I810) += i810.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i915_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i915_Makefile new file mode 100644 index 000000000000..ea86130bd471 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_i915_Makefile @@ -0,0 +1,10 @@ +--- a/drivers/gpu/drm/i915/Makefile ++++ b/drivers/gpu/drm/i915/Makefile +@@ -48,6 +48,6 @@ + + i915-$(CONFIG_ACPI) += intel_acpi.o + +-obj-$(CONFIG_DRM_I915) += i915.o ++obj-$(CONFIG_COMPAT_DRM_I915) += i915.o + + CFLAGS_i915_trace_points.o := -I$(src) diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_mgag200_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_mgag200_Makefile new file mode 100644 index 000000000000..0f9b190fc3ad --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_mgag200_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/mgag200/Makefile ++++ b/drivers/gpu/drm/mgag200/Makefile +@@ -2,4 +2,4 @@ + mgag200-y := mgag200_main.o mgag200_mode.o \ + mgag200_drv.o mgag200_fb.o mgag200_i2c.o mgag200_ttm.o + +-obj-$(CONFIG_DRM_MGAG200) += mgag200.o ++obj-$(CONFIG_COMPAT_DRM_MGAG200) += mgag200.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_Makefile new file mode 100644 index 000000000000..317701d0ccf1 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_Makefile @@ -0,0 +1,12 @@ +--- a/drivers/gpu/drm/nouveau/Makefile ++++ b/drivers/gpu/drm/nouveau/Makefile +@@ -241,7 +241,7 @@ + ifdef CONFIG_X86 + nouveau-$(CONFIG_ACPI) += nouveau_acpi.o + endif +-nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o ++nouveau-$(CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o + nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o + +-obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o ++obj-$(CONFIG_COMPAT_DRM_NOUVEAU)+= nouveau.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_nouveau_display.h b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_nouveau_display.h new file mode 100644 index 000000000000..6a2a2a32c58f --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_nouveau_nouveau_display.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/nouveau_display.h ++++ b/drivers/gpu/drm/nouveau/nouveau_display.h +@@ -73,7 +73,7 @@ + + void nouveau_hdmi_mode_set(struct drm_encoder *, struct drm_display_mode *); + +-#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT ++#ifdef CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT + extern int nouveau_backlight_init(struct drm_device *); + extern void nouveau_backlight_exit(struct drm_device *); + #else diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_radeon_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_radeon_Makefile new file mode 100644 index 000000000000..bcf711c9e624 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_radeon_Makefile @@ -0,0 +1,10 @@ +--- a/drivers/gpu/drm/radeon/Makefile ++++ b/drivers/gpu/drm/radeon/Makefile +@@ -82,6 +82,6 @@ + radeon-$(CONFIG_VGA_SWITCHEROO) += radeon_atpx_handler.o + radeon-$(CONFIG_ACPI) += radeon_acpi.o + +-obj-$(CONFIG_DRM_RADEON)+= radeon.o ++obj-$(CONFIG_COMPAT_DRM_RADEON)+= radeon.o + + CFLAGS_radeon_trace_points.o := -I$(src) diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ttm_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ttm_Makefile new file mode 100644 index 000000000000..cf29ee97bda6 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_ttm_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/ttm/Makefile ++++ b/drivers/gpu/drm/ttm/Makefile +@@ -11,4 +11,4 @@ + ttm-y += ttm_page_alloc_dma.o + endif + +-obj-$(CONFIG_DRM_TTM) += ttm.o ++obj-$(CONFIG_COMPAT_DRM_TTM) += ttm.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_via_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_via_Makefile new file mode 100644 index 000000000000..ec53bbc9d6c8 --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_via_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/via/Makefile ++++ b/drivers/gpu/drm/via/Makefile +@@ -5,4 +5,4 @@ + ccflags-y := -Iinclude/drm + via-y := via_irq.o via_drv.o via_map.o via_mm.o via_dma.o via_verifier.o via_video.o via_dmablit.o + +-obj-$(CONFIG_DRM_VIA) +=via.o ++obj-$(CONFIG_COMPAT_DRM_VIA) +=via.o diff --git a/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_vmwgfx_Makefile b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_vmwgfx_Makefile new file mode 100644 index 000000000000..182dd995118d --- /dev/null +++ b/patches/collateral-evolutions/drm/06-rename-config-options/drivers_gpu_drm_vmwgfx_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/gpu/drm/vmwgfx/Makefile ++++ b/drivers/gpu/drm/vmwgfx/Makefile +@@ -8,4 +8,4 @@ + vmwgfx_fence.o vmwgfx_dmabuf.o vmwgfx_scrn.o vmwgfx_context.o \ + vmwgfx_surface.o + +-obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o ++obj-$(CONFIG_COMPAT_DRM_VMWGFX) := vmwgfx.o diff --git a/patches/collateral-evolutions/drm/07-intel-gtt.patch b/patches/collateral-evolutions/drm/07-intel-gtt/INFO similarity index 64% rename from patches/collateral-evolutions/drm/07-intel-gtt.patch rename to patches/collateral-evolutions/drm/07-intel-gtt/INFO index c9e461d8977f..427fcb7f8598 100644 --- a/patches/collateral-evolutions/drm/07-intel-gtt.patch +++ b/patches/collateral-evolutions/drm/07-intel-gtt/INFO @@ -22,21 +22,3 @@ Date: Thu Jun 7 15:56:03 2012 +0200 Reviewed-by: Jani Nikula Signed-off-by: Daniel Vetter ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -3997,9 +3997,14 @@ i915_gem_init_hw(struct drm_device *dev) - drm_i915_private_t *dev_priv = dev->dev_private; - int ret; - -- if (INTEL_INFO(dev)->gen < 6 && !intel_enable_gtt()) -+ if (INTEL_INFO(dev)->gen < 6) - return -EIO; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) -+ if (!intel_enable_gtt()) -+ return -EIO; -+#endif -+ - if (IS_HASWELL(dev) && (I915_READ(0x120010) == 1)) - I915_WRITE(0x9008, I915_READ(0x9008) | 0xf0000); - diff --git a/patches/collateral-evolutions/drm/07-intel-gtt/drivers_gpu_drm_i915_i915_gem.c b/patches/collateral-evolutions/drm/07-intel-gtt/drivers_gpu_drm_i915_i915_gem.c new file mode 100644 index 000000000000..c4cc8a022235 --- /dev/null +++ b/patches/collateral-evolutions/drm/07-intel-gtt/drivers_gpu_drm_i915_i915_gem.c @@ -0,0 +1,18 @@ +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -3997,9 +3997,14 @@ + drm_i915_private_t *dev_priv = dev->dev_private; + int ret; + +- if (INTEL_INFO(dev)->gen < 6 && !intel_enable_gtt()) ++ if (INTEL_INFO(dev)->gen < 6) + return -EIO; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) ++ if (!intel_enable_gtt()) ++ return -EIO; ++#endif ++ + if (IS_HASWELL(dev) && (I915_READ(0x120010) == 1)) + I915_WRITE(0x9008, I915_READ(0x9008) | 0xf0000); + diff --git a/patches/collateral-evolutions/drm/08-shmem_truncate_range.patch b/patches/collateral-evolutions/drm/08-shmem_truncate_range/INFO similarity index 70% rename from patches/collateral-evolutions/drm/08-shmem_truncate_range.patch rename to patches/collateral-evolutions/drm/08-shmem_truncate_range/INFO index 5112bf6396b1..3b27ff438347 100644 --- a/patches/collateral-evolutions/drm/08-shmem_truncate_range.patch +++ b/patches/collateral-evolutions/drm/08-shmem_truncate_range/INFO @@ -25,19 +25,3 @@ Date: Mon Jun 27 16:18:19 2011 -0700 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -1620,7 +1620,13 @@ i915_gem_object_truncate(struct drm_i915 - * backing pages, *now*. - */ - inode = file_inode(obj->base.filp); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)) - shmem_truncate_range(inode, 0, (loff_t)-1); -+#else -+ truncate_inode_pages(inode->i_mapping, 0); -+ if (inode->i_op->truncate_range) -+ inode->i_op->truncate_range(inode, 0, (loff_t)-1); -+#endif - - obj->madv = __I915_MADV_PURGED; - } diff --git a/patches/collateral-evolutions/drm/08-shmem_truncate_range/drivers_gpu_drm_i915_i915_gem.c b/patches/collateral-evolutions/drm/08-shmem_truncate_range/drivers_gpu_drm_i915_i915_gem.c new file mode 100644 index 000000000000..cf4c3943558b --- /dev/null +++ b/patches/collateral-evolutions/drm/08-shmem_truncate_range/drivers_gpu_drm_i915_i915_gem.c @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -1620,7 +1620,13 @@ + * backing pages, *now*. + */ + inode = file_inode(obj->base.filp); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)) + shmem_truncate_range(inode, 0, (loff_t)-1); ++#else ++ truncate_inode_pages(inode->i_mapping, 0); ++ if (inode->i_op->truncate_range) ++ inode->i_op->truncate_range(inode, 0, (loff_t)-1); ++#endif + + obj->madv = __I915_MADV_PURGED; + } diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars.patch b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars.patch deleted file mode 100644 index 29c77194167a..000000000000 --- a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars.patch +++ /dev/null @@ -1,153 +0,0 @@ -Rename CONFIG_NOUVEAU_DEBUG and CONFIG_NOUVEAU_DEBUG_DEFAULT to -CONFIG_COMPAT_*. - ---- a/drivers/gpu/drm/nouveau/core/core/option.c -+++ b/drivers/gpu/drm/nouveau/core/core/option.c -@@ -86,7 +86,7 @@ nouveau_boolopt(const char *optstr, cons - int - nouveau_dbgopt(const char *optstr, const char *sub) - { -- int mode = 1, level = CONFIG_NOUVEAU_DEBUG_DEFAULT; -+ int mode = 1, level = CONFIG_COMPAT_NOUVEAU_DEBUG_DEFAULT; - - while (optstr) { - int len = strcspn(optstr, ",="); ---- a/drivers/gpu/drm/nouveau/core/include/core/client.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/client.h -@@ -15,7 +15,7 @@ struct nouveau_client { - static inline struct nouveau_client * - nv_client(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_CLIENT_CLASS))) - nv_assert("BAD CAST -> NvClient, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/device.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/device.h -@@ -97,7 +97,7 @@ nv_device(void *obj) - if (device->parent) - device = device->parent; - --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(device, NV_SUBDEV_CLASS) || - (nv_hclass(device) & 0xff) != NVDEV_SUBDEV_DEVICE)) { - nv_assert("BAD CAST -> NvDevice, 0x%08x 0x%08x", ---- a/drivers/gpu/drm/nouveau/core/include/core/engctx.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/engctx.h -@@ -20,7 +20,7 @@ struct nouveau_engctx { - static inline struct nouveau_engctx * - nv_engctx(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_ENGCTX_CLASS))) - nv_assert("BAD CAST -> NvEngCtx, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/engine.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/engine.h -@@ -22,7 +22,7 @@ struct nouveau_engine { - static inline struct nouveau_engine * - nv_engine(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_ENGINE_CLASS))) - nv_assert("BAD CAST -> NvEngine, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h -@@ -27,7 +27,7 @@ struct nouveau_gpuobj { - static inline struct nouveau_gpuobj * - nv_gpuobj(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_GPUOBJ_CLASS))) - nv_assert("BAD CAST -> NvGpuObj, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/namedb.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/namedb.h -@@ -14,7 +14,7 @@ struct nouveau_namedb { - static inline struct nouveau_namedb * - nv_namedb(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_NAMEDB_CLASS))) - nv_assert("BAD CAST -> NvNameDB, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/object.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/object.h -@@ -20,7 +20,7 @@ struct nouveau_object { - struct nouveau_object *engine; - atomic_t refcount; - atomic_t usecount; --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - #define NOUVEAU_OBJECT_MAGIC 0x75ef0bad - struct list_head list; - u32 _magic; -@@ -30,7 +30,7 @@ struct nouveau_object { - static inline struct nouveau_object * - nv_object(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (likely(obj)) { - struct nouveau_object *object = obj; - if (unlikely(object->_magic != NOUVEAU_OBJECT_MAGIC)) ---- a/drivers/gpu/drm/nouveau/core/include/core/parent.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/parent.h -@@ -29,7 +29,7 @@ struct nouveau_parent { - static inline struct nouveau_parent * - nv_parent(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!(nv_iclass(obj, NV_PARENT_CLASS)))) - nv_assert("BAD CAST -> NvParent, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/core/printk.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/printk.h -@@ -19,7 +19,7 @@ void __printf(4, 5) - nv_printk_(struct nouveau_object *, const char *, int, const char *, ...); - - #define nv_printk(o,l,f,a...) do { \ -- if (NV_DBG_##l <= CONFIG_NOUVEAU_DEBUG) \ -+ if (NV_DBG_##l <= CONFIG_COMPAT_NOUVEAU_DEBUG) \ - nv_printk_(nv_object(o), NV_PRINTK_##l, NV_DBG_##l, f, ##a); \ - } while(0) - -@@ -32,7 +32,7 @@ nv_printk_(struct nouveau_object *, cons - #define nv_spam(o,f,a...) nv_printk((o), SPAM, f, ##a) - - #define nv_assert(f,a...) do { \ -- if (NV_DBG_FATAL <= CONFIG_NOUVEAU_DEBUG) \ -+ if (NV_DBG_FATAL <= CONFIG_COMPAT_NOUVEAU_DEBUG) \ - nv_printk_(NULL, NV_PRINTK_FATAL, NV_DBG_FATAL, f "\n", ##a); \ - BUG_ON(1); \ - } while(0) ---- a/drivers/gpu/drm/nouveau/core/include/core/subdev.h -+++ b/drivers/gpu/drm/nouveau/core/include/core/subdev.h -@@ -20,7 +20,7 @@ struct nouveau_subdev { - static inline struct nouveau_subdev * - nv_subdev(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_SUBDEV_CLASS))) - nv_assert("BAD CAST -> NvSubDev, %08x", nv_hclass(obj)); - #endif ---- a/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h -+++ b/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h -@@ -16,7 +16,7 @@ struct nouveau_instobj { - static inline struct nouveau_instobj * - nv_memobj(void *obj) - { --#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA -+#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA - if (unlikely(!nv_iclass(obj, NV_MEMOBJ_CLASS))) - nv_assert("BAD CAST -> NvMemObj, %08x", nv_hclass(obj)); - #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/INFO b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/INFO new file mode 100644 index 000000000000..d533c9c840f5 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/INFO @@ -0,0 +1,3 @@ +Rename CONFIG_NOUVEAU_DEBUG and CONFIG_NOUVEAU_DEBUG_DEFAULT to +CONFIG_COMPAT_*. + diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_core_option.c b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_core_option.c new file mode 100644 index 000000000000..f47d37eed823 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_core_option.c @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/core/option.c ++++ b/drivers/gpu/drm/nouveau/core/core/option.c +@@ -86,7 +86,7 @@ + int + nouveau_dbgopt(const char *optstr, const char *sub) + { +- int mode = 1, level = CONFIG_NOUVEAU_DEBUG_DEFAULT; ++ int mode = 1, level = CONFIG_COMPAT_NOUVEAU_DEBUG_DEFAULT; + + while (optstr) { + int len = strcspn(optstr, ",="); diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_client.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_client.h new file mode 100644 index 000000000000..243fc8a349ca --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_client.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/client.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/client.h +@@ -15,7 +15,7 @@ + static inline struct nouveau_client * + nv_client(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_CLIENT_CLASS))) + nv_assert("BAD CAST -> NvClient, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_device.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_device.h new file mode 100644 index 000000000000..111f8bd7afc4 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_device.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/device.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/device.h +@@ -97,7 +97,7 @@ + if (device->parent) + device = device->parent; + +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(device, NV_SUBDEV_CLASS) || + (nv_hclass(device) & 0xff) != NVDEV_SUBDEV_DEVICE)) { + nv_assert("BAD CAST -> NvDevice, 0x%08x 0x%08x", diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engctx.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engctx.h new file mode 100644 index 000000000000..ff6055768426 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engctx.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/engctx.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/engctx.h +@@ -20,7 +20,7 @@ + static inline struct nouveau_engctx * + nv_engctx(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_ENGCTX_CLASS))) + nv_assert("BAD CAST -> NvEngCtx, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engine.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engine.h new file mode 100644 index 000000000000..86f12477480e --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_engine.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/engine.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/engine.h +@@ -22,7 +22,7 @@ + static inline struct nouveau_engine * + nv_engine(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_ENGINE_CLASS))) + nv_assert("BAD CAST -> NvEngine, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_gpuobj.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_gpuobj.h new file mode 100644 index 000000000000..e664d52332bd --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_gpuobj.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h +@@ -27,7 +27,7 @@ + static inline struct nouveau_gpuobj * + nv_gpuobj(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_GPUOBJ_CLASS))) + nv_assert("BAD CAST -> NvGpuObj, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_namedb.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_namedb.h new file mode 100644 index 000000000000..91faab0d179e --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_namedb.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/namedb.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/namedb.h +@@ -14,7 +14,7 @@ + static inline struct nouveau_namedb * + nv_namedb(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_NAMEDB_CLASS))) + nv_assert("BAD CAST -> NvNameDB, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_object.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_object.h new file mode 100644 index 000000000000..ede1ddace1e3 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_object.h @@ -0,0 +1,20 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/object.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/object.h +@@ -20,7 +20,7 @@ + struct nouveau_object *engine; + atomic_t refcount; + atomic_t usecount; +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + #define NOUVEAU_OBJECT_MAGIC 0x75ef0bad + struct list_head list; + u32 _magic; +@@ -30,7 +30,7 @@ + static inline struct nouveau_object * + nv_object(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (likely(obj)) { + struct nouveau_object *object = obj; + if (unlikely(object->_magic != NOUVEAU_OBJECT_MAGIC)) diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_parent.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_parent.h new file mode 100644 index 000000000000..087aead6998c --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_parent.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/parent.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/parent.h +@@ -29,7 +29,7 @@ + static inline struct nouveau_parent * + nv_parent(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!(nv_iclass(obj, NV_PARENT_CLASS)))) + nv_assert("BAD CAST -> NvParent, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_printk.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_printk.h new file mode 100644 index 000000000000..037b31cf5a42 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_printk.h @@ -0,0 +1,20 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/printk.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/printk.h +@@ -19,7 +19,7 @@ + nv_printk_(struct nouveau_object *, const char *, int, const char *, ...); + + #define nv_printk(o,l,f,a...) do { \ +- if (NV_DBG_##l <= CONFIG_NOUVEAU_DEBUG) \ ++ if (NV_DBG_##l <= CONFIG_COMPAT_NOUVEAU_DEBUG) \ + nv_printk_(nv_object(o), NV_PRINTK_##l, NV_DBG_##l, f, ##a); \ + } while(0) + +@@ -32,7 +32,7 @@ + #define nv_spam(o,f,a...) nv_printk((o), SPAM, f, ##a) + + #define nv_assert(f,a...) do { \ +- if (NV_DBG_FATAL <= CONFIG_NOUVEAU_DEBUG) \ ++ if (NV_DBG_FATAL <= CONFIG_COMPAT_NOUVEAU_DEBUG) \ + nv_printk_(NULL, NV_PRINTK_FATAL, NV_DBG_FATAL, f "\n", ##a); \ + BUG_ON(1); \ + } while(0) diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_subdev.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_subdev.h new file mode 100644 index 000000000000..c773d0203503 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_core_subdev.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/core/subdev.h ++++ b/drivers/gpu/drm/nouveau/core/include/core/subdev.h +@@ -20,7 +20,7 @@ + static inline struct nouveau_subdev * + nv_subdev(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_SUBDEV_CLASS))) + nv_assert("BAD CAST -> NvSubDev, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_subdev_instmem.h b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_subdev_instmem.h new file mode 100644 index 000000000000..30b682028ab3 --- /dev/null +++ b/patches/collateral-evolutions/drm/09-nouveau-compatify-kconfig-vars/drivers_gpu_drm_nouveau_core_include_subdev_instmem.h @@ -0,0 +1,11 @@ +--- a/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h ++++ b/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h +@@ -16,7 +16,7 @@ + static inline struct nouveau_instobj * + nv_memobj(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_MEMOBJ_CLASS))) + nv_assert("BAD CAST -> NvMemObj, %08x", nv_hclass(obj)); + #endif diff --git a/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO b/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO new file mode 100644 index 000000000000..28db5d28b795 --- /dev/null +++ b/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO @@ -0,0 +1,3 @@ +acpi_get_table_with_size() was exported with kernels >= 3.6. Revert the +size checking for kernels < 3.6. + diff --git a/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check.patch b/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/drivers_gpu_drm_radeon_radeon_bios.c similarity index 81% rename from patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check.patch rename to patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/drivers_gpu_drm_radeon_radeon_bios.c index 8adaeb3598b3..1bca6e827b3c 100644 --- a/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check.patch +++ b/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/drivers_gpu_drm_radeon_radeon_bios.c @@ -1,9 +1,6 @@ -acpi_get_table_with_size() was exported with kernels >= 3.6. Revert the -size checking for kernels < 3.6. - --- a/drivers/gpu/drm/radeon/radeon_bios.c +++ b/drivers/gpu/drm/radeon/radeon_bios.c -@@ -554,12 +554,21 @@ static bool radeon_acpi_vfct_bios(struct +@@ -554,12 +554,21 @@ { bool ret = false; struct acpi_table_header *hdr; diff --git a/patches/collateral-evolutions/drm/11-videomode-includes.patch b/patches/collateral-evolutions/drm/11-videomode-includes/drivers_gpu_drm_drm_modes.c similarity index 100% rename from patches/collateral-evolutions/drm/11-videomode-includes.patch rename to patches/collateral-evolutions/drm/11-videomode-includes/drivers_gpu_drm_drm_modes.c diff --git a/patches/collateral-evolutions/drm/98-pr_fmt.patch b/patches/collateral-evolutions/drm/98-pr_fmt.patch deleted file mode 100644 index 3c9224504f3d..000000000000 --- a/patches/collateral-evolutions/drm/98-pr_fmt.patch +++ /dev/null @@ -1,189 +0,0 @@ - -Undef/define/include printk.h for fixing redefinition warnings -during build. - -Patch adapted from compat-wireless tree. - ---- a/drivers/gpu/drm/drm_fb_helper.c -+++ b/drivers/gpu/drm/drm_fb_helper.c -@@ -27,9 +27,11 @@ - * Dave Airlie - * Jesse Barnes - */ -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include -+#include - #include - #include - #include ---- a/drivers/gpu/drm/ttm/ttm_agp_backend.c -+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c -@@ -29,8 +29,10 @@ - * Keith Packard. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - -+#include - #include - #include - #include ---- a/drivers/gpu/drm/ttm/ttm_bo.c -+++ b/drivers/gpu/drm/ttm/ttm_bo.c -@@ -28,11 +28,13 @@ - * Authors: Thomas Hellstrom - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - - #include - #include - #include -+#include - #include - #include - #include ---- a/drivers/gpu/drm/ttm/ttm_bo_vm.c -+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c -@@ -28,8 +28,10 @@ - * Authors: Thomas Hellstrom - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - -+#include - #include - #include - #include ---- a/drivers/gpu/drm/ttm/ttm_memory.c -+++ b/drivers/gpu/drm/ttm/ttm_memory.c -@@ -25,11 +25,13 @@ - * - **************************************************************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - - #include - #include - #include -+#include - #include - #include - #include ---- a/drivers/gpu/drm/ttm/ttm_object.c -+++ b/drivers/gpu/drm/ttm/ttm_object.c -@@ -49,10 +49,12 @@ - * for fast lookup of ref objects given a base object. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - - #include - #include -+#include - #include - #include - #include ---- a/drivers/gpu/drm/ttm/ttm_page_alloc.c -+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c -@@ -31,8 +31,10 @@ - * - doesn't track currently in use pages - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - -+#include - #include - #include - #include ---- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c -+++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c -@@ -33,8 +33,10 @@ - * when freed). - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - -+#include - #include - #include - #include /* for seq_printf */ ---- a/drivers/gpu/drm/ttm/ttm_tt.c -+++ b/drivers/gpu/drm/ttm/ttm_tt.c -@@ -28,8 +28,10 @@ - * Authors: Thomas Hellstrom - */ - -+#undef pr_fmt - #define pr_fmt(fmt) "[TTM] " fmt - -+#include - #include - #include - #include ---- a/drivers/gpu/drm/i915/i915_dma.c -+++ b/drivers/gpu/drm/i915/i915_dma.c -@@ -26,6 +26,7 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include -@@ -35,6 +36,7 @@ - #include - #include "i915_drv.h" - #include "i915_trace.h" -+#include - #include - #include - #include ---- a/drivers/gpu/drm/i915/i915_irq.c -+++ b/drivers/gpu/drm/i915/i915_irq.c -@@ -26,8 +26,10 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/gpu/drm/i915/intel_opregion.c -+++ b/drivers/gpu/drm/i915/intel_opregion.c -@@ -25,8 +25,10 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/gpu/drm/i915/intel_panel.c -+++ b/drivers/gpu/drm/i915/intel_panel.c -@@ -28,8 +28,10 @@ - * Chris Wilson - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include "intel_drv.h" - diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/INFO b/patches/collateral-evolutions/drm/98-pr_fmt/INFO new file mode 100644 index 000000000000..d7895f41e4e4 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/INFO @@ -0,0 +1,6 @@ + +Undef/define/include printk.h for fixing redefinition warnings +during build. + +Patch adapted from compat-wireless tree. + diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_drm_fb_helper.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_drm_fb_helper.c new file mode 100644 index 000000000000..49af9e73a7b4 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_drm_fb_helper.c @@ -0,0 +1,14 @@ +--- a/drivers/gpu/drm/drm_fb_helper.c ++++ b/drivers/gpu/drm/drm_fb_helper.c +@@ -27,9 +27,11 @@ + * Dave Airlie + * Jesse Barnes + */ ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_dma.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_dma.c new file mode 100644 index 000000000000..df64c81052c0 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_dma.c @@ -0,0 +1,18 @@ +--- a/drivers/gpu/drm/i915/i915_dma.c ++++ b/drivers/gpu/drm/i915/i915_dma.c +@@ -26,6 +26,7 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include +@@ -35,6 +36,7 @@ + #include + #include "i915_drv.h" + #include "i915_trace.h" ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_irq.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_irq.c new file mode 100644 index 000000000000..923a8b493937 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_i915_irq.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/i915/i915_irq.c ++++ b/drivers/gpu/drm/i915/i915_irq.c +@@ -26,8 +26,10 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_opregion.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_opregion.c new file mode 100644 index 000000000000..8279c93b2d0d --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_opregion.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/i915/intel_opregion.c ++++ b/drivers/gpu/drm/i915/intel_opregion.c +@@ -25,8 +25,10 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_panel.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_panel.c new file mode 100644 index 000000000000..3a87d9f76126 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_i915_intel_panel.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/i915/intel_panel.c ++++ b/drivers/gpu/drm/i915/intel_panel.c +@@ -28,8 +28,10 @@ + * Chris Wilson + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include "intel_drv.h" + diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_agp_backend.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_agp_backend.c new file mode 100644 index 000000000000..d4a791e49a83 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_agp_backend.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c ++++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c +@@ -29,8 +29,10 @@ + * Keith Packard. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo.c new file mode 100644 index 000000000000..ac5cb1d614b7 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo.c @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/ttm/ttm_bo.c ++++ b/drivers/gpu/drm/ttm/ttm_bo.c +@@ -28,11 +28,13 @@ + * Authors: Thomas Hellstrom + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + + #include + #include + #include ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo_vm.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo_vm.c new file mode 100644 index 000000000000..45c5f053cbdf --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_bo_vm.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c ++++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c +@@ -28,8 +28,10 @@ + * Authors: Thomas Hellstrom + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_memory.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_memory.c new file mode 100644 index 000000000000..ce492cb53dc5 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_memory.c @@ -0,0 +1,16 @@ +--- a/drivers/gpu/drm/ttm/ttm_memory.c ++++ b/drivers/gpu/drm/ttm/ttm_memory.c +@@ -25,11 +25,13 @@ + * + **************************************************************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + + #include + #include + #include ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_object.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_object.c new file mode 100644 index 000000000000..7c8ed9981b45 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_object.c @@ -0,0 +1,15 @@ +--- a/drivers/gpu/drm/ttm/ttm_object.c ++++ b/drivers/gpu/drm/ttm/ttm_object.c +@@ -49,10 +49,12 @@ + * for fast lookup of ref objects given a base object. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + + #include + #include ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc.c new file mode 100644 index 000000000000..355653836664 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c ++++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c +@@ -31,8 +31,10 @@ + * - doesn't track currently in use pages + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc_dma.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc_dma.c new file mode 100644 index 000000000000..a2c700a15e88 --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_page_alloc_dma.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c ++++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +@@ -33,8 +33,10 @@ + * when freed). + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + ++#include + #include + #include + #include /* for seq_printf */ diff --git a/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_tt.c b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_tt.c new file mode 100644 index 000000000000..2925d7db494b --- /dev/null +++ b/patches/collateral-evolutions/drm/98-pr_fmt/drivers_gpu_drm_ttm_ttm_tt.c @@ -0,0 +1,13 @@ +--- a/drivers/gpu/drm/ttm/ttm_tt.c ++++ b/drivers/gpu/drm/ttm/ttm_tt.c +@@ -28,8 +28,10 @@ + * Authors: Thomas Hellstrom + */ + ++#undef pr_fmt + #define pr_fmt(fmt) "[TTM] " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/drm/99-change-makefile/INFO b/patches/collateral-evolutions/drm/99-change-makefile/INFO new file mode 100644 index 000000000000..e64c528b5e9c --- /dev/null +++ b/patches/collateral-evolutions/drm/99-change-makefile/INFO @@ -0,0 +1,2 @@ +Remove drivers that we do not want to build from gpu/drm/Makefile + diff --git a/patches/collateral-evolutions/drm/99-change-makefile.patch b/patches/collateral-evolutions/drm/99-change-makefile/drivers_gpu_drm_Makefile similarity index 89% rename from patches/collateral-evolutions/drm/99-change-makefile.patch rename to patches/collateral-evolutions/drm/99-change-makefile/drivers_gpu_drm_Makefile index 00fa2be6ce8f..527c8572775f 100644 --- a/patches/collateral-evolutions/drm/99-change-makefile.patch +++ b/patches/collateral-evolutions/drm/99-change-makefile/drivers_gpu_drm_Makefile @@ -1,8 +1,6 @@ -Remove drivers that we do not want to build from gpu/drm/Makefile - --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile -@@ -31,25 +31,14 @@ CFLAGS_drm_trace_points.o := -I$(src) +@@ -31,25 +31,14 @@ obj-$(CONFIG_COMPAT_DRM) += drm.o obj-$(CONFIG_COMPAT_DRM_USB) += drm_usb.o obj-$(CONFIG_COMPAT_DRM_TTM) += ttm/ diff --git a/patches/collateral-evolutions/network/0001-netdev_ops.patch b/patches/collateral-evolutions/network/0001-netdev_ops.patch deleted file mode 100644 index e13fea7c4e9e..000000000000 --- a/patches/collateral-evolutions/network/0001-netdev_ops.patch +++ /dev/null @@ -1,290 +0,0 @@ - -This patch backports the struct net_device_ops changes added on 2.6.29. - -If we add the compat.git netdev_attach_ops() implementation -for newer kernels upstream it means we do not have to use this -patch at all for older kernels. - -mcgrof@tux ~/linux-stable (git::master)$ git describe --contains d314774cf2cd5dfeb39a00d37deee65d4c627927 -v2.6.29-rc1~581^2~677 - -commit d314774cf2cd5dfeb39a00d37deee65d4c627927 -Author: Stephen Hemminger -Date: Wed Nov 19 21:32:24 2008 -0800 - - netdev: network device operations infrastructure - - This patch changes the network device internal API to move adminstrative - operations out of the network device structure and into a separate structure. - - This patch involves some hackery to maintain compatablity between the - new and old model, so all 300+ drivers don't have to be changed at once. - For drivers that aren't converted yet, the netdevice_ops virt function list - still resides in the net_device structure. For old protocols, the new - net_device_ops are copied out to the old net_device pointers. - - After the transistion is completed the nag message can be changed to - an WARN_ON, and the compatiablity code can be made configurable. - - Some function pointers aren't moved: - * destructor can't be in net_device_ops because - it may need to be referenced after the module is unloaded. - * neighbor setup is manipulated in a couple of places that need special - consideration - * hard_start_xmit is in the fast path for transmit. - - Signed-off-by: Stephen Hemminger - Signed-off-by: David S. Miller - ---- a/drivers/net/usb/rndis_host.c -+++ b/drivers/net/usb/rndis_host.c -@@ -358,7 +358,7 @@ generic_rndis_bind(struct usbnet *dev, s - dev->rx_urb_size &= ~(dev->maxpacket - 1); - u.init->max_transfer_size = cpu_to_le32(dev->rx_urb_size); - -- net->netdev_ops = &rndis_netdev_ops; -+ netdev_attach_ops(net, &rndis_netdev_ops); - - retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE); - if (unlikely(retval < 0)) { ---- a/drivers/net/usb/usbnet.c -+++ b/drivers/net/usb/usbnet.c -@@ -1446,7 +1446,7 @@ usbnet_probe (struct usb_interface *udev - net->features |= NETIF_F_HIGHDMA; - #endif - -- net->netdev_ops = &usbnet_netdev_ops; -+ netdev_attach_ops(net, &usbnet_netdev_ops); - net->watchdog_timeo = TX_TIMEOUT_JIFFIES; - net->ethtool_ops = &usbnet_ethtool_ops; - ---- a/drivers/net/wireless/ath/ath6kl/main.c -+++ b/drivers/net/wireless/ath/ath6kl/main.c -@@ -1289,7 +1289,7 @@ static const struct net_device_ops ath6k - - void init_netdev(struct net_device *dev) - { -- dev->netdev_ops = &ath6kl_netdev_ops; -+ netdev_attach_ops(dev, &ath6kl_netdev_ops); - dev->destructor = free_netdev; - dev->watchdog_timeo = ATH6KL_TX_TIMEOUT; - ---- a/drivers/net/wireless/ath/wil6210/netdev.c -+++ b/drivers/net/wireless/ath/wil6210/netdev.c -@@ -76,7 +76,7 @@ void *wil_if_alloc(struct device *dev, v - goto out_priv; - } - -- ndev->netdev_ops = &wil_netdev_ops; -+ netdev_attach_ops(ndev, &wil_netdev_ops); - ndev->ieee80211_ptr = wdev; - SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy)); - wdev->netdev = ndev; ---- a/drivers/net/wireless/rndis_wlan.c -+++ b/drivers/net/wireless/rndis_wlan.c -@@ -3438,7 +3438,7 @@ static int rndis_wlan_bind(struct usbnet - * rndis_host wants to avoid all OID as much as possible - * so do promisc/multicast handling in rndis_wlan. - */ -- usbdev->net->netdev_ops = &rndis_wlan_netdev_ops; -+ netdev_attach_ops(usbdev->net, &rndis_wlan_netdev_ops); - - tmp = cpu_to_le32(RNDIS_PACKET_TYPE_DIRECTED | RNDIS_PACKET_TYPE_BROADCAST); - retval = rndis_set_oid(usbdev, ---- a/drivers/net/ethernet/broadcom/b44.c -+++ b/drivers/net/ethernet/broadcom/b44.c -@@ -2170,7 +2170,7 @@ static int b44_init_one(struct ssb_devic - bp->rx_pending = B44_DEF_RX_RING_PENDING; - bp->tx_pending = B44_DEF_TX_RING_PENDING; - -- dev->netdev_ops = &b44_netdev_ops; -+ netdev_attach_ops(dev, &b44_netdev_ops); - netif_napi_add(dev, &bp->napi, b44_poll, 64); - dev->watchdog_timeo = B44_TX_TIMEOUT; - dev->irq = sdev->irq; ---- a/drivers/net/wireless/ipw2x00/ipw2100.c -+++ b/drivers/net/wireless/ipw2x00/ipw2100.c -@@ -6086,7 +6086,7 @@ static struct net_device *ipw2100_alloc_ - priv->ieee->perfect_rssi = -20; - priv->ieee->worst_rssi = -85; - -- dev->netdev_ops = &ipw2100_netdev_ops; -+ netdev_attach_ops(dev, &ipw2100_netdev_ops); - dev->ethtool_ops = &ipw2100_ethtool_ops; - dev->wireless_handlers = &ipw2100_wx_handler_def; - priv->wireless_data.libipw = priv->ieee; ---- a/drivers/net/wireless/ipw2x00/ipw2200.c -+++ b/drivers/net/wireless/ipw2x00/ipw2200.c -@@ -11680,7 +11680,7 @@ static int ipw_prom_alloc(struct ipw_pri - memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN); - - priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; -- priv->prom_net_dev->netdev_ops = &ipw_prom_netdev_ops; -+ netdev_attach_ops(priv->prom_net_dev, &ipw_prom_netdev_ops); - - priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; - SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev); -@@ -11818,7 +11818,7 @@ static int ipw_pci_probe(struct pci_dev - priv->ieee->perfect_rssi = -20; - priv->ieee->worst_rssi = -85; - -- net_dev->netdev_ops = &ipw_netdev_ops; -+ netdev_attach_ops(net_dev, &ipw_netdev_ops); - priv->wireless_data.spy_data = &priv->ieee->spy_data; - net_dev->wireless_data = &priv->wireless_data; - net_dev->wireless_handlers = &ipw_wx_handler_def; ---- a/drivers/net/wireless/libertas/main.c -+++ b/drivers/net/wireless/libertas/main.c -@@ -993,7 +993,7 @@ struct lbs_private *lbs_add_card(void *c - wdev->netdev = dev; - priv->dev = dev; - -- dev->netdev_ops = &lbs_netdev_ops; -+ netdev_attach_ops(dev, &lbs_netdev_ops); - dev->watchdog_timeo = 5 * HZ; - dev->ethtool_ops = &lbs_ethtool_ops; - dev->flags |= IFF_BROADCAST | IFF_MULTICAST; ---- a/drivers/net/wireless/libertas/mesh.c -+++ b/drivers/net/wireless/libertas/mesh.c -@@ -1015,7 +1015,7 @@ static int lbs_add_mesh(struct lbs_priva - mesh_dev->ieee80211_ptr = mesh_wdev; - priv->mesh_dev = mesh_dev; - -- mesh_dev->netdev_ops = &mesh_netdev_ops; -+ netdev_attach_ops(mesh_dev, &mesh_netdev_ops); - mesh_dev->ethtool_ops = &lbs_ethtool_ops; - memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, ETH_ALEN); - ---- a/drivers/net/wireless/mac80211_hwsim.c -+++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -1695,7 +1695,7 @@ static const struct net_device_ops hwsim - - static void hwsim_mon_setup(struct net_device *dev) - { -- dev->netdev_ops = &hwsim_netdev_ops; -+ netdev_attach_ops(dev, &hwsim_netdev_ops); - dev->destructor = free_netdev; - ether_setup(dev); - dev->tx_queue_len = 0; ---- a/drivers/net/wireless/mwifiex/main.c -+++ b/drivers/net/wireless/mwifiex/main.c -@@ -654,7 +654,7 @@ static const struct net_device_ops mwifi - void mwifiex_init_priv_params(struct mwifiex_private *priv, - struct net_device *dev) - { -- dev->netdev_ops = &mwifiex_netdev_ops; -+ netdev_attach_ops(dev, &mwifiex_netdev_ops); - /* Initialize private structure */ - priv->current_key_index = 0; - priv->media_connected = false; ---- a/net/bluetooth/bnep/netdev.c -+++ b/net/bluetooth/bnep/netdev.c -@@ -223,7 +223,7 @@ void bnep_net_setup(struct net_device *d - - ether_setup(dev); - dev->priv_flags &= ~IFF_TX_SKB_SHARING; -- dev->netdev_ops = &bnep_netdev_ops; -+ netdev_attach_ops(dev, &bnep_netdev_ops); - - dev->watchdog_timeo = HZ * 2; - } ---- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -@@ -2207,7 +2207,7 @@ static int atl1e_init_netdev(struct net_ - SET_NETDEV_DEV(netdev, &pdev->dev); - pci_set_drvdata(pdev, netdev); - -- netdev->netdev_ops = &atl1e_netdev_ops; -+ netdev_attach_ops(netdev, &atl1e_netdev_ops); - - netdev->watchdog_timeo = AT_TX_WATCHDOG; - atl1e_set_ethtool_ops(netdev); ---- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -@@ -2470,7 +2470,7 @@ static int atl1c_init_netdev(struct net_ - SET_NETDEV_DEV(netdev, &pdev->dev); - pci_set_drvdata(pdev, netdev); - -- netdev->netdev_ops = &atl1c_netdev_ops; -+ netdev_attach_ops(netdev, &atl1c_netdev_ops); - netdev->watchdog_timeo = AT_TX_WATCHDOG; - atl1c_set_ethtool_ops(netdev); - ---- a/drivers/net/ethernet/atheros/atlx/atl1.c -+++ b/drivers/net/ethernet/atheros/atlx/atl1.c -@@ -3009,7 +3009,7 @@ static int atl1_probe(struct pci_dev *pd - adapter->mii.phy_id_mask = 0x1f; - adapter->mii.reg_num_mask = 0x1f; - -- netdev->netdev_ops = &atl1_netdev_ops; -+ netdev_attach_ops(netdev, &atl1_netdev_ops); - netdev->watchdog_timeo = 5 * HZ; - netif_napi_add(netdev, &adapter->napi, atl1_rings_clean, 64); - ---- a/drivers/net/ethernet/atheros/atlx/atl2.c -+++ b/drivers/net/ethernet/atheros/atlx/atl2.c -@@ -1396,7 +1396,7 @@ static int atl2_probe(struct pci_dev *pd - - atl2_setup_pcicmd(pdev); - -- netdev->netdev_ops = &atl2_netdev_ops; -+ netdev_attach_ops(netdev, &atl2_netdev_ops); - atl2_set_ethtool_ops(netdev); - netdev->watchdog_timeo = 5 * HZ; - strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); ---- a/net/mac80211/iface.c -+++ b/net/mac80211/iface.c -@@ -1017,7 +1017,7 @@ static void ieee80211_if_setup(struct ne - { - ether_setup(dev); - dev->priv_flags &= ~IFF_TX_SKB_SHARING; -- dev->netdev_ops = &ieee80211_dataif_ops; -+ netdev_attach_ops(dev, &ieee80211_dataif_ops); - dev->destructor = free_netdev; - } - -@@ -1180,7 +1180,7 @@ static void ieee80211_setup_sdata(struct - - /* only monitor/p2p-device differ */ - if (sdata->dev) { -- sdata->dev->netdev_ops = &ieee80211_dataif_ops; -+ netdev_attach_ops(sdata->dev, &ieee80211_dataif_ops); - sdata->dev->type = ARPHRD_ETHER; - } - -@@ -1218,7 +1218,7 @@ static void ieee80211_setup_sdata(struct - break; - case NL80211_IFTYPE_MONITOR: - sdata->dev->type = ARPHRD_IEEE80211_RADIOTAP; -- sdata->dev->netdev_ops = &ieee80211_monitorif_ops; -+ netdev_attach_ops(sdata->dev, &ieee80211_monitorif_ops); - sdata->u.mntr_flags = MONITOR_FLAG_CONTROL | - MONITOR_FLAG_OTHER_BSS; - break; ---- a/drivers/net/wireless/orinoco/main.c -+++ b/drivers/net/wireless/orinoco/main.c -@@ -2272,9 +2272,9 @@ int orinoco_if_add(struct orinoco_privat - #endif - /* Default to standard ops if not set */ - if (ops) -- dev->netdev_ops = ops; -+ netdev_attach_ops(dev, ops); - else -- dev->netdev_ops = &orinoco_netdev_ops; -+ netdev_attach_ops(dev, &orinoco_netdev_ops); - - /* we use the default eth_mac_addr for setting the MAC addr */ - ---- a/net/wireless/wext-core.c -+++ b/net/wireless/wext-core.c -@@ -925,9 +925,7 @@ static int wireless_process_ioctl(struct - return private(dev, iwr, cmd, info, handler); - } - /* Old driver API : call driver ioctl handler */ -- if (dev->netdev_ops->ndo_do_ioctl) -- return dev->netdev_ops->ndo_do_ioctl(dev, ifr, cmd); -- return -EOPNOTSUPP; -+ return ndo_do_ioctl(dev, ifr, cmd); - } - - /* If command is `set a parameter', or `get the encoding parameters', diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/INFO b/patches/collateral-evolutions/network/0001-netdev_ops/INFO new file mode 100644 index 000000000000..31bea5162e89 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/INFO @@ -0,0 +1,38 @@ + +This patch backports the struct net_device_ops changes added on 2.6.29. + +If we add the compat.git netdev_attach_ops() implementation +for newer kernels upstream it means we do not have to use this +patch at all for older kernels. + +mcgrof@tux ~/linux-stable (git::master)$ git describe --contains d314774cf2cd5dfeb39a00d37deee65d4c627927 +v2.6.29-rc1~581^2~677 + +commit d314774cf2cd5dfeb39a00d37deee65d4c627927 +Author: Stephen Hemminger +Date: Wed Nov 19 21:32:24 2008 -0800 + + netdev: network device operations infrastructure + + This patch changes the network device internal API to move adminstrative + operations out of the network device structure and into a separate structure. + + This patch involves some hackery to maintain compatablity between the + new and old model, so all 300+ drivers don't have to be changed at once. + For drivers that aren't converted yet, the netdevice_ops virt function list + still resides in the net_device structure. For old protocols, the new + net_device_ops are copied out to the old net_device pointers. + + After the transistion is completed the nag message can be changed to + an WARN_ON, and the compatiablity code can be made configurable. + + Some function pointers aren't moved: + * destructor can't be in net_device_ops because + it may need to be referenced after the module is unloaded. + * neighbor setup is manipulated in a couple of places that need special + consideration + * hard_start_xmit is in the fast path for transmit. + + Signed-off-by: Stephen Hemminger + Signed-off-by: David S. Miller + diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atl1c_atl1c_main.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atl1c_atl1c_main.c new file mode 100644 index 000000000000..c52f463964b0 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atl1c_atl1c_main.c @@ -0,0 +1,11 @@ +--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c ++++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +@@ -2470,7 +2470,7 @@ + SET_NETDEV_DEV(netdev, &pdev->dev); + pci_set_drvdata(pdev, netdev); + +- netdev->netdev_ops = &atl1c_netdev_ops; ++ netdev_attach_ops(netdev, &atl1c_netdev_ops); + netdev->watchdog_timeo = AT_TX_WATCHDOG; + atl1c_set_ethtool_ops(netdev); + diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atl1e_atl1e_main.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atl1e_atl1e_main.c new file mode 100644 index 000000000000..4794c2285f0f --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atl1e_atl1e_main.c @@ -0,0 +1,11 @@ +--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c ++++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +@@ -2207,7 +2207,7 @@ + SET_NETDEV_DEV(netdev, &pdev->dev); + pci_set_drvdata(pdev, netdev); + +- netdev->netdev_ops = &atl1e_netdev_ops; ++ netdev_attach_ops(netdev, &atl1e_netdev_ops); + + netdev->watchdog_timeo = AT_TX_WATCHDOG; + atl1e_set_ethtool_ops(netdev); diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atlx_atl1.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atlx_atl1.c new file mode 100644 index 000000000000..437b423bffa7 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atlx_atl1.c @@ -0,0 +1,11 @@ +--- a/drivers/net/ethernet/atheros/atlx/atl1.c ++++ b/drivers/net/ethernet/atheros/atlx/atl1.c +@@ -3009,7 +3009,7 @@ + adapter->mii.phy_id_mask = 0x1f; + adapter->mii.reg_num_mask = 0x1f; + +- netdev->netdev_ops = &atl1_netdev_ops; ++ netdev_attach_ops(netdev, &atl1_netdev_ops); + netdev->watchdog_timeo = 5 * HZ; + netif_napi_add(netdev, &adapter->napi, atl1_rings_clean, 64); + diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atlx_atl2.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atlx_atl2.c new file mode 100644 index 000000000000..b5024ea2abc7 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_atheros_atlx_atl2.c @@ -0,0 +1,11 @@ +--- a/drivers/net/ethernet/atheros/atlx/atl2.c ++++ b/drivers/net/ethernet/atheros/atlx/atl2.c +@@ -1396,7 +1396,7 @@ + + atl2_setup_pcicmd(pdev); + +- netdev->netdev_ops = &atl2_netdev_ops; ++ netdev_attach_ops(netdev, &atl2_netdev_ops); + atl2_set_ethtool_ops(netdev); + netdev->watchdog_timeo = 5 * HZ; + strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_broadcom_b44.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_broadcom_b44.c new file mode 100644 index 000000000000..2d44f7146041 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_ethernet_broadcom_b44.c @@ -0,0 +1,11 @@ +--- a/drivers/net/ethernet/broadcom/b44.c ++++ b/drivers/net/ethernet/broadcom/b44.c +@@ -2170,7 +2170,7 @@ + bp->rx_pending = B44_DEF_RX_RING_PENDING; + bp->tx_pending = B44_DEF_TX_RING_PENDING; + +- dev->netdev_ops = &b44_netdev_ops; ++ netdev_attach_ops(dev, &b44_netdev_ops); + netif_napi_add(dev, &bp->napi, b44_poll, 64); + dev->watchdog_timeo = B44_TX_TIMEOUT; + dev->irq = sdev->irq; diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_usb_rndis_host.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_usb_rndis_host.c new file mode 100644 index 000000000000..3ced6304fe97 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_usb_rndis_host.c @@ -0,0 +1,11 @@ +--- a/drivers/net/usb/rndis_host.c ++++ b/drivers/net/usb/rndis_host.c +@@ -358,7 +358,7 @@ + dev->rx_urb_size &= ~(dev->maxpacket - 1); + u.init->max_transfer_size = cpu_to_le32(dev->rx_urb_size); + +- net->netdev_ops = &rndis_netdev_ops; ++ netdev_attach_ops(net, &rndis_netdev_ops); + + retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE); + if (unlikely(retval < 0)) { diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_usb_usbnet.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_usb_usbnet.c new file mode 100644 index 000000000000..f2bf6eccc5f0 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_usb_usbnet.c @@ -0,0 +1,11 @@ +--- a/drivers/net/usb/usbnet.c ++++ b/drivers/net/usb/usbnet.c +@@ -1446,7 +1446,7 @@ + net->features |= NETIF_F_HIGHDMA; + #endif + +- net->netdev_ops = &usbnet_netdev_ops; ++ netdev_attach_ops(net, &usbnet_netdev_ops); + net->watchdog_timeo = TX_TIMEOUT_JIFFIES; + net->ethtool_ops = &usbnet_ethtool_ops; + diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ath_ath6kl_main.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ath_ath6kl_main.c new file mode 100644 index 000000000000..d8e008e298eb --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ath_ath6kl_main.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/ath/ath6kl/main.c ++++ b/drivers/net/wireless/ath/ath6kl/main.c +@@ -1289,7 +1289,7 @@ + + void init_netdev(struct net_device *dev) + { +- dev->netdev_ops = &ath6kl_netdev_ops; ++ netdev_attach_ops(dev, &ath6kl_netdev_ops); + dev->destructor = free_netdev; + dev->watchdog_timeo = ATH6KL_TX_TIMEOUT; + diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ath_wil6210_netdev.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ath_wil6210_netdev.c new file mode 100644 index 000000000000..78347abfd118 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ath_wil6210_netdev.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/ath/wil6210/netdev.c ++++ b/drivers/net/wireless/ath/wil6210/netdev.c +@@ -76,7 +76,7 @@ + goto out_priv; + } + +- ndev->netdev_ops = &wil_netdev_ops; ++ netdev_attach_ops(ndev, &wil_netdev_ops); + ndev->ieee80211_ptr = wdev; + SET_NETDEV_DEV(ndev, wiphy_dev(wdev->wiphy)); + wdev->netdev = ndev; diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ipw2x00_ipw2100.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ipw2x00_ipw2100.c new file mode 100644 index 000000000000..04042212079a --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ipw2x00_ipw2100.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/ipw2x00/ipw2100.c ++++ b/drivers/net/wireless/ipw2x00/ipw2100.c +@@ -6086,7 +6086,7 @@ + priv->ieee->perfect_rssi = -20; + priv->ieee->worst_rssi = -85; + +- dev->netdev_ops = &ipw2100_netdev_ops; ++ netdev_attach_ops(dev, &ipw2100_netdev_ops); + dev->ethtool_ops = &ipw2100_ethtool_ops; + dev->wireless_handlers = &ipw2100_wx_handler_def; + priv->wireless_data.libipw = priv->ieee; diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ipw2x00_ipw2200.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ipw2x00_ipw2200.c new file mode 100644 index 000000000000..98d01434309c --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_ipw2x00_ipw2200.c @@ -0,0 +1,20 @@ +--- a/drivers/net/wireless/ipw2x00/ipw2200.c ++++ b/drivers/net/wireless/ipw2x00/ipw2200.c +@@ -11680,7 +11680,7 @@ + memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN); + + priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; +- priv->prom_net_dev->netdev_ops = &ipw_prom_netdev_ops; ++ netdev_attach_ops(priv->prom_net_dev, &ipw_prom_netdev_ops); + + priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; + SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev); +@@ -11818,7 +11818,7 @@ + priv->ieee->perfect_rssi = -20; + priv->ieee->worst_rssi = -85; + +- net_dev->netdev_ops = &ipw_netdev_ops; ++ netdev_attach_ops(net_dev, &ipw_netdev_ops); + priv->wireless_data.spy_data = &priv->ieee->spy_data; + net_dev->wireless_data = &priv->wireless_data; + net_dev->wireless_handlers = &ipw_wx_handler_def; diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_libertas_main.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_libertas_main.c new file mode 100644 index 000000000000..f77d30367ce6 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_libertas_main.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/libertas/main.c ++++ b/drivers/net/wireless/libertas/main.c +@@ -993,7 +993,7 @@ + wdev->netdev = dev; + priv->dev = dev; + +- dev->netdev_ops = &lbs_netdev_ops; ++ netdev_attach_ops(dev, &lbs_netdev_ops); + dev->watchdog_timeo = 5 * HZ; + dev->ethtool_ops = &lbs_ethtool_ops; + dev->flags |= IFF_BROADCAST | IFF_MULTICAST; diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_libertas_mesh.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_libertas_mesh.c new file mode 100644 index 000000000000..434f27bd778a --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_libertas_mesh.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/libertas/mesh.c ++++ b/drivers/net/wireless/libertas/mesh.c +@@ -1015,7 +1015,7 @@ + mesh_dev->ieee80211_ptr = mesh_wdev; + priv->mesh_dev = mesh_dev; + +- mesh_dev->netdev_ops = &mesh_netdev_ops; ++ netdev_attach_ops(mesh_dev, &mesh_netdev_ops); + mesh_dev->ethtool_ops = &lbs_ethtool_ops; + memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, ETH_ALEN); + diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_mac80211_hwsim.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_mac80211_hwsim.c new file mode 100644 index 000000000000..c469227d8520 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_mac80211_hwsim.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/mac80211_hwsim.c ++++ b/drivers/net/wireless/mac80211_hwsim.c +@@ -1695,7 +1695,7 @@ + + static void hwsim_mon_setup(struct net_device *dev) + { +- dev->netdev_ops = &hwsim_netdev_ops; ++ netdev_attach_ops(dev, &hwsim_netdev_ops); + dev->destructor = free_netdev; + ether_setup(dev); + dev->tx_queue_len = 0; diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_mwifiex_main.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_mwifiex_main.c new file mode 100644 index 000000000000..e34289ff0055 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_mwifiex_main.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/mwifiex/main.c ++++ b/drivers/net/wireless/mwifiex/main.c +@@ -654,7 +654,7 @@ + void mwifiex_init_priv_params(struct mwifiex_private *priv, + struct net_device *dev) + { +- dev->netdev_ops = &mwifiex_netdev_ops; ++ netdev_attach_ops(dev, &mwifiex_netdev_ops); + /* Initialize private structure */ + priv->current_key_index = 0; + priv->media_connected = false; diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_orinoco_main.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_orinoco_main.c new file mode 100644 index 000000000000..563ed60bce34 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_orinoco_main.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/orinoco/main.c ++++ b/drivers/net/wireless/orinoco/main.c +@@ -2272,9 +2272,9 @@ + #endif + /* Default to standard ops if not set */ + if (ops) +- dev->netdev_ops = ops; ++ netdev_attach_ops(dev, ops); + else +- dev->netdev_ops = &orinoco_netdev_ops; ++ netdev_attach_ops(dev, &orinoco_netdev_ops); + + /* we use the default eth_mac_addr for setting the MAC addr */ + diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_rndis_wlan.c b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_rndis_wlan.c new file mode 100644 index 000000000000..2c2d83909ac2 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/drivers_net_wireless_rndis_wlan.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/rndis_wlan.c ++++ b/drivers/net/wireless/rndis_wlan.c +@@ -3438,7 +3438,7 @@ + * rndis_host wants to avoid all OID as much as possible + * so do promisc/multicast handling in rndis_wlan. + */ +- usbdev->net->netdev_ops = &rndis_wlan_netdev_ops; ++ netdev_attach_ops(usbdev->net, &rndis_wlan_netdev_ops); + + tmp = cpu_to_le32(RNDIS_PACKET_TYPE_DIRECTED | RNDIS_PACKET_TYPE_BROADCAST); + retval = rndis_set_oid(usbdev, diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/net_bluetooth_bnep_netdev.c b/patches/collateral-evolutions/network/0001-netdev_ops/net_bluetooth_bnep_netdev.c new file mode 100644 index 000000000000..f445877b1595 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/net_bluetooth_bnep_netdev.c @@ -0,0 +1,11 @@ +--- a/net/bluetooth/bnep/netdev.c ++++ b/net/bluetooth/bnep/netdev.c +@@ -223,7 +223,7 @@ + + ether_setup(dev); + dev->priv_flags &= ~IFF_TX_SKB_SHARING; +- dev->netdev_ops = &bnep_netdev_ops; ++ netdev_attach_ops(dev, &bnep_netdev_ops); + + dev->watchdog_timeo = HZ * 2; + } diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/net_mac80211_iface.c b/patches/collateral-evolutions/network/0001-netdev_ops/net_mac80211_iface.c new file mode 100644 index 000000000000..8f44fe5f12bf --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/net_mac80211_iface.c @@ -0,0 +1,29 @@ +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -1017,7 +1017,7 @@ + { + ether_setup(dev); + dev->priv_flags &= ~IFF_TX_SKB_SHARING; +- dev->netdev_ops = &ieee80211_dataif_ops; ++ netdev_attach_ops(dev, &ieee80211_dataif_ops); + dev->destructor = free_netdev; + } + +@@ -1180,7 +1180,7 @@ + + /* only monitor/p2p-device differ */ + if (sdata->dev) { +- sdata->dev->netdev_ops = &ieee80211_dataif_ops; ++ netdev_attach_ops(sdata->dev, &ieee80211_dataif_ops); + sdata->dev->type = ARPHRD_ETHER; + } + +@@ -1218,7 +1218,7 @@ + break; + case NL80211_IFTYPE_MONITOR: + sdata->dev->type = ARPHRD_IEEE80211_RADIOTAP; +- sdata->dev->netdev_ops = &ieee80211_monitorif_ops; ++ netdev_attach_ops(sdata->dev, &ieee80211_monitorif_ops); + sdata->u.mntr_flags = MONITOR_FLAG_CONTROL | + MONITOR_FLAG_OTHER_BSS; + break; diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/net_wireless_wext-core.c b/patches/collateral-evolutions/network/0001-netdev_ops/net_wireless_wext-core.c new file mode 100644 index 000000000000..df6c792fdbe1 --- /dev/null +++ b/patches/collateral-evolutions/network/0001-netdev_ops/net_wireless_wext-core.c @@ -0,0 +1,13 @@ +--- a/net/wireless/wext-core.c ++++ b/net/wireless/wext-core.c +@@ -925,9 +925,7 @@ + return private(dev, iwr, cmd, info, handler); + } + /* Old driver API : call driver ioctl handler */ +- if (dev->netdev_ops->ndo_do_ioctl) +- return dev->netdev_ops->ndo_do_ioctl(dev, ifr, cmd); +- return -EOPNOTSUPP; ++ return ndo_do_ioctl(dev, ifr, cmd); + } + + /* If command is `set a parameter', or `get the encoding parameters', diff --git a/patches/collateral-evolutions/network/0002-net-misc.patch b/patches/collateral-evolutions/network/0002-net-misc.patch deleted file mode 100644 index bd50e0d28753..000000000000 --- a/patches/collateral-evolutions/network/0002-net-misc.patch +++ /dev/null @@ -1,68 +0,0 @@ -These are things that removed in later kernels but no good explanatin -was provided as to their removal. We should review if this is needed -and if not remove these hunks. - -Pretty sure we can remove the netdev_tx_t hunk change on -net/bluetooth/bnep/netdev.c, removing that hunk just needs to be -compile tested against older kernels. - ---- a/drivers/net/usb/rndis_host.c -+++ b/drivers/net/usb/rndis_host.c -@@ -332,6 +332,11 @@ generic_rndis_bind(struct usbnet *dev, s - u.init->major_version = cpu_to_le32(1); - u.init->minor_version = cpu_to_le32(0); - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) -+ /* can't we remove this? */ -+ net->change_mtu = NULL; -+#endif -+ - /* max transfer (in spec) is 0x4000 at full speed, but for - * TX we'll stick to one Ethernet packet plus RNDIS framing. - * For RX we handle drivers that zero-pad to end-of-packet. ---- a/net/mac80211/iface.c -+++ b/net/mac80211/iface.c -@@ -1018,6 +1018,11 @@ static void ieee80211_if_setup(struct ne - ether_setup(dev); - dev->priv_flags &= ~IFF_TX_SKB_SHARING; - netdev_attach_ops(dev, &ieee80211_dataif_ops); -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) -+ /* Do we need this ? */ -+ /* we will validate the address ourselves in ->open */ -+ dev->validate_addr = NULL; -+#endif - dev->destructor = free_netdev; - } - ---- a/net/bluetooth/bnep/netdev.c -+++ b/net/bluetooth/bnep/netdev.c -@@ -161,8 +161,12 @@ static int bnep_net_proto_filter(struct - } - #endif - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) - static netdev_tx_t bnep_net_xmit(struct sk_buff *skb, - struct net_device *dev) -+#else -+static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev) -+#endif - { - struct bnep_session *s = netdev_priv(dev); - struct sock *sk = s->sock->sk; ---- a/drivers/net/wireless/libertas/defs.h -+++ b/drivers/net/wireless/libertas/defs.h -@@ -16,6 +16,14 @@ - #define DRV_NAME "libertas" - #endif - -+/* -+ * Really nasty hack to avoid stuffing compat.diff with tons of ifdefs, -+ * we could add this to a compat header file but too lazy to check ml_priv -+ * is not used anywhere else -+ */ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) -+#define ml_priv priv -+#endif - - #define LBS_DEB_ENTER 0x00000001 - #define LBS_DEB_LEAVE 0x00000002 diff --git a/patches/collateral-evolutions/network/0002-net-misc/INFO b/patches/collateral-evolutions/network/0002-net-misc/INFO new file mode 100644 index 000000000000..fcfb41608401 --- /dev/null +++ b/patches/collateral-evolutions/network/0002-net-misc/INFO @@ -0,0 +1,8 @@ +These are things that removed in later kernels but no good explanatin +was provided as to their removal. We should review if this is needed +and if not remove these hunks. + +Pretty sure we can remove the netdev_tx_t hunk change on +net/bluetooth/bnep/netdev.c, removing that hunk just needs to be +compile tested against older kernels. + diff --git a/patches/collateral-evolutions/network/0002-net-misc/drivers_net_usb_rndis_host.c b/patches/collateral-evolutions/network/0002-net-misc/drivers_net_usb_rndis_host.c new file mode 100644 index 000000000000..ea802ffe7c1a --- /dev/null +++ b/patches/collateral-evolutions/network/0002-net-misc/drivers_net_usb_rndis_host.c @@ -0,0 +1,14 @@ +--- a/drivers/net/usb/rndis_host.c ++++ b/drivers/net/usb/rndis_host.c +@@ -332,6 +332,11 @@ + u.init->major_version = cpu_to_le32(1); + u.init->minor_version = cpu_to_le32(0); + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) ++ /* can't we remove this? */ ++ net->change_mtu = NULL; ++#endif ++ + /* max transfer (in spec) is 0x4000 at full speed, but for + * TX we'll stick to one Ethernet packet plus RNDIS framing. + * For RX we handle drivers that zero-pad to end-of-packet. diff --git a/patches/collateral-evolutions/network/0002-net-misc/drivers_net_wireless_libertas_defs.h b/patches/collateral-evolutions/network/0002-net-misc/drivers_net_wireless_libertas_defs.h new file mode 100644 index 000000000000..5039684e2ba4 --- /dev/null +++ b/patches/collateral-evolutions/network/0002-net-misc/drivers_net_wireless_libertas_defs.h @@ -0,0 +1,17 @@ +--- a/drivers/net/wireless/libertas/defs.h ++++ b/drivers/net/wireless/libertas/defs.h +@@ -16,6 +16,14 @@ + #define DRV_NAME "libertas" + #endif + ++/* ++ * Really nasty hack to avoid stuffing compat.diff with tons of ifdefs, ++ * we could add this to a compat header file but too lazy to check ml_priv ++ * is not used anywhere else ++ */ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) ++#define ml_priv priv ++#endif + + #define LBS_DEB_ENTER 0x00000001 + #define LBS_DEB_LEAVE 0x00000002 diff --git a/patches/collateral-evolutions/network/0002-net-misc/net_bluetooth_bnep_netdev.c b/patches/collateral-evolutions/network/0002-net-misc/net_bluetooth_bnep_netdev.c new file mode 100644 index 000000000000..45deda6c3927 --- /dev/null +++ b/patches/collateral-evolutions/network/0002-net-misc/net_bluetooth_bnep_netdev.c @@ -0,0 +1,15 @@ +--- a/net/bluetooth/bnep/netdev.c ++++ b/net/bluetooth/bnep/netdev.c +@@ -161,8 +161,12 @@ + } + #endif + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) + static netdev_tx_t bnep_net_xmit(struct sk_buff *skb, + struct net_device *dev) ++#else ++static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev) ++#endif + { + struct bnep_session *s = netdev_priv(dev); + struct sock *sk = s->sock->sk; diff --git a/patches/collateral-evolutions/network/0002-net-misc/net_mac80211_iface.c b/patches/collateral-evolutions/network/0002-net-misc/net_mac80211_iface.c new file mode 100644 index 000000000000..2033364de2dc --- /dev/null +++ b/patches/collateral-evolutions/network/0002-net-misc/net_mac80211_iface.c @@ -0,0 +1,14 @@ +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -1018,6 +1018,11 @@ + ether_setup(dev); + dev->priv_flags &= ~IFF_TX_SKB_SHARING; + netdev_attach_ops(dev, &ieee80211_dataif_ops); ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) ++ /* Do we need this ? */ ++ /* we will validate the address ourselves in ->open */ ++ dev->validate_addr = NULL; ++#endif + dev->destructor = free_netdev; + } + diff --git a/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom.patch b/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom.patch deleted file mode 100644 index a38ceaf60c10..000000000000 --- a/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom.patch +++ /dev/null @@ -1,36 +0,0 @@ -This is an optimization introduced on newer kernels, just ignore for -older kernels on mac80211. For others the netdev->hard_header_len -could be used. - ---- a/net/mac80211/iface.c -+++ b/net/mac80211/iface.c -@@ -1518,6 +1518,7 @@ int ieee80211_if_add(struct ieee80211_lo - return -ENOMEM; - dev_net_set(ndev, wiphy_net(local->hw.wiphy)); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) - ndev->needed_headroom = local->tx_headroom + - 4*6 /* four MAC addresses */ - + 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */ -@@ -1526,6 +1527,7 @@ int ieee80211_if_add(struct ieee80211_lo - - ETH_HLEN /* ethernet hard_header_len */ - + IEEE80211_ENCRYPT_HEADROOM; - ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM; -+#endif - - ret = dev_alloc_name(ndev, ndev->name); - if (ret < 0) { ---- a/drivers/net/wireless/orinoco/main.c -+++ b/drivers/net/wireless/orinoco/main.c -@@ -2279,7 +2279,11 @@ int orinoco_if_add(struct orinoco_privat - /* we use the default eth_mac_addr for setting the MAC addr */ - - /* Reserve space in skb for the SNAP header */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) - dev->needed_headroom = ENCAPS_OVERHEAD; -+#else -+ dev->hard_header_len += ENCAPS_OVERHEAD; -+#endif - - netif_carrier_off(dev); - diff --git a/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/INFO b/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/INFO new file mode 100644 index 000000000000..be5ad804f69d --- /dev/null +++ b/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/INFO @@ -0,0 +1,4 @@ +This is an optimization introduced on newer kernels, just ignore for +older kernels on mac80211. For others the netdev->hard_header_len +could be used. + diff --git a/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/drivers_net_wireless_orinoco_main.c b/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/drivers_net_wireless_orinoco_main.c new file mode 100644 index 000000000000..4adf276480ab --- /dev/null +++ b/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/drivers_net_wireless_orinoco_main.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/orinoco/main.c ++++ b/drivers/net/wireless/orinoco/main.c +@@ -2279,7 +2279,11 @@ + /* we use the default eth_mac_addr for setting the MAC addr */ + + /* Reserve space in skb for the SNAP header */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) + dev->needed_headroom = ENCAPS_OVERHEAD; ++#else ++ dev->hard_header_len += ENCAPS_OVERHEAD; ++#endif + + netif_carrier_off(dev); + diff --git a/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/net_mac80211_iface.c b/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/net_mac80211_iface.c new file mode 100644 index 000000000000..cc9aae45c06c --- /dev/null +++ b/patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/net_mac80211_iface.c @@ -0,0 +1,18 @@ +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -1518,6 +1518,7 @@ + return -ENOMEM; + dev_net_set(ndev, wiphy_net(local->hw.wiphy)); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)) + ndev->needed_headroom = local->tx_headroom + + 4*6 /* four MAC addresses */ + + 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */ +@@ -1526,6 +1527,7 @@ + - ETH_HLEN /* ethernet hard_header_len */ + + IEEE80211_ENCRYPT_HEADROOM; + ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM; ++#endif + + ret = dev_alloc_name(ndev, ndev->name); + if (ret < 0) { diff --git a/patches/collateral-evolutions/network/0004-wext-namespace/INFO b/patches/collateral-evolutions/network/0004-wext-namespace/INFO new file mode 100644 index 000000000000..66bde409c2f9 --- /dev/null +++ b/patches/collateral-evolutions/network/0004-wext-namespace/INFO @@ -0,0 +1,4 @@ + +This patch backports the namespace changes added +through net/wireless/wext.c. + diff --git a/patches/collateral-evolutions/network/0004-wext-namespace.patch b/patches/collateral-evolutions/network/0004-wext-namespace/net_wireless_wext-core.c similarity index 83% rename from patches/collateral-evolutions/network/0004-wext-namespace.patch rename to patches/collateral-evolutions/network/0004-wext-namespace/net_wireless_wext-core.c index 606001b62110..2d257c6948a6 100644 --- a/patches/collateral-evolutions/network/0004-wext-namespace.patch +++ b/patches/collateral-evolutions/network/0004-wext-namespace/net_wireless_wext-core.c @@ -1,10 +1,6 @@ - -This patch backports the namespace changes added -through net/wireless/wext.c. - --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c -@@ -342,6 +342,7 @@ static const int compat_event_type_size[ +@@ -342,6 +342,7 @@ /* IW event code */ @@ -12,7 +8,7 @@ through net/wireless/wext.c. static int __net_init wext_pernet_init(struct net *net) { skb_queue_head_init(&net->wext_nlevents); -@@ -384,6 +385,29 @@ static void wireless_nlevent_process(str +@@ -384,6 +385,29 @@ static DECLARE_WORK(wireless_nlevent_work, wireless_nlevent_process); @@ -42,7 +38,7 @@ through net/wireless/wext.c. static struct nlmsghdr *rtnetlink_ifinfo_prep(struct net_device *dev, struct sk_buff *skb) { -@@ -597,8 +621,13 @@ void wireless_send_event(struct net_devi +@@ -597,8 +621,13 @@ skb_shinfo(skb)->frag_list = compskb; #endif diff --git a/patches/collateral-evolutions/network/0005-netlink-portid/INFO b/patches/collateral-evolutions/network/0005-netlink-portid/INFO new file mode 100644 index 000000000000..e49ac3b625c1 --- /dev/null +++ b/patches/collateral-evolutions/network/0005-netlink-portid/INFO @@ -0,0 +1,42 @@ +The patch: + +commit 15e473046cb6e5d18a4d0057e61d76315230382b +Author: Eric W. Biederman +Date: Fri Sep 7 20:12:54 2012 +0000 + + netlink: Rename pid to portid to avoid confusion + + It is a frequent mistake to confuse the netlink port identifier with a + process identifier. Try to reduce this confusion by renaming fields + that hold port identifiers portid instead of pid. + + I have carefully avoided changing the structures exported to + userspace to avoid changing the userspace API. + + I have successfully built an allyesconfig kernel with this change. + + Signed-off-by: "Eric W. Biederman" + Acked-by: Stephen Hemminger + Signed-off-by: David S. Miller + +Changed the struct members: + +struct netlink_notify->pid to +struct netlink_notify->portid + +struct genl_info->snd_pid to +struct genl_info->snd_portid + +To help backport this and not have to #ifdef around it against +kernel versions compat has introduced two helpers for us to +simply do the backport with two macro helpers: + +genl_info_snd_portid() +netlink_notify_portid() + +This takes care of the work for us requiring only one +single line change. If we get another patch thrown into +this file then I suspect we can extract SMPL out of it +and use it to backport further collateral evolutions like +this one should other drivers / subsystem need this change. + diff --git a/patches/collateral-evolutions/network/0005-netlink-portid/drivers_net_wireless_mac80211_hwsim.c b/patches/collateral-evolutions/network/0005-netlink-portid/drivers_net_wireless_mac80211_hwsim.c new file mode 100644 index 000000000000..1f8d82b8e1d7 --- /dev/null +++ b/patches/collateral-evolutions/network/0005-netlink-portid/drivers_net_wireless_mac80211_hwsim.c @@ -0,0 +1,24 @@ +--- a/drivers/net/wireless/mac80211_hwsim.c ++++ b/drivers/net/wireless/mac80211_hwsim.c +@@ -2019,10 +2019,10 @@ + if (info == NULL) + goto out; + +- wmediumd_portid = info->snd_portid; ++ wmediumd_portid = genl_info_snd_portid(info); + + printk(KERN_DEBUG "mac80211_hwsim: received a REGISTER, " +- "switching to wmediumd mode with pid %d\n", info->snd_portid); ++ "switching to wmediumd mode with pid %d\n", genl_info_snd_portid(info)); + + return 0; + out: +@@ -2059,7 +2059,7 @@ + if (state != NETLINK_URELEASE) + return NOTIFY_DONE; + +- if (notify->portid == wmediumd_portid) { ++ if (netlink_notify_portid(notify) == wmediumd_portid) { + printk(KERN_INFO "mac80211_hwsim: wmediumd released netlink" + " socket, switching to perfect channel medium\n"); + wmediumd_portid = 0; diff --git a/patches/collateral-evolutions/network/0005-netlink-portid.patch b/patches/collateral-evolutions/network/0005-netlink-portid/net_wireless_nl80211.c similarity index 63% rename from patches/collateral-evolutions/network/0005-netlink-portid.patch rename to patches/collateral-evolutions/network/0005-netlink-portid/net_wireless_nl80211.c index 56dd3efc22f6..3e39a4df7b00 100644 --- a/patches/collateral-evolutions/network/0005-netlink-portid.patch +++ b/patches/collateral-evolutions/network/0005-netlink-portid/net_wireless_nl80211.c @@ -1,72 +1,6 @@ -The patch: - -commit 15e473046cb6e5d18a4d0057e61d76315230382b -Author: Eric W. Biederman -Date: Fri Sep 7 20:12:54 2012 +0000 - - netlink: Rename pid to portid to avoid confusion - - It is a frequent mistake to confuse the netlink port identifier with a - process identifier. Try to reduce this confusion by renaming fields - that hold port identifiers portid instead of pid. - - I have carefully avoided changing the structures exported to - userspace to avoid changing the userspace API. - - I have successfully built an allyesconfig kernel with this change. - - Signed-off-by: "Eric W. Biederman" - Acked-by: Stephen Hemminger - Signed-off-by: David S. Miller - -Changed the struct members: - -struct netlink_notify->pid to -struct netlink_notify->portid - -struct genl_info->snd_pid to -struct genl_info->snd_portid - -To help backport this and not have to #ifdef around it against -kernel versions compat has introduced two helpers for us to -simply do the backport with two macro helpers: - -genl_info_snd_portid() -netlink_notify_portid() - -This takes care of the work for us requiring only one -single line change. If we get another patch thrown into -this file then I suspect we can extract SMPL out of it -and use it to backport further collateral evolutions like -this one should other drivers / subsystem need this change. - ---- a/drivers/net/wireless/mac80211_hwsim.c -+++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -2019,10 +2019,10 @@ static int hwsim_register_received_nl(st - if (info == NULL) - goto out; - -- wmediumd_portid = info->snd_portid; -+ wmediumd_portid = genl_info_snd_portid(info); - - printk(KERN_DEBUG "mac80211_hwsim: received a REGISTER, " -- "switching to wmediumd mode with pid %d\n", info->snd_portid); -+ "switching to wmediumd mode with pid %d\n", genl_info_snd_portid(info)); - - return 0; - out: -@@ -2059,7 +2059,7 @@ static int mac80211_hwsim_netlink_notify - if (state != NETLINK_URELEASE) - return NOTIFY_DONE; - -- if (notify->portid == wmediumd_portid) { -+ if (netlink_notify_portid(notify) == wmediumd_portid) { - printk(KERN_INFO "mac80211_hwsim: wmediumd released netlink" - " socket, switching to perfect channel medium\n"); - wmediumd_portid = 0; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -1593,7 +1593,7 @@ static int nl80211_dump_wiphy(struct sk_ +@@ -1593,7 +1593,7 @@ /* attempt to fit multiple wiphy data chunks into the skb */ do { ret = nl80211_send_wiphy(dev, skb, @@ -75,7 +9,7 @@ this one should other drivers / subsystem need this change. cb->nlh->nlmsg_seq, NLM_F_MULTI, split, &cb->args[1], -@@ -1642,7 +1642,7 @@ static int nl80211_get_wiphy(struct sk_b +@@ -1642,7 +1642,7 @@ if (!msg) return -ENOMEM; @@ -84,7 +18,7 @@ this one should other drivers / subsystem need this change. false, NULL, NULL, NULL) < 0) { nlmsg_free(msg); return -ENOBUFS; -@@ -2222,7 +2222,7 @@ static int nl80211_dump_interface(struct +@@ -2222,7 +2222,7 @@ if_idx++; continue; } @@ -93,7 +27,7 @@ this one should other drivers / subsystem need this change. cb->nlh->nlmsg_seq, NLM_F_MULTI, rdev, wdev) < 0) { mutex_unlock(&rdev->devlist_mtx); -@@ -2253,7 +2253,7 @@ static int nl80211_get_interface(struct +@@ -2253,7 +2253,7 @@ if (!msg) return -ENOMEM; @@ -102,7 +36,7 @@ this one should other drivers / subsystem need this change. dev, wdev) < 0) { nlmsg_free(msg); return -ENOBUFS; -@@ -2478,7 +2478,7 @@ static int nl80211_new_interface(struct +@@ -2478,7 +2478,7 @@ break; } @@ -111,7 +45,7 @@ this one should other drivers / subsystem need this change. rdev, wdev) < 0) { nlmsg_free(msg); return -ENOBUFS; -@@ -2613,7 +2613,7 @@ static int nl80211_get_key(struct sk_buf +@@ -2613,7 +2613,7 @@ if (!msg) return -ENOMEM; @@ -120,7 +54,7 @@ this one should other drivers / subsystem need this change. NL80211_CMD_NEW_KEY); if (IS_ERR(hdr)) return PTR_ERR(hdr); -@@ -3549,7 +3549,7 @@ static int nl80211_dump_station(struct s +@@ -3549,7 +3549,7 @@ goto out_err; if (nl80211_send_station(skb, @@ -129,7 +63,7 @@ this one should other drivers / subsystem need this change. cb->nlh->nlmsg_seq, NLM_F_MULTI, dev, netdev, mac_addr, &sinfo) < 0) -@@ -3595,7 +3595,7 @@ static int nl80211_get_station(struct sk +@@ -3595,7 +3595,7 @@ if (!msg) return -ENOMEM; @@ -138,7 +72,7 @@ this one should other drivers / subsystem need this change. rdev, dev, mac_addr, &sinfo) < 0) { nlmsg_free(msg); return -ENOBUFS; -@@ -4195,7 +4195,7 @@ static int nl80211_dump_mpath(struct sk_ +@@ -4195,7 +4195,7 @@ if (err) goto out_err; @@ -147,7 +81,7 @@ this one should other drivers / subsystem need this change. cb->nlh->nlmsg_seq, NLM_F_MULTI, netdev, dst, next_hop, &pinfo) < 0) -@@ -4244,7 +4244,7 @@ static int nl80211_get_mpath(struct sk_b +@@ -4244,7 +4244,7 @@ if (!msg) return -ENOMEM; @@ -156,7 +90,7 @@ this one should other drivers / subsystem need this change. dev, dst, next_hop, &pinfo) < 0) { nlmsg_free(msg); return -ENOBUFS; -@@ -4508,7 +4508,7 @@ static int nl80211_get_mesh_config(struc +@@ -4508,7 +4508,7 @@ msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); if (!msg) return -ENOMEM; @@ -165,7 +99,7 @@ this one should other drivers / subsystem need this change. NL80211_CMD_GET_MESH_CONFIG); if (!hdr) goto out; -@@ -4858,7 +4858,7 @@ static int nl80211_get_reg(struct sk_buf +@@ -4858,7 +4858,7 @@ goto out; } @@ -174,7 +108,7 @@ this one should other drivers / subsystem need this change. NL80211_CMD_GET_REG); if (!hdr) goto put_failure; -@@ -5558,7 +5558,7 @@ static int nl80211_send_bss(struct sk_bu +@@ -5558,7 +5558,7 @@ ASSERT_WDEV_LOCK(wdev); @@ -183,7 +117,7 @@ this one should other drivers / subsystem need this change. NL80211_CMD_NEW_SCAN_RESULTS); if (!hdr) return -1; -@@ -5789,7 +5789,7 @@ static int nl80211_dump_survey(struct sk +@@ -5789,7 +5789,7 @@ } if (nl80211_send_survey(skb, @@ -192,7 +126,7 @@ this one should other drivers / subsystem need this change. cb->nlh->nlmsg_seq, NLM_F_MULTI, netdev, &survey) < 0) -@@ -6448,7 +6448,7 @@ static int nl80211_testmode_dump(struct +@@ -6448,7 +6448,7 @@ } while (1) { @@ -201,7 +135,7 @@ this one should other drivers / subsystem need this change. cb->nlh->nlmsg_seq, NLM_F_MULTI, NL80211_CMD_TESTMODE); struct nlattr *tmdata; -@@ -6527,7 +6527,7 @@ struct sk_buff *cfg80211_testmode_alloc_ +@@ -6527,7 +6527,7 @@ return NULL; return __cfg80211_testmode_alloc_skb(rdev, approxlen, @@ -210,7 +144,7 @@ this one should other drivers / subsystem need this change. rdev->testmode_info->snd_seq, GFP_KERNEL); } -@@ -6887,7 +6887,7 @@ static int nl80211_remain_on_channel(str +@@ -6887,7 +6887,7 @@ if (!msg) return -ENOMEM; @@ -219,7 +153,7 @@ this one should other drivers / subsystem need this change. NL80211_CMD_REMAIN_ON_CHANNEL); if (IS_ERR(hdr)) { -@@ -7106,7 +7106,7 @@ static int nl80211_register_mgmt(struct +@@ -7106,7 +7106,7 @@ if (!rdev->ops->mgmt_tx) return -EOPNOTSUPP; @@ -228,7 +162,7 @@ this one should other drivers / subsystem need this change. nla_data(info->attrs[NL80211_ATTR_FRAME_MATCH]), nla_len(info->attrs[NL80211_ATTR_FRAME_MATCH])); } -@@ -7176,7 +7176,7 @@ static int nl80211_tx_mgmt(struct sk_buf +@@ -7176,7 +7176,7 @@ if (!msg) return -ENOMEM; @@ -237,7 +171,7 @@ this one should other drivers / subsystem need this change. NL80211_CMD_FRAME); if (IS_ERR(hdr)) { -@@ -7291,7 +7291,7 @@ static int nl80211_get_power_save(struct +@@ -7291,7 +7291,7 @@ if (!msg) return -ENOMEM; @@ -246,7 +180,7 @@ this one should other drivers / subsystem need this change. NL80211_CMD_GET_POWER_SAVE); if (!hdr) { err = -ENOBUFS; -@@ -7583,7 +7583,7 @@ static int nl80211_get_wowlan(struct sk_ +@@ -7583,7 +7583,7 @@ if (!msg) return -ENOMEM; @@ -255,7 +189,7 @@ this one should other drivers / subsystem need this change. NL80211_CMD_GET_WOWLAN); if (!hdr) goto nla_put_failure; -@@ -8007,7 +8007,7 @@ static int nl80211_register_unexpected_f +@@ -8007,7 +8007,7 @@ if (wdev->ap_unexpected_nlportid) return -EBUSY; @@ -264,7 +198,7 @@ this one should other drivers / subsystem need this change. return 0; } -@@ -8037,7 +8037,7 @@ static int nl80211_probe_client(struct s +@@ -8037,7 +8037,7 @@ if (!msg) return -ENOMEM; @@ -273,7 +207,7 @@ this one should other drivers / subsystem need this change. NL80211_CMD_PROBE_CLIENT); if (IS_ERR(hdr)) { -@@ -8081,13 +8081,13 @@ static int nl80211_register_beacons(stru +@@ -8081,13 +8081,13 @@ /* First, check if already registered. */ spin_lock_bh(&rdev->beacon_registrations_lock); list_for_each_entry(reg, &rdev->beacon_registrations, list) { @@ -289,7 +223,7 @@ this one should other drivers / subsystem need this change. list_add(&nreg->list, &rdev->beacon_registrations); spin_unlock_bh(&rdev->beacon_registrations_lock); -@@ -8160,7 +8160,7 @@ static int nl80211_get_protocol_features +@@ -8160,7 +8160,7 @@ if (!msg) return -ENOMEM; @@ -298,7 +232,7 @@ this one should other drivers / subsystem need this change. NL80211_CMD_GET_PROTOCOL_FEATURES); if (!hdr) goto nla_put_failure; -@@ -10565,12 +10565,12 @@ static int nl80211_netlink_notify(struct +@@ -10565,12 +10565,12 @@ list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) { list_for_each_entry_rcu(wdev, &rdev->wdev_list, list) diff --git a/patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels.patch b/patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels/INFO similarity index 69% rename from patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels.patch rename to patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels/INFO index ff7abf757843..04893226280e 100644 --- a/patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels.patch +++ b/patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels/INFO @@ -26,21 +26,3 @@ Date: Fri Mar 1 14:03:49 2013 +0100 Also increase the size for the get_wiphy command. ---- a/net/wireless/nl80211.c -+++ b/net/wireless/nl80211.c -@@ -1600,6 +1600,7 @@ static int nl80211_dump_wiphy(struct sk_ - &cb->args[2], - &cb->args[3]); - if (ret < 0) { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) - /* - * If sending the wiphy data didn't fit (ENOBUFS - * or EMSGSIZE returned), this SKB is still -@@ -1620,6 +1621,7 @@ static int nl80211_dump_wiphy(struct sk_ - mutex_unlock(&cfg80211_mutex); - return 1; - } -+#endif - idx--; - break; - } diff --git a/patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels/net_wireless_nl80211.c b/patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels/net_wireless_nl80211.c new file mode 100644 index 000000000000..6dc8c3303e10 --- /dev/null +++ b/patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels/net_wireless_nl80211.c @@ -0,0 +1,18 @@ +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -1600,6 +1600,7 @@ + &cb->args[2], + &cb->args[3]); + if (ret < 0) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) + /* + * If sending the wiphy data didn't fit (ENOBUFS + * or EMSGSIZE returned), this SKB is still +@@ -1620,6 +1621,7 @@ + mutex_unlock(&cfg80211_mutex); + return 1; + } ++#endif + idx--; + break; + } diff --git a/patches/collateral-evolutions/network/02-ksize/INFO b/patches/collateral-evolutions/network/02-ksize/INFO new file mode 100644 index 000000000000..1bb12887d3ad --- /dev/null +++ b/patches/collateral-evolutions/network/02-ksize/INFO @@ -0,0 +1,12 @@ +ksize() was added as of 2.6.29, it gives you the actual +size of the allocated data. Since we have no support for +this we simply do not optimize for it and deal with +large alloocations for the IEs. + +We technically could backport this as + +define ksize(bleh) SOME_LARGE_NUMBER + +but doing it this way emphasis careful review +of the situation. + diff --git a/patches/collateral-evolutions/network/02-ksize.patch b/patches/collateral-evolutions/network/02-ksize/drivers_net_wireless_orinoco_wext.c similarity index 65% rename from patches/collateral-evolutions/network/02-ksize.patch rename to patches/collateral-evolutions/network/02-ksize/drivers_net_wireless_orinoco_wext.c index 934e2fae154f..1bf1ac5b53c6 100644 --- a/patches/collateral-evolutions/network/02-ksize.patch +++ b/patches/collateral-evolutions/network/02-ksize/drivers_net_wireless_orinoco_wext.c @@ -1,18 +1,6 @@ -ksize() was added as of 2.6.29, it gives you the actual -size of the allocated data. Since we have no support for -this we simply do not optimize for it and deal with -large alloocations for the IEs. - -We technically could backport this as - -define ksize(bleh) SOME_LARGE_NUMBER - -but doing it this way emphasis careful review -of the situation. - --- a/drivers/net/wireless/orinoco/wext.c +++ b/drivers/net/wireless/orinoco/wext.c -@@ -31,8 +31,22 @@ static int orinoco_set_key(struct orinoc +@@ -31,8 +31,22 @@ enum orinoco_alg alg, const u8 *key, int key_len, const u8 *seq, int seq_len) { diff --git a/patches/collateral-evolutions/network/03-rfkill.patch b/patches/collateral-evolutions/network/03-rfkill.patch deleted file mode 100644 index 5797d9f32bee..000000000000 --- a/patches/collateral-evolutions/network/03-rfkill.patch +++ /dev/null @@ -1,66 +0,0 @@ -rfkill was re-implemented on 2.6.31. We port it to -older kernels with a simple hack, just rename the -module as a new one rfkill_backport, and every -exported symbol gets redefined with a _backport -postfix through compat-2.6.31.h. The changes below -are the ones we could not do through compat-2.6.31.h - -Do older kernels have /dev/rfkill ? I not then we can -just keep /dev/rfkill and not /dev/rfkill_backport. - -Note that 2.6.31 added netdevice notifier upon interface -dev_open() which on cfg80211 will check if checks to see -if rfkill is enabled (or if the mode of operation is not -supported) on the cfg80211_netdev_notifier_call() and if -so deny bringing the interface up. This was added via -commit: - -3b8bcfd5d31ea0fec58681d035544ace707d2536 - -Since older kernels will not have the notifier call -on dev_open() if we *really want* to port this we could have -mac80211's subif_open() call : - - ret = call_netdevice_notifiers(NETDEV_PRE_UP, dev); - ret = notifier_to_errno(ret); - if (ret) - return ret; - -This would do the policing from within mac80211. - ---- a/net/rfkill/Makefile -+++ b/net/rfkill/Makefile -@@ -2,8 +2,8 @@ - # Makefile for the RF switch subsystem. - # - --rfkill-y += core.o --rfkill-$(CONFIG_RFKILL_INPUT) += input.o --obj-$(CONFIG_RFKILL) += rfkill.o -+rfkill_backport-y += core.o -+rfkill_backport-$(CONFIG_RFKILL_BACKPORT_INPUT) += input.o -+obj-$(CONFIG_RFKILL_BACKPORT) += rfkill_backport.o - obj-$(CONFIG_RFKILL_REGULATOR) += rfkill-regulator.o - obj-$(CONFIG_RFKILL_GPIO) += rfkill-gpio.o ---- a/net/rfkill/input.c -+++ b/net/rfkill/input.c -@@ -230,7 +230,7 @@ static int rfkill_connect(struct input_h - - handle->dev = dev; - handle->handler = handler; -- handle->name = "rfkill"; -+ handle->name = "rfkill_backport"; - - /* causes rfkill_start() to be called */ - error = input_register_handle(handle); ---- a/net/rfkill/core.c -+++ b/net/rfkill/core.c -@@ -826,7 +826,7 @@ static int rfkill_resume(struct device * - } - - static struct class rfkill_class = { -- .name = "rfkill", -+ .name = "rfkill_backport", - .dev_release = rfkill_release, - .dev_attrs = rfkill_dev_attrs, - .dev_uevent = rfkill_dev_uevent, diff --git a/patches/collateral-evolutions/network/03-rfkill/INFO b/patches/collateral-evolutions/network/03-rfkill/INFO new file mode 100644 index 000000000000..9aff38f98654 --- /dev/null +++ b/patches/collateral-evolutions/network/03-rfkill/INFO @@ -0,0 +1,30 @@ +rfkill was re-implemented on 2.6.31. We port it to +older kernels with a simple hack, just rename the +module as a new one rfkill_backport, and every +exported symbol gets redefined with a _backport +postfix through compat-2.6.31.h. The changes below +are the ones we could not do through compat-2.6.31.h + +Do older kernels have /dev/rfkill ? I not then we can +just keep /dev/rfkill and not /dev/rfkill_backport. + +Note that 2.6.31 added netdevice notifier upon interface +dev_open() which on cfg80211 will check if checks to see +if rfkill is enabled (or if the mode of operation is not +supported) on the cfg80211_netdev_notifier_call() and if +so deny bringing the interface up. This was added via +commit: + +3b8bcfd5d31ea0fec58681d035544ace707d2536 + +Since older kernels will not have the notifier call +on dev_open() if we *really want* to port this we could have +mac80211's subif_open() call : + + ret = call_netdevice_notifiers(NETDEV_PRE_UP, dev); + ret = notifier_to_errno(ret); + if (ret) + return ret; + +This would do the policing from within mac80211. + diff --git a/patches/collateral-evolutions/network/03-rfkill/net_rfkill_Makefile b/patches/collateral-evolutions/network/03-rfkill/net_rfkill_Makefile new file mode 100644 index 000000000000..29d260e33163 --- /dev/null +++ b/patches/collateral-evolutions/network/03-rfkill/net_rfkill_Makefile @@ -0,0 +1,14 @@ +--- a/net/rfkill/Makefile ++++ b/net/rfkill/Makefile +@@ -2,8 +2,8 @@ + # Makefile for the RF switch subsystem. + # + +-rfkill-y += core.o +-rfkill-$(CONFIG_RFKILL_INPUT) += input.o +-obj-$(CONFIG_RFKILL) += rfkill.o ++rfkill_backport-y += core.o ++rfkill_backport-$(CONFIG_RFKILL_BACKPORT_INPUT) += input.o ++obj-$(CONFIG_RFKILL_BACKPORT) += rfkill_backport.o + obj-$(CONFIG_RFKILL_REGULATOR) += rfkill-regulator.o + obj-$(CONFIG_RFKILL_GPIO) += rfkill-gpio.o diff --git a/patches/collateral-evolutions/network/03-rfkill/net_rfkill_core.c b/patches/collateral-evolutions/network/03-rfkill/net_rfkill_core.c new file mode 100644 index 000000000000..689c6c9a93ce --- /dev/null +++ b/patches/collateral-evolutions/network/03-rfkill/net_rfkill_core.c @@ -0,0 +1,11 @@ +--- a/net/rfkill/core.c ++++ b/net/rfkill/core.c +@@ -826,7 +826,7 @@ + } + + static struct class rfkill_class = { +- .name = "rfkill", ++ .name = "rfkill_backport", + .dev_release = rfkill_release, + .dev_attrs = rfkill_dev_attrs, + .dev_uevent = rfkill_dev_uevent, diff --git a/patches/collateral-evolutions/network/03-rfkill/net_rfkill_input.c b/patches/collateral-evolutions/network/03-rfkill/net_rfkill_input.c new file mode 100644 index 000000000000..0304be5bca1c --- /dev/null +++ b/patches/collateral-evolutions/network/03-rfkill/net_rfkill_input.c @@ -0,0 +1,11 @@ +--- a/net/rfkill/input.c ++++ b/net/rfkill/input.c +@@ -230,7 +230,7 @@ + + handle->dev = dev; + handle->handler = handler; +- handle->name = "rfkill"; ++ handle->name = "rfkill_backport"; + + /* causes rfkill_start() to be called */ + error = input_register_handle(handle); diff --git a/patches/collateral-evolutions/network/04-netns.patch b/patches/collateral-evolutions/network/04-netns.patch deleted file mode 100644 index 51345b6eb300..000000000000 --- a/patches/collateral-evolutions/network/04-netns.patch +++ /dev/null @@ -1,149 +0,0 @@ -The only other namespace change. Note that pach 01-netdev.patch -also has some other namespace changes there, look at that file -for the other changes. It'd be nice to figure out a way to -bring thise here cleanly and seprately but they touch the same -files... - ---- a/net/wireless/nl80211.c -+++ b/net/wireless/nl80211.c -@@ -6740,7 +6740,9 @@ static int nl80211_wiphy_netns(struct sk - if (!net_eq(wiphy_net(&rdev->wiphy), net)) - err = cfg80211_switch_netns(rdev, net); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - put_net(net); -+#endif - return err; - } - ---- a/net/wireless/core.c -+++ b/net/wireless/core.c -@@ -160,6 +160,7 @@ int cfg80211_dev_rename(struct cfg80211_ - return 0; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - int cfg80211_switch_netns(struct cfg80211_registered_device *rdev, - struct net *net) - { -@@ -204,6 +205,7 @@ int cfg80211_switch_netns(struct cfg8021 - - return 0; - } -+#endif - - static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data) - { -@@ -372,7 +374,9 @@ struct wiphy *wiphy_new(const struct cfg - rdev->wiphy.flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT; - #endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - wiphy_net_set(&rdev->wiphy, &init_net); -+#endif - - rdev->rfkill_ops.set_block = cfg80211_rfkill_set_block; - rdev->rfkill = rfkill_alloc(dev_name(&rdev->wiphy.dev), -@@ -919,8 +923,10 @@ static int cfg80211_netdev_notifier_call - wdev->identifier = ++rdev->wdev_id; - list_add_rcu(&wdev->list, &rdev->wdev_list); - rdev->devlist_generation++; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - /* can only change netns with wiphy */ - dev->features |= NETIF_F_NETNS_LOCAL; -+#endif - - if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj, - "phy80211")) { -@@ -1081,6 +1087,7 @@ static struct notifier_block cfg80211_ne - .notifier_call = cfg80211_netdev_notifier_call, - }; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - static void __net_exit cfg80211_pernet_exit(struct net *net) - { - struct cfg80211_registered_device *rdev; -@@ -1098,14 +1105,17 @@ static void __net_exit cfg80211_pernet_e - static struct pernet_operations cfg80211_pernet_ops = { - .exit = cfg80211_pernet_exit, - }; -+#endif - - static int __init cfg80211_init(void) - { - int err; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - err = register_pernet_device(&cfg80211_pernet_ops); - if (err) - goto out_fail_pernet; -+#endif - - err = wiphy_sysfs_init(); - if (err) -@@ -1142,8 +1152,10 @@ out_fail_nl80211: - out_fail_notifier: - wiphy_sysfs_exit(); - out_fail_sysfs: -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - unregister_pernet_device(&cfg80211_pernet_ops); - out_fail_pernet: -+#endif - return err; - } - subsys_initcall(cfg80211_init); -@@ -1155,7 +1167,9 @@ static void __exit cfg80211_exit(void) - unregister_netdevice_notifier(&cfg80211_netdev_notifier); - wiphy_sysfs_exit(); - regulatory_exit(); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - unregister_pernet_device(&cfg80211_pernet_ops); -+#endif - destroy_workqueue(cfg80211_wq); - } - module_exit(cfg80211_exit); ---- a/net/wireless/wext-core.c -+++ b/net/wireless/wext-core.c -@@ -367,6 +367,7 @@ static int __init wireless_nlevent_init( - subsys_initcall(wireless_nlevent_init); - - /* Process events generated by the wireless layer or the driver. */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - static void wireless_nlevent_process(struct work_struct *work) - { - struct sk_buff *skb; -@@ -382,6 +383,20 @@ static void wireless_nlevent_process(str - - rtnl_unlock(); - } -+#else -+static void wireless_nlevent_process(struct work_struct *work) -+{ -+ struct sk_buff *skb; -+ struct net *net; -+ -+ rtnl_lock(); -+ -+ while ((skb = skb_dequeue(&net->wext_nlevents))) -+ rtnl_notify(skb, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC); -+ -+ rtnl_unlock(); -+} -+#endif - - static DECLARE_WORK(wireless_nlevent_work, wireless_nlevent_process); - ---- a/net/wireless/wext-proc.c -+++ b/net/wireless/wext-proc.c -@@ -98,7 +98,11 @@ static void *wireless_dev_seq_start(stru - return SEQ_START_TOKEN; - - off = 1; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) - for_each_netdev(net, dev) -+#else -+ for_each_netdev(net) -+#endif - if (off++ == *pos) - return dev; - return NULL; diff --git a/patches/collateral-evolutions/network/04-netns/INFO b/patches/collateral-evolutions/network/04-netns/INFO new file mode 100644 index 000000000000..6f21d3de3c30 --- /dev/null +++ b/patches/collateral-evolutions/network/04-netns/INFO @@ -0,0 +1,6 @@ +The only other namespace change. Note that pach 01-netdev.patch +also has some other namespace changes there, look at that file +for the other changes. It'd be nice to figure out a way to +bring thise here cleanly and seprately but they touch the same +files... + diff --git a/patches/collateral-evolutions/network/04-netns/net_wireless_core.c b/patches/collateral-evolutions/network/04-netns/net_wireless_core.c new file mode 100644 index 000000000000..08d440e4ed75 --- /dev/null +++ b/patches/collateral-evolutions/network/04-netns/net_wireless_core.c @@ -0,0 +1,86 @@ +--- a/net/wireless/core.c ++++ b/net/wireless/core.c +@@ -160,6 +160,7 @@ + return 0; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + int cfg80211_switch_netns(struct cfg80211_registered_device *rdev, + struct net *net) + { +@@ -204,6 +205,7 @@ + + return 0; + } ++#endif + + static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data) + { +@@ -372,7 +374,9 @@ + rdev->wiphy.flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT; + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + wiphy_net_set(&rdev->wiphy, &init_net); ++#endif + + rdev->rfkill_ops.set_block = cfg80211_rfkill_set_block; + rdev->rfkill = rfkill_alloc(dev_name(&rdev->wiphy.dev), +@@ -919,8 +923,10 @@ + wdev->identifier = ++rdev->wdev_id; + list_add_rcu(&wdev->list, &rdev->wdev_list); + rdev->devlist_generation++; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + /* can only change netns with wiphy */ + dev->features |= NETIF_F_NETNS_LOCAL; ++#endif + + if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj, + "phy80211")) { +@@ -1081,6 +1087,7 @@ + .notifier_call = cfg80211_netdev_notifier_call, + }; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + static void __net_exit cfg80211_pernet_exit(struct net *net) + { + struct cfg80211_registered_device *rdev; +@@ -1098,14 +1105,17 @@ + static struct pernet_operations cfg80211_pernet_ops = { + .exit = cfg80211_pernet_exit, + }; ++#endif + + static int __init cfg80211_init(void) + { + int err; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + err = register_pernet_device(&cfg80211_pernet_ops); + if (err) + goto out_fail_pernet; ++#endif + + err = wiphy_sysfs_init(); + if (err) +@@ -1142,8 +1152,10 @@ + out_fail_notifier: + wiphy_sysfs_exit(); + out_fail_sysfs: ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + unregister_pernet_device(&cfg80211_pernet_ops); + out_fail_pernet: ++#endif + return err; + } + subsys_initcall(cfg80211_init); +@@ -1155,7 +1167,9 @@ + unregister_netdevice_notifier(&cfg80211_netdev_notifier); + wiphy_sysfs_exit(); + regulatory_exit(); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + unregister_pernet_device(&cfg80211_pernet_ops); ++#endif + destroy_workqueue(cfg80211_wq); + } + module_exit(cfg80211_exit); diff --git a/patches/collateral-evolutions/network/04-netns/net_wireless_nl80211.c b/patches/collateral-evolutions/network/04-netns/net_wireless_nl80211.c new file mode 100644 index 000000000000..ed189bad60d5 --- /dev/null +++ b/patches/collateral-evolutions/network/04-netns/net_wireless_nl80211.c @@ -0,0 +1,12 @@ +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -6740,7 +6740,9 @@ + if (!net_eq(wiphy_net(&rdev->wiphy), net)) + err = cfg80211_switch_netns(rdev, net); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + put_net(net); ++#endif + return err; + } + diff --git a/patches/collateral-evolutions/network/04-netns/net_wireless_wext-core.c b/patches/collateral-evolutions/network/04-netns/net_wireless_wext-core.c new file mode 100644 index 000000000000..3f62024aa016 --- /dev/null +++ b/patches/collateral-evolutions/network/04-netns/net_wireless_wext-core.c @@ -0,0 +1,31 @@ +--- a/net/wireless/wext-core.c ++++ b/net/wireless/wext-core.c +@@ -367,6 +367,7 @@ + subsys_initcall(wireless_nlevent_init); + + /* Process events generated by the wireless layer or the driver. */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + static void wireless_nlevent_process(struct work_struct *work) + { + struct sk_buff *skb; +@@ -382,6 +383,20 @@ + + rtnl_unlock(); + } ++#else ++static void wireless_nlevent_process(struct work_struct *work) ++{ ++ struct sk_buff *skb; ++ struct net *net; ++ ++ rtnl_lock(); ++ ++ while ((skb = skb_dequeue(&net->wext_nlevents))) ++ rtnl_notify(skb, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC); ++ ++ rtnl_unlock(); ++} ++#endif + + static DECLARE_WORK(wireless_nlevent_work, wireless_nlevent_process); + diff --git a/patches/collateral-evolutions/network/04-netns/net_wireless_wext-proc.c b/patches/collateral-evolutions/network/04-netns/net_wireless_wext-proc.c new file mode 100644 index 000000000000..73420e34b147 --- /dev/null +++ b/patches/collateral-evolutions/network/04-netns/net_wireless_wext-proc.c @@ -0,0 +1,14 @@ +--- a/net/wireless/wext-proc.c ++++ b/net/wireless/wext-proc.c +@@ -98,7 +98,11 @@ + return SEQ_START_TOKEN; + + off = 1; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)) + for_each_netdev(net, dev) ++#else ++ for_each_netdev(net) ++#endif + if (off++ == *pos) + return dev; + return NULL; diff --git a/patches/collateral-evolutions/network/05-usb.patch b/patches/collateral-evolutions/network/05-usb.patch deleted file mode 100644 index 4303b5655cbc..000000000000 --- a/patches/collateral-evolutions/network/05-usb.patch +++ /dev/null @@ -1,26 +0,0 @@ -USB opt soft_unbid was added as of 2.6.27. - ---- a/drivers/net/wireless/p54/p54usb.c -+++ b/drivers/net/wireless/p54/p54usb.c -@@ -1137,7 +1137,9 @@ static struct usb_driver p54u_driver = { - .resume = p54u_resume, - .reset_resume = p54u_resume, - #endif /* CONFIG_PM */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) - .soft_unbind = 1, -+#endif - .disable_hub_initiated_lpm = 1, - }; - ---- a/drivers/net/wireless/ath/ath9k/hif_usb.c -+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c -@@ -1370,7 +1370,9 @@ static struct usb_driver ath9k_hif_usb_d - .reset_resume = ath9k_hif_usb_resume, - #endif - .id_table = ath9k_hif_usb_ids, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) - .soft_unbind = 1, -+#endif - .disable_hub_initiated_lpm = 1, - }; - diff --git a/patches/collateral-evolutions/network/05-usb/INFO b/patches/collateral-evolutions/network/05-usb/INFO new file mode 100644 index 000000000000..328ba0027acd --- /dev/null +++ b/patches/collateral-evolutions/network/05-usb/INFO @@ -0,0 +1,2 @@ +USB opt soft_unbid was added as of 2.6.27. + diff --git a/patches/collateral-evolutions/network/05-usb/drivers_net_wireless_ath_ath9k_hif_usb.c b/patches/collateral-evolutions/network/05-usb/drivers_net_wireless_ath_ath9k_hif_usb.c new file mode 100644 index 000000000000..96077326354d --- /dev/null +++ b/patches/collateral-evolutions/network/05-usb/drivers_net_wireless_ath_ath9k_hif_usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/ath/ath9k/hif_usb.c ++++ b/drivers/net/wireless/ath/ath9k/hif_usb.c +@@ -1370,7 +1370,9 @@ + .reset_resume = ath9k_hif_usb_resume, + #endif + .id_table = ath9k_hif_usb_ids, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) + .soft_unbind = 1, ++#endif + .disable_hub_initiated_lpm = 1, + }; + diff --git a/patches/collateral-evolutions/network/05-usb/drivers_net_wireless_p54_p54usb.c b/patches/collateral-evolutions/network/05-usb/drivers_net_wireless_p54_p54usb.c new file mode 100644 index 000000000000..4662b0209ddc --- /dev/null +++ b/patches/collateral-evolutions/network/05-usb/drivers_net_wireless_p54_p54usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/p54/p54usb.c ++++ b/drivers/net/wireless/p54/p54usb.c +@@ -1137,7 +1137,9 @@ + .resume = p54u_resume, + .reset_resume = p54u_resume, + #endif /* CONFIG_PM */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) + .soft_unbind = 1, ++#endif + .disable_hub_initiated_lpm = 1, + }; + diff --git a/patches/collateral-evolutions/network/06-header-changes.patch b/patches/collateral-evolutions/network/06-header-changes.patch deleted file mode 100644 index 647ce8459300..000000000000 --- a/patches/collateral-evolutions/network/06-header-changes.patch +++ /dev/null @@ -1,176 +0,0 @@ - -Every kernel release there are a few changes to headers -made. Some code gets shifted around between headers or -new headers are defined. This patch deals with such -cases. - ---- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c -+++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c -@@ -18,6 +18,10 @@ - #include "debug.h" - #include "hif-ops.h" - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) -+#include -+#endif -+ - #define HTC_PACKET_CONTAINER_ALLOCATION 32 - #define HTC_CONTROL_BUFFER_SIZE (HTC_MAX_CTRL_MSG_LEN + HTC_HDR_LENGTH) - ---- a/drivers/net/wireless/b43/phy_common.h -+++ b/drivers/net/wireless/b43/phy_common.h -@@ -3,6 +3,9 @@ - - #include - #include -+#if (LINUX_VERSION_CODE == KERNEL_VERSION(2,6,28)) -+#include -+#endif - - struct b43_wldev; - ---- a/drivers/net/wireless/rtlwifi/base.c -+++ b/drivers/net/wireless/rtlwifi/base.c -@@ -36,6 +36,7 @@ - #include "regd.h" - - #include -+#include - #include - - /* ---- a/drivers/net/wireless/ti/wl1251/main.c -+++ b/drivers/net/wireless/ti/wl1251/main.c -@@ -24,6 +24,9 @@ - #include - #include - #include -+#if (LINUX_VERSION_CODE == KERNEL_VERSION(2,6,28)) -+#include -+#endif - #include - #include - #include ---- a/drivers/net/wireless/ti/wl1251/spi.c -+++ b/drivers/net/wireless/ti/wl1251/spi.c -@@ -24,6 +24,9 @@ - #include - #include - #include -+#if (LINUX_VERSION_CODE == KERNEL_VERSION(2,6,28)) -+#include -+#endif - #include - #include - ---- a/net/mac80211/key.c -+++ b/net/mac80211/key.c -@@ -24,6 +24,9 @@ - #include "aes_ccm.h" - #include "aes_cmac.h" - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) -+#include -+#endif - - /** - * DOC: Key handling basics ---- a/net/mac80211/pm.c -+++ b/net/mac80211/pm.c -@@ -1,5 +1,6 @@ - #include - #include -+#include - - #include "ieee80211_i.h" - #include "mesh.h" ---- a/net/bluetooth/bnep/sock.c -+++ b/net/bluetooth/bnep/sock.c -@@ -26,6 +26,7 @@ - - #include - #include -+#include - - #include "bnep.h" - ---- a/net/bluetooth/hci_sock.c -+++ b/net/bluetooth/hci_sock.c -@@ -25,6 +25,7 @@ - /* Bluetooth HCI sockets. */ - - #include -+#include - #include - - #include ---- a/net/bluetooth/hidp/sock.c -+++ b/net/bluetooth/hidp/sock.c -@@ -22,6 +22,7 @@ - - #include - #include -+#include - - #include "hidp.h" - ---- a/drivers/net/wireless/ath/ath6kl/cfg80211.c -+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - - #include "core.h" - #include "cfg80211.h" ---- a/drivers/net/wireless/mwifiex/usb.c -+++ b/drivers/net/wireless/mwifiex/usb.c -@@ -19,6 +19,7 @@ - - #include "main.h" - #include "usb.h" -+#include - - #define USB_VERSION "1.0" - ---- a/net/wireless/util.c -+++ b/net/wireless/util.c -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - #include "core.h" - #include "rdev-ops.h" - ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - - /** - * DOC: Introduction ---- a/drivers/net/wireless/ti/wlcore/event.c -+++ b/drivers/net/wireless/ti/wlcore/event.c -@@ -21,6 +21,7 @@ - * - */ - -+#include - #include "wlcore.h" - #include "debug.h" - #include "io.h" ---- a/drivers/net/wireless/ti/wlcore/scan.c -+++ b/drivers/net/wireless/ti/wlcore/scan.c -@@ -22,6 +22,7 @@ - */ - - #include -+#include - - #include "wlcore.h" - #include "debug.h" diff --git a/patches/collateral-evolutions/network/06-header-changes/INFO b/patches/collateral-evolutions/network/06-header-changes/INFO new file mode 100644 index 000000000000..eccf5d6d01a1 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/INFO @@ -0,0 +1,6 @@ + +Every kernel release there are a few changes to headers +made. Some code gets shifted around between headers or +new headers are defined. This patch deals with such +cases. + diff --git a/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ath_ath6kl_cfg80211.c b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ath_ath6kl_cfg80211.c new file mode 100644 index 000000000000..193faac33650 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ath_ath6kl_cfg80211.c @@ -0,0 +1,10 @@ +--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c ++++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include "core.h" + #include "cfg80211.h" diff --git a/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ath_ath6kl_htc_pipe.c b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ath_ath6kl_htc_pipe.c new file mode 100644 index 000000000000..ef7769147f68 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ath_ath6kl_htc_pipe.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c ++++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c +@@ -18,6 +18,10 @@ + #include "debug.h" + #include "hif-ops.h" + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) ++#include ++#endif ++ + #define HTC_PACKET_CONTAINER_ALLOCATION 32 + #define HTC_CONTROL_BUFFER_SIZE (HTC_MAX_CTRL_MSG_LEN + HTC_HDR_LENGTH) + diff --git a/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_b43_phy_common.h b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_b43_phy_common.h new file mode 100644 index 000000000000..1b8189acbe5a --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_b43_phy_common.h @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/b43/phy_common.h ++++ b/drivers/net/wireless/b43/phy_common.h +@@ -3,6 +3,9 @@ + + #include + #include ++#if (LINUX_VERSION_CODE == KERNEL_VERSION(2,6,28)) ++#include ++#endif + + struct b43_wldev; + diff --git a/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_mwifiex_usb.c b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_mwifiex_usb.c new file mode 100644 index 000000000000..75a3db991e01 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_mwifiex_usb.c @@ -0,0 +1,10 @@ +--- a/drivers/net/wireless/mwifiex/usb.c ++++ b/drivers/net/wireless/mwifiex/usb.c +@@ -19,6 +19,7 @@ + + #include "main.h" + #include "usb.h" ++#include + + #define USB_VERSION "1.0" + diff --git a/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_rtlwifi_base.c b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_rtlwifi_base.c new file mode 100644 index 000000000000..ea33c7d85b6f --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_rtlwifi_base.c @@ -0,0 +1,10 @@ +--- a/drivers/net/wireless/rtlwifi/base.c ++++ b/drivers/net/wireless/rtlwifi/base.c +@@ -36,6 +36,7 @@ + #include "regd.h" + + #include ++#include + #include + + /* diff --git a/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wl1251_main.c b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wl1251_main.c new file mode 100644 index 000000000000..4701f4883f1c --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wl1251_main.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/ti/wl1251/main.c ++++ b/drivers/net/wireless/ti/wl1251/main.c +@@ -24,6 +24,9 @@ + #include + #include + #include ++#if (LINUX_VERSION_CODE == KERNEL_VERSION(2,6,28)) ++#include ++#endif + #include + #include + #include diff --git a/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wl1251_spi.c b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wl1251_spi.c new file mode 100644 index 000000000000..97850f0d6d85 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wl1251_spi.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/ti/wl1251/spi.c ++++ b/drivers/net/wireless/ti/wl1251/spi.c +@@ -24,6 +24,9 @@ + #include + #include + #include ++#if (LINUX_VERSION_CODE == KERNEL_VERSION(2,6,28)) ++#include ++#endif + #include + #include + diff --git a/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wlcore_event.c b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wlcore_event.c new file mode 100644 index 000000000000..3bc339643783 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wlcore_event.c @@ -0,0 +1,10 @@ +--- a/drivers/net/wireless/ti/wlcore/event.c ++++ b/drivers/net/wireless/ti/wlcore/event.c +@@ -21,6 +21,7 @@ + * + */ + ++#include + #include "wlcore.h" + #include "debug.h" + #include "io.h" diff --git a/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wlcore_scan.c b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wlcore_scan.c new file mode 100644 index 000000000000..848aa82adca4 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wlcore_scan.c @@ -0,0 +1,10 @@ +--- a/drivers/net/wireless/ti/wlcore/scan.c ++++ b/drivers/net/wireless/ti/wlcore/scan.c +@@ -22,6 +22,7 @@ + */ + + #include ++#include + + #include "wlcore.h" + #include "debug.h" diff --git a/patches/collateral-evolutions/network/06-header-changes/include_net_mac80211.h b/patches/collateral-evolutions/network/06-header-changes/include_net_mac80211.h new file mode 100644 index 000000000000..2ba84707ecfd --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/include_net_mac80211.h @@ -0,0 +1,10 @@ +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + /** + * DOC: Introduction diff --git a/patches/collateral-evolutions/network/06-header-changes/net_bluetooth_bnep_sock.c b/patches/collateral-evolutions/network/06-header-changes/net_bluetooth_bnep_sock.c new file mode 100644 index 000000000000..9c949d26f389 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/net_bluetooth_bnep_sock.c @@ -0,0 +1,10 @@ +--- a/net/bluetooth/bnep/sock.c ++++ b/net/bluetooth/bnep/sock.c +@@ -26,6 +26,7 @@ + + #include + #include ++#include + + #include "bnep.h" + diff --git a/patches/collateral-evolutions/network/06-header-changes/net_bluetooth_hci_sock.c b/patches/collateral-evolutions/network/06-header-changes/net_bluetooth_hci_sock.c new file mode 100644 index 000000000000..08d68fd62047 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/net_bluetooth_hci_sock.c @@ -0,0 +1,10 @@ +--- a/net/bluetooth/hci_sock.c ++++ b/net/bluetooth/hci_sock.c +@@ -25,6 +25,7 @@ + /* Bluetooth HCI sockets. */ + + #include ++#include + #include + + #include diff --git a/patches/collateral-evolutions/network/06-header-changes/net_bluetooth_hidp_sock.c b/patches/collateral-evolutions/network/06-header-changes/net_bluetooth_hidp_sock.c new file mode 100644 index 000000000000..1e351761199c --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/net_bluetooth_hidp_sock.c @@ -0,0 +1,10 @@ +--- a/net/bluetooth/hidp/sock.c ++++ b/net/bluetooth/hidp/sock.c +@@ -22,6 +22,7 @@ + + #include + #include ++#include + + #include "hidp.h" + diff --git a/patches/collateral-evolutions/network/06-header-changes/net_mac80211_key.c b/patches/collateral-evolutions/network/06-header-changes/net_mac80211_key.c new file mode 100644 index 000000000000..7f8bbeb6b2c8 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/net_mac80211_key.c @@ -0,0 +1,12 @@ +--- a/net/mac80211/key.c ++++ b/net/mac80211/key.c +@@ -24,6 +24,9 @@ + #include "aes_ccm.h" + #include "aes_cmac.h" + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) ++#include ++#endif + + /** + * DOC: Key handling basics diff --git a/patches/collateral-evolutions/network/06-header-changes/net_mac80211_pm.c b/patches/collateral-evolutions/network/06-header-changes/net_mac80211_pm.c new file mode 100644 index 000000000000..cd7ae0e85674 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/net_mac80211_pm.c @@ -0,0 +1,9 @@ +--- a/net/mac80211/pm.c ++++ b/net/mac80211/pm.c +@@ -1,5 +1,6 @@ + #include + #include ++#include + + #include "ieee80211_i.h" + #include "mesh.h" diff --git a/patches/collateral-evolutions/network/06-header-changes/net_wireless_util.c b/patches/collateral-evolutions/network/06-header-changes/net_wireless_util.c new file mode 100644 index 000000000000..ab9b61a58a45 --- /dev/null +++ b/patches/collateral-evolutions/network/06-header-changes/net_wireless_util.c @@ -0,0 +1,10 @@ +--- a/net/wireless/util.c ++++ b/net/wireless/util.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include "core.h" + #include "rdev-ops.h" + diff --git a/patches/collateral-evolutions/network/07-change-default-rate-alg/INFO b/patches/collateral-evolutions/network/07-change-default-rate-alg/INFO new file mode 100644 index 000000000000..60cdc350af63 --- /dev/null +++ b/patches/collateral-evolutions/network/07-change-default-rate-alg/INFO @@ -0,0 +1,12 @@ + +Your current kernels configuration (.config and linux/autoconf.h) +are always respected when compiling external modules. Because +of this if you are using an old kernel which preferred the +PID rate control algorithm we cannot force it to use minstrel +instead. Minstrel is now the default rate control algorithm +and we want you to use it. To let you use it we redefine here +the CONFIG_MAC80211_RC_DEFAULT to CONFIG_COMPAT_MAC80211_RC_DEFAULT +and define CONFIG_COMPAT_MAC80211_RC_DEFAULT on config.mk. +Through the compat autoconf we then get it also defined there +at compilation time. + diff --git a/patches/collateral-evolutions/network/07-change-default-rate-alg.patch b/patches/collateral-evolutions/network/07-change-default-rate-alg/net_mac80211_rate.c similarity index 56% rename from patches/collateral-evolutions/network/07-change-default-rate-alg.patch rename to patches/collateral-evolutions/network/07-change-default-rate-alg/net_mac80211_rate.c index 0584f9d8df72..b6018e660e55 100644 --- a/patches/collateral-evolutions/network/07-change-default-rate-alg.patch +++ b/patches/collateral-evolutions/network/07-change-default-rate-alg/net_mac80211_rate.c @@ -1,18 +1,6 @@ - -Your current kernels configuration (.config and linux/autoconf.h) -are always respected when compiling external modules. Because -of this if you are using an old kernel which preferred the -PID rate control algorithm we cannot force it to use minstrel -instead. Minstrel is now the default rate control algorithm -and we want you to use it. To let you use it we redefine here -the CONFIG_MAC80211_RC_DEFAULT to CONFIG_COMPAT_MAC80211_RC_DEFAULT -and define CONFIG_COMPAT_MAC80211_RC_DEFAULT on config.mk. -Through the compat autoconf we then get it also defined there -at compilation time. - --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c -@@ -24,7 +24,7 @@ struct rate_control_alg { +@@ -24,7 +24,7 @@ static LIST_HEAD(rate_ctrl_algs); static DEFINE_MUTEX(rate_ctrl_mutex); @@ -21,7 +9,7 @@ at compilation time. module_param(ieee80211_default_rc_algo, charp, 0644); MODULE_PARM_DESC(ieee80211_default_rc_algo, "Default rate control algorithm for mac80211 to use"); -@@ -120,8 +120,8 @@ ieee80211_rate_control_ops_get(const cha +@@ -120,8 +120,8 @@ ops = ieee80211_try_rate_control_ops_get(ieee80211_default_rc_algo); /* try built-in one if specific alg requested but not found */ diff --git a/patches/collateral-evolutions/network/08-rename-config-options.patch b/patches/collateral-evolutions/network/08-rename-config-options.patch deleted file mode 100644 index c2ce7b73097e..000000000000 --- a/patches/collateral-evolutions/network/08-rename-config-options.patch +++ /dev/null @@ -1,192 +0,0 @@ -This file renames CONFIG_ options that may be defined in older -kernels but that we know we can *safely* rename to other config -option names to ensure we disable building these options at -through this framework. An example here is ath9k's rate control -aglorithm is always selected by default via CONFIG_ATH9K_RATE_CONTROL. -By renaming this to CONFIG_COMPAT_ATH9K_RATE_CONTROL we have -the flexibility to disable it for a replacement driver. - -In kernel 2.6.26 and older CONFIG_IWL4965 was build as an extra -module, but now it is directly included in the iwlagn. - -CONFIG_IWL4965 has to be set to y, to build correctly. - -zd1211rw does not build with kernel < 2.6.28, but it is often activated -in the kernel config of older kernels. We rename the option to -deactivate it on older kernels. -CONFIG_BT_L2CAP and CONFIG_BT_SCO are boolean now, but often set to m -in the kernel config. - -CONFIG_BT_HIDP does not build with older kernel versions. - ---- a/drivers/net/wireless/Makefile -+++ b/drivers/net/wireless/Makefile -@@ -21,7 +21,7 @@ obj-$(CONFIG_PRISM54) += prism54/ - obj-$(CONFIG_HOSTAP) += hostap/ - obj-$(CONFIG_B43) += b43/ - obj-$(CONFIG_B43LEGACY) += b43legacy/ --obj-$(CONFIG_ZD1211RW) += zd1211rw/ -+obj-$(CONFIG_COMPAT_ZD1211RW) += zd1211rw/ - obj-$(CONFIG_RTL8180) += rtl818x/ - obj-$(CONFIG_RTL8187) += rtl818x/ - obj-$(CONFIG_RTLWIFI) += rtlwifi/ -@@ -49,11 +49,11 @@ obj-$(CONFIG_P54_COMMON) += p54/ - - obj-$(CONFIG_ATH_CARDS) += ath/ - --obj-$(CONFIG_MAC80211_HWSIM) += mac80211_hwsim.o -+obj-$(CONFIG_COMPAT_MAC80211_HWSIM) += mac80211_hwsim.o - - obj-$(CONFIG_WL_TI) += ti/ - --obj-$(CONFIG_MWIFIEX) += mwifiex/ -+obj-$(CONFIG_COMPAT_MWIFIEX) += mwifiex/ - - obj-$(CONFIG_BRCMFMAC) += brcm80211/ - obj-$(CONFIG_BRCMSMAC) += brcm80211/ ---- a/drivers/net/wireless/iwlegacy/Makefile -+++ b/drivers/net/wireless/iwlegacy/Makefile -@@ -5,7 +5,7 @@ iwlegacy-$(CONFIG_IWLEGACY_DEBUGFS) += d - iwlegacy-objs += $(iwlegacy-m) - - # 4965 --obj-$(CONFIG_IWL4965) += iwl4965.o -+obj-$(CONFIG_COMPAT_IWL4965) += iwl4965.o - iwl4965-objs := 4965.o 4965-mac.o 4965-rs.o 4965-calib.o - iwl4965-$(CONFIG_IWLEGACY_DEBUGFS) += 4965-debug.o - ---- a/drivers/net/wireless/iwlegacy/common.h -+++ b/drivers/net/wireless/iwlegacy/common.h -@@ -1348,7 +1348,7 @@ struct il_priv { - - } _3945; - #endif --#if defined(CONFIG_IWL4965) || defined(CONFIG_IWL4965_MODULE) -+#if defined(CONFIG_COMPAT_IWL4965) || defined(CONFIG_COMPAT_IWL4965_MODULE) - struct { - struct il_rx_phy_res last_phy_res; - bool last_phy_res_valid; ---- a/drivers/net/wireless/libertas/Makefile -+++ b/drivers/net/wireless/libertas/Makefile -@@ -17,5 +17,5 @@ libertas_spi-objs += if_spi.o - obj-$(CONFIG_LIBERTAS) += libertas.o - obj-$(CONFIG_LIBERTAS_USB) += usb8xxx.o - obj-$(CONFIG_LIBERTAS_CS) += libertas_cs.o --obj-$(CONFIG_LIBERTAS_SDIO) += libertas_sdio.o -+obj-$(CONFIG_COMPAT_LIBERTAS_SDIO) += libertas_sdio.o - obj-$(CONFIG_LIBERTAS_SPI) += libertas_spi.o ---- a/drivers/net/wireless/zd1211rw/Makefile -+++ b/drivers/net/wireless/zd1211rw/Makefile -@@ -1,4 +1,4 @@ --obj-$(CONFIG_ZD1211RW) += zd1211rw.o -+obj-$(CONFIG_COMPAT_ZD1211RW) += zd1211rw.o - - zd1211rw-objs := zd_chip.o zd_mac.o \ - zd_rf_al2230.o zd_rf_rf2959.o \ ---- a/net/bluetooth/Makefile -+++ b/net/bluetooth/Makefile -@@ -6,7 +6,7 @@ obj-$(CONFIG_BT) += bluetooth.o - obj-$(CONFIG_BT_RFCOMM) += rfcomm/ - obj-$(CONFIG_BT_BNEP) += bnep/ - obj-$(CONFIG_BT_CMTP) += cmtp/ --obj-$(CONFIG_BT_HIDP) += hidp/ -+obj-$(CONFIG_COMPAT_BT_HIDP) += hidp/ - - bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o \ - hci_sock.o hci_sysfs.o l2cap_core.o l2cap_sock.o smp.o sco.o lib.o \ ---- a/net/bluetooth/hidp/Makefile -+++ b/net/bluetooth/hidp/Makefile -@@ -2,6 +2,6 @@ - # Makefile for the Linux Bluetooth HIDP layer - # - --obj-$(CONFIG_BT_HIDP) += hidp.o -+obj-$(CONFIG_COMPAT_BT_HIDP) += hidp.o - - hidp-objs := core.o sock.o ---- a/drivers/net/wireless/ti/wl1251/Makefile -+++ b/drivers/net/wireless/ti/wl1251/Makefile -@@ -4,7 +4,7 @@ wl1251_spi-objs += spi.o - wl1251_sdio-objs += sdio.o - - obj-$(CONFIG_WL1251) += wl1251.o --obj-$(CONFIG_WL1251_SPI) += wl1251_spi.o --obj-$(CONFIG_WL1251_SDIO) += wl1251_sdio.o -+obj-$(CONFIG_COMPAT_WL1251_SPI)+= wl1251_spi.o -+obj-$(CONFIG_COMPAT_WL1251_SDIO)+= wl1251_sdio.o - - ccflags-y += -D__CHECK_ENDIAN__ ---- a/drivers/net/wireless/ath/ath9k/Makefile -+++ b/drivers/net/wireless/ath/ath9k/Makefile -@@ -8,7 +8,7 @@ ath9k-y += beacon.o \ - antenna.o - - ath9k-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += mci.o --ath9k-$(CONFIG_ATH9K_RATE_CONTROL) += rc.o -+ath9k-$(CONFIG_COMPAT_ATH9K_RATE_CONTROL) += rc.o - ath9k-$(CONFIG_ATH9K_PCI) += pci.o - ath9k-$(CONFIG_ATH9K_AHB) += ahb.o - ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o ---- a/drivers/net/wireless/ath/ath9k/init.c -+++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -809,7 +809,7 @@ void ath9k_set_hw_capab(struct ath_softc - sc->ant_rx = hw->wiphy->available_antennas_rx; - sc->ant_tx = hw->wiphy->available_antennas_tx; - --#ifdef CONFIG_ATH9K_RATE_CONTROL -+#ifdef CONFIG_COMPAT_ATH9K_RATE_CONTROL - hw->rate_control_algorithm = "ath9k_rate_control"; - #endif - ---- a/drivers/net/wireless/ath/ath9k/rc.h -+++ b/drivers/net/wireless/ath/ath9k/rc.h -@@ -231,7 +231,7 @@ static inline void ath_debug_stat_retrie - } - #endif - --#ifdef CONFIG_ATH9K_RATE_CONTROL -+#ifdef CONFIG_COMPAT_ATH9K_RATE_CONTROL - int ath_rate_control_register(void); - void ath_rate_control_unregister(void); - #else ---- a/net/bluetooth/rfcomm/Makefile -+++ b/net/bluetooth/rfcomm/Makefile -@@ -5,4 +5,4 @@ - obj-$(CONFIG_BT_RFCOMM) += rfcomm.o - - rfcomm-y := core.o sock.o --rfcomm-$(CONFIG_BT_RFCOMM_TTY) += tty.o -+rfcomm-$(CONFIG_COMPAT_BT_RFCOMM_TTY) += tty.o ---- a/include/net/bluetooth/rfcomm.h -+++ b/include/net/bluetooth/rfcomm.h -@@ -351,7 +351,7 @@ struct rfcomm_dev_list_req { - - int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); - --#ifdef CONFIG_BT_RFCOMM_TTY -+#ifdef CONFIG_COMPAT_BT_RFCOMM_TTY - int rfcomm_init_ttys(void); - void rfcomm_cleanup_ttys(void); - #else ---- a/net/bluetooth/rfcomm/sock.c -+++ b/net/bluetooth/rfcomm/sock.c -@@ -860,7 +860,7 @@ static int rfcomm_sock_ioctl(struct sock - err = bt_sock_ioctl(sock, cmd, arg); - - if (err == -ENOIOCTLCMD) { --#ifdef CONFIG_BT_RFCOMM_TTY -+#ifdef CONFIG_COMPAT_BT_RFCOMM_TTY - lock_sock(sk); - err = rfcomm_dev_ioctl(sk, cmd, (void __user *) arg); - release_sock(sk); ---- a/drivers/net/wireless/mwifiex/Makefile -+++ b/drivers/net/wireless/mwifiex/Makefile -@@ -41,7 +41,7 @@ mwifiex-y += uap_txrx.o - mwifiex-y += cfg80211.o - mwifiex-y += ethtool.o - mwifiex-$(CONFIG_DEBUG_FS) += debugfs.o --obj-$(CONFIG_MWIFIEX) += mwifiex.o -+obj-$(CONFIG_COMPAT_MWIFIEX) += mwifiex.o - - mwifiex_sdio-y += sdio.o - obj-$(CONFIG_MWIFIEX_SDIO) += mwifiex_sdio.o diff --git a/patches/collateral-evolutions/network/08-rename-config-options/INFO b/patches/collateral-evolutions/network/08-rename-config-options/INFO new file mode 100644 index 000000000000..124c454d12a8 --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/INFO @@ -0,0 +1,21 @@ +This file renames CONFIG_ options that may be defined in older +kernels but that we know we can *safely* rename to other config +option names to ensure we disable building these options at +through this framework. An example here is ath9k's rate control +aglorithm is always selected by default via CONFIG_ATH9K_RATE_CONTROL. +By renaming this to CONFIG_COMPAT_ATH9K_RATE_CONTROL we have +the flexibility to disable it for a replacement driver. + +In kernel 2.6.26 and older CONFIG_IWL4965 was build as an extra +module, but now it is directly included in the iwlagn. + +CONFIG_IWL4965 has to be set to y, to build correctly. + +zd1211rw does not build with kernel < 2.6.28, but it is often activated +in the kernel config of older kernels. We rename the option to +deactivate it on older kernels. +CONFIG_BT_L2CAP and CONFIG_BT_SCO are boolean now, but often set to m +in the kernel config. + +CONFIG_BT_HIDP does not build with older kernel versions. + diff --git a/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_Makefile b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_Makefile new file mode 100644 index 000000000000..e9e7c19bd20a --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_Makefile @@ -0,0 +1,25 @@ +--- a/drivers/net/wireless/Makefile ++++ b/drivers/net/wireless/Makefile +@@ -21,7 +21,7 @@ + obj-$(CONFIG_HOSTAP) += hostap/ + obj-$(CONFIG_B43) += b43/ + obj-$(CONFIG_B43LEGACY) += b43legacy/ +-obj-$(CONFIG_ZD1211RW) += zd1211rw/ ++obj-$(CONFIG_COMPAT_ZD1211RW) += zd1211rw/ + obj-$(CONFIG_RTL8180) += rtl818x/ + obj-$(CONFIG_RTL8187) += rtl818x/ + obj-$(CONFIG_RTLWIFI) += rtlwifi/ +@@ -49,11 +49,11 @@ + + obj-$(CONFIG_ATH_CARDS) += ath/ + +-obj-$(CONFIG_MAC80211_HWSIM) += mac80211_hwsim.o ++obj-$(CONFIG_COMPAT_MAC80211_HWSIM) += mac80211_hwsim.o + + obj-$(CONFIG_WL_TI) += ti/ + +-obj-$(CONFIG_MWIFIEX) += mwifiex/ ++obj-$(CONFIG_COMPAT_MWIFIEX) += mwifiex/ + + obj-$(CONFIG_BRCMFMAC) += brcm80211/ + obj-$(CONFIG_BRCMSMAC) += brcm80211/ diff --git a/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_Makefile b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_Makefile new file mode 100644 index 000000000000..4b3e5e6353eb --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_Makefile @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/ath/ath9k/Makefile ++++ b/drivers/net/wireless/ath/ath9k/Makefile +@@ -8,7 +8,7 @@ + antenna.o + + ath9k-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += mci.o +-ath9k-$(CONFIG_ATH9K_RATE_CONTROL) += rc.o ++ath9k-$(CONFIG_COMPAT_ATH9K_RATE_CONTROL) += rc.o + ath9k-$(CONFIG_ATH9K_PCI) += pci.o + ath9k-$(CONFIG_ATH9K_AHB) += ahb.o + ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o diff --git a/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_init.c b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_init.c new file mode 100644 index 000000000000..e88243d6b332 --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_init.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/ath/ath9k/init.c ++++ b/drivers/net/wireless/ath/ath9k/init.c +@@ -809,7 +809,7 @@ + sc->ant_rx = hw->wiphy->available_antennas_rx; + sc->ant_tx = hw->wiphy->available_antennas_tx; + +-#ifdef CONFIG_ATH9K_RATE_CONTROL ++#ifdef CONFIG_COMPAT_ATH9K_RATE_CONTROL + hw->rate_control_algorithm = "ath9k_rate_control"; + #endif + diff --git a/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_rc.h b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_rc.h new file mode 100644 index 000000000000..41c6102f12fb --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ath_ath9k_rc.h @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/ath/ath9k/rc.h ++++ b/drivers/net/wireless/ath/ath9k/rc.h +@@ -231,7 +231,7 @@ + } + #endif + +-#ifdef CONFIG_ATH9K_RATE_CONTROL ++#ifdef CONFIG_COMPAT_ATH9K_RATE_CONTROL + int ath_rate_control_register(void); + void ath_rate_control_unregister(void); + #else diff --git a/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_iwlegacy_Makefile b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_iwlegacy_Makefile new file mode 100644 index 000000000000..a34a591ff96d --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_iwlegacy_Makefile @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/iwlegacy/Makefile ++++ b/drivers/net/wireless/iwlegacy/Makefile +@@ -5,7 +5,7 @@ + iwlegacy-objs += $(iwlegacy-m) + + # 4965 +-obj-$(CONFIG_IWL4965) += iwl4965.o ++obj-$(CONFIG_COMPAT_IWL4965) += iwl4965.o + iwl4965-objs := 4965.o 4965-mac.o 4965-rs.o 4965-calib.o + iwl4965-$(CONFIG_IWLEGACY_DEBUGFS) += 4965-debug.o + diff --git a/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_iwlegacy_common.h b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_iwlegacy_common.h new file mode 100644 index 000000000000..2cc58ee0c8d8 --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_iwlegacy_common.h @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/iwlegacy/common.h ++++ b/drivers/net/wireless/iwlegacy/common.h +@@ -1348,7 +1348,7 @@ + + } _3945; + #endif +-#if defined(CONFIG_IWL4965) || defined(CONFIG_IWL4965_MODULE) ++#if defined(CONFIG_COMPAT_IWL4965) || defined(CONFIG_COMPAT_IWL4965_MODULE) + struct { + struct il_rx_phy_res last_phy_res; + bool last_phy_res_valid; diff --git a/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_libertas_Makefile b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_libertas_Makefile new file mode 100644 index 000000000000..2ef885fa7f67 --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_libertas_Makefile @@ -0,0 +1,9 @@ +--- a/drivers/net/wireless/libertas/Makefile ++++ b/drivers/net/wireless/libertas/Makefile +@@ -17,5 +17,5 @@ + obj-$(CONFIG_LIBERTAS) += libertas.o + obj-$(CONFIG_LIBERTAS_USB) += usb8xxx.o + obj-$(CONFIG_LIBERTAS_CS) += libertas_cs.o +-obj-$(CONFIG_LIBERTAS_SDIO) += libertas_sdio.o ++obj-$(CONFIG_COMPAT_LIBERTAS_SDIO) += libertas_sdio.o + obj-$(CONFIG_LIBERTAS_SPI) += libertas_spi.o diff --git a/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_mwifiex_Makefile b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_mwifiex_Makefile new file mode 100644 index 000000000000..0c6e1f03997f --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_mwifiex_Makefile @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/mwifiex/Makefile ++++ b/drivers/net/wireless/mwifiex/Makefile +@@ -41,7 +41,7 @@ + mwifiex-y += cfg80211.o + mwifiex-y += ethtool.o + mwifiex-$(CONFIG_DEBUG_FS) += debugfs.o +-obj-$(CONFIG_MWIFIEX) += mwifiex.o ++obj-$(CONFIG_COMPAT_MWIFIEX) += mwifiex.o + + mwifiex_sdio-y += sdio.o + obj-$(CONFIG_MWIFIEX_SDIO) += mwifiex_sdio.o diff --git a/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ti_wl1251_Makefile b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ti_wl1251_Makefile new file mode 100644 index 000000000000..e098d0eddde6 --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_ti_wl1251_Makefile @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/ti/wl1251/Makefile ++++ b/drivers/net/wireless/ti/wl1251/Makefile +@@ -4,7 +4,7 @@ + wl1251_sdio-objs += sdio.o + + obj-$(CONFIG_WL1251) += wl1251.o +-obj-$(CONFIG_WL1251_SPI) += wl1251_spi.o +-obj-$(CONFIG_WL1251_SDIO) += wl1251_sdio.o ++obj-$(CONFIG_COMPAT_WL1251_SPI)+= wl1251_spi.o ++obj-$(CONFIG_COMPAT_WL1251_SDIO)+= wl1251_sdio.o + + ccflags-y += -D__CHECK_ENDIAN__ diff --git a/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_zd1211rw_Makefile b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_zd1211rw_Makefile new file mode 100644 index 000000000000..7f89efdbda39 --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/drivers_net_wireless_zd1211rw_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/net/wireless/zd1211rw/Makefile ++++ b/drivers/net/wireless/zd1211rw/Makefile +@@ -1,4 +1,4 @@ +-obj-$(CONFIG_ZD1211RW) += zd1211rw.o ++obj-$(CONFIG_COMPAT_ZD1211RW) += zd1211rw.o + + zd1211rw-objs := zd_chip.o zd_mac.o \ + zd_rf_al2230.o zd_rf_rf2959.o \ diff --git a/patches/collateral-evolutions/network/08-rename-config-options/include_net_bluetooth_rfcomm.h b/patches/collateral-evolutions/network/08-rename-config-options/include_net_bluetooth_rfcomm.h new file mode 100644 index 000000000000..e54d04c3c5c2 --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/include_net_bluetooth_rfcomm.h @@ -0,0 +1,11 @@ +--- a/include/net/bluetooth/rfcomm.h ++++ b/include/net/bluetooth/rfcomm.h +@@ -351,7 +351,7 @@ + + int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); + +-#ifdef CONFIG_BT_RFCOMM_TTY ++#ifdef CONFIG_COMPAT_BT_RFCOMM_TTY + int rfcomm_init_ttys(void); + void rfcomm_cleanup_ttys(void); + #else diff --git a/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_Makefile b/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_Makefile new file mode 100644 index 000000000000..92898fced018 --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_Makefile @@ -0,0 +1,11 @@ +--- a/net/bluetooth/Makefile ++++ b/net/bluetooth/Makefile +@@ -6,7 +6,7 @@ + obj-$(CONFIG_BT_RFCOMM) += rfcomm/ + obj-$(CONFIG_BT_BNEP) += bnep/ + obj-$(CONFIG_BT_CMTP) += cmtp/ +-obj-$(CONFIG_BT_HIDP) += hidp/ ++obj-$(CONFIG_COMPAT_BT_HIDP) += hidp/ + + bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o \ + hci_sock.o hci_sysfs.o l2cap_core.o l2cap_sock.o smp.o sco.o lib.o \ diff --git a/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_hidp_Makefile b/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_hidp_Makefile new file mode 100644 index 000000000000..581e3a765a75 --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_hidp_Makefile @@ -0,0 +1,10 @@ +--- a/net/bluetooth/hidp/Makefile ++++ b/net/bluetooth/hidp/Makefile +@@ -2,6 +2,6 @@ + # Makefile for the Linux Bluetooth HIDP layer + # + +-obj-$(CONFIG_BT_HIDP) += hidp.o ++obj-$(CONFIG_COMPAT_BT_HIDP) += hidp.o + + hidp-objs := core.o sock.o diff --git a/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_rfcomm_Makefile b/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_rfcomm_Makefile new file mode 100644 index 000000000000..59d26c18ceac --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_rfcomm_Makefile @@ -0,0 +1,8 @@ +--- a/net/bluetooth/rfcomm/Makefile ++++ b/net/bluetooth/rfcomm/Makefile +@@ -5,4 +5,4 @@ + obj-$(CONFIG_BT_RFCOMM) += rfcomm.o + + rfcomm-y := core.o sock.o +-rfcomm-$(CONFIG_BT_RFCOMM_TTY) += tty.o ++rfcomm-$(CONFIG_COMPAT_BT_RFCOMM_TTY) += tty.o diff --git a/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_rfcomm_sock.c b/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_rfcomm_sock.c new file mode 100644 index 000000000000..96594cc39091 --- /dev/null +++ b/patches/collateral-evolutions/network/08-rename-config-options/net_bluetooth_rfcomm_sock.c @@ -0,0 +1,11 @@ +--- a/net/bluetooth/rfcomm/sock.c ++++ b/net/bluetooth/rfcomm/sock.c +@@ -860,7 +860,7 @@ + err = bt_sock_ioctl(sock, cmd, arg); + + if (err == -ENOIOCTLCMD) { +-#ifdef CONFIG_BT_RFCOMM_TTY ++#ifdef CONFIG_COMPAT_BT_RFCOMM_TTY + lock_sock(sk); + err = rfcomm_dev_ioctl(sk, cmd, (void __user *) arg); + release_sock(sk); diff --git a/patches/collateral-evolutions/network/09-cfg80211-wext-padding.patch b/patches/collateral-evolutions/network/09-cfg80211-wext-padding.patch deleted file mode 100644 index fcc721d0ffa2..000000000000 --- a/patches/collateral-evolutions/network/09-cfg80211-wext-padding.patch +++ /dev/null @@ -1,62 +0,0 @@ -This is a tricky one. - -Consider a kernel that has this code in net/wireless/wext-core.c: - -#ifdef CONFIG_CFG80211_WEXT - if (dev->ieee80211_ptr && dev->ieee80211_ptr->wiphy) - handlers = dev->ieee80211_ptr->wiphy->wext; -#endif -#ifdef CONFIG_WIRELESS_EXT - if (dev->wireless_handlers) - handlers = dev->wireless_handlers; -#endif - -If a kernel is compiled without CONFIG_WIRELESS_EXT then -compat-drivers can't do wireless extensions against it. -However, if the kernel is compiled with CONFIG_CFG80211_WEXT -then it will try to get the wext handlers from struct wiphy. - -Now, struct wiphy in the base kernel and struct wiphy in -compat-drivers don't match, so the kernel crashes!! - -To fix this, add lots of padding to compat-drivers's -struct wiphy so that the "wext" pointer is guaranteed -to be NULL. - -Make sure the padding is larger than the struct so we -don't ever run into this again because the wext pointer -moved due to struct enlargements. - - ---- a/include/net/cfg80211.h -+++ b/include/net/cfg80211.h -@@ -2561,6 +2561,9 @@ struct wiphy_wowlan_support { - struct wiphy { - /* assign these fields before you register the wiphy */ - -+#define WIPHY_COMPAT_PAD_SIZE 2048 -+ u8 padding[WIPHY_COMPAT_PAD_SIZE]; -+ - /* permanent MAC address(es) */ - u8 perm_addr[ETH_ALEN]; - u8 addr_mask[ETH_ALEN]; ---- a/net/wireless/core.c -+++ b/net/wireless/core.c -@@ -316,6 +316,17 @@ struct wiphy *wiphy_new(const struct cfg - struct cfg80211_registered_device *rdev; - int alloc_size; - -+ /* -+ * Make sure the padding is >= the rest of the struct so that we -+ * always keep it large enough to pad out the entire original -+ * kernel's struct. We really only need to make sure it's larger -+ * than the kernel compat is compiled against, but since it'll -+ * only increase in size make sure it's larger than the current -+ * version of it. Subtract since it's included. -+ */ -+ BUILD_BUG_ON(WIPHY_COMPAT_PAD_SIZE < -+ sizeof(struct wiphy) - WIPHY_COMPAT_PAD_SIZE); -+ - WARN_ON(ops->add_key && (!ops->del_key || !ops->set_default_key)); - WARN_ON(ops->auth && (!ops->assoc || !ops->deauth || !ops->disassoc)); - WARN_ON(ops->connect && !ops->disconnect); diff --git a/patches/collateral-evolutions/network/09-cfg80211-wext-padding/INFO b/patches/collateral-evolutions/network/09-cfg80211-wext-padding/INFO new file mode 100644 index 000000000000..3d0044da103d --- /dev/null +++ b/patches/collateral-evolutions/network/09-cfg80211-wext-padding/INFO @@ -0,0 +1,30 @@ +This is a tricky one. + +Consider a kernel that has this code in net/wireless/wext-core.c: + +#ifdef CONFIG_CFG80211_WEXT + if (dev->ieee80211_ptr && dev->ieee80211_ptr->wiphy) + handlers = dev->ieee80211_ptr->wiphy->wext; +#endif +#ifdef CONFIG_WIRELESS_EXT + if (dev->wireless_handlers) + handlers = dev->wireless_handlers; +#endif + +If a kernel is compiled without CONFIG_WIRELESS_EXT then +compat-drivers can't do wireless extensions against it. +However, if the kernel is compiled with CONFIG_CFG80211_WEXT +then it will try to get the wext handlers from struct wiphy. + +Now, struct wiphy in the base kernel and struct wiphy in +compat-drivers don't match, so the kernel crashes!! + +To fix this, add lots of padding to compat-drivers's +struct wiphy so that the "wext" pointer is guaranteed +to be NULL. + +Make sure the padding is larger than the struct so we +don't ever run into this again because the wext pointer +moved due to struct enlargements. + + diff --git a/patches/collateral-evolutions/network/09-cfg80211-wext-padding/include_net_cfg80211.h b/patches/collateral-evolutions/network/09-cfg80211-wext-padding/include_net_cfg80211.h new file mode 100644 index 000000000000..0661f90d423f --- /dev/null +++ b/patches/collateral-evolutions/network/09-cfg80211-wext-padding/include_net_cfg80211.h @@ -0,0 +1,12 @@ +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -2561,6 +2561,9 @@ + struct wiphy { + /* assign these fields before you register the wiphy */ + ++#define WIPHY_COMPAT_PAD_SIZE 2048 ++ u8 padding[WIPHY_COMPAT_PAD_SIZE]; ++ + /* permanent MAC address(es) */ + u8 perm_addr[ETH_ALEN]; + u8 addr_mask[ETH_ALEN]; diff --git a/patches/collateral-evolutions/network/09-cfg80211-wext-padding/net_wireless_core.c b/patches/collateral-evolutions/network/09-cfg80211-wext-padding/net_wireless_core.c new file mode 100644 index 000000000000..064e15713671 --- /dev/null +++ b/patches/collateral-evolutions/network/09-cfg80211-wext-padding/net_wireless_core.c @@ -0,0 +1,20 @@ +--- a/net/wireless/core.c ++++ b/net/wireless/core.c +@@ -316,6 +316,17 @@ + struct cfg80211_registered_device *rdev; + int alloc_size; + ++ /* ++ * Make sure the padding is >= the rest of the struct so that we ++ * always keep it large enough to pad out the entire original ++ * kernel's struct. We really only need to make sure it's larger ++ * than the kernel compat is compiled against, but since it'll ++ * only increase in size make sure it's larger than the current ++ * version of it. Subtract since it's included. ++ */ ++ BUILD_BUG_ON(WIPHY_COMPAT_PAD_SIZE < ++ sizeof(struct wiphy) - WIPHY_COMPAT_PAD_SIZE); ++ + WARN_ON(ops->add_key && (!ops->del_key || !ops->set_default_key)); + WARN_ON(ops->auth && (!ops->assoc || !ops->deauth || !ops->disassoc)); + WARN_ON(ops->connect && !ops->disconnect); diff --git a/patches/collateral-evolutions/network/09-threaded-irq.patch b/patches/collateral-evolutions/network/09-threaded-irq.patch deleted file mode 100644 index ecd1765c91d7..000000000000 --- a/patches/collateral-evolutions/network/09-threaded-irq.patch +++ /dev/null @@ -1,181 +0,0 @@ -The 2.6.31 kernel has threaded IRQ support and b43 is the first -wireless driver that makes use of it. To support threaded IRSs -on older kernels we built our own struct compat_threaded_irq -to queue_work() onto it as the kernel thread be running the -thread in process context as well. - ---- a/drivers/net/wireless/b43/main.c -+++ b/drivers/net/wireless/b43/main.c -@@ -4243,8 +4243,13 @@ redo: - if (b43_bus_host_is_sdio(dev->dev)) { - b43_sdio_free_irq(dev); - } else { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ compat_synchronize_threaded_irq(&dev->irq_compat); -+ compat_free_threaded_irq(&dev->irq_compat); -+#else - synchronize_irq(dev->dev->irq); - free_irq(dev->dev->irq, dev); -+#endif - } - mutex_lock(&wl->mutex); - dev = wl->current_dev; -@@ -4290,9 +4295,17 @@ static int b43_wireless_core_start(struc - goto out; - } - } else { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ err = compat_request_threaded_irq(&dev->irq_compat, -+ dev->dev->irq, -+ b43_interrupt_handler, -+ b43_interrupt_thread_handler, -+ IRQF_SHARED, KBUILD_MODNAME, dev); -+#else - err = request_threaded_irq(dev->dev->irq, b43_interrupt_handler, - b43_interrupt_thread_handler, - IRQF_SHARED, KBUILD_MODNAME, dev); -+#endif - if (err) { - b43err(dev->wl, "Cannot request IRQ-%d\n", - dev->dev->irq); -@@ -5115,6 +5128,10 @@ static int b43_setup_bands(struct b43_wl - - static void b43_wireless_core_detach(struct b43_wldev *dev) - { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ if (dev->dev->sdev->bus->bustype != SSB_BUSTYPE_SDIO) -+ compat_destroy_threaded_irq(&dev->irq_compat); -+#endif - /* We release firmware that late to not be required to re-request - * is all the time when we reinit the core. */ - b43_release_firmware(dev); ---- a/drivers/net/wireless/b43/b43.h -+++ b/drivers/net/wireless/b43/b43.h -@@ -872,6 +872,9 @@ struct b43_wldev { - unsigned int tx_count; - unsigned int rx_count; - #endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ struct compat_threaded_irq irq_compat; -+#endif - }; - - /* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */ ---- a/drivers/net/wireless/iwlwifi/pcie/internal.h -+++ b/drivers/net/wireless/iwlwifi/pcie/internal.h -@@ -311,6 +311,9 @@ struct iwl_trans_pcie { - - /*protect hw register */ - spinlock_t reg_lock; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ struct compat_threaded_irq irq_compat; -+#endif - }; - - /** ---- a/drivers/net/wireless/iwlwifi/pcie/trans.c -+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c -@@ -773,12 +773,21 @@ void iwl_trans_pcie_free(struct iwl_tran - { - struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ compat_synchronize_threaded_irq(&trans_pcie->irq_compat); -+#else - synchronize_irq(trans_pcie->pci_dev->irq); -+#endif - - iwl_pcie_tx_free(trans); - iwl_pcie_rx_free(trans); - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ compat_free_threaded_irq(&trans_pcie->irq_compat); -+ compat_destroy_threaded_irq(&trans_pcie->irq_compat); -+#else - free_irq(trans_pcie->pci_dev->irq, trans); -+#endif - iwl_pcie_free_ict(trans); - - pci_disable_msi(trans_pcie->pci_dev); -@@ -1566,9 +1575,16 @@ struct iwl_trans *iwl_trans_pcie_alloc(s - if (iwl_pcie_alloc_ict(trans)) - goto out_free_cmd_pool; - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ if (compat_request_threaded_irq(&trans_pcie->irq_compat, -+ pdev->irq, iwl_pcie_isr_ict, -+ iwl_pcie_irq_handler, -+ IRQF_SHARED, DRV_NAME, trans)) { -+#else - if (request_threaded_irq(pdev->irq, iwl_pcie_isr_ict, - iwl_pcie_irq_handler, - IRQF_SHARED, DRV_NAME, trans)) { -+#endif - IWL_ERR(trans, "Error allocating IRQ %d\n", pdev->irq); - goto out_free_ict; - } ---- a/drivers/net/wireless/ti/wlcore/main.c -+++ b/drivers/net/wireless/ti/wlcore/main.c -@@ -6054,13 +6054,24 @@ static void wlcore_nvs_cb(const struct f - wl->platform_quirks = pdata->platform_quirks; - wl->if_ops = pdev_data->if_ops; - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) -+ irqflags = IRQF_TRIGGER_RISING; -+#else - if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) - irqflags = IRQF_TRIGGER_RISING; - else - irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT; -+#endif - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ ret = compat_request_threaded_irq(&wl->irq_compat, wl->irq, -+ NULL, wlcore_irq, -+ irqflags, -+ pdev->name, wl); -+#else - ret = request_threaded_irq(wl->irq, NULL, wlcore_irq, - irqflags, pdev->name, wl); -+#endif - if (ret < 0) { - wl1271_error("request_irq() failed: %d", ret); - goto out_free_nvs; -@@ -6135,7 +6146,11 @@ out_unreg: - wl1271_unregister_hw(wl); - - out_irq: -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ compat_free_threaded_irq(&wl->irq_compat); -+#else - free_irq(wl->irq, wl); -+#endif - - out_free_nvs: - kfree(wl->nvs); -@@ -6181,7 +6196,12 @@ int wlcore_remove(struct platform_device - disable_irq_wake(wl->irq); - } - wl1271_unregister_hw(wl); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ compat_free_threaded_irq(&wl->irq_compat); -+ compat_destroy_threaded_irq(&wl->irq_compat); -+#else - free_irq(wl->irq, wl); -+#endif - wlcore_free_hw(wl); - - return 0; ---- a/drivers/net/wireless/ti/wlcore/wlcore.h -+++ b/drivers/net/wireless/ti/wlcore/wlcore.h -@@ -175,7 +175,9 @@ struct wl1271 { - bool initialized; - struct ieee80211_hw *hw; - bool mac80211_registered; -- -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) -+ struct compat_threaded_irq irq_compat; -+#endif - struct device *dev; - struct platform_device *pdev; - diff --git a/patches/collateral-evolutions/network/09-threaded-irq/INFO b/patches/collateral-evolutions/network/09-threaded-irq/INFO new file mode 100644 index 000000000000..3da69ef9e32f --- /dev/null +++ b/patches/collateral-evolutions/network/09-threaded-irq/INFO @@ -0,0 +1,6 @@ +The 2.6.31 kernel has threaded IRQ support and b43 is the first +wireless driver that makes use of it. To support threaded IRSs +on older kernels we built our own struct compat_threaded_irq +to queue_work() onto it as the kernel thread be running the +thread in process context as well. + diff --git a/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_b43.h b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_b43.h new file mode 100644 index 000000000000..a4e66cad8856 --- /dev/null +++ b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_b43.h @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/b43/b43.h ++++ b/drivers/net/wireless/b43/b43.h +@@ -872,6 +872,9 @@ + unsigned int tx_count; + unsigned int rx_count; + #endif ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ struct compat_threaded_irq irq_compat; ++#endif + }; + + /* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */ diff --git a/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_main.c b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_main.c new file mode 100644 index 000000000000..16a638fd8ef6 --- /dev/null +++ b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_main.c @@ -0,0 +1,45 @@ +--- a/drivers/net/wireless/b43/main.c ++++ b/drivers/net/wireless/b43/main.c +@@ -4243,8 +4243,13 @@ + if (b43_bus_host_is_sdio(dev->dev)) { + b43_sdio_free_irq(dev); + } else { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ compat_synchronize_threaded_irq(&dev->irq_compat); ++ compat_free_threaded_irq(&dev->irq_compat); ++#else + synchronize_irq(dev->dev->irq); + free_irq(dev->dev->irq, dev); ++#endif + } + mutex_lock(&wl->mutex); + dev = wl->current_dev; +@@ -4290,9 +4295,17 @@ + goto out; + } + } else { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ err = compat_request_threaded_irq(&dev->irq_compat, ++ dev->dev->irq, ++ b43_interrupt_handler, ++ b43_interrupt_thread_handler, ++ IRQF_SHARED, KBUILD_MODNAME, dev); ++#else + err = request_threaded_irq(dev->dev->irq, b43_interrupt_handler, + b43_interrupt_thread_handler, + IRQF_SHARED, KBUILD_MODNAME, dev); ++#endif + if (err) { + b43err(dev->wl, "Cannot request IRQ-%d\n", + dev->dev->irq); +@@ -5115,6 +5128,10 @@ + + static void b43_wireless_core_detach(struct b43_wldev *dev) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ if (dev->dev->sdev->bus->bustype != SSB_BUSTYPE_SDIO) ++ compat_destroy_threaded_irq(&dev->irq_compat); ++#endif + /* We release firmware that late to not be required to re-request + * is all the time when we reinit the core. */ + b43_release_firmware(dev); diff --git a/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_internal.h b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_internal.h new file mode 100644 index 000000000000..a89d0d50f97d --- /dev/null +++ b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_internal.h @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/iwlwifi/pcie/internal.h ++++ b/drivers/net/wireless/iwlwifi/pcie/internal.h +@@ -311,6 +311,9 @@ + + /*protect hw register */ + spinlock_t reg_lock; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ struct compat_threaded_irq irq_compat; ++#endif + }; + + /** diff --git a/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_trans.c b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_trans.c new file mode 100644 index 000000000000..600ebd668a3c --- /dev/null +++ b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_trans.c @@ -0,0 +1,41 @@ +--- a/drivers/net/wireless/iwlwifi/pcie/trans.c ++++ b/drivers/net/wireless/iwlwifi/pcie/trans.c +@@ -773,12 +773,21 @@ + { + struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ compat_synchronize_threaded_irq(&trans_pcie->irq_compat); ++#else + synchronize_irq(trans_pcie->pci_dev->irq); ++#endif + + iwl_pcie_tx_free(trans); + iwl_pcie_rx_free(trans); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ compat_free_threaded_irq(&trans_pcie->irq_compat); ++ compat_destroy_threaded_irq(&trans_pcie->irq_compat); ++#else + free_irq(trans_pcie->pci_dev->irq, trans); ++#endif + iwl_pcie_free_ict(trans); + + pci_disable_msi(trans_pcie->pci_dev); +@@ -1566,9 +1575,16 @@ + if (iwl_pcie_alloc_ict(trans)) + goto out_free_cmd_pool; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ if (compat_request_threaded_irq(&trans_pcie->irq_compat, ++ pdev->irq, iwl_pcie_isr_ict, ++ iwl_pcie_irq_handler, ++ IRQF_SHARED, DRV_NAME, trans)) { ++#else + if (request_threaded_irq(pdev->irq, iwl_pcie_isr_ict, + iwl_pcie_irq_handler, + IRQF_SHARED, DRV_NAME, trans)) { ++#endif + IWL_ERR(trans, "Error allocating IRQ %d\n", pdev->irq); + goto out_free_ict; + } diff --git a/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main.c b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main.c new file mode 100644 index 000000000000..f04c7d023aa9 --- /dev/null +++ b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main.c @@ -0,0 +1,52 @@ +--- a/drivers/net/wireless/ti/wlcore/main.c ++++ b/drivers/net/wireless/ti/wlcore/main.c +@@ -6054,13 +6054,24 @@ + wl->platform_quirks = pdata->platform_quirks; + wl->if_ops = pdev_data->if_ops; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) ++ irqflags = IRQF_TRIGGER_RISING; ++#else + if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) + irqflags = IRQF_TRIGGER_RISING; + else + irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT; ++#endif + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ ret = compat_request_threaded_irq(&wl->irq_compat, wl->irq, ++ NULL, wlcore_irq, ++ irqflags, ++ pdev->name, wl); ++#else + ret = request_threaded_irq(wl->irq, NULL, wlcore_irq, + irqflags, pdev->name, wl); ++#endif + if (ret < 0) { + wl1271_error("request_irq() failed: %d", ret); + goto out_free_nvs; +@@ -6135,7 +6146,11 @@ + wl1271_unregister_hw(wl); + + out_irq: ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ compat_free_threaded_irq(&wl->irq_compat); ++#else + free_irq(wl->irq, wl); ++#endif + + out_free_nvs: + kfree(wl->nvs); +@@ -6181,7 +6196,12 @@ + disable_irq_wake(wl->irq); + } + wl1271_unregister_hw(wl); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ compat_free_threaded_irq(&wl->irq_compat); ++ compat_destroy_threaded_irq(&wl->irq_compat); ++#else + free_irq(wl->irq, wl); ++#endif + wlcore_free_hw(wl); + + return 0; diff --git a/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_wlcore.h b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_wlcore.h new file mode 100644 index 000000000000..1731cf7078b5 --- /dev/null +++ b/patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_wlcore.h @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ti/wlcore/wlcore.h ++++ b/drivers/net/wireless/ti/wlcore/wlcore.h +@@ -175,7 +175,9 @@ + bool initialized; + struct ieee80211_hw *hw; + bool mac80211_registered; +- ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) ++ struct compat_threaded_irq irq_compat; ++#endif + struct device *dev; + struct platform_device *pdev; + diff --git a/patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev/INFO b/patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev/INFO new file mode 100644 index 000000000000..76149d788e9d --- /dev/null +++ b/patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev/INFO @@ -0,0 +1,18 @@ +The patch "wext: refactor" by Johannes Berg refactored +wext code so that new kernels no longer get the wext +handlers through struct netdevice, instead they get +it through the struct wiphy which is cfg80211 specific. + +For old kernels this means you get not wext handlers +anymore when backporting code, this adds the wext handler +back to the netdevice wireless_handlers to let compat +users use wext again. + +We do this for every kernel version because the struct wiphy +is changing from kernel version to version. At least the +struct from kernel 2.6.33 and 2.6.34 are incompatible and +the kernel would dereference some wrong type in the struct +and oops. The old interface is not affected by this. This +will cause that CONFIG_CFG80211_WEXT still depends on +CONFIG_WIRELESS_EXT in compat-drivers. + diff --git a/patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev.patch b/patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev/net_wireless_core.c similarity index 52% rename from patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev.patch rename to patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev/net_wireless_core.c index 2e2aca0cf745..916c595600b3 100644 --- a/patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev.patch +++ b/patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev/net_wireless_core.c @@ -1,24 +1,6 @@ -The patch "wext: refactor" by Johannes Berg refactored -wext code so that new kernels no longer get the wext -handlers through struct netdevice, instead they get -it through the struct wiphy which is cfg80211 specific. - -For old kernels this means you get not wext handlers -anymore when backporting code, this adds the wext handler -back to the netdevice wireless_handlers to let compat -users use wext again. - -We do this for every kernel version because the struct wiphy -is changing from kernel version to version. At least the -struct from kernel 2.6.33 and 2.6.34 are incompatible and -the kernel would dereference some wrong type in the struct -and oops. The old interface is not affected by this. This -will cause that CONFIG_CFG80211_WEXT still depends on -CONFIG_WIRELESS_EXT in compat-drivers. - --- a/net/wireless/core.c +++ b/net/wireless/core.c -@@ -373,10 +373,6 @@ struct wiphy *wiphy_new(const struct cfg +@@ -373,10 +373,6 @@ INIT_WORK(&rdev->sched_scan_results_wk, __cfg80211_sched_scan_results); INIT_DELAYED_WORK(&rdev->dfs_update_channels_wk, cfg80211_dfs_channels_update_work); @@ -29,7 +11,7 @@ CONFIG_WIRELESS_EXT in compat-drivers. device_initialize(&rdev->wiphy.dev); rdev->wiphy.dev.class = &ieee80211_class; rdev->wiphy.dev.platform_data = rdev; -@@ -947,6 +943,15 @@ static int cfg80211_netdev_notifier_call +@@ -947,6 +943,15 @@ wdev->sme_state = CFG80211_SME_IDLE; mutex_unlock(&rdev->devlist_mtx); #ifdef CONFIG_CFG80211_WEXT diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops.patch b/patches/collateral-evolutions/network/11-dev-pm-ops.patch deleted file mode 100644 index 4d9ae9524d42..000000000000 --- a/patches/collateral-evolutions/network/11-dev-pm-ops.patch +++ /dev/null @@ -1,379 +0,0 @@ -The 2.6.29 kernel has new struct dev_pm_ops [1] which are used -on the pci device to distinguish power management hooks for suspend -to RAM and hibernation. Older kernels don't have these so we need -to resort back to the good ol' suspend/resume. Fortunately the calls -are not so different so it should be possible to resuse the same -calls on compat code with only slight modifications. - -[1] http://lxr.linux.no/#linux+v2.6.29/include/linux/pm.h#L170 - ---- a/drivers/bcma/host_pci.c -+++ b/drivers/bcma/host_pci.c -@@ -257,6 +257,9 @@ static int bcma_host_pci_resume(struct d - return bcma_bus_resume(bus); - } - -+compat_pci_suspend(bcma_host_pci_suspend) -+compat_pci_resume(bcma_host_pci_resume) -+ - static SIMPLE_DEV_PM_OPS(bcma_pm_ops, bcma_host_pci_suspend, - bcma_host_pci_resume); - #define BCMA_PM_OPS (&bcma_pm_ops) -@@ -285,7 +288,12 @@ static struct pci_driver bcma_pci_bridge - .id_table = bcma_pci_bridge_tbl, - .probe = bcma_host_pci_probe, - .remove = bcma_host_pci_remove, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = BCMA_PM_OPS, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = bcma_host_pci_suspend_compat, -+ .resume = bcma_host_pci_resume_compat, -+#endif - }; - - int __init bcma_host_pci_init(void) ---- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -@@ -2743,6 +2743,9 @@ static const struct pci_error_handlers a - .resume = atl1c_io_resume, - }; - -+compat_pci_suspend(atl1c_suspend) -+compat_pci_resume(atl1c_resume) -+ - static SIMPLE_DEV_PM_OPS(atl1c_pm_ops, atl1c_suspend, atl1c_resume); - - static struct pci_driver atl1c_driver = { -@@ -2752,7 +2755,12 @@ static struct pci_driver atl1c_driver = - .remove = atl1c_remove, - .shutdown = atl1c_shutdown, - .err_handler = &atl1c_err_handler, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = &atl1c_pm_ops, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = atl1c_suspend_compat, -+ .resume = atl1c_resume_compat, -+#endif - }; - - /** ---- a/drivers/net/ethernet/atheros/atlx/atl1.c -+++ b/drivers/net/ethernet/atheros/atlx/atl1.c -@@ -2877,6 +2877,9 @@ static int atl1_resume(struct device *de - return 0; - } - -+compat_pci_suspend(atl1_suspend) -+compat_pci_resume(atl1_resume) -+ - static SIMPLE_DEV_PM_OPS(atl1_pm_ops, atl1_suspend, atl1_resume); - #define ATL1_PM_OPS (&atl1_pm_ops) - -@@ -3147,7 +3150,12 @@ static struct pci_driver atl1_driver = { - .probe = atl1_probe, - .remove = atl1_remove, - .shutdown = atl1_shutdown, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = ATL1_PM_OPS, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = atl1_suspend_compat, -+ .resume = atl1_resume_compat, -+#endif - }; - - /** ---- a/drivers/net/wireless/ath/ath5k/pci.c -+++ b/drivers/net/wireless/ath/ath5k/pci.c -@@ -326,6 +326,9 @@ static int ath5k_pci_resume(struct devic - return 0; - } - -+compat_pci_suspend(ath5k_pci_suspend) -+compat_pci_resume(ath5k_pci_resume) -+ - static SIMPLE_DEV_PM_OPS(ath5k_pm_ops, ath5k_pci_suspend, ath5k_pci_resume); - #define ATH5K_PM_OPS (&ath5k_pm_ops) - #else -@@ -337,7 +340,12 @@ static struct pci_driver ath5k_pci_drive - .id_table = ath5k_pci_id_table, - .probe = ath5k_pci_probe, - .remove = ath5k_pci_remove, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = ATH5K_PM_OPS, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = ath5k_pci_suspend_compat, -+ .resume = ath5k_pci_resume_compat, -+#endif - }; - - module_pci_driver(ath5k_pci_driver); ---- a/drivers/net/wireless/ath/ath9k/pci.c -+++ b/drivers/net/wireless/ath/ath9k/pci.c -@@ -310,6 +310,9 @@ static int ath_pci_resume(struct device - return 0; - } - -+compat_pci_suspend(ath_pci_suspend); -+compat_pci_resume(ath_pci_resume); -+ - static SIMPLE_DEV_PM_OPS(ath9k_pm_ops, ath_pci_suspend, ath_pci_resume); - - #define ATH9K_PM_OPS (&ath9k_pm_ops) -@@ -328,7 +331,12 @@ static struct pci_driver ath_pci_driver - .id_table = ath_pci_id_table, - .probe = ath_pci_probe, - .remove = ath_pci_remove, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = ATH9K_PM_OPS, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = ath_pci_suspend_compat, -+ .resume = ath_pci_resume_compat, -+#endif - }; - - int ath_pci_init(void) ---- a/drivers/net/wireless/iwlegacy/3945-mac.c -+++ b/drivers/net/wireless/iwlegacy/3945-mac.c -@@ -3909,7 +3909,12 @@ static struct pci_driver il3945_driver = - .id_table = il3945_hw_card_ids, - .probe = il3945_pci_probe, - .remove = il3945_pci_remove, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = IL_LEGACY_PM_OPS, -+#elif defined(CONFIG_PM) -+ .suspend = il_pci_suspend_compat, -+ .resume = il_pci_resume_compat, -+#endif - }; - - static int __init ---- a/drivers/net/wireless/iwlegacy/4965-mac.c -+++ b/drivers/net/wireless/iwlegacy/4965-mac.c -@@ -6803,7 +6803,12 @@ static struct pci_driver il4965_driver = - .id_table = il4965_hw_card_ids, - .probe = il4965_pci_probe, - .remove = il4965_pci_remove, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = IL_LEGACY_PM_OPS, -+#elif defined(CONFIG_PM) -+ .suspend = il_pci_suspend_compat, -+ .resume = il_pci_resume_compat, -+#endif - }; - - static int __init ---- a/drivers/net/wireless/iwlegacy/common.c -+++ b/drivers/net/wireless/iwlegacy/common.c -@@ -4935,8 +4935,17 @@ il_pci_resume(struct device *device) - return 0; - } - -+compat_pci_suspend(il_pci_suspend) -+compat_pci_resume(il_pci_resume) -+ - SIMPLE_DEV_PM_OPS(il_pm_ops, il_pci_suspend, il_pci_resume); -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - EXPORT_SYMBOL(il_pm_ops); -+#else -+EXPORT_SYMBOL(il_pci_suspend_compat); -+EXPORT_SYMBOL(il_pci_resume_compat); -+#endif - - #endif /* CONFIG_PM_SLEEP */ - ---- a/drivers/net/wireless/iwlegacy/common.h -+++ b/drivers/net/wireless/iwlegacy/common.h -@@ -1833,7 +1833,14 @@ __le32 il_add_beacon_time(struct il_priv - u32 beacon_interval); - - #ifdef CONFIG_PM -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) -+int il_pci_suspend_compat(struct pci_dev *pdev, pm_message_t state); -+int il_pci_resume_compat(struct pci_dev *pdev); -+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)) -+extern struct dev_pm_ops il_pm_ops; -+#else - extern const struct dev_pm_ops il_pm_ops; -+#endif - - #define IL_LEGACY_PM_OPS (&il_pm_ops) - ---- a/drivers/net/wireless/iwlwifi/pcie/drv.c -+++ b/drivers/net/wireless/iwlwifi/pcie/drv.c -@@ -347,6 +347,9 @@ static int iwl_pci_resume(struct device - return iwl_trans_resume(iwl_trans); - } - -+compat_pci_suspend(iwl_pci_suspend) -+compat_pci_resume(iwl_pci_resume) -+ - static SIMPLE_DEV_PM_OPS(iwl_dev_pm_ops, iwl_pci_suspend, iwl_pci_resume); - - #define IWL_PM_OPS (&iwl_dev_pm_ops) -@@ -362,7 +365,12 @@ static struct pci_driver iwl_pci_driver - .id_table = iwl_hw_card_ids, - .probe = iwl_pci_probe, - .remove = iwl_pci_remove, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = IWL_PM_OPS, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = iwl_pci_suspend_compat, -+ .resume = iwl_pci_resume_compat, -+#endif - }; - - int __must_check iwl_pci_register_driver(void) ---- a/drivers/net/wireless/libertas/if_spi.c -+++ b/drivers/net/wireless/libertas/if_spi.c -@@ -1249,6 +1249,7 @@ static int libertas_spi_remove(struct sp - return 0; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - static int if_spi_suspend(struct device *dev) - { - struct spi_device *spi = to_spi_device(dev); -@@ -1282,6 +1283,7 @@ static const struct dev_pm_ops if_spi_pm - .suspend = if_spi_suspend, - .resume = if_spi_resume, - }; -+#endif - - static struct spi_driver libertas_spi_driver = { - .probe = if_spi_probe, -@@ -1289,7 +1291,9 @@ static struct spi_driver libertas_spi_dr - .driver = { - .name = "libertas_spi", - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .pm = &if_spi_pm_ops, -+#endif - }, - }; - ---- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c -+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c -@@ -372,6 +372,9 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use - MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); - MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); - -+compat_pci_suspend(rtl_pci_suspend); -+compat_pci_resume(rtl_pci_resume); -+ - static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); - - static struct pci_driver rtl92ce_driver = { -@@ -379,7 +382,12 @@ static struct pci_driver rtl92ce_driver - .id_table = rtl92ce_pci_ids, - .probe = rtl_pci_probe, - .remove = rtl_pci_disconnect, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = &rtlwifi_pm_ops, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = rtl_pci_suspend_compat, -+ .resume = rtl_pci_resume_compat, -+#endif - }; - - module_pci_driver(rtl92ce_driver); ---- a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c -+++ b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c -@@ -378,6 +378,9 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use - MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); - MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); - -+compat_pci_suspend(rtl_pci_suspend); -+compat_pci_resume(rtl_pci_resume); -+ - static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); - - static struct pci_driver rtl92de_driver = { -@@ -385,7 +388,12 @@ static struct pci_driver rtl92de_driver - .id_table = rtl92de_pci_ids, - .probe = rtl_pci_probe, - .remove = rtl_pci_disconnect, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = &rtlwifi_pm_ops, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = rtl_pci_suspend_compat, -+ .resume = rtl_pci_resume_compat, -+#endif - }; - - /* add global spin lock to solve the problem that ---- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c -+++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c -@@ -429,6 +429,9 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use - MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); - MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); - -+compat_pci_suspend(rtl_pci_suspend); -+compat_pci_resume(rtl_pci_resume); -+ - static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); - - static struct pci_driver rtl92se_driver = { -@@ -436,7 +439,12 @@ static struct pci_driver rtl92se_driver - .id_table = rtl92se_pci_ids, - .probe = rtl_pci_probe, - .remove = rtl_pci_disconnect, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = &rtlwifi_pm_ops, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = rtl_pci_suspend_compat, -+ .resume = rtl_pci_resume_compat, -+#endif - }; - - module_pci_driver(rtl92se_driver); ---- a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c -+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c -@@ -367,6 +367,9 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use - MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); - MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); - -+compat_pci_suspend(rtl_pci_suspend); -+compat_pci_resume(rtl_pci_resume); -+ - static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); - - static struct pci_driver rtl8723ae_driver = { -@@ -374,7 +377,12 @@ static struct pci_driver rtl8723ae_drive - .id_table = rtl8723ae_pci_ids, - .probe = rtl_pci_probe, - .remove = rtl_pci_disconnect, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = &rtlwifi_pm_ops, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = rtl_pci_suspend_compat, -+ .resume = rtl_pci_resume_compat, -+#endif - }; - - module_pci_driver(rtl8723ae_driver); ---- a/drivers/net/wireless/p54/p54pci.c -+++ b/drivers/net/wireless/p54/p54pci.c -@@ -684,6 +684,9 @@ static int p54p_resume(struct device *de - return pci_set_power_state(pdev, PCI_D0); - } - -+compat_pci_suspend(p54p_suspend); -+compat_pci_resume(p54p_resume); -+ - static SIMPLE_DEV_PM_OPS(p54pci_pm_ops, p54p_suspend, p54p_resume); - - #define P54P_PM_OPS (&p54pci_pm_ops) -@@ -696,7 +699,12 @@ static struct pci_driver p54p_driver = { - .id_table = p54p_table, - .probe = p54p_probe, - .remove = p54p_remove, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) - .driver.pm = P54P_PM_OPS, -+#elif defined(CONFIG_PM_SLEEP) -+ .suspend = p54p_suspend_compat, -+ .resume = p54p_resume_compat, -+#endif - }; - - module_pci_driver(p54p_driver); diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/INFO b/patches/collateral-evolutions/network/11-dev-pm-ops/INFO new file mode 100644 index 000000000000..c8b4c91cb944 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/INFO @@ -0,0 +1,9 @@ +The 2.6.29 kernel has new struct dev_pm_ops [1] which are used +on the pci device to distinguish power management hooks for suspend +to RAM and hibernation. Older kernels don't have these so we need +to resort back to the good ol' suspend/resume. Fortunately the calls +are not so different so it should be possible to resuse the same +calls on compat code with only slight modifications. + +[1] http://lxr.linux.no/#linux+v2.6.29/include/linux/pm.h#L170 + diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_bcma_host_pci.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_bcma_host_pci.c new file mode 100644 index 000000000000..3ad0153d1b40 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_bcma_host_pci.c @@ -0,0 +1,25 @@ +--- a/drivers/bcma/host_pci.c ++++ b/drivers/bcma/host_pci.c +@@ -257,6 +257,9 @@ + return bcma_bus_resume(bus); + } + ++compat_pci_suspend(bcma_host_pci_suspend) ++compat_pci_resume(bcma_host_pci_resume) ++ + static SIMPLE_DEV_PM_OPS(bcma_pm_ops, bcma_host_pci_suspend, + bcma_host_pci_resume); + #define BCMA_PM_OPS (&bcma_pm_ops) +@@ -285,7 +288,12 @@ + .id_table = bcma_pci_bridge_tbl, + .probe = bcma_host_pci_probe, + .remove = bcma_host_pci_remove, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = BCMA_PM_OPS, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = bcma_host_pci_suspend_compat, ++ .resume = bcma_host_pci_resume_compat, ++#endif + }; + + int __init bcma_host_pci_init(void) diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_atl1c_atl1c_main.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_atl1c_atl1c_main.c new file mode 100644 index 000000000000..70753ec29057 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_atl1c_atl1c_main.c @@ -0,0 +1,25 @@ +--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c ++++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +@@ -2743,6 +2743,9 @@ + .resume = atl1c_io_resume, + }; + ++compat_pci_suspend(atl1c_suspend) ++compat_pci_resume(atl1c_resume) ++ + static SIMPLE_DEV_PM_OPS(atl1c_pm_ops, atl1c_suspend, atl1c_resume); + + static struct pci_driver atl1c_driver = { +@@ -2752,7 +2755,12 @@ + .remove = atl1c_remove, + .shutdown = atl1c_shutdown, + .err_handler = &atl1c_err_handler, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = &atl1c_pm_ops, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = atl1c_suspend_compat, ++ .resume = atl1c_resume_compat, ++#endif + }; + + /** diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_atlx_atl1.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_atlx_atl1.c new file mode 100644 index 000000000000..5886923cca50 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_atlx_atl1.c @@ -0,0 +1,25 @@ +--- a/drivers/net/ethernet/atheros/atlx/atl1.c ++++ b/drivers/net/ethernet/atheros/atlx/atl1.c +@@ -2877,6 +2877,9 @@ + return 0; + } + ++compat_pci_suspend(atl1_suspend) ++compat_pci_resume(atl1_resume) ++ + static SIMPLE_DEV_PM_OPS(atl1_pm_ops, atl1_suspend, atl1_resume); + #define ATL1_PM_OPS (&atl1_pm_ops) + +@@ -3147,7 +3150,12 @@ + .probe = atl1_probe, + .remove = atl1_remove, + .shutdown = atl1_shutdown, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = ATL1_PM_OPS, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = atl1_suspend_compat, ++ .resume = atl1_resume_compat, ++#endif + }; + + /** diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_ath_ath5k_pci.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_ath_ath5k_pci.c new file mode 100644 index 000000000000..860a02acee83 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_ath_ath5k_pci.c @@ -0,0 +1,25 @@ +--- a/drivers/net/wireless/ath/ath5k/pci.c ++++ b/drivers/net/wireless/ath/ath5k/pci.c +@@ -326,6 +326,9 @@ + return 0; + } + ++compat_pci_suspend(ath5k_pci_suspend) ++compat_pci_resume(ath5k_pci_resume) ++ + static SIMPLE_DEV_PM_OPS(ath5k_pm_ops, ath5k_pci_suspend, ath5k_pci_resume); + #define ATH5K_PM_OPS (&ath5k_pm_ops) + #else +@@ -337,7 +340,12 @@ + .id_table = ath5k_pci_id_table, + .probe = ath5k_pci_probe, + .remove = ath5k_pci_remove, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = ATH5K_PM_OPS, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = ath5k_pci_suspend_compat, ++ .resume = ath5k_pci_resume_compat, ++#endif + }; + + module_pci_driver(ath5k_pci_driver); diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_ath_ath9k_pci.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_ath_ath9k_pci.c new file mode 100644 index 000000000000..16107a15a92a --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_ath_ath9k_pci.c @@ -0,0 +1,25 @@ +--- a/drivers/net/wireless/ath/ath9k/pci.c ++++ b/drivers/net/wireless/ath/ath9k/pci.c +@@ -310,6 +310,9 @@ + return 0; + } + ++compat_pci_suspend(ath_pci_suspend); ++compat_pci_resume(ath_pci_resume); ++ + static SIMPLE_DEV_PM_OPS(ath9k_pm_ops, ath_pci_suspend, ath_pci_resume); + + #define ATH9K_PM_OPS (&ath9k_pm_ops) +@@ -328,7 +331,12 @@ + .id_table = ath_pci_id_table, + .probe = ath_pci_probe, + .remove = ath_pci_remove, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = ATH9K_PM_OPS, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = ath_pci_suspend_compat, ++ .resume = ath_pci_resume_compat, ++#endif + }; + + int ath_pci_init(void) diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_3945-mac.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_3945-mac.c new file mode 100644 index 000000000000..973d06b34e05 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_3945-mac.c @@ -0,0 +1,15 @@ +--- a/drivers/net/wireless/iwlegacy/3945-mac.c ++++ b/drivers/net/wireless/iwlegacy/3945-mac.c +@@ -3909,7 +3909,12 @@ + .id_table = il3945_hw_card_ids, + .probe = il3945_pci_probe, + .remove = il3945_pci_remove, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = IL_LEGACY_PM_OPS, ++#elif defined(CONFIG_PM) ++ .suspend = il_pci_suspend_compat, ++ .resume = il_pci_resume_compat, ++#endif + }; + + static int __init diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_4965-mac.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_4965-mac.c new file mode 100644 index 000000000000..776b8a54bd32 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_4965-mac.c @@ -0,0 +1,15 @@ +--- a/drivers/net/wireless/iwlegacy/4965-mac.c ++++ b/drivers/net/wireless/iwlegacy/4965-mac.c +@@ -6803,7 +6803,12 @@ + .id_table = il4965_hw_card_ids, + .probe = il4965_pci_probe, + .remove = il4965_pci_remove, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = IL_LEGACY_PM_OPS, ++#elif defined(CONFIG_PM) ++ .suspend = il_pci_suspend_compat, ++ .resume = il_pci_resume_compat, ++#endif + }; + + static int __init diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_common.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_common.c new file mode 100644 index 000000000000..70af6aa0ea85 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_common.c @@ -0,0 +1,20 @@ +--- a/drivers/net/wireless/iwlegacy/common.c ++++ b/drivers/net/wireless/iwlegacy/common.c +@@ -4935,8 +4935,17 @@ + return 0; + } + ++compat_pci_suspend(il_pci_suspend) ++compat_pci_resume(il_pci_resume) ++ + SIMPLE_DEV_PM_OPS(il_pm_ops, il_pci_suspend, il_pci_resume); ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + EXPORT_SYMBOL(il_pm_ops); ++#else ++EXPORT_SYMBOL(il_pci_suspend_compat); ++EXPORT_SYMBOL(il_pci_resume_compat); ++#endif + + #endif /* CONFIG_PM_SLEEP */ + diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_common.h b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_common.h new file mode 100644 index 000000000000..e81cc7cd3051 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_common.h @@ -0,0 +1,17 @@ +--- a/drivers/net/wireless/iwlegacy/common.h ++++ b/drivers/net/wireless/iwlegacy/common.h +@@ -1833,7 +1833,14 @@ + u32 beacon_interval); + + #ifdef CONFIG_PM ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) ++int il_pci_suspend_compat(struct pci_dev *pdev, pm_message_t state); ++int il_pci_resume_compat(struct pci_dev *pdev); ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)) ++extern struct dev_pm_ops il_pm_ops; ++#else + extern const struct dev_pm_ops il_pm_ops; ++#endif + + #define IL_LEGACY_PM_OPS (&il_pm_ops) + diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlwifi_pcie_drv.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlwifi_pcie_drv.c new file mode 100644 index 000000000000..4c2a2742fc86 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlwifi_pcie_drv.c @@ -0,0 +1,25 @@ +--- a/drivers/net/wireless/iwlwifi/pcie/drv.c ++++ b/drivers/net/wireless/iwlwifi/pcie/drv.c +@@ -347,6 +347,9 @@ + return iwl_trans_resume(iwl_trans); + } + ++compat_pci_suspend(iwl_pci_suspend) ++compat_pci_resume(iwl_pci_resume) ++ + static SIMPLE_DEV_PM_OPS(iwl_dev_pm_ops, iwl_pci_suspend, iwl_pci_resume); + + #define IWL_PM_OPS (&iwl_dev_pm_ops) +@@ -362,7 +365,12 @@ + .id_table = iwl_hw_card_ids, + .probe = iwl_pci_probe, + .remove = iwl_pci_remove, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = IWL_PM_OPS, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = iwl_pci_suspend_compat, ++ .resume = iwl_pci_resume_compat, ++#endif + }; + + int __must_check iwl_pci_register_driver(void) diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_libertas_if_spi.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_libertas_if_spi.c new file mode 100644 index 000000000000..7f6312c4f052 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_libertas_if_spi.c @@ -0,0 +1,28 @@ +--- a/drivers/net/wireless/libertas/if_spi.c ++++ b/drivers/net/wireless/libertas/if_spi.c +@@ -1249,6 +1249,7 @@ + return 0; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + static int if_spi_suspend(struct device *dev) + { + struct spi_device *spi = to_spi_device(dev); +@@ -1282,6 +1283,7 @@ + .suspend = if_spi_suspend, + .resume = if_spi_resume, + }; ++#endif + + static struct spi_driver libertas_spi_driver = { + .probe = if_spi_probe, +@@ -1289,7 +1291,9 @@ + .driver = { + .name = "libertas_spi", + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .pm = &if_spi_pm_ops, ++#endif + }, + }; + diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_p54_p54pci.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_p54_p54pci.c new file mode 100644 index 000000000000..833de297914e --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_p54_p54pci.c @@ -0,0 +1,25 @@ +--- a/drivers/net/wireless/p54/p54pci.c ++++ b/drivers/net/wireless/p54/p54pci.c +@@ -684,6 +684,9 @@ + return pci_set_power_state(pdev, PCI_D0); + } + ++compat_pci_suspend(p54p_suspend); ++compat_pci_resume(p54p_resume); ++ + static SIMPLE_DEV_PM_OPS(p54pci_pm_ops, p54p_suspend, p54p_resume); + + #define P54P_PM_OPS (&p54pci_pm_ops) +@@ -696,7 +699,12 @@ + .id_table = p54p_table, + .probe = p54p_probe, + .remove = p54p_remove, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = P54P_PM_OPS, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = p54p_suspend_compat, ++ .resume = p54p_resume_compat, ++#endif + }; + + module_pci_driver(p54p_driver); diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192ce_sw.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192ce_sw.c new file mode 100644 index 000000000000..e03a4b1da7cc --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192ce_sw.c @@ -0,0 +1,25 @@ +--- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c ++++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c +@@ -372,6 +372,9 @@ + MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); + MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); + ++compat_pci_suspend(rtl_pci_suspend); ++compat_pci_resume(rtl_pci_resume); ++ + static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); + + static struct pci_driver rtl92ce_driver = { +@@ -379,7 +382,12 @@ + .id_table = rtl92ce_pci_ids, + .probe = rtl_pci_probe, + .remove = rtl_pci_disconnect, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = &rtlwifi_pm_ops, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = rtl_pci_suspend_compat, ++ .resume = rtl_pci_resume_compat, ++#endif + }; + + module_pci_driver(rtl92ce_driver); diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192de_sw.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192de_sw.c new file mode 100644 index 000000000000..071398d0a280 --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192de_sw.c @@ -0,0 +1,25 @@ +--- a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c ++++ b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c +@@ -378,6 +378,9 @@ + MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); + MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); + ++compat_pci_suspend(rtl_pci_suspend); ++compat_pci_resume(rtl_pci_resume); ++ + static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); + + static struct pci_driver rtl92de_driver = { +@@ -385,7 +388,12 @@ + .id_table = rtl92de_pci_ids, + .probe = rtl_pci_probe, + .remove = rtl_pci_disconnect, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = &rtlwifi_pm_ops, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = rtl_pci_suspend_compat, ++ .resume = rtl_pci_resume_compat, ++#endif + }; + + /* add global spin lock to solve the problem that diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192se_sw.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192se_sw.c new file mode 100644 index 000000000000..acb2ff1ee1bb --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8192se_sw.c @@ -0,0 +1,25 @@ +--- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c ++++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c +@@ -429,6 +429,9 @@ + MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); + MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); + ++compat_pci_suspend(rtl_pci_suspend); ++compat_pci_resume(rtl_pci_resume); ++ + static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); + + static struct pci_driver rtl92se_driver = { +@@ -436,7 +439,12 @@ + .id_table = rtl92se_pci_ids, + .probe = rtl_pci_probe, + .remove = rtl_pci_disconnect, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = &rtlwifi_pm_ops, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = rtl_pci_suspend_compat, ++ .resume = rtl_pci_resume_compat, ++#endif + }; + + module_pci_driver(rtl92se_driver); diff --git a/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8723ae_sw.c b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8723ae_sw.c new file mode 100644 index 000000000000..0fc2fe2b0bab --- /dev/null +++ b/patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_rtlwifi_rtl8723ae_sw.c @@ -0,0 +1,25 @@ +--- a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c ++++ b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c +@@ -367,6 +367,9 @@ + MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); + MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); + ++compat_pci_suspend(rtl_pci_suspend); ++compat_pci_resume(rtl_pci_resume); ++ + static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); + + static struct pci_driver rtl8723ae_driver = { +@@ -374,7 +377,12 @@ + .id_table = rtl8723ae_pci_ids, + .probe = rtl_pci_probe, + .remove = rtl_pci_disconnect, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) + .driver.pm = &rtlwifi_pm_ops, ++#elif defined(CONFIG_PM_SLEEP) ++ .suspend = rtl_pci_suspend_compat, ++ .resume = rtl_pci_resume_compat, ++#endif + }; + + module_pci_driver(rtl8723ae_driver); diff --git a/patches/collateral-evolutions/network/12-iw_handler-changes.patch b/patches/collateral-evolutions/network/12-iw_handler-changes/drivers_net_wireless_ipw2x00_ipw2100.c similarity index 88% rename from patches/collateral-evolutions/network/12-iw_handler-changes.patch rename to patches/collateral-evolutions/network/12-iw_handler-changes/drivers_net_wireless_ipw2x00_ipw2100.c index d7a6a6dd5e1b..b5622e3a5cde 100644 --- a/patches/collateral-evolutions/network/12-iw_handler-changes.patch +++ b/patches/collateral-evolutions/network/12-iw_handler-changes/drivers_net_wireless_ipw2x00_ipw2100.c @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c -@@ -6089,7 +6089,11 @@ static struct net_device *ipw2100_alloc_ +@@ -6089,7 +6089,11 @@ netdev_attach_ops(dev, &ipw2100_netdev_ops); dev->ethtool_ops = &ipw2100_ethtool_ops; dev->wireless_handlers = &ipw2100_wx_handler_def; diff --git a/patches/collateral-evolutions/network/12-mac80211-disable-tx-status/INFO b/patches/collateral-evolutions/network/12-mac80211-disable-tx-status/INFO new file mode 100644 index 000000000000..760ed4401220 --- /dev/null +++ b/patches/collateral-evolutions/network/12-mac80211-disable-tx-status/INFO @@ -0,0 +1,6 @@ +We can't possibly backport the wifi TX status since +skb_shinfo()->tx_flags used to be a union and there +is no way to make the & work properly in that case. +So we need to just ifdef this part out. + + diff --git a/patches/collateral-evolutions/network/12-mac80211-disable-tx-status.patch b/patches/collateral-evolutions/network/12-mac80211-disable-tx-status/net_mac80211_tx.c similarity index 52% rename from patches/collateral-evolutions/network/12-mac80211-disable-tx-status.patch rename to patches/collateral-evolutions/network/12-mac80211-disable-tx-status/net_mac80211_tx.c index 3d497dfd86fe..f5aeb8361961 100644 --- a/patches/collateral-evolutions/network/12-mac80211-disable-tx-status.patch +++ b/patches/collateral-evolutions/network/12-mac80211-disable-tx-status/net_mac80211_tx.c @@ -1,12 +1,6 @@ -We can't possibly backport the wifi TX status since -skb_shinfo()->tx_flags used to be a union and there -is no way to make the & work properly in that case. -So we need to just ifdef this part out. - - --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -2035,6 +2035,7 @@ netdev_tx_t ieee80211_subif_start_xmit(s +@@ -2035,6 +2035,7 @@ goto fail_rcu; } @@ -14,7 +8,7 @@ So we need to just ifdef this part out. if (unlikely(!multicast && skb->sk && skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS)) { struct sk_buff *orig_skb = skb; -@@ -2063,6 +2064,7 @@ netdev_tx_t ieee80211_subif_start_xmit(s +@@ -2063,6 +2064,7 @@ skb = orig_skb; } } diff --git a/patches/collateral-evolutions/network/14-device-type.patch b/patches/collateral-evolutions/network/14-device-type.patch deleted file mode 100644 index b5163991cb56..000000000000 --- a/patches/collateral-evolutions/network/14-device-type.patch +++ /dev/null @@ -1,56 +0,0 @@ -Kernels >= 2.6.32 can identify the type of device netdevice -so that sysfs can be used to get this. We never really had a -systematic way of doing this -- now we do through the -SET_NETDEV_DEVTYPE() macro. For older kernels we make the -SET_NETDEV_DEVTYPE() be a no-op this means the wireless type -we define is unused so we ucomment it simply to avoid a -compile warning. - ---- a/net/wireless/core.c -+++ b/net/wireless/core.c -@@ -839,9 +839,11 @@ void cfg80211_unregister_wdev(struct wir - } - EXPORT_SYMBOL(cfg80211_unregister_wdev); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) - static struct device_type wiphy_type = { - .name = "wlan", - }; -+#endif - - void cfg80211_update_iface_num(struct cfg80211_registered_device *rdev, - enum nl80211_iftype iftype, int num) ---- a/net/bluetooth/bnep/core.c -+++ b/net/bluetooth/bnep/core.c -@@ -526,9 +526,11 @@ static struct device *bnep_get_device(st - return conn ? &conn->dev : NULL; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) - static struct device_type bnep_type = { - .name = "bluetooth", - }; -+#endif - - int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) - { ---- a/drivers/net/usb/usbnet.c -+++ b/drivers/net/usb/usbnet.c -@@ -1363,13 +1363,17 @@ static const struct net_device_ops usbne - - // precondition: never called in_interrupt - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) - static struct device_type wlan_type = { - .name = "wlan", - }; -+#endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) - static struct device_type wwan_type = { - .name = "wwan", - }; -+#endif - - int - usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) diff --git a/patches/collateral-evolutions/network/14-device-type/INFO b/patches/collateral-evolutions/network/14-device-type/INFO new file mode 100644 index 000000000000..686985788f72 --- /dev/null +++ b/patches/collateral-evolutions/network/14-device-type/INFO @@ -0,0 +1,8 @@ +Kernels >= 2.6.32 can identify the type of device netdevice +so that sysfs can be used to get this. We never really had a +systematic way of doing this -- now we do through the +SET_NETDEV_DEVTYPE() macro. For older kernels we make the +SET_NETDEV_DEVTYPE() be a no-op this means the wireless type +we define is unused so we ucomment it simply to avoid a +compile warning. + diff --git a/patches/collateral-evolutions/network/14-device-type/drivers_net_usb_usbnet.c b/patches/collateral-evolutions/network/14-device-type/drivers_net_usb_usbnet.c new file mode 100644 index 000000000000..66dcd3881f4f --- /dev/null +++ b/patches/collateral-evolutions/network/14-device-type/drivers_net_usb_usbnet.c @@ -0,0 +1,20 @@ +--- a/drivers/net/usb/usbnet.c ++++ b/drivers/net/usb/usbnet.c +@@ -1363,13 +1363,17 @@ + + // precondition: never called in_interrupt + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) + static struct device_type wlan_type = { + .name = "wlan", + }; ++#endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) + static struct device_type wwan_type = { + .name = "wwan", + }; ++#endif + + int + usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) diff --git a/patches/collateral-evolutions/network/14-device-type/net_bluetooth_bnep_core.c b/patches/collateral-evolutions/network/14-device-type/net_bluetooth_bnep_core.c new file mode 100644 index 000000000000..d8954e4254cd --- /dev/null +++ b/patches/collateral-evolutions/network/14-device-type/net_bluetooth_bnep_core.c @@ -0,0 +1,14 @@ +--- a/net/bluetooth/bnep/core.c ++++ b/net/bluetooth/bnep/core.c +@@ -526,9 +526,11 @@ + return conn ? &conn->dev : NULL; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) + static struct device_type bnep_type = { + .name = "bluetooth", + }; ++#endif + + int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) + { diff --git a/patches/collateral-evolutions/network/14-device-type/net_wireless_core.c b/patches/collateral-evolutions/network/14-device-type/net_wireless_core.c new file mode 100644 index 000000000000..84eb5b26eb8e --- /dev/null +++ b/patches/collateral-evolutions/network/14-device-type/net_wireless_core.c @@ -0,0 +1,14 @@ +--- a/net/wireless/core.c ++++ b/net/wireless/core.c +@@ -839,9 +839,11 @@ + } + EXPORT_SYMBOL(cfg80211_unregister_wdev); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) + static struct device_type wiphy_type = { + .name = "wlan", + }; ++#endif + + void cfg80211_update_iface_num(struct cfg80211_registered_device *rdev, + enum nl80211_iftype iftype, int num) diff --git a/patches/collateral-evolutions/network/15-symbol-export-conflicts/INFO b/patches/collateral-evolutions/network/15-symbol-export-conflicts/INFO new file mode 100644 index 000000000000..403561558ffe --- /dev/null +++ b/patches/collateral-evolutions/network/15-symbol-export-conflicts/INFO @@ -0,0 +1,3 @@ +In kernel < 2.6.32 libipw also exports ieee80211_rx. +To avoid conflicts with the other export we rename our. + diff --git a/patches/collateral-evolutions/network/15-symbol-export-conflicts.patch b/patches/collateral-evolutions/network/15-symbol-export-conflicts/net_mac80211_rx.c similarity index 67% rename from patches/collateral-evolutions/network/15-symbol-export-conflicts.patch rename to patches/collateral-evolutions/network/15-symbol-export-conflicts/net_mac80211_rx.c index 09c2ffe3eec1..2ed169b03852 100644 --- a/patches/collateral-evolutions/network/15-symbol-export-conflicts.patch +++ b/patches/collateral-evolutions/network/15-symbol-export-conflicts/net_mac80211_rx.c @@ -1,9 +1,6 @@ -In kernel < 2.6.32 libipw also exports ieee80211_rx. -To avoid conflicts with the other export we rename our. - --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -3317,7 +3317,12 @@ void ieee80211_rx(struct ieee80211_hw *h +@@ -3317,7 +3317,12 @@ drop: kfree_skb(skb); } diff --git a/patches/collateral-evolutions/network/16-bluetooth.patch b/patches/collateral-evolutions/network/16-bluetooth.patch deleted file mode 100644 index 5ca9f4ce358d..000000000000 --- a/patches/collateral-evolutions/network/16-bluetooth.patch +++ /dev/null @@ -1,575 +0,0 @@ -These changes are required to backport blueooth. A lot can be optimized -here still, but for now we keep this here. - ---- a/drivers/bluetooth/hci_ldisc.c -+++ b/drivers/bluetooth/hci_ldisc.c -@@ -297,8 +297,13 @@ static int hci_uart_tty_open(struct tty_ - /* FIXME: why is this needed. Note don't use ldisc_ref here as the - open path is before the ldisc is referencable */ - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)) - if (tty->ldisc->ops->flush_buffer) - tty->ldisc->ops->flush_buffer(tty); -+#else -+ if (tty->ldisc.ops->flush_buffer) -+ tty->ldisc.ops->flush_buffer(tty); -+#endif - tty_driver_flush_buffer(tty); - - return 0; -@@ -524,7 +529,11 @@ static int hci_uart_tty_ioctl(struct tty - return hu->hdev_flags; - - default: -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - err = n_tty_ioctl_helper(tty, file, cmd, arg); -+#else -+ err = n_tty_ioctl(tty, file, cmd, arg); -+#endif - break; - } - ---- a/net/bluetooth/af_bluetooth.c -+++ b/net/bluetooth/af_bluetooth.c -@@ -103,8 +103,12 @@ void bt_sock_unregister(int proto) - } - EXPORT_SYMBOL(bt_sock_unregister); - -+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) - static int bt_sock_create(struct net *net, struct socket *sock, int proto, - int kern) -+#else -+static int bt_sock_create(struct net *net, struct socket *sock, int proto) -+#endif - { - int err; - -@@ -122,7 +126,11 @@ static int bt_sock_create(struct net *ne - read_lock(&bt_proto_lock); - - if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) { -+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) - err = bt_proto[proto]->create(net, sock, proto, kern); -+#else -+ err = bt_proto[proto]->create(net, sock, proto); -+#endif - if (!err) - bt_sock_reclassify_lock(sock->sk, proto); - module_put(bt_proto[proto]->owner); -@@ -455,7 +463,11 @@ int bt_sock_ioctl(struct socket *sock, u - if (sk->sk_state == BT_LISTEN) - return -EINVAL; - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) - amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk); -+#else -+ amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); -+#endif - if (amount < 0) - amount = 0; - err = put_user(amount, (int __user *) arg); ---- a/net/bluetooth/cmtp/capi.c -+++ b/net/bluetooth/cmtp/capi.c -@@ -384,7 +384,11 @@ static void cmtp_reset_ctr(struct capi_c - - BT_DBG("ctrl %p", ctrl); - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)) - capi_ctr_down(ctrl); -+#else -+ capi_ctr_reseted(ctrl); -+#endif - - atomic_inc(&session->terminate); - wake_up_process(session->task); ---- a/net/bluetooth/hci_sock.c -+++ b/net/bluetooth/hci_sock.c -@@ -884,8 +884,13 @@ drop: - goto done; - } - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) - static int hci_sock_setsockopt(struct socket *sock, int level, int optname, - char __user *optval, unsigned int len) -+#else -+static int hci_sock_setsockopt(struct socket *sock, int level, int optname, -+ char __user *optval, int len) -+#endif - { - struct hci_ufilter uf = { .opcode = 0 }; - struct sock *sk = sock->sk; -@@ -1059,8 +1064,12 @@ static struct proto hci_sk_proto = { - .obj_size = sizeof(struct hci_pinfo) - }; - -+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) - static int hci_sock_create(struct net *net, struct socket *sock, int protocol, - int kern) -+#else -+static int hci_sock_create(struct net *net, struct socket *sock, int protocol) -+#endif - { - struct sock *sk; - ---- a/net/bluetooth/hci_sysfs.c -+++ b/net/bluetooth/hci_sysfs.c -@@ -72,7 +72,11 @@ static struct attribute_group bt_link_gr - .attrs = bt_link_attrs, - }; - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) - static const struct attribute_group *bt_link_groups[] = { -+#else -+static struct attribute_group *bt_link_groups[] = { -+#endif - &bt_link_group, - NULL - }; -@@ -141,7 +145,11 @@ void hci_conn_del_sysfs(struct hci_conn - dev = device_find_child(&conn->dev, NULL, __match_tty); - if (!dev) - break; -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)) - device_move(dev, NULL, DPM_ORDER_DEV_LAST); -+#else -+ device_move(dev, NULL); -+#endif - put_device(dev); - } - -@@ -379,7 +387,11 @@ static struct attribute_group bt_host_gr - .attrs = bt_host_attrs, - }; - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) - static const struct attribute_group *bt_host_groups[] = { -+#else -+static struct attribute_group *bt_host_groups[] = { -+#endif - &bt_host_group, - NULL - }; ---- a/net/bluetooth/hidp/core.c -+++ b/net/bluetooth/hidp/core.c -@@ -383,6 +383,7 @@ err: - return ret; - } - -+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) - static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count, - unsigned char report_type) - { -@@ -441,6 +442,16 @@ err: - mutex_unlock(&session->report_mutex); - return ret; - } -+#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) - { -@@ -743,8 +754,14 @@ static int hidp_session(void *arg) - } - - if (session->hid) { -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - hid_destroy_device(session->hid); - session->hid = NULL; -+#else -+ if (session->hid->claimed & HID_CLAIMED_INPUT) -+ hidinput_disconnect(session->hid); -+ hid_free_device(session->hid); -+#endif - } - - /* Wakeup user-space polling for socket errors */ -@@ -855,6 +872,70 @@ static void hidp_close(struct hid_device - { - } - -+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27)) -+static const struct { -+ __u16 idVendor; -+ __u16 idProduct; -+ unsigned quirks; -+} hidp_blacklist[] = { -+ /* Apple wireless Mighty Mouse */ -+ { 0x05ac, 0x030c, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, -+ -+ { } /* Terminating entry */ -+}; -+static void hidp_setup_quirks(struct hid_device *hid) -+{ -+ unsigned int n; -+ -+ for (n = 0; hidp_blacklist[n].idVendor; n++) -+ if (hidp_blacklist[n].idVendor == le16_to_cpu(hid->vendor) && -+ hidp_blacklist[n].idProduct == le16_to_cpu(hid->product)) -+ hid->quirks = hidp_blacklist[n].quirks; -+} -+ -+static void hidp_setup_hid(struct hidp_session *session, -+ struct hidp_connadd_req *req) -+{ -+ struct hid_device *hid = session->hid; -+ struct hid_report *report; -+ bdaddr_t src, dst; -+ -+ session->hid = hid; -+ -+ hid->driver_data = session; -+ -+ baswap(&src, &bt_sk(session->ctrl_sock->sk)->src); -+ baswap(&dst, &bt_sk(session->ctrl_sock->sk)->dst); -+ -+ hid->bus = BUS_BLUETOOTH; -+ hid->vendor = req->vendor; -+ hid->product = req->product; -+ hid->version = req->version; -+ hid->country = req->country; -+ -+ strncpy(hid->name, req->name, 128); -+ strncpy(hid->phys, batostr(&src), 64); -+ strncpy(hid->uniq, batostr(&dst), 64); -+ -+ hid->dev = hidp_get_device(session); -+ hid->hid_open = hidp_open; -+ hid->hid_close = hidp_close; -+ -+ hid->hidinput_input_event = hidp_hidinput_event; -+ -+ hidp_setup_quirks(hid); -+ -+ list_for_each_entry(report, &hid->report_enum[HID_INPUT_REPORT].report_list, list) -+ hidp_send_report(session, report); -+ -+ list_for_each_entry(report, &hid->report_enum[HID_FEATURE_REPORT].report_list, list) -+ hidp_send_report(session, report); -+ -+ if (hidinput_connect(hid) == 0) -+ hid->claimed |= HID_CLAIMED_INPUT; -+} -+#else -+ - static int hidp_parse(struct hid_device *hid) - { - struct hidp_session *session = hid->driver_data; -@@ -946,7 +1027,9 @@ static int hidp_setup_hid(struct hidp_se - hid->dev.parent = &session->conn->dev; - hid->ll_driver = &hidp_hid_driver; - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) - hid->hid_get_raw_report = hidp_get_raw_report; -+#endif - hid->hid_output_raw_report = hidp_output_raw_report; - - /* True if device is blacklisted in drivers/hid/hid-core.c */ -@@ -964,6 +1047,7 @@ fault: - - return err; - } -+#endif - - int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock) - { -@@ -979,6 +1063,39 @@ int hidp_add_connection(struct hidp_conn - - BT_DBG("rd_data %p rd_size %d", req->rd_data, req->rd_size); - -+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27)) -+ if (req->rd_size > 0) { -+ unsigned char *buf = kmalloc(req->rd_size, GFP_KERNEL); -+ -+ if (!buf) { -+ kfree(session); -+ return -ENOMEM; -+ } -+ -+ if (copy_from_user(buf, req->rd_data, req->rd_size)) { -+ kfree(buf); -+ kfree(session); -+ return -EFAULT; -+ } -+ -+ session->hid = hid_parse_report(buf, req->rd_size); -+ -+ kfree(buf); -+ -+ if (!session->hid) { -+ kfree(session); -+ return -EINVAL; -+ } -+ } -+ -+ if (!session->hid) { -+ session->input = input_allocate_device(); -+ if (!session->input) { -+ kfree(session); -+ return -ENOMEM; -+ } -+ } -+#endif - down_write(&hidp_session_sem); - - s = __hidp_get_session(&bt_sk(ctrl_sock->sk)->dst); -@@ -1026,6 +1143,7 @@ int hidp_add_connection(struct hidp_conn - - __hidp_link_session(session); - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - if (req->rd_size > 0) { - err = hidp_setup_hid(session, req); - if (err && err != -ENODEV) -@@ -1037,6 +1155,16 @@ int hidp_add_connection(struct hidp_conn - if (err < 0) - goto purge; - } -+#else -+ if (session->input) { -+ err = hidp_setup_input(session, req); -+ if (err < 0) -+ goto failed; -+ } -+ -+ if (session->hid) -+ hidp_setup_hid(session, req); -+#endif - - hidp_set_timer(session); - -@@ -1095,6 +1223,7 @@ unlink: - session->input = NULL; - } - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - if (session->hid) { - hid_destroy_device(session->hid); - session->hid = NULL; -@@ -1108,10 +1237,15 @@ purge: - - skb_queue_purge(&session->ctrl_transmit); - skb_queue_purge(&session->intr_transmit); -+#endif - - failed: - up_write(&hidp_session_sem); - -+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27)) -+ if (session->hid) -+ hid_free_device(session->hid); -+#endif - kfree(session); - return err; - } ---- a/net/bluetooth/rfcomm/sock.c -+++ b/net/bluetooth/rfcomm/sock.c -@@ -304,8 +304,13 @@ static struct sock *rfcomm_sock_alloc(st - return sk; - } - -+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) - static int rfcomm_sock_create(struct net *net, struct socket *sock, - int protocol, int kern) -+#else -+static int rfcomm_sock_create(struct net *net, struct socket *sock, -+ int protocol) -+#endif - { - struct sock *sk; - -@@ -660,7 +665,11 @@ static int rfcomm_sock_setsockopt_old(st - return err; - } - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) - static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) -+#else -+static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, int optlen) -+#endif - { - struct sock *sk = sock->sk; - struct bt_security sec; ---- a/net/bluetooth/rfcomm/tty.c -+++ b/net/bluetooth/rfcomm/tty.c -@@ -708,8 +708,12 @@ static int rfcomm_tty_open(struct tty_st - remove_wait_queue(&dev->wait, &wait); - - if (err == 0) -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)) - device_move(dev->tty_dev, rfcomm_get_device(dev), - DPM_ORDER_DEV_AFTER_PARENT); -+#else -+ device_move(dev->tty_dev, rfcomm_get_device(dev)); -+#endif - - rfcomm_tty_copy_pending(dev); - -@@ -733,7 +737,11 @@ static void rfcomm_tty_close(struct tty_ - if (!--dev->port.count) { - spin_unlock_irqrestore(&dev->port.lock, flags); - if (dev->tty_dev->parent) -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)) - device_move(dev->tty_dev, NULL, DPM_ORDER_DEV_LAST); -+#else -+ device_move(dev->tty_dev, NULL); -+#endif - - /* Close DLC and dettach TTY */ - rfcomm_dlc_close(dev->dlc, 0); -@@ -809,7 +817,11 @@ static int rfcomm_tty_write_room(struct - return room; - } - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) - static int rfcomm_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) -+#else -+static int rfcomm_tty_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg) -+#endif - { - BT_DBG("tty %p cmd 0x%02x", tty, cmd); - -@@ -1068,7 +1080,11 @@ static void rfcomm_tty_hangup(struct tty - } - } - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) - static int rfcomm_tty_tiocmget(struct tty_struct *tty) -+#else -+static int rfcomm_tty_tiocmget(struct tty_struct *tty, struct file *filp) -+#endif - { - struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; - -@@ -1077,7 +1093,11 @@ static int rfcomm_tty_tiocmget(struct tt - return dev->modem_status; - } - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) - static int rfcomm_tty_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear) -+#else -+static int rfcomm_tty_tiocmset(struct tty_struct *tty, struct file *filp, unsigned int set, unsigned int clear) -+#endif - { - struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; - struct rfcomm_dlc *dlc = dev->dlc; ---- a/net/bluetooth/sco.c -+++ b/net/bluetooth/sco.c -@@ -423,8 +423,12 @@ static struct sock *sco_sock_alloc(struc - return sk; - } - -+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) - static int sco_sock_create(struct net *net, struct socket *sock, int protocol, - int kern) -+#else -+static int sco_sock_create(struct net *net, struct socket *sock, int protocol) -+#endif - { - struct sock *sk; - -@@ -675,7 +679,11 @@ static int sco_sock_recvmsg(struct kiocb - return bt_sock_recvmsg(iocb, sock, msg, len, flags); - } - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) - static int sco_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) -+#else -+static int sco_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, int optlen) -+#endif - { - struct sock *sk = sock->sk; - int err = 0; ---- a/net/bluetooth/bnep/sock.c -+++ b/net/bluetooth/bnep/sock.c -@@ -186,8 +186,12 @@ static struct proto bnep_proto = { - .obj_size = sizeof(struct bt_sock) - }; - -+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) - static int bnep_sock_create(struct net *net, struct socket *sock, int protocol, - int kern) -+#else -+static int bnep_sock_create(struct net *net, struct socket *sock, int protocol) -+#endif - { - struct sock *sk; - ---- a/net/bluetooth/cmtp/sock.c -+++ b/net/bluetooth/cmtp/sock.c -@@ -195,8 +195,12 @@ static struct proto cmtp_proto = { - .obj_size = sizeof(struct bt_sock) - }; - -+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) - static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol, - int kern) -+#else -+static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol) -+#endif - { - struct sock *sk; - ---- a/net/bluetooth/hidp/sock.c -+++ b/net/bluetooth/hidp/sock.c -@@ -235,8 +235,12 @@ static struct proto hidp_proto = { - .obj_size = sizeof(struct bt_sock) - }; - -+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) - static int hidp_sock_create(struct net *net, struct socket *sock, int protocol, - int kern) -+#else -+static int hidp_sock_create(struct net *net, struct socket *sock, int protocol) -+#endif - { - struct sock *sk; - ---- a/net/bluetooth/l2cap_sock.c -+++ b/net/bluetooth/l2cap_sock.c -@@ -573,8 +573,13 @@ static int l2cap_sock_setsockopt_old(str - return err; - } - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) - static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, - char __user *optval, unsigned int optlen) -+#else -+static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, -+ char __user *optval, int optlen) -+#endif - { - struct sock *sk = sock->sk; - struct l2cap_chan *chan = l2cap_pi(sk)->chan; -@@ -1225,8 +1230,12 @@ static struct sock *l2cap_sock_alloc(str - return sk; - } - -+#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) - static int l2cap_sock_create(struct net *net, struct socket *sock, int protocol, - int kern) -+#else -+static int l2cap_sock_create(struct net *net, struct socket *sock, int protocol) -+#endif - { - struct sock *sk; - -@@ -1238,7 +1247,11 @@ static int l2cap_sock_create(struct net - sock->type != SOCK_DGRAM && sock->type != SOCK_RAW) - return -ESOCKTNOSUPPORT; - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32)) - if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW)) -+#else -+ if (sock->type == SOCK_RAW && !capable(CAP_NET_RAW)) -+#endif - return -EPERM; - - sock->ops = &l2cap_sock_ops; diff --git a/patches/collateral-evolutions/network/16-bluetooth/INFO b/patches/collateral-evolutions/network/16-bluetooth/INFO new file mode 100644 index 000000000000..7df4a684e114 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/INFO @@ -0,0 +1,3 @@ +These changes are required to backport blueooth. A lot can be optimized +here still, but for now we keep this here. + diff --git a/patches/collateral-evolutions/network/16-bluetooth/drivers_bluetooth_hci_ldisc.c b/patches/collateral-evolutions/network/16-bluetooth/drivers_bluetooth_hci_ldisc.c new file mode 100644 index 000000000000..5248d2d6844d --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/drivers_bluetooth_hci_ldisc.c @@ -0,0 +1,28 @@ +--- a/drivers/bluetooth/hci_ldisc.c ++++ b/drivers/bluetooth/hci_ldisc.c +@@ -297,8 +297,13 @@ + /* FIXME: why is this needed. Note don't use ldisc_ref here as the + open path is before the ldisc is referencable */ + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)) + if (tty->ldisc->ops->flush_buffer) + tty->ldisc->ops->flush_buffer(tty); ++#else ++ if (tty->ldisc.ops->flush_buffer) ++ tty->ldisc.ops->flush_buffer(tty); ++#endif + tty_driver_flush_buffer(tty); + + return 0; +@@ -524,7 +529,11 @@ + return hu->hdev_flags; + + default: ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) + err = n_tty_ioctl_helper(tty, file, cmd, arg); ++#else ++ err = n_tty_ioctl(tty, file, cmd, arg); ++#endif + break; + } + diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_af_bluetooth.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_af_bluetooth.c new file mode 100644 index 000000000000..e4823d520d13 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_af_bluetooth.c @@ -0,0 +1,39 @@ +--- a/net/bluetooth/af_bluetooth.c ++++ b/net/bluetooth/af_bluetooth.c +@@ -103,8 +103,12 @@ + } + EXPORT_SYMBOL(bt_sock_unregister); + ++#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) + static int bt_sock_create(struct net *net, struct socket *sock, int proto, + int kern) ++#else ++static int bt_sock_create(struct net *net, struct socket *sock, int proto) ++#endif + { + int err; + +@@ -122,7 +126,11 @@ + read_lock(&bt_proto_lock); + + if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) { ++#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) + err = bt_proto[proto]->create(net, sock, proto, kern); ++#else ++ err = bt_proto[proto]->create(net, sock, proto); ++#endif + if (!err) + bt_sock_reclassify_lock(sock->sk, proto); + module_put(bt_proto[proto]->owner); +@@ -455,7 +463,11 @@ + if (sk->sk_state == BT_LISTEN) + return -EINVAL; + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) + amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk); ++#else ++ amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); ++#endif + if (amount < 0) + amount = 0; + err = put_user(amount, (int __user *) arg); diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_bnep_sock.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_bnep_sock.c new file mode 100644 index 000000000000..13e1f1bc77df --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_bnep_sock.c @@ -0,0 +1,15 @@ +--- a/net/bluetooth/bnep/sock.c ++++ b/net/bluetooth/bnep/sock.c +@@ -186,8 +186,12 @@ + .obj_size = sizeof(struct bt_sock) + }; + ++#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) + static int bnep_sock_create(struct net *net, struct socket *sock, int protocol, + int kern) ++#else ++static int bnep_sock_create(struct net *net, struct socket *sock, int protocol) ++#endif + { + struct sock *sk; + diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_cmtp_capi.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_cmtp_capi.c new file mode 100644 index 000000000000..25a51dcceb77 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_cmtp_capi.c @@ -0,0 +1,14 @@ +--- a/net/bluetooth/cmtp/capi.c ++++ b/net/bluetooth/cmtp/capi.c +@@ -384,7 +384,11 @@ + + BT_DBG("ctrl %p", ctrl); + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)) + capi_ctr_down(ctrl); ++#else ++ capi_ctr_reseted(ctrl); ++#endif + + atomic_inc(&session->terminate); + wake_up_process(session->task); diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_cmtp_sock.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_cmtp_sock.c new file mode 100644 index 000000000000..eed70c6a3dc3 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_cmtp_sock.c @@ -0,0 +1,15 @@ +--- a/net/bluetooth/cmtp/sock.c ++++ b/net/bluetooth/cmtp/sock.c +@@ -195,8 +195,12 @@ + .obj_size = sizeof(struct bt_sock) + }; + ++#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) + static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol, + int kern) ++#else ++static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol) ++#endif + { + struct sock *sk; + diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sock.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sock.c new file mode 100644 index 000000000000..87a98121f430 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sock.c @@ -0,0 +1,29 @@ +--- a/net/bluetooth/hci_sock.c ++++ b/net/bluetooth/hci_sock.c +@@ -884,8 +884,13 @@ + goto done; + } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) + static int hci_sock_setsockopt(struct socket *sock, int level, int optname, + char __user *optval, unsigned int len) ++#else ++static int hci_sock_setsockopt(struct socket *sock, int level, int optname, ++ char __user *optval, int len) ++#endif + { + struct hci_ufilter uf = { .opcode = 0 }; + struct sock *sk = sock->sk; +@@ -1059,8 +1064,12 @@ + .obj_size = sizeof(struct hci_pinfo) + }; + ++#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) + static int hci_sock_create(struct net *net, struct socket *sock, int protocol, + int kern) ++#else ++static int hci_sock_create(struct net *net, struct socket *sock, int protocol) ++#endif + { + struct sock *sk; + diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sysfs.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sysfs.c new file mode 100644 index 000000000000..df664bdc8245 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sysfs.c @@ -0,0 +1,38 @@ +--- a/net/bluetooth/hci_sysfs.c ++++ b/net/bluetooth/hci_sysfs.c +@@ -72,7 +72,11 @@ + .attrs = bt_link_attrs, + }; + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) + static const struct attribute_group *bt_link_groups[] = { ++#else ++static struct attribute_group *bt_link_groups[] = { ++#endif + &bt_link_group, + NULL + }; +@@ -141,7 +145,11 @@ + dev = device_find_child(&conn->dev, NULL, __match_tty); + if (!dev) + break; ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)) + device_move(dev, NULL, DPM_ORDER_DEV_LAST); ++#else ++ device_move(dev, NULL); ++#endif + put_device(dev); + } + +@@ -379,7 +387,11 @@ + .attrs = bt_host_attrs, + }; + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) + static const struct attribute_group *bt_host_groups[] = { ++#else ++static struct attribute_group *bt_host_groups[] = { ++#endif + &bt_host_group, + NULL + }; diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_core.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_core.c new file mode 100644 index 000000000000..0807ccc7f104 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_core.c @@ -0,0 +1,220 @@ +--- a/net/bluetooth/hidp/core.c ++++ b/net/bluetooth/hidp/core.c +@@ -383,6 +383,7 @@ + return ret; + } + ++#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) + static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count, + unsigned char report_type) + { +@@ -441,6 +442,16 @@ + mutex_unlock(&session->report_mutex); + return ret; + } ++#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) + { +@@ -743,8 +754,14 @@ + } + + if (session->hid) { ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) + hid_destroy_device(session->hid); + session->hid = NULL; ++#else ++ if (session->hid->claimed & HID_CLAIMED_INPUT) ++ hidinput_disconnect(session->hid); ++ hid_free_device(session->hid); ++#endif + } + + /* Wakeup user-space polling for socket errors */ +@@ -855,6 +872,70 @@ + { + } + ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27)) ++static const struct { ++ __u16 idVendor; ++ __u16 idProduct; ++ unsigned quirks; ++} hidp_blacklist[] = { ++ /* Apple wireless Mighty Mouse */ ++ { 0x05ac, 0x030c, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, ++ ++ { } /* Terminating entry */ ++}; ++static void hidp_setup_quirks(struct hid_device *hid) ++{ ++ unsigned int n; ++ ++ for (n = 0; hidp_blacklist[n].idVendor; n++) ++ if (hidp_blacklist[n].idVendor == le16_to_cpu(hid->vendor) && ++ hidp_blacklist[n].idProduct == le16_to_cpu(hid->product)) ++ hid->quirks = hidp_blacklist[n].quirks; ++} ++ ++static void hidp_setup_hid(struct hidp_session *session, ++ struct hidp_connadd_req *req) ++{ ++ struct hid_device *hid = session->hid; ++ struct hid_report *report; ++ bdaddr_t src, dst; ++ ++ session->hid = hid; ++ ++ hid->driver_data = session; ++ ++ baswap(&src, &bt_sk(session->ctrl_sock->sk)->src); ++ baswap(&dst, &bt_sk(session->ctrl_sock->sk)->dst); ++ ++ hid->bus = BUS_BLUETOOTH; ++ hid->vendor = req->vendor; ++ hid->product = req->product; ++ hid->version = req->version; ++ hid->country = req->country; ++ ++ strncpy(hid->name, req->name, 128); ++ strncpy(hid->phys, batostr(&src), 64); ++ strncpy(hid->uniq, batostr(&dst), 64); ++ ++ hid->dev = hidp_get_device(session); ++ hid->hid_open = hidp_open; ++ hid->hid_close = hidp_close; ++ ++ hid->hidinput_input_event = hidp_hidinput_event; ++ ++ hidp_setup_quirks(hid); ++ ++ list_for_each_entry(report, &hid->report_enum[HID_INPUT_REPORT].report_list, list) ++ hidp_send_report(session, report); ++ ++ list_for_each_entry(report, &hid->report_enum[HID_FEATURE_REPORT].report_list, list) ++ hidp_send_report(session, report); ++ ++ if (hidinput_connect(hid) == 0) ++ hid->claimed |= HID_CLAIMED_INPUT; ++} ++#else ++ + static int hidp_parse(struct hid_device *hid) + { + struct hidp_session *session = hid->driver_data; +@@ -946,7 +1027,9 @@ + hid->dev.parent = &session->conn->dev; + hid->ll_driver = &hidp_hid_driver; + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) + hid->hid_get_raw_report = hidp_get_raw_report; ++#endif + hid->hid_output_raw_report = hidp_output_raw_report; + + /* True if device is blacklisted in drivers/hid/hid-core.c */ +@@ -964,6 +1047,7 @@ + + return err; + } ++#endif + + int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock) + { +@@ -979,6 +1063,39 @@ + + BT_DBG("rd_data %p rd_size %d", req->rd_data, req->rd_size); + ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27)) ++ if (req->rd_size > 0) { ++ unsigned char *buf = kmalloc(req->rd_size, GFP_KERNEL); ++ ++ if (!buf) { ++ kfree(session); ++ return -ENOMEM; ++ } ++ ++ if (copy_from_user(buf, req->rd_data, req->rd_size)) { ++ kfree(buf); ++ kfree(session); ++ return -EFAULT; ++ } ++ ++ session->hid = hid_parse_report(buf, req->rd_size); ++ ++ kfree(buf); ++ ++ if (!session->hid) { ++ kfree(session); ++ return -EINVAL; ++ } ++ } ++ ++ if (!session->hid) { ++ session->input = input_allocate_device(); ++ if (!session->input) { ++ kfree(session); ++ return -ENOMEM; ++ } ++ } ++#endif + down_write(&hidp_session_sem); + + s = __hidp_get_session(&bt_sk(ctrl_sock->sk)->dst); +@@ -1026,6 +1143,7 @@ + + __hidp_link_session(session); + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) + if (req->rd_size > 0) { + err = hidp_setup_hid(session, req); + if (err && err != -ENODEV) +@@ -1037,6 +1155,16 @@ + if (err < 0) + goto purge; + } ++#else ++ if (session->input) { ++ err = hidp_setup_input(session, req); ++ if (err < 0) ++ goto failed; ++ } ++ ++ if (session->hid) ++ hidp_setup_hid(session, req); ++#endif + + hidp_set_timer(session); + +@@ -1095,6 +1223,7 @@ + session->input = NULL; + } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) + if (session->hid) { + hid_destroy_device(session->hid); + session->hid = NULL; +@@ -1108,10 +1237,15 @@ + + skb_queue_purge(&session->ctrl_transmit); + skb_queue_purge(&session->intr_transmit); ++#endif + + failed: + up_write(&hidp_session_sem); + ++#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27)) ++ if (session->hid) ++ hid_free_device(session->hid); ++#endif + kfree(session); + return err; + } diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_sock.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_sock.c new file mode 100644 index 000000000000..0cf1f8c366d9 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_sock.c @@ -0,0 +1,15 @@ +--- a/net/bluetooth/hidp/sock.c ++++ b/net/bluetooth/hidp/sock.c +@@ -235,8 +235,12 @@ + .obj_size = sizeof(struct bt_sock) + }; + ++#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) + static int hidp_sock_create(struct net *net, struct socket *sock, int protocol, + int kern) ++#else ++static int hidp_sock_create(struct net *net, struct socket *sock, int protocol) ++#endif + { + struct sock *sk; + diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_l2cap_sock.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_l2cap_sock.c new file mode 100644 index 000000000000..89307b4174ad --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_l2cap_sock.c @@ -0,0 +1,41 @@ +--- a/net/bluetooth/l2cap_sock.c ++++ b/net/bluetooth/l2cap_sock.c +@@ -573,8 +573,13 @@ + return err; + } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) + static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, + char __user *optval, unsigned int optlen) ++#else ++static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, ++ char __user *optval, int optlen) ++#endif + { + struct sock *sk = sock->sk; + struct l2cap_chan *chan = l2cap_pi(sk)->chan; +@@ -1225,8 +1230,12 @@ + return sk; + } + ++#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) + static int l2cap_sock_create(struct net *net, struct socket *sock, int protocol, + int kern) ++#else ++static int l2cap_sock_create(struct net *net, struct socket *sock, int protocol) ++#endif + { + struct sock *sk; + +@@ -1238,7 +1247,11 @@ + sock->type != SOCK_DGRAM && sock->type != SOCK_RAW) + return -ESOCKTNOSUPPORT; + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32)) + if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW)) ++#else ++ if (sock->type == SOCK_RAW && !capable(CAP_NET_RAW)) ++#endif + return -EPERM; + + sock->ops = &l2cap_sock_ops; diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_sock.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_sock.c new file mode 100644 index 000000000000..5affe501e1a9 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_sock.c @@ -0,0 +1,28 @@ +--- a/net/bluetooth/rfcomm/sock.c ++++ b/net/bluetooth/rfcomm/sock.c +@@ -304,8 +304,13 @@ + return sk; + } + ++#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) + static int rfcomm_sock_create(struct net *net, struct socket *sock, + int protocol, int kern) ++#else ++static int rfcomm_sock_create(struct net *net, struct socket *sock, ++ int protocol) ++#endif + { + struct sock *sk; + +@@ -660,7 +665,11 @@ + return err; + } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) + static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) ++#else ++static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, int optlen) ++#endif + { + struct sock *sk = sock->sk; + struct bt_security sec; diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_tty.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_tty.c new file mode 100644 index 000000000000..957122ec3e88 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_tty.c @@ -0,0 +1,63 @@ +--- a/net/bluetooth/rfcomm/tty.c ++++ b/net/bluetooth/rfcomm/tty.c +@@ -708,8 +708,12 @@ + remove_wait_queue(&dev->wait, &wait); + + if (err == 0) ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)) + device_move(dev->tty_dev, rfcomm_get_device(dev), + DPM_ORDER_DEV_AFTER_PARENT); ++#else ++ device_move(dev->tty_dev, rfcomm_get_device(dev)); ++#endif + + rfcomm_tty_copy_pending(dev); + +@@ -733,7 +737,11 @@ + if (!--dev->port.count) { + spin_unlock_irqrestore(&dev->port.lock, flags); + if (dev->tty_dev->parent) ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)) + device_move(dev->tty_dev, NULL, DPM_ORDER_DEV_LAST); ++#else ++ device_move(dev->tty_dev, NULL); ++#endif + + /* Close DLC and dettach TTY */ + rfcomm_dlc_close(dev->dlc, 0); +@@ -809,7 +817,11 @@ + return room; + } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) + static int rfcomm_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) ++#else ++static int rfcomm_tty_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg) ++#endif + { + BT_DBG("tty %p cmd 0x%02x", tty, cmd); + +@@ -1068,7 +1080,11 @@ + } + } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) + static int rfcomm_tty_tiocmget(struct tty_struct *tty) ++#else ++static int rfcomm_tty_tiocmget(struct tty_struct *tty, struct file *filp) ++#endif + { + struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; + +@@ -1077,7 +1093,11 @@ + return dev->modem_status; + } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) + static int rfcomm_tty_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear) ++#else ++static int rfcomm_tty_tiocmset(struct tty_struct *tty, struct file *filp, unsigned int set, unsigned int clear) ++#endif + { + struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; + struct rfcomm_dlc *dlc = dev->dlc; diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_sco.c b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_sco.c new file mode 100644 index 000000000000..64bc1a4cb0f3 --- /dev/null +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_sco.c @@ -0,0 +1,27 @@ +--- a/net/bluetooth/sco.c ++++ b/net/bluetooth/sco.c +@@ -423,8 +423,12 @@ + return sk; + } + ++#if defined(CONFIG_COMPAT_BT_SOCK_CREATE_NEEDS_KERN) + static int sco_sock_create(struct net *net, struct socket *sock, int protocol, + int kern) ++#else ++static int sco_sock_create(struct net *net, struct socket *sock, int protocol) ++#endif + { + struct sock *sk; + +@@ -675,7 +679,11 @@ + return bt_sock_recvmsg(iocb, sock, msg, len, flags); + } + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) + static int sco_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) ++#else ++static int sco_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, int optlen) ++#endif + { + struct sock *sk = sock->sk; + int err = 0; diff --git a/patches/collateral-evolutions/network/17-netdev-queue/INFO b/patches/collateral-evolutions/network/17-netdev-queue/INFO new file mode 100644 index 000000000000..ea3688d6fd84 --- /dev/null +++ b/patches/collateral-evolutions/network/17-netdev-queue/INFO @@ -0,0 +1,14 @@ +This patch addresses changes made by usage of new symbols +like unregister_netdevice_queue() which are not possible to backport +due to their reliance on internal symbols on net/core/dev.c + +The patch that introduced this on mac80211 was: + + mac80211: Speedup ieee80211_remove_interfaces() + + Speedup ieee80211_remove_interfaces() by factorizing synchronize_rcu() calls + + Signed-off-by: Eric Dumazet + Reviewed-by: Johannes Berg + Signed-off-by: John W. Linville + diff --git a/patches/collateral-evolutions/network/17-netdev-queue.patch b/patches/collateral-evolutions/network/17-netdev-queue/net_mac80211_iface.c similarity index 54% rename from patches/collateral-evolutions/network/17-netdev-queue.patch rename to patches/collateral-evolutions/network/17-netdev-queue/net_mac80211_iface.c index 9dbe17b5a9c1..5c8f6976d38c 100644 --- a/patches/collateral-evolutions/network/17-netdev-queue.patch +++ b/patches/collateral-evolutions/network/17-netdev-queue/net_mac80211_iface.c @@ -1,20 +1,6 @@ -This patch addresses changes made by usage of new symbols -like unregister_netdevice_queue() which are not possible to backport -due to their reliance on internal symbols on net/core/dev.c - -The patch that introduced this on mac80211 was: - - mac80211: Speedup ieee80211_remove_interfaces() - - Speedup ieee80211_remove_interfaces() by factorizing synchronize_rcu() calls - - Signed-off-by: Eric Dumazet - Reviewed-by: Johannes Berg - Signed-off-by: John W. Linville - --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -1643,6 +1643,7 @@ void ieee80211_sdata_stop(struct ieee802 +@@ -1643,6 +1643,7 @@ * Remove all interfaces, may only be called at hardware unregistration * time because it doesn't do RCU-safe list removals. */ @@ -22,7 +8,7 @@ The patch that introduced this on mac80211 was: void ieee80211_remove_interfaces(struct ieee80211_local *local) { struct ieee80211_sub_if_data *sdata, *tmp; -@@ -1670,6 +1671,22 @@ void ieee80211_remove_interfaces(struct +@@ -1670,6 +1671,22 @@ kfree(sdata); } } diff --git a/patches/collateral-evolutions/network/18-rename-usb-net-symbols.patch b/patches/collateral-evolutions/network/18-rename-usb-net-symbols.patch deleted file mode 100644 index ecb8b0a0c8d2..000000000000 --- a/patches/collateral-evolutions/network/18-rename-usb-net-symbols.patch +++ /dev/null @@ -1,53 +0,0 @@ -Rename config names for usbnet to deactivate them also if activated in -the main kernel configuration. This is needed because -usb_autopm_put_interface_async and usb_autopm_get_interface_async are -not backported to kernel 2.6.28 and earlier. -Remove this patch if these symbols are backported. - ---- a/drivers/net/usb/Makefile -+++ b/drivers/net/usb/Makefile -@@ -10,7 +10,7 @@ obj-$(CONFIG_USB_HSO) += hso.o - obj-$(CONFIG_USB_NET_AX8817X) += asix.o - asix-y := asix_devices.o asix_common.o ax88172a.o - obj-$(CONFIG_USB_NET_AX88179_178A) += ax88179_178a.o --obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o -+obj-$(CONFIG_USB_NET_COMPAT_CDCETHER) += cdc_ether.o - obj-$(CONFIG_USB_NET_CDC_EEM) += cdc_eem.o - obj-$(CONFIG_USB_NET_DM9601) += dm9601.o - obj-$(CONFIG_USB_NET_SMSC75XX) += smsc75xx.o -@@ -18,11 +18,11 @@ obj-$(CONFIG_USB_NET_SMSC95XX) += smsc95 - obj-$(CONFIG_USB_NET_GL620A) += gl620a.o - obj-$(CONFIG_USB_NET_NET1080) += net1080.o - obj-$(CONFIG_USB_NET_PLUSB) += plusb.o --obj-$(CONFIG_USB_NET_RNDIS_HOST) += rndis_host.o -+obj-$(CONFIG_USB_NET_COMPAT_RNDIS_HOST) += rndis_host.o - obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o - obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o - obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o --obj-$(CONFIG_USB_USBNET) += usbnet.o -+obj-$(CONFIG_USB_COMPAT_USBNET) += usbnet.o - obj-$(CONFIG_USB_NET_INT51X1) += int51x1.o - obj-$(CONFIG_USB_CDC_PHONET) += cdc-phonet.o - obj-$(CONFIG_USB_NET_KALMIA) += kalmia.o ---- a/drivers/net/usb/cdc_ether.c -+++ b/drivers/net/usb/cdc_ether.c -@@ -33,7 +33,7 @@ - #include - - --#if defined(CONFIG_USB_NET_RNDIS_HOST) || defined(CONFIG_USB_NET_RNDIS_HOST_MODULE) -+#if defined(CONFIG_USB_NET_COMPAT_RNDIS_HOST) || defined(CONFIG_USB_NET_COMPAT_RNDIS_HOST_MODULE) - - static int is_rndis(struct usb_interface_descriptor *desc) - { ---- a/drivers/net/wireless/Makefile -+++ b/drivers/net/wireless/Makefile -@@ -30,7 +30,7 @@ obj-$(CONFIG_RTLWIFI) += rtlwifi/ - obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o - obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o - --obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o -+obj-$(CONFIG_USB_NET_COMPAT_RNDIS_WLAN) += rndis_wlan.o - - obj-$(CONFIG_USB_ZD1201) += zd1201.o - obj-$(CONFIG_LIBERTAS) += libertas/ diff --git a/patches/collateral-evolutions/network/18-rename-usb-net-symbols/INFO b/patches/collateral-evolutions/network/18-rename-usb-net-symbols/INFO new file mode 100644 index 000000000000..b98e835abeba --- /dev/null +++ b/patches/collateral-evolutions/network/18-rename-usb-net-symbols/INFO @@ -0,0 +1,6 @@ +Rename config names for usbnet to deactivate them also if activated in +the main kernel configuration. This is needed because +usb_autopm_put_interface_async and usb_autopm_get_interface_async are +not backported to kernel 2.6.28 and earlier. +Remove this patch if these symbols are backported. + diff --git a/patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_usb_Makefile b/patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_usb_Makefile new file mode 100644 index 000000000000..4737a86138ec --- /dev/null +++ b/patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_usb_Makefile @@ -0,0 +1,25 @@ +--- a/drivers/net/usb/Makefile ++++ b/drivers/net/usb/Makefile +@@ -10,7 +10,7 @@ + obj-$(CONFIG_USB_NET_AX8817X) += asix.o + asix-y := asix_devices.o asix_common.o ax88172a.o + obj-$(CONFIG_USB_NET_AX88179_178A) += ax88179_178a.o +-obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o ++obj-$(CONFIG_USB_NET_COMPAT_CDCETHER) += cdc_ether.o + obj-$(CONFIG_USB_NET_CDC_EEM) += cdc_eem.o + obj-$(CONFIG_USB_NET_DM9601) += dm9601.o + obj-$(CONFIG_USB_NET_SMSC75XX) += smsc75xx.o +@@ -18,11 +18,11 @@ + obj-$(CONFIG_USB_NET_GL620A) += gl620a.o + obj-$(CONFIG_USB_NET_NET1080) += net1080.o + obj-$(CONFIG_USB_NET_PLUSB) += plusb.o +-obj-$(CONFIG_USB_NET_RNDIS_HOST) += rndis_host.o ++obj-$(CONFIG_USB_NET_COMPAT_RNDIS_HOST) += rndis_host.o + obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o + obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o + obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o +-obj-$(CONFIG_USB_USBNET) += usbnet.o ++obj-$(CONFIG_USB_COMPAT_USBNET) += usbnet.o + obj-$(CONFIG_USB_NET_INT51X1) += int51x1.o + obj-$(CONFIG_USB_CDC_PHONET) += cdc-phonet.o + obj-$(CONFIG_USB_NET_KALMIA) += kalmia.o diff --git a/patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_usb_cdc_ether.c b/patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_usb_cdc_ether.c new file mode 100644 index 000000000000..dab385f54473 --- /dev/null +++ b/patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_usb_cdc_ether.c @@ -0,0 +1,11 @@ +--- a/drivers/net/usb/cdc_ether.c ++++ b/drivers/net/usb/cdc_ether.c +@@ -33,7 +33,7 @@ + #include + + +-#if defined(CONFIG_USB_NET_RNDIS_HOST) || defined(CONFIG_USB_NET_RNDIS_HOST_MODULE) ++#if defined(CONFIG_USB_NET_COMPAT_RNDIS_HOST) || defined(CONFIG_USB_NET_COMPAT_RNDIS_HOST_MODULE) + + static int is_rndis(struct usb_interface_descriptor *desc) + { diff --git a/patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_wireless_Makefile b/patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_wireless_Makefile new file mode 100644 index 000000000000..7b8d22f9dc33 --- /dev/null +++ b/patches/collateral-evolutions/network/18-rename-usb-net-symbols/drivers_net_wireless_Makefile @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/Makefile ++++ b/drivers/net/wireless/Makefile +@@ -30,7 +30,7 @@ + obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o + obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o + +-obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o ++obj-$(CONFIG_USB_NET_COMPAT_RNDIS_WLAN) += rndis_wlan.o + + obj-$(CONFIG_USB_ZD1201) += zd1201.o + obj-$(CONFIG_LIBERTAS) += libertas/ diff --git a/patches/collateral-evolutions/network/21-capi-proc_fops/INFO b/patches/collateral-evolutions/network/21-capi-proc_fops/INFO new file mode 100644 index 000000000000..30afaec6b999 --- /dev/null +++ b/patches/collateral-evolutions/network/21-capi-proc_fops/INFO @@ -0,0 +1,3 @@ +Backport kernel patch 9a58a80a701bdb2d220cdab4914218df5b48d781 +proc_fops: convert drivers/isdn/ to seq_file + diff --git a/patches/collateral-evolutions/network/21-capi-proc_fops.patch b/patches/collateral-evolutions/network/21-capi-proc_fops/net_bluetooth_cmtp_capi.c similarity index 85% rename from patches/collateral-evolutions/network/21-capi-proc_fops.patch rename to patches/collateral-evolutions/network/21-capi-proc_fops/net_bluetooth_cmtp_capi.c index 7dc92f401c98..c733cc60c282 100644 --- a/patches/collateral-evolutions/network/21-capi-proc_fops.patch +++ b/patches/collateral-evolutions/network/21-capi-proc_fops/net_bluetooth_cmtp_capi.c @@ -1,6 +1,3 @@ -Backport kernel patch 9a58a80a701bdb2d220cdab4914218df5b48d781 -proc_fops: convert drivers/isdn/ to seq_file - --- a/net/bluetooth/cmtp/capi.c +++ b/net/bluetooth/cmtp/capi.c @@ -21,8 +21,10 @@ @@ -14,7 +11,7 @@ proc_fops: convert drivers/isdn/ to seq_file #include #include #include -@@ -522,6 +524,7 @@ static char *cmtp_procinfo(struct capi_c +@@ -522,6 +524,7 @@ return "CAPI Message Transport Protocol"; } @@ -22,7 +19,7 @@ proc_fops: convert drivers/isdn/ to seq_file static int cmtp_proc_show(struct seq_file *m, void *v) { struct capi_ctr *ctrl = m->private; -@@ -554,6 +557,36 @@ static const struct file_operations cmtp +@@ -554,6 +557,36 @@ .release = single_release, }; @@ -59,7 +56,7 @@ proc_fops: convert drivers/isdn/ to seq_file int cmtp_attach_device(struct cmtp_session *session) { unsigned char buf[4]; -@@ -592,7 +625,11 @@ int cmtp_attach_device(struct cmtp_sessi +@@ -592,7 +625,11 @@ session->ctrl.send_message = cmtp_send_message; session->ctrl.procinfo = cmtp_procinfo; diff --git a/patches/collateral-evolutions/network/22-multiqueue.patch b/patches/collateral-evolutions/network/22-multiqueue/INFO similarity index 76% rename from patches/collateral-evolutions/network/22-multiqueue.patch rename to patches/collateral-evolutions/network/22-multiqueue/INFO index 8049f38235ca..bcb4eecfa11e 100644 --- a/patches/collateral-evolutions/network/22-multiqueue.patch +++ b/patches/collateral-evolutions/network/22-multiqueue/INFO @@ -28,16 +28,3 @@ This patch thus only addresses the lack of select_queue on kernels older than 2.6.27, naming differences are handled in compat. ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -1512,6 +1512,10 @@ void ieee80211_xmit(struct ieee80211_sub - } - } - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) -+ /* Older kernels do not have the select_queue callback */ -+ skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, skb)); -+#endif - ieee80211_set_qos_hdr(sdata, skb); - ieee80211_tx(sdata, skb, false, band); - } diff --git a/patches/collateral-evolutions/network/22-multiqueue/net_mac80211_tx.c b/patches/collateral-evolutions/network/22-multiqueue/net_mac80211_tx.c new file mode 100644 index 000000000000..6495d2529ff6 --- /dev/null +++ b/patches/collateral-evolutions/network/22-multiqueue/net_mac80211_tx.c @@ -0,0 +1,13 @@ +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -1512,6 +1512,10 @@ + } + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) ++ /* Older kernels do not have the select_queue callback */ ++ skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, skb)); ++#endif + ieee80211_set_qos_hdr(sdata, skb); + ieee80211_tx(sdata, skb, false, band); + } diff --git a/patches/collateral-evolutions/network/24-pcmcia.patch b/patches/collateral-evolutions/network/24-pcmcia.patch deleted file mode 100644 index f0c7c2957676..000000000000 --- a/patches/collateral-evolutions/network/24-pcmcia.patch +++ /dev/null @@ -1,1414 +0,0 @@ ---- a/drivers/bluetooth/bluecard_cs.c -+++ b/drivers/bluetooth/bluecard_cs.c -@@ -158,7 +158,12 @@ static void bluecard_detach(struct pcmci - static void bluecard_activity_led_timeout(u_long arg) - { - bluecard_info_t *info = (bluecard_info_t *)arg; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif -+ - - if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) - return; -@@ -175,7 +180,11 @@ static void bluecard_activity_led_timeou - - static void bluecard_enable_activity_led(bluecard_info_t *info) - { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - - if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) - return; -@@ -231,7 +240,11 @@ static void bluecard_write_wakeup(blueca - } - - do { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - unsigned int offset; - unsigned char command; - unsigned long ready_bit; -@@ -378,7 +391,11 @@ static void bluecard_receive(bluecard_in - return; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - iobase = info->p_dev->resource[0]->start; -+#else -+ iobase = info->p_dev->io.BasePort1; -+#endif - - if (test_bit(XMIT_SENDING_READY, &(info->tx_state))) - bluecard_enable_activity_led(info); -@@ -507,7 +524,11 @@ static irqreturn_t bluecard_interrupt(in - if (!test_bit(CARD_READY, &(info->hw_state))) - return IRQ_HANDLED; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - iobase = info->p_dev->resource[0]->start; -+#else -+ iobase = info->p_dev->io.BasePort1; -+#endif - - spin_lock(&(info->lock)); - -@@ -629,7 +650,11 @@ static int bluecard_hci_open(struct hci_ - return 0; - - if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - - /* Enable LED */ - outb(0x08 | 0x20, iobase + 0x30); -@@ -649,7 +674,11 @@ static int bluecard_hci_close(struct hci - bluecard_hci_flush(hdev); - - if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - - /* Disable LED */ - outb(0x00, iobase + 0x30); -@@ -705,7 +734,11 @@ static int bluecard_hci_ioctl(struct hci - - static int bluecard_open(bluecard_info_t *info) - { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - struct hci_dev *hdev; - unsigned char id; - -@@ -821,7 +854,11 @@ static int bluecard_open(bluecard_info_t - - static int bluecard_close(bluecard_info_t *info) - { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - struct hci_dev *hdev = info->hdev; - - if (!hdev) -@@ -856,7 +893,18 @@ static int bluecard_probe(struct pcmcia_ - info->p_dev = link; - link->priv = info; - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; -+ -+ link->irq.Handler = bluecard_interrupt; -+#endif -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - link->config_flags |= CONF_ENABLE_IRQ; -+#else -+ link->conf.Attributes = CONF_ENABLE_IRQ; -+ link->conf.IntType = INT_MEMORY_AND_IO; -+#endif - - return bluecard_config(link); - } -@@ -873,15 +921,30 @@ static int bluecard_config(struct pcmcia - bluecard_info_t *info = link->priv; - int i, n; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - link->config_index = 0x20; -+#else -+ link->conf.ConfigIndex = 0x20; -+#endif - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; - link->resource[0]->end = 64; - link->io_lines = 6; -+#else -+ link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; -+ link->io.NumPorts1 = 64; -+ link->io.IOAddrLines = 6; -+#endif - - for (n = 0; n < 0x400; n += 0x40) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - link->resource[0]->start = n ^ 0x300; - i = pcmcia_request_io(link); -+#else -+ link->io.BasePort1 = n ^ 0x300; -+ i = pcmcia_request_io(link, &link->io); -+#endif - if (i == 0) - break; - } -@@ -889,9 +952,15 @@ static int bluecard_config(struct pcmcia - if (i != 0) - goto failed; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - i = pcmcia_request_irq(link, bluecard_interrupt); - if (i != 0) - goto failed; -+#else -+ i = pcmcia_request_irq(link, &link->irq); -+ if (i != 0) -+ link->irq.AssignedIRQ = 0; -+#endif - - i = pcmcia_enable_device(link); - if (i != 0) -@@ -929,7 +998,13 @@ MODULE_DEVICE_TABLE(pcmcia, bluecard_ids - - static struct pcmcia_driver bluecard_driver = { - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - .name = "bluecard_cs", -+#else -+ .drv = { -+ .name = "bluecard_cs", -+ }, -+#endif - .probe = bluecard_probe, - .remove = bluecard_detach, - .id_table = bluecard_ids, ---- a/drivers/bluetooth/bt3c_cs.c -+++ b/drivers/bluetooth/bt3c_cs.c -@@ -186,7 +186,11 @@ static void bt3c_write_wakeup(bt3c_info_ - return; - - do { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - register struct sk_buff *skb; - int len; - -@@ -224,7 +228,11 @@ static void bt3c_receive(bt3c_info_t *in - return; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - iobase = info->p_dev->resource[0]->start; -+#else -+ iobase = info->p_dev->io.BasePort1; -+#endif - - avail = bt3c_read(iobase, 0x7006); - //printk("bt3c_cs: receiving %d bytes\n", avail); -@@ -345,7 +353,11 @@ static irqreturn_t bt3c_interrupt(int ir - /* our irq handler is shared */ - return IRQ_NONE; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - iobase = info->p_dev->resource[0]->start; -+#else -+ iobase = info->p_dev->io.BasePort1; -+#endif - - spin_lock(&(info->lock)); - -@@ -473,7 +485,11 @@ static int bt3c_load_firmware(bt3c_info_ - unsigned int iobase, size, addr, fcs, tmp; - int i, err = 0; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - iobase = info->p_dev->resource[0]->start; -+#else -+ iobase = info->p_dev->io.BasePort1; -+#endif - - /* Reset */ - bt3c_io_write(iobase, 0x8040, 0x0404); -@@ -645,8 +661,27 @@ static int bt3c_probe(struct pcmcia_devi - info->p_dev = link; - link->priv = info; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | - CONF_AUTO_SET_IO; -+#else -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; -+ link->resource[0]->end = 8; -+#else -+ link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; -+ link->io.NumPorts1= 8; -+#endif -+ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; -+ -+ link->irq.Handler = bt3c_interrupt; -+#endif -+ -+ link->conf.Attributes = CONF_ENABLE_IRQ; -+ link->conf.IntType = INT_MEMORY_AND_IO; -+#endif - - return bt3c_config(link); - } -@@ -657,6 +692,7 @@ static void bt3c_detach(struct pcmcia_de - bt3c_release(link); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - static int bt3c_check_config(struct pcmcia_device *p_dev, void *priv_data) - { - int *try = priv_data; -@@ -695,6 +731,63 @@ static int bt3c_check_config_notpicky(st - } - return -ENODEV; - } -+#else -+static int bt3c_check_config(struct pcmcia_device *p_dev, -+ cistpl_cftable_entry_t *cf, -+ cistpl_cftable_entry_t *dflt, -+ unsigned int vcc, -+ void *priv_data) -+{ -+ unsigned long try = (unsigned long) priv_data; -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ p_dev->io_lines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK; -+#endif -+ -+ if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM)) -+ p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; -+ if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && -+ (cf->io.win[0].base != 0)) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ p_dev->resource[0]->start = cf->io.win[0].base; -+ if (!pcmcia_request_io(p_dev)) -+#else -+ p_dev->io.BasePort1 = cf->io.win[0].base; -+ p_dev->io.IOAddrLines = (try == 0) ? 16 : -+ cf->io.flags & CISTPL_IO_LINES_MASK; -+ if (!pcmcia_request_io(p_dev, &p_dev->io)) -+#endif -+ return 0; -+ } -+ return -ENODEV; -+} -+ -+static int bt3c_check_config_notpicky(struct pcmcia_device *p_dev, -+ cistpl_cftable_entry_t *cf, -+ cistpl_cftable_entry_t *dflt, -+ unsigned int vcc, -+ void *priv_data) -+{ -+ static unsigned int base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; -+ int j; -+ -+ if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { -+ for (j = 0; j < 5; j++) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ p_dev->resource[0]->start = base[j]; -+ p_dev->io_lines = base[j] ? 16 : 3; -+ if (!pcmcia_request_io(p_dev)) -+#else -+ p_dev->io.BasePort1 = base[j]; -+ p_dev->io.IOAddrLines = base[j] ? 16 : 3; -+ if (!pcmcia_request_io(p_dev, &p_dev->io)) -+#endif -+ return 0; -+ } -+ } -+ return -ENODEV; -+} -+#endif - - static int bt3c_config(struct pcmcia_device *link) - { -@@ -718,9 +811,15 @@ static int bt3c_config(struct pcmcia_dev - goto failed; - - found_port: -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - i = pcmcia_request_irq(link, &bt3c_interrupt); - if (i != 0) - goto failed; -+#else -+ i = pcmcia_request_irq(link, &link->irq); -+ if (i != 0) -+ link->irq.AssignedIRQ = 0; -+#endif - - i = pcmcia_enable_device(link); - if (i != 0) -@@ -755,7 +854,13 @@ MODULE_DEVICE_TABLE(pcmcia, bt3c_ids); - - static struct pcmcia_driver bt3c_driver = { - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - .name = "bt3c_cs", -+#else -+ .drv = { -+ .name = "bt3c_cs", -+ }, -+#endif - .probe = bt3c_probe, - .remove = bt3c_detach, - .id_table = bt3c_ids, ---- a/drivers/bluetooth/btuart_cs.c -+++ b/drivers/bluetooth/btuart_cs.c -@@ -140,7 +140,11 @@ static void btuart_write_wakeup(btuart_i - } - - do { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - register struct sk_buff *skb; - int len; - -@@ -181,7 +185,11 @@ static void btuart_receive(btuart_info_t - return; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - iobase = info->p_dev->resource[0]->start; -+#else -+ iobase = info->p_dev->io.BasePort1; -+#endif - - do { - info->hdev->stat.byte_rx++; -@@ -295,7 +303,11 @@ static irqreturn_t btuart_interrupt(int - /* our irq handler is shared */ - return IRQ_NONE; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - iobase = info->p_dev->resource[0]->start; -+#else -+ iobase = info->p_dev->io.BasePort1; -+#endif - - spin_lock(&(info->lock)); - -@@ -352,7 +364,11 @@ static void btuart_change_speed(btuart_i - return; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - iobase = info->p_dev->resource[0]->start; -+#else -+ iobase = info->p_dev->io.BasePort1; -+#endif - - spin_lock_irqsave(&(info->lock), flags); - -@@ -471,7 +487,11 @@ static int btuart_hci_ioctl(struct hci_d - static int btuart_open(btuart_info_t *info) - { - unsigned long flags; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - struct hci_dev *hdev; - - spin_lock_init(&(info->lock)); -@@ -538,7 +558,11 @@ static int btuart_open(btuart_info_t *in - static int btuart_close(btuart_info_t *info) - { - unsigned long flags; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - struct hci_dev *hdev = info->hdev; - - if (!hdev) -@@ -574,8 +598,27 @@ static int btuart_probe(struct pcmcia_de - info->p_dev = link; - link->priv = info; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | - CONF_AUTO_SET_IO; -+#else -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; -+ link->resource[0]->end = 8; -+#else -+ link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; -+ link->io.NumPorts1= 8; -+#endif -+ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; -+ -+ link->irq.Handler = btuart_interrupt; -+#endif -+ -+ link->conf.Attributes = CONF_ENABLE_IRQ; -+ link->conf.IntType = INT_MEMORY_AND_IO; -+#endif - - return btuart_config(link); - } -@@ -586,6 +629,7 @@ static void btuart_detach(struct pcmcia_ - btuart_release(link); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - static int btuart_check_config(struct pcmcia_device *p_dev, void *priv_data) - { - int *try = priv_data; -@@ -624,6 +668,63 @@ static int btuart_check_config_notpicky( - } - return -ENODEV; - } -+#else -+static int btuart_check_config(struct pcmcia_device *p_dev, -+ cistpl_cftable_entry_t *cf, -+ cistpl_cftable_entry_t *dflt, -+ unsigned int vcc, -+ void *priv_data) -+{ -+ int *try = priv_data; -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ p_dev->io_lines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK; -+#endif -+ -+ if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM)) -+ p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; -+ if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && -+ (cf->io.win[0].base != 0)) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ p_dev->resource[0]->start = cf->io.win[0].base; -+ if (!pcmcia_request_io(p_dev)) -+#else -+ p_dev->io.BasePort1 = cf->io.win[0].base; -+ p_dev->io.IOAddrLines = (*try == 0) ? 16 : -+ cf->io.flags & CISTPL_IO_LINES_MASK; -+ if (!pcmcia_request_io(p_dev, &p_dev->io)) -+#endif -+ return 0; -+ } -+ return -ENODEV; -+} -+ -+static int btuart_check_config_notpicky(struct pcmcia_device *p_dev, -+ cistpl_cftable_entry_t *cf, -+ cistpl_cftable_entry_t *dflt, -+ unsigned int vcc, -+ void *priv_data) -+{ -+ static unsigned int base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; -+ int j; -+ -+ if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { -+ for (j = 0; j < 5; j++) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ p_dev->resource[0]->start = base[j]; -+ p_dev->io_lines = base[j] ? 16 : 3; -+ if (!pcmcia_request_io(p_dev)) -+#else -+ p_dev->io.BasePort1 = base[j]; -+ p_dev->io.IOAddrLines = base[j] ? 16 : 3; -+ if (!pcmcia_request_io(p_dev, &p_dev->io)) -+#endif -+ return 0; -+ } -+ } -+ return -ENODEV; -+} -+#endif - - static int btuart_config(struct pcmcia_device *link) - { -@@ -647,9 +748,15 @@ static int btuart_config(struct pcmcia_d - goto failed; - - found_port: -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - i = pcmcia_request_irq(link, btuart_interrupt); - if (i != 0) - goto failed; -+#else -+ i = pcmcia_request_irq(link, &link->irq); -+ if (i != 0) -+ link->irq.AssignedIRQ = 0; -+#endif - - i = pcmcia_enable_device(link); - if (i != 0) -@@ -683,7 +790,13 @@ MODULE_DEVICE_TABLE(pcmcia, btuart_ids); - - static struct pcmcia_driver btuart_driver = { - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - .name = "btuart_cs", -+#else -+ .drv = { -+ .name = "btuart_cs", -+ }, -+#endif - .probe = btuart_probe, - .remove = btuart_detach, - .id_table = btuart_ids, ---- a/drivers/bluetooth/dtl1_cs.c -+++ b/drivers/bluetooth/dtl1_cs.c -@@ -144,7 +144,11 @@ static void dtl1_write_wakeup(dtl1_info_ - } - - do { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - register struct sk_buff *skb; - int len; - -@@ -209,7 +213,11 @@ static void dtl1_receive(dtl1_info_t *in - return; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - iobase = info->p_dev->resource[0]->start; -+#else -+ iobase = info->p_dev->io.BasePort1; -+#endif - - do { - info->hdev->stat.byte_rx++; -@@ -296,7 +304,11 @@ static irqreturn_t dtl1_interrupt(int ir - /* our irq handler is shared */ - return IRQ_NONE; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - iobase = info->p_dev->resource[0]->start; -+#else -+ iobase = info->p_dev->io.BasePort1; -+#endif - - spin_lock(&(info->lock)); - -@@ -451,7 +463,11 @@ static int dtl1_hci_ioctl(struct hci_dev - static int dtl1_open(dtl1_info_t *info) - { - unsigned long flags; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - struct hci_dev *hdev; - - spin_lock_init(&(info->lock)); -@@ -495,8 +511,13 @@ static int dtl1_open(dtl1_info_t *info) - outb(UART_LCR_WLEN8, iobase + UART_LCR); /* Reset DLAB */ - outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase + UART_MCR); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - info->ri_latch = inb(info->p_dev->resource[0]->start + UART_MSR) - & UART_MSR_RI; -+#else -+ info->ri_latch = inb(info->p_dev->io.BasePort1 + UART_MSR) -+ & UART_MSR_RI; -+#endif - - /* Turn on interrupts */ - outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER); -@@ -521,7 +542,11 @@ static int dtl1_open(dtl1_info_t *info) - static int dtl1_close(dtl1_info_t *info) - { - unsigned long flags; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - unsigned int iobase = info->p_dev->resource[0]->start; -+#else -+ unsigned int iobase = info->p_dev->io.BasePort1; -+#endif - struct hci_dev *hdev = info->hdev; - - if (!hdev) -@@ -557,7 +582,24 @@ static int dtl1_probe(struct pcmcia_devi - info->p_dev = link; - link->priv = info; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; -+#else -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; -+ link->resource[0]->end = 8; -+#else -+ link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; -+ link->io.NumPorts1= 8; -+#endif -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; -+ link->irq.Handler = dtl1_interrupt; -+#endif -+ -+ link->conf.Attributes = CONF_ENABLE_IRQ; -+ link->conf.IntType = INT_MEMORY_AND_IO; -+#endif - - return dtl1_config(link); - } -@@ -571,6 +613,7 @@ static void dtl1_detach(struct pcmcia_de - pcmcia_disable_device(link); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data) - { - if ((p_dev->resource[1]->end) || (p_dev->resource[1]->end < 8)) -@@ -581,6 +624,29 @@ static int dtl1_confcheck(struct pcmcia_ - - return pcmcia_request_io(p_dev); - } -+#else -+static int dtl1_confcheck(struct pcmcia_device *p_dev, -+ cistpl_cftable_entry_t *cf, -+ cistpl_cftable_entry_t *dflt, -+ unsigned int vcc, -+ void *priv_data) -+{ -+ if ((cf->io.nwin != 1) || (cf->io.win[0].len <= 8)) -+ return -ENODEV; -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ p_dev->resource[0]->start = cf->io.win[0].base; -+ p_dev->resource[0]->end = cf->io.win[0].len; /*yo */ -+ p_dev->io_lines = cf->io.flags & CISTPL_IO_LINES_MASK; -+ return pcmcia_request_io(p_dev); -+#else -+ p_dev->io.BasePort1 = cf->io.win[0].base; -+ p_dev->io.NumPorts1 = cf->io.win[0].len; /*yo */ -+ p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; -+ return pcmcia_request_io(p_dev, &p_dev->io); -+#endif -+} -+#endif - - static int dtl1_config(struct pcmcia_device *link) - { -@@ -588,14 +654,24 @@ static int dtl1_config(struct pcmcia_dev - int ret; - - /* Look for a generic full-sized window */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - link->resource[0]->end = 8; -+#else -+ link->io.NumPorts1 = 8; -+#endif - ret = pcmcia_loop_config(link, dtl1_confcheck, NULL); - if (ret) - goto failed; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - ret = pcmcia_request_irq(link, dtl1_interrupt); - if (ret) - goto failed; -+#else -+ ret = pcmcia_request_irq(link, &link->irq); -+ if (ret != 0) -+ link->irq.AssignedIRQ = 0; -+#endif - - ret = pcmcia_enable_device(link); - if (ret) -@@ -623,7 +699,13 @@ MODULE_DEVICE_TABLE(pcmcia, dtl1_ids); - - static struct pcmcia_driver dtl1_driver = { - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - .name = "dtl1_cs", -+#else -+ .drv = { -+ .name = "dtl1_cs", -+ }, -+#endif - .probe = dtl1_probe, - .remove = dtl1_detach, - .id_table = dtl1_ids, ---- a/drivers/net/wireless/b43/pcmcia.c -+++ b/drivers/net/wireless/b43/pcmcia.c -@@ -63,6 +63,9 @@ static int b43_pcmcia_resume(struct pcmc - static int b43_pcmcia_probe(struct pcmcia_device *dev) - { - struct ssb_bus *ssb; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) -+ win_req_t win; -+#endif - int err = -ENOMEM; - int res = 0; - -@@ -72,6 +75,7 @@ static int b43_pcmcia_probe(struct pcmci - - err = -ENODEV; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - dev->config_flags |= CONF_ENABLE_IRQ; - - dev->resource[2]->flags |= WIN_ENABLE | WIN_DATA_WIDTH_16 | -@@ -79,21 +83,46 @@ static int b43_pcmcia_probe(struct pcmci - dev->resource[2]->start = 0; - dev->resource[2]->end = SSB_CORE_SIZE; - res = pcmcia_request_window(dev, dev->resource[2], 250); -+#else -+ dev->conf.Attributes = CONF_ENABLE_IRQ; -+ dev->conf.IntType = INT_MEMORY_AND_IO; -+ -+ win.Attributes = WIN_ENABLE | WIN_DATA_WIDTH_16 | -+ WIN_USE_WAIT; -+ win.Base = 0; -+ win.Size = SSB_CORE_SIZE; -+ win.AccessSpeed = 250; -+ res = pcmcia_request_window(dev, &win, &dev->win); -+#endif - if (res != 0) - goto err_kfree_ssb; -- -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - res = pcmcia_map_mem_page(dev, dev->resource[2], 0); -+#else -+ res = pcmcia_map_mem_page(dev, dev->win, 0); -+#endif - if (res != 0) - goto err_disable; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - if (!dev->irq) -+#else -+ dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; -+ dev->irq.Handler = NULL; /* The handler is registered later. */ -+ res = pcmcia_request_irq(dev, &dev->irq); -+ if (res != 0) -+#endif - goto err_disable; - - res = pcmcia_enable_device(dev); - if (res != 0) - goto err_disable; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - err = ssb_bus_pcmciabus_register(ssb, dev, dev->resource[2]->start); -+#else -+ err = ssb_bus_pcmciabus_register(ssb, dev, win.Base); -+#endif - if (err) - goto err_disable; - dev->priv = ssb; -@@ -122,7 +151,13 @@ static void b43_pcmcia_remove(struct pcm - - static struct pcmcia_driver b43_pcmcia_driver = { - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - .name = "b43-pcmcia", -+#else -+ .drv = { -+ .name = "b43-pcmcia", -+ }, -+#endif - .id_table = b43_pcmcia_tbl, - .probe = b43_pcmcia_probe, - .remove = b43_pcmcia_remove, ---- a/drivers/net/wireless/libertas/if_cs.c -+++ b/drivers/net/wireless/libertas/if_cs.c -@@ -757,7 +757,11 @@ static void if_cs_prog_firmware(struct l - goto out; - - /* Now actually get the IRQ */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - ret = request_irq(card->p_dev->irq, if_cs_interrupt, -+#else -+ ret = request_irq(card->p_dev->irq.AssignedIRQ, if_cs_interrupt, -+#endif - IRQF_SHARED, DRV_NAME, card); - if (ret) { - pr_err("error in request_irq\n"); -@@ -775,7 +779,11 @@ static void if_cs_prog_firmware(struct l - priv->fw_ready = 1; - if (lbs_start_card(priv) != 0) { - pr_err("could not activate card\n"); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - free_irq(card->p_dev->irq, card); -+#else -+ free_irq(card->p_dev->irq.AssignedIRQ, card); -+#endif - } - - out: -@@ -824,7 +832,11 @@ static void if_cs_release(struct pcmcia_ - - lbs_deb_enter(LBS_DEB_CS); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - free_irq(p_dev->irq, card); -+#else -+ free_irq(p_dev->irq.AssignedIRQ, card); -+#endif - pcmcia_disable_device(p_dev); - if (card->iobase) - ioport_unmap(card->iobase); -@@ -832,7 +844,7 @@ static void if_cs_release(struct pcmcia_ - lbs_deb_leave(LBS_DEB_CS); - } - -- -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data) - { - p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; -@@ -842,9 +854,39 @@ static int if_cs_ioprobe(struct pcmcia_d - pr_err("wrong CIS (check number of IO windows)\n"); - return -ENODEV; - } -+#else -+static int if_cs_ioprobe(struct pcmcia_device *p_dev, -+ cistpl_cftable_entry_t *cfg, -+ cistpl_cftable_entry_t *dflt, -+ unsigned int vcc, -+ void *priv_data) -+{ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -+ p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; -+ p_dev->resource[0]->start = cfg->io.win[0].base; -+ p_dev->resource[0]->end = cfg->io.win[0].len; -+#else -+ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; -+ p_dev->io.BasePort1 = cfg->io.win[0].base; -+ p_dev->io.NumPorts1 = cfg->io.win[0].len; -+#endif -+ -+ /* Do we need to allocate an interrupt? */ -+ p_dev->conf.Attributes |= CONF_ENABLE_IRQ; -+ -+ /* IO window settings */ -+ if (cfg->io.nwin != 1) { -+ pr_err("wrong CIS (check number of IO windows)\n"); -+ return -ENODEV; -+ } -+#endif - - /* This reserves IO space but doesn't actually enable it */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - return pcmcia_request_io(p_dev); -+#else -+ return pcmcia_request_io(p_dev, &p_dev->io); -+#endif - } - - static int if_cs_probe(struct pcmcia_device *p_dev) -@@ -863,7 +905,16 @@ static int if_cs_probe(struct pcmcia_dev - card->p_dev = p_dev; - p_dev->priv = card; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; -+#else -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+ p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; -+ p_dev->irq.Handler = NULL; -+#endif -+ p_dev->conf.Attributes = 0; -+ p_dev->conf.IntType = INT_MEMORY_AND_IO; -+#endif - - if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) { - pr_err("error in pcmcia_loop_config\n"); -@@ -875,12 +926,26 @@ static int if_cs_probe(struct pcmcia_dev - * a handler to the interrupt, unless the 'Handler' member of - * the irq structure is initialized. - */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - if (!p_dev->irq) - goto out1; -+#else -+ if (p_dev->conf.Attributes & CONF_ENABLE_IRQ) { -+ ret = pcmcia_request_irq(p_dev, &p_dev->irq); -+ if (ret) { -+ pr_err("error in pcmcia_request_irq\n"); -+ goto out1; -+ } -+ } -+#endif - - /* Initialize io access */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - card->iobase = ioport_map(p_dev->resource[0]->start, - resource_size(p_dev->resource[0])); -+#else -+ card->iobase = ioport_map(p_dev->io.BasePort1, p_dev->io.NumPorts1); -+#endif - if (!card->iobase) { - pr_err("error in ioport_map\n"); - ret = -EIO; -@@ -894,7 +959,17 @@ static int if_cs_probe(struct pcmcia_dev - } - - /* Finally, report what we've done */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - lbs_deb_cs("irq %d, io %pR", p_dev->irq, p_dev->resource[0]); -+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) -+ lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n", -+ p_dev->irq, p_dev->io.BasePort1, -+ p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1); -+#else -+ lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n", -+ p_dev->irq.AssignedIRQ, p_dev->io.BasePort1, -+ p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1); -+#endif - - /* - * Most of the libertas cards can do unaligned register access, but some -@@ -1001,7 +1076,13 @@ MODULE_DEVICE_TABLE(pcmcia, if_cs_ids); - - static struct pcmcia_driver lbs_driver = { - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - .name = DRV_NAME, -+#else -+ .drv = { -+ .name = DRV_NAME, -+ }, -+#endif - .probe = if_cs_probe, - .remove = if_cs_detach, - .id_table = if_cs_ids, ---- a/drivers/net/wireless/orinoco/orinoco_cs.c -+++ b/drivers/net/wireless/orinoco/orinoco_cs.c -@@ -78,7 +78,11 @@ orinoco_cs_hard_reset(struct orinoco_pri - /* We need atomic ops here, because we're not holding the lock */ - set_bit(0, &card->hard_reset_in_progress); - -+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27) -+ err = pcmcia_reset_card(link, NULL); -+#else - err = pcmcia_reset_card(link->socket); -+#endif - if (err) - return err; - -@@ -108,6 +112,16 @@ orinoco_cs_probe(struct pcmcia_device *l - card->p_dev = link; - link->priv = priv; - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+ /* Interrupt setup */ -+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; -+ link->irq.Handler = orinoco_interrupt; -+#endif -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) -+ link->conf.Attributes = 0; -+ link->conf.IntType = INT_MEMORY_AND_IO; -+#endif -+ - return orinoco_cs_config(link); - } /* orinoco_cs_attach */ - -@@ -122,6 +136,7 @@ static void orinoco_cs_detach(struct pcm - free_orinocodev(priv); - } /* orinoco_cs_detach */ - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - static int orinoco_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) - { - if (p_dev->config_index == 0) -@@ -129,6 +144,98 @@ static int orinoco_cs_config_check(struc - - return pcmcia_request_io(p_dev); - }; -+#else -+static int orinoco_cs_config_check(struct pcmcia_device *p_dev, -+ cistpl_cftable_entry_t *cfg, -+ cistpl_cftable_entry_t *dflt, -+ unsigned int vcc, -+ void *priv_data) -+{ -+ if (cfg->index == 0) -+ goto next_entry; -+ -+ /* Use power settings for Vcc and Vpp if present */ -+ /* Note that the CIS values need to be rescaled */ -+ if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { -+ if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000) { -+ DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", -+ __func__, vcc, -+ cfg->vcc.param[CISTPL_POWER_VNOM] / 10000); -+ if (!ignore_cis_vcc) -+ goto next_entry; -+ } -+ } else if (dflt->vcc.present & (1 << CISTPL_POWER_VNOM)) { -+ if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM] / 10000) { -+ DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", -+ __func__, vcc, -+ dflt->vcc.param[CISTPL_POWER_VNOM] / 10000); -+ if (!ignore_cis_vcc) -+ goto next_entry; -+ } -+ } -+ -+ if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) -+ p_dev->conf.Vpp = -+ cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; -+ else if (dflt->vpp1.present & (1 << CISTPL_POWER_VNOM)) -+ p_dev->conf.Vpp = -+ dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; -+ -+ /* Do we need to allocate an interrupt? */ -+ p_dev->conf.Attributes |= CONF_ENABLE_IRQ; -+ -+ /* IO window settings */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+ p_dev->resource[0]->end = p_dev->resource[1]->end = 0; -+#else -+ p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; -+#endif -+ if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { -+ cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+ p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; -+ p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; -+ p_dev->resource[0]->flags |= -+ pcmcia_io_cfg_data_width(io->flags); -+ p_dev->resource[0]->start = io->win[0].base; -+ p_dev->resource[0]->end = io->win[0].len; -+#else -+ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; -+ if (!(io->flags & CISTPL_IO_8BIT)) -+ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; -+ if (!(io->flags & CISTPL_IO_16BIT)) -+ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; -+ p_dev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; -+ p_dev->io.BasePort1 = io->win[0].base; -+ p_dev->io.NumPorts1 = io->win[0].len; -+#endif -+ if (io->nwin > 1) { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+ p_dev->resource[1]->flags = p_dev->resource[0]->flags; -+ p_dev->resource[1]->start = io->win[1].base; -+ p_dev->resource[1]->end = io->win[1].len; -+#else -+ p_dev->io.Attributes2 = p_dev->io.Attributes1; -+ p_dev->io.BasePort2 = io->win[1].base; -+ p_dev->io.NumPorts2 = io->win[1].len; -+#endif -+ } -+ -+ /* This reserves IO space but doesn't actually enable it */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+ if (pcmcia_request_io(p_dev) != 0) -+#else -+ if (pcmcia_request_io(p_dev, &p_dev->io) != 0) -+#endif -+ goto next_entry; -+ } -+ return 0; -+ -+next_entry: -+ pcmcia_disable_device(p_dev); -+ return -ENODEV; -+}; -+#endif - - static int - orinoco_cs_config(struct pcmcia_device *link) -@@ -138,10 +245,12 @@ orinoco_cs_config(struct pcmcia_device * - int ret; - void __iomem *mem; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC | - CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; - if (ignore_cis_vcc) - link->config_flags &= ~CONF_AUTO_CHECK_VCC; -+#endif - ret = pcmcia_loop_config(link, orinoco_cs_config_check, NULL); - if (ret) { - if (!ignore_cis_vcc) -@@ -151,8 +260,12 @@ orinoco_cs_config(struct pcmcia_device * - goto failed; - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) - mem = ioport_map(link->resource[0]->start, - resource_size(link->resource[0])); -+#else -+ mem = ioport_map(link->io.BasePort1, link->io.NumPorts1); -+#endif - if (!mem) - goto failed; - -@@ -161,7 +274,11 @@ orinoco_cs_config(struct pcmcia_device * - * called. */ - hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - ret = pcmcia_request_irq(link, orinoco_interrupt); -+#else -+ ret = pcmcia_request_irq(link, &link->irq); -+#endif - if (ret) - goto failed; - -@@ -176,8 +293,16 @@ orinoco_cs_config(struct pcmcia_device * - } - - /* Register an interface with the stack */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - if (orinoco_if_add(priv, link->resource[0]->start, - link->irq, NULL) != 0) { -+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) -+ if (orinoco_if_add(priv, link->io.BasePort1, -+ link->irq, NULL) != 0) { -+#else -+ if (orinoco_if_add(priv, link->io.BasePort1, -+ link->irq.AssignedIRQ, NULL) != 0) { -+#endif - printk(KERN_ERR PFX "orinoco_if_add() failed\n"); - goto failed; - } -@@ -331,7 +456,13 @@ MODULE_DEVICE_TABLE(pcmcia, orinoco_cs_i - - static struct pcmcia_driver orinoco_driver = { - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - .name = DRIVER_NAME, -+#else -+ .drv = { -+ .name = DRIVER_NAME, -+ }, -+#endif - .probe = orinoco_cs_probe, - .remove = orinoco_cs_detach, - .id_table = orinoco_cs_ids, ---- a/drivers/net/wireless/orinoco/spectrum_cs.c -+++ b/drivers/net/wireless/orinoco/spectrum_cs.c -@@ -170,6 +170,16 @@ spectrum_cs_probe(struct pcmcia_device * - card->p_dev = link; - link->priv = priv; - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+ /* Interrupt setup */ -+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; -+ link->irq.Handler = orinoco_interrupt; -+#endif -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) -+ link->conf.Attributes = 0; -+ link->conf.IntType = INT_MEMORY_AND_IO; -+#endif -+ - return spectrum_cs_config(link); - } /* spectrum_cs_attach */ - -@@ -184,6 +194,7 @@ static void spectrum_cs_detach(struct pc - free_orinocodev(priv); - } /* spectrum_cs_detach */ - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - static int spectrum_cs_config_check(struct pcmcia_device *p_dev, - void *priv_data) - { -@@ -192,6 +203,98 @@ static int spectrum_cs_config_check(stru - - return pcmcia_request_io(p_dev); - }; -+#else -+static int spectrum_cs_config_check(struct pcmcia_device *p_dev, -+ cistpl_cftable_entry_t *cfg, -+ cistpl_cftable_entry_t *dflt, -+ unsigned int vcc, -+ void *priv_data) -+{ -+ if (cfg->index == 0) -+ goto next_entry; -+ -+ /* Use power settings for Vcc and Vpp if present */ -+ /* Note that the CIS values need to be rescaled */ -+ if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { -+ if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000) { -+ DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", -+ __func__, vcc, -+ cfg->vcc.param[CISTPL_POWER_VNOM] / 10000); -+ if (!ignore_cis_vcc) -+ goto next_entry; -+ } -+ } else if (dflt->vcc.present & (1 << CISTPL_POWER_VNOM)) { -+ if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM] / 10000) { -+ DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", -+ __func__, vcc, -+ dflt->vcc.param[CISTPL_POWER_VNOM] / 10000); -+ if (!ignore_cis_vcc) -+ goto next_entry; -+ } -+ } -+ -+ if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) -+ p_dev->conf.Vpp = -+ cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; -+ else if (dflt->vpp1.present & (1 << CISTPL_POWER_VNOM)) -+ p_dev->conf.Vpp = -+ dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; -+ -+ /* Do we need to allocate an interrupt? */ -+ p_dev->conf.Attributes |= CONF_ENABLE_IRQ; -+ -+ /* IO window settings */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+ p_dev->resource[0]->end = p_dev->resource[1]->end = 0; -+#else -+ p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; -+#endif -+ if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { -+ cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+ p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; -+ p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; -+ p_dev->resource[0]->flags |= -+ pcmcia_io_cfg_data_width(io->flags); -+ p_dev->resource[0]->start = io->win[0].base; -+ p_dev->resource[0]->end = io->win[0].len; -+#else -+ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; -+ if (!(io->flags & CISTPL_IO_8BIT)) -+ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; -+ if (!(io->flags & CISTPL_IO_16BIT)) -+ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; -+ p_dev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; -+ p_dev->io.BasePort1 = io->win[0].base; -+ p_dev->io.NumPorts1 = io->win[0].len; -+#endif -+ if (io->nwin > 1) { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+ p_dev->resource[1]->flags = p_dev->resource[0]->flags; -+ p_dev->resource[1]->start = io->win[1].base; -+ p_dev->resource[1]->end = io->win[1].len; -+#else -+ p_dev->io.Attributes2 = p_dev->io.Attributes1; -+ p_dev->io.BasePort2 = io->win[1].base; -+ p_dev->io.NumPorts2 = io->win[1].len; -+#endif -+ } -+ -+ /* This reserves IO space but doesn't actually enable it */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -+ if (pcmcia_request_io(p_dev) != 0) -+#else -+ if (pcmcia_request_io(p_dev, &p_dev->io) != 0) -+#endif -+ goto next_entry; -+ } -+ return 0; -+ -+next_entry: -+ pcmcia_disable_device(p_dev); -+ return -ENODEV; -+}; -+#endif - - static int - spectrum_cs_config(struct pcmcia_device *link) -@@ -201,10 +304,12 @@ spectrum_cs_config(struct pcmcia_device - int ret; - void __iomem *mem; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC | - CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; - if (ignore_cis_vcc) - link->config_flags &= ~CONF_AUTO_CHECK_VCC; -+#endif - ret = pcmcia_loop_config(link, spectrum_cs_config_check, NULL); - if (ret) { - if (!ignore_cis_vcc) -@@ -214,8 +319,12 @@ spectrum_cs_config(struct pcmcia_device - goto failed; - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) - mem = ioport_map(link->resource[0]->start, - resource_size(link->resource[0])); -+#else -+ mem = ioport_map(link->io.BasePort1, link->io.NumPorts1); -+#endif - if (!mem) - goto failed; - -@@ -225,7 +334,11 @@ spectrum_cs_config(struct pcmcia_device - hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); - hw->eeprom_pda = true; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - ret = pcmcia_request_irq(link, orinoco_interrupt); -+#else -+ ret = pcmcia_request_irq(link, &link->irq); -+#endif - if (ret) - goto failed; - -@@ -244,8 +357,16 @@ spectrum_cs_config(struct pcmcia_device - } - - /* Register an interface with the stack */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - if (orinoco_if_add(priv, link->resource[0]->start, - link->irq, NULL) != 0) { -+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) -+ if (orinoco_if_add(priv, link->io.BasePort1, -+ link->irq, NULL) != 0) { -+#else -+ if (orinoco_if_add(priv, link->io.BasePort1, -+ link->irq.AssignedIRQ, NULL) != 0) { -+#endif - printk(KERN_ERR PFX "orinoco_if_add() failed\n"); - goto failed; - } -@@ -311,7 +432,13 @@ MODULE_DEVICE_TABLE(pcmcia, spectrum_cs_ - - static struct pcmcia_driver orinoco_driver = { - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - .name = DRIVER_NAME, -+#else -+ .drv = { -+ .name = DRIVER_NAME, -+ }, -+#endif - .probe = spectrum_cs_probe, - .remove = spectrum_cs_detach, - .suspend = spectrum_cs_suspend, ---- a/drivers/ssb/main.c -+++ b/drivers/ssb/main.c -@@ -517,7 +517,11 @@ static int ssb_devices_register(struct s - break; - case SSB_BUSTYPE_PCMCIA: - #ifdef CONFIG_SSB_PCMCIAHOST -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - sdev->irq = bus->host_pcmcia->irq; -+#else -+ sdev->irq = bus->host_pcmcia->irq.AssignedIRQ; -+#endif - dev->parent = &bus->host_pcmcia->dev; - #endif - break; diff --git a/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_bluecard_cs.c b/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_bluecard_cs.c new file mode 100644 index 000000000000..23b80895660c --- /dev/null +++ b/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_bluecard_cs.c @@ -0,0 +1,191 @@ +--- a/drivers/bluetooth/bluecard_cs.c ++++ b/drivers/bluetooth/bluecard_cs.c +@@ -158,7 +158,12 @@ + static void bluecard_activity_led_timeout(u_long arg) + { + bluecard_info_t *info = (bluecard_info_t *)arg; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif ++ + + if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) + return; +@@ -175,7 +180,11 @@ + + static void bluecard_enable_activity_led(bluecard_info_t *info) + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + + if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) + return; +@@ -231,7 +240,11 @@ + } + + do { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + unsigned int offset; + unsigned char command; + unsigned long ready_bit; +@@ -378,7 +391,11 @@ + return; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + iobase = info->p_dev->resource[0]->start; ++#else ++ iobase = info->p_dev->io.BasePort1; ++#endif + + if (test_bit(XMIT_SENDING_READY, &(info->tx_state))) + bluecard_enable_activity_led(info); +@@ -507,7 +524,11 @@ + if (!test_bit(CARD_READY, &(info->hw_state))) + return IRQ_HANDLED; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + iobase = info->p_dev->resource[0]->start; ++#else ++ iobase = info->p_dev->io.BasePort1; ++#endif + + spin_lock(&(info->lock)); + +@@ -629,7 +650,11 @@ + return 0; + + if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + + /* Enable LED */ + outb(0x08 | 0x20, iobase + 0x30); +@@ -649,7 +674,11 @@ + bluecard_hci_flush(hdev); + + if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + + /* Disable LED */ + outb(0x00, iobase + 0x30); +@@ -705,7 +734,11 @@ + + static int bluecard_open(bluecard_info_t *info) + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + struct hci_dev *hdev; + unsigned char id; + +@@ -821,7 +854,11 @@ + + static int bluecard_close(bluecard_info_t *info) + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + struct hci_dev *hdev = info->hdev; + + if (!hdev) +@@ -856,7 +893,18 @@ + info->p_dev = link; + link->priv = info; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; ++ ++ link->irq.Handler = bluecard_interrupt; ++#endif ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + link->config_flags |= CONF_ENABLE_IRQ; ++#else ++ link->conf.Attributes = CONF_ENABLE_IRQ; ++ link->conf.IntType = INT_MEMORY_AND_IO; ++#endif + + return bluecard_config(link); + } +@@ -873,15 +921,30 @@ + bluecard_info_t *info = link->priv; + int i, n; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + link->config_index = 0x20; ++#else ++ link->conf.ConfigIndex = 0x20; ++#endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; + link->resource[0]->end = 64; + link->io_lines = 6; ++#else ++ link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; ++ link->io.NumPorts1 = 64; ++ link->io.IOAddrLines = 6; ++#endif + + for (n = 0; n < 0x400; n += 0x40) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + link->resource[0]->start = n ^ 0x300; + i = pcmcia_request_io(link); ++#else ++ link->io.BasePort1 = n ^ 0x300; ++ i = pcmcia_request_io(link, &link->io); ++#endif + if (i == 0) + break; + } +@@ -889,9 +952,15 @@ + if (i != 0) + goto failed; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + i = pcmcia_request_irq(link, bluecard_interrupt); + if (i != 0) + goto failed; ++#else ++ i = pcmcia_request_irq(link, &link->irq); ++ if (i != 0) ++ link->irq.AssignedIRQ = 0; ++#endif + + i = pcmcia_enable_device(link); + if (i != 0) +@@ -929,7 +998,13 @@ + + static struct pcmcia_driver bluecard_driver = { + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + .name = "bluecard_cs", ++#else ++ .drv = { ++ .name = "bluecard_cs", ++ }, ++#endif + .probe = bluecard_probe, + .remove = bluecard_detach, + .id_table = bluecard_ids, diff --git a/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_bt3c_cs.c b/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_bt3c_cs.c new file mode 100644 index 000000000000..ac7ef633dff1 --- /dev/null +++ b/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_bt3c_cs.c @@ -0,0 +1,180 @@ +--- a/drivers/bluetooth/bt3c_cs.c ++++ b/drivers/bluetooth/bt3c_cs.c +@@ -186,7 +186,11 @@ + return; + + do { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + register struct sk_buff *skb; + int len; + +@@ -224,7 +228,11 @@ + return; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + iobase = info->p_dev->resource[0]->start; ++#else ++ iobase = info->p_dev->io.BasePort1; ++#endif + + avail = bt3c_read(iobase, 0x7006); + //printk("bt3c_cs: receiving %d bytes\n", avail); +@@ -345,7 +353,11 @@ + /* our irq handler is shared */ + return IRQ_NONE; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + iobase = info->p_dev->resource[0]->start; ++#else ++ iobase = info->p_dev->io.BasePort1; ++#endif + + spin_lock(&(info->lock)); + +@@ -473,7 +485,11 @@ + unsigned int iobase, size, addr, fcs, tmp; + int i, err = 0; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + iobase = info->p_dev->resource[0]->start; ++#else ++ iobase = info->p_dev->io.BasePort1; ++#endif + + /* Reset */ + bt3c_io_write(iobase, 0x8040, 0x0404); +@@ -645,8 +661,27 @@ + info->p_dev = link; + link->priv = info; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | + CONF_AUTO_SET_IO; ++#else ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; ++ link->resource[0]->end = 8; ++#else ++ link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; ++ link->io.NumPorts1= 8; ++#endif ++ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; ++ ++ link->irq.Handler = bt3c_interrupt; ++#endif ++ ++ link->conf.Attributes = CONF_ENABLE_IRQ; ++ link->conf.IntType = INT_MEMORY_AND_IO; ++#endif + + return bt3c_config(link); + } +@@ -657,6 +692,7 @@ + bt3c_release(link); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + static int bt3c_check_config(struct pcmcia_device *p_dev, void *priv_data) + { + int *try = priv_data; +@@ -695,6 +731,63 @@ + } + return -ENODEV; + } ++#else ++static int bt3c_check_config(struct pcmcia_device *p_dev, ++ cistpl_cftable_entry_t *cf, ++ cistpl_cftable_entry_t *dflt, ++ unsigned int vcc, ++ void *priv_data) ++{ ++ unsigned long try = (unsigned long) priv_data; ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ p_dev->io_lines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK; ++#endif ++ ++ if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM)) ++ p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; ++ if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && ++ (cf->io.win[0].base != 0)) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ p_dev->resource[0]->start = cf->io.win[0].base; ++ if (!pcmcia_request_io(p_dev)) ++#else ++ p_dev->io.BasePort1 = cf->io.win[0].base; ++ p_dev->io.IOAddrLines = (try == 0) ? 16 : ++ cf->io.flags & CISTPL_IO_LINES_MASK; ++ if (!pcmcia_request_io(p_dev, &p_dev->io)) ++#endif ++ return 0; ++ } ++ return -ENODEV; ++} ++ ++static int bt3c_check_config_notpicky(struct pcmcia_device *p_dev, ++ cistpl_cftable_entry_t *cf, ++ cistpl_cftable_entry_t *dflt, ++ unsigned int vcc, ++ void *priv_data) ++{ ++ static unsigned int base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; ++ int j; ++ ++ if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { ++ for (j = 0; j < 5; j++) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ p_dev->resource[0]->start = base[j]; ++ p_dev->io_lines = base[j] ? 16 : 3; ++ if (!pcmcia_request_io(p_dev)) ++#else ++ p_dev->io.BasePort1 = base[j]; ++ p_dev->io.IOAddrLines = base[j] ? 16 : 3; ++ if (!pcmcia_request_io(p_dev, &p_dev->io)) ++#endif ++ return 0; ++ } ++ } ++ return -ENODEV; ++} ++#endif + + static int bt3c_config(struct pcmcia_device *link) + { +@@ -718,9 +811,15 @@ + goto failed; + + found_port: ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + i = pcmcia_request_irq(link, &bt3c_interrupt); + if (i != 0) + goto failed; ++#else ++ i = pcmcia_request_irq(link, &link->irq); ++ if (i != 0) ++ link->irq.AssignedIRQ = 0; ++#endif + + i = pcmcia_enable_device(link); + if (i != 0) +@@ -755,7 +854,13 @@ + + static struct pcmcia_driver bt3c_driver = { + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + .name = "bt3c_cs", ++#else ++ .drv = { ++ .name = "bt3c_cs", ++ }, ++#endif + .probe = bt3c_probe, + .remove = bt3c_detach, + .id_table = bt3c_ids, diff --git a/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_btuart_cs.c b/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_btuart_cs.c new file mode 100644 index 000000000000..56b25bd702d3 --- /dev/null +++ b/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_btuart_cs.c @@ -0,0 +1,204 @@ +--- a/drivers/bluetooth/btuart_cs.c ++++ b/drivers/bluetooth/btuart_cs.c +@@ -140,7 +140,11 @@ + } + + do { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + register struct sk_buff *skb; + int len; + +@@ -181,7 +185,11 @@ + return; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + iobase = info->p_dev->resource[0]->start; ++#else ++ iobase = info->p_dev->io.BasePort1; ++#endif + + do { + info->hdev->stat.byte_rx++; +@@ -295,7 +303,11 @@ + /* our irq handler is shared */ + return IRQ_NONE; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + iobase = info->p_dev->resource[0]->start; ++#else ++ iobase = info->p_dev->io.BasePort1; ++#endif + + spin_lock(&(info->lock)); + +@@ -352,7 +364,11 @@ + return; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + iobase = info->p_dev->resource[0]->start; ++#else ++ iobase = info->p_dev->io.BasePort1; ++#endif + + spin_lock_irqsave(&(info->lock), flags); + +@@ -471,7 +487,11 @@ + static int btuart_open(btuart_info_t *info) + { + unsigned long flags; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + struct hci_dev *hdev; + + spin_lock_init(&(info->lock)); +@@ -538,7 +558,11 @@ + static int btuart_close(btuart_info_t *info) + { + unsigned long flags; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + struct hci_dev *hdev = info->hdev; + + if (!hdev) +@@ -574,8 +598,27 @@ + info->p_dev = link; + link->priv = info; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | + CONF_AUTO_SET_IO; ++#else ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; ++ link->resource[0]->end = 8; ++#else ++ link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; ++ link->io.NumPorts1= 8; ++#endif ++ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; ++ ++ link->irq.Handler = btuart_interrupt; ++#endif ++ ++ link->conf.Attributes = CONF_ENABLE_IRQ; ++ link->conf.IntType = INT_MEMORY_AND_IO; ++#endif + + return btuart_config(link); + } +@@ -586,6 +629,7 @@ + btuart_release(link); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + static int btuart_check_config(struct pcmcia_device *p_dev, void *priv_data) + { + int *try = priv_data; +@@ -624,6 +668,63 @@ + } + return -ENODEV; + } ++#else ++static int btuart_check_config(struct pcmcia_device *p_dev, ++ cistpl_cftable_entry_t *cf, ++ cistpl_cftable_entry_t *dflt, ++ unsigned int vcc, ++ void *priv_data) ++{ ++ int *try = priv_data; ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ p_dev->io_lines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK; ++#endif ++ ++ if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM)) ++ p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; ++ if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && ++ (cf->io.win[0].base != 0)) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ p_dev->resource[0]->start = cf->io.win[0].base; ++ if (!pcmcia_request_io(p_dev)) ++#else ++ p_dev->io.BasePort1 = cf->io.win[0].base; ++ p_dev->io.IOAddrLines = (*try == 0) ? 16 : ++ cf->io.flags & CISTPL_IO_LINES_MASK; ++ if (!pcmcia_request_io(p_dev, &p_dev->io)) ++#endif ++ return 0; ++ } ++ return -ENODEV; ++} ++ ++static int btuart_check_config_notpicky(struct pcmcia_device *p_dev, ++ cistpl_cftable_entry_t *cf, ++ cistpl_cftable_entry_t *dflt, ++ unsigned int vcc, ++ void *priv_data) ++{ ++ static unsigned int base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; ++ int j; ++ ++ if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { ++ for (j = 0; j < 5; j++) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ p_dev->resource[0]->start = base[j]; ++ p_dev->io_lines = base[j] ? 16 : 3; ++ if (!pcmcia_request_io(p_dev)) ++#else ++ p_dev->io.BasePort1 = base[j]; ++ p_dev->io.IOAddrLines = base[j] ? 16 : 3; ++ if (!pcmcia_request_io(p_dev, &p_dev->io)) ++#endif ++ return 0; ++ } ++ } ++ return -ENODEV; ++} ++#endif + + static int btuart_config(struct pcmcia_device *link) + { +@@ -647,9 +748,15 @@ + goto failed; + + found_port: ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + i = pcmcia_request_irq(link, btuart_interrupt); + if (i != 0) + goto failed; ++#else ++ i = pcmcia_request_irq(link, &link->irq); ++ if (i != 0) ++ link->irq.AssignedIRQ = 0; ++#endif + + i = pcmcia_enable_device(link); + if (i != 0) +@@ -683,7 +790,13 @@ + + static struct pcmcia_driver btuart_driver = { + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + .name = "btuart_cs", ++#else ++ .drv = { ++ .name = "btuart_cs", ++ }, ++#endif + .probe = btuart_probe, + .remove = btuart_detach, + .id_table = btuart_ids, diff --git a/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_dtl1_cs.c b/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_dtl1_cs.c new file mode 100644 index 000000000000..26e06b9b8da8 --- /dev/null +++ b/patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_dtl1_cs.c @@ -0,0 +1,178 @@ +--- a/drivers/bluetooth/dtl1_cs.c ++++ b/drivers/bluetooth/dtl1_cs.c +@@ -144,7 +144,11 @@ + } + + do { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + register struct sk_buff *skb; + int len; + +@@ -209,7 +213,11 @@ + return; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + iobase = info->p_dev->resource[0]->start; ++#else ++ iobase = info->p_dev->io.BasePort1; ++#endif + + do { + info->hdev->stat.byte_rx++; +@@ -296,7 +304,11 @@ + /* our irq handler is shared */ + return IRQ_NONE; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + iobase = info->p_dev->resource[0]->start; ++#else ++ iobase = info->p_dev->io.BasePort1; ++#endif + + spin_lock(&(info->lock)); + +@@ -451,7 +463,11 @@ + static int dtl1_open(dtl1_info_t *info) + { + unsigned long flags; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + struct hci_dev *hdev; + + spin_lock_init(&(info->lock)); +@@ -495,8 +511,13 @@ + outb(UART_LCR_WLEN8, iobase + UART_LCR); /* Reset DLAB */ + outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase + UART_MCR); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + info->ri_latch = inb(info->p_dev->resource[0]->start + UART_MSR) + & UART_MSR_RI; ++#else ++ info->ri_latch = inb(info->p_dev->io.BasePort1 + UART_MSR) ++ & UART_MSR_RI; ++#endif + + /* Turn on interrupts */ + outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER); +@@ -521,7 +542,11 @@ + static int dtl1_close(dtl1_info_t *info) + { + unsigned long flags; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + unsigned int iobase = info->p_dev->resource[0]->start; ++#else ++ unsigned int iobase = info->p_dev->io.BasePort1; ++#endif + struct hci_dev *hdev = info->hdev; + + if (!hdev) +@@ -557,7 +582,24 @@ + info->p_dev = link; + link->priv = info; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; ++#else ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; ++ link->resource[0]->end = 8; ++#else ++ link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; ++ link->io.NumPorts1= 8; ++#endif ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; ++ link->irq.Handler = dtl1_interrupt; ++#endif ++ ++ link->conf.Attributes = CONF_ENABLE_IRQ; ++ link->conf.IntType = INT_MEMORY_AND_IO; ++#endif + + return dtl1_config(link); + } +@@ -571,6 +613,7 @@ + pcmcia_disable_device(link); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data) + { + if ((p_dev->resource[1]->end) || (p_dev->resource[1]->end < 8)) +@@ -581,6 +624,29 @@ + + return pcmcia_request_io(p_dev); + } ++#else ++static int dtl1_confcheck(struct pcmcia_device *p_dev, ++ cistpl_cftable_entry_t *cf, ++ cistpl_cftable_entry_t *dflt, ++ unsigned int vcc, ++ void *priv_data) ++{ ++ if ((cf->io.nwin != 1) || (cf->io.win[0].len <= 8)) ++ return -ENODEV; ++ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ p_dev->resource[0]->start = cf->io.win[0].base; ++ p_dev->resource[0]->end = cf->io.win[0].len; /*yo */ ++ p_dev->io_lines = cf->io.flags & CISTPL_IO_LINES_MASK; ++ return pcmcia_request_io(p_dev); ++#else ++ p_dev->io.BasePort1 = cf->io.win[0].base; ++ p_dev->io.NumPorts1 = cf->io.win[0].len; /*yo */ ++ p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; ++ return pcmcia_request_io(p_dev, &p_dev->io); ++#endif ++} ++#endif + + static int dtl1_config(struct pcmcia_device *link) + { +@@ -588,14 +654,24 @@ + int ret; + + /* Look for a generic full-sized window */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + link->resource[0]->end = 8; ++#else ++ link->io.NumPorts1 = 8; ++#endif + ret = pcmcia_loop_config(link, dtl1_confcheck, NULL); + if (ret) + goto failed; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + ret = pcmcia_request_irq(link, dtl1_interrupt); + if (ret) + goto failed; ++#else ++ ret = pcmcia_request_irq(link, &link->irq); ++ if (ret != 0) ++ link->irq.AssignedIRQ = 0; ++#endif + + ret = pcmcia_enable_device(link); + if (ret) +@@ -623,7 +699,13 @@ + + static struct pcmcia_driver dtl1_driver = { + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + .name = "dtl1_cs", ++#else ++ .drv = { ++ .name = "dtl1_cs", ++ }, ++#endif + .probe = dtl1_probe, + .remove = dtl1_detach, + .id_table = dtl1_ids, diff --git a/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_b43_pcmcia.c b/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_b43_pcmcia.c new file mode 100644 index 000000000000..dc1b3c665d1f --- /dev/null +++ b/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_b43_pcmcia.c @@ -0,0 +1,82 @@ +--- a/drivers/net/wireless/b43/pcmcia.c ++++ b/drivers/net/wireless/b43/pcmcia.c +@@ -63,6 +63,9 @@ + static int b43_pcmcia_probe(struct pcmcia_device *dev) + { + struct ssb_bus *ssb; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) ++ win_req_t win; ++#endif + int err = -ENOMEM; + int res = 0; + +@@ -72,6 +75,7 @@ + + err = -ENODEV; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + dev->config_flags |= CONF_ENABLE_IRQ; + + dev->resource[2]->flags |= WIN_ENABLE | WIN_DATA_WIDTH_16 | +@@ -79,21 +83,46 @@ + dev->resource[2]->start = 0; + dev->resource[2]->end = SSB_CORE_SIZE; + res = pcmcia_request_window(dev, dev->resource[2], 250); ++#else ++ dev->conf.Attributes = CONF_ENABLE_IRQ; ++ dev->conf.IntType = INT_MEMORY_AND_IO; ++ ++ win.Attributes = WIN_ENABLE | WIN_DATA_WIDTH_16 | ++ WIN_USE_WAIT; ++ win.Base = 0; ++ win.Size = SSB_CORE_SIZE; ++ win.AccessSpeed = 250; ++ res = pcmcia_request_window(dev, &win, &dev->win); ++#endif + if (res != 0) + goto err_kfree_ssb; +- ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + res = pcmcia_map_mem_page(dev, dev->resource[2], 0); ++#else ++ res = pcmcia_map_mem_page(dev, dev->win, 0); ++#endif + if (res != 0) + goto err_disable; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + if (!dev->irq) ++#else ++ dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; ++ dev->irq.Handler = NULL; /* The handler is registered later. */ ++ res = pcmcia_request_irq(dev, &dev->irq); ++ if (res != 0) ++#endif + goto err_disable; + + res = pcmcia_enable_device(dev); + if (res != 0) + goto err_disable; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + err = ssb_bus_pcmciabus_register(ssb, dev, dev->resource[2]->start); ++#else ++ err = ssb_bus_pcmciabus_register(ssb, dev, win.Base); ++#endif + if (err) + goto err_disable; + dev->priv = ssb; +@@ -122,7 +151,13 @@ + + static struct pcmcia_driver b43_pcmcia_driver = { + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + .name = "b43-pcmcia", ++#else ++ .drv = { ++ .name = "b43-pcmcia", ++ }, ++#endif + .id_table = b43_pcmcia_tbl, + .probe = b43_pcmcia_probe, + .remove = b43_pcmcia_remove, diff --git a/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_libertas_if_cs.c b/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_libertas_if_cs.c new file mode 100644 index 000000000000..2568ba6e1cf1 --- /dev/null +++ b/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_libertas_if_cs.c @@ -0,0 +1,163 @@ +--- a/drivers/net/wireless/libertas/if_cs.c ++++ b/drivers/net/wireless/libertas/if_cs.c +@@ -757,7 +757,11 @@ + goto out; + + /* Now actually get the IRQ */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + ret = request_irq(card->p_dev->irq, if_cs_interrupt, ++#else ++ ret = request_irq(card->p_dev->irq.AssignedIRQ, if_cs_interrupt, ++#endif + IRQF_SHARED, DRV_NAME, card); + if (ret) { + pr_err("error in request_irq\n"); +@@ -775,7 +779,11 @@ + priv->fw_ready = 1; + if (lbs_start_card(priv) != 0) { + pr_err("could not activate card\n"); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + free_irq(card->p_dev->irq, card); ++#else ++ free_irq(card->p_dev->irq.AssignedIRQ, card); ++#endif + } + + out: +@@ -824,7 +832,11 @@ + + lbs_deb_enter(LBS_DEB_CS); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + free_irq(p_dev->irq, card); ++#else ++ free_irq(p_dev->irq.AssignedIRQ, card); ++#endif + pcmcia_disable_device(p_dev); + if (card->iobase) + ioport_unmap(card->iobase); +@@ -832,7 +844,7 @@ + lbs_deb_leave(LBS_DEB_CS); + } + +- ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data) + { + p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; +@@ -842,9 +854,39 @@ + pr_err("wrong CIS (check number of IO windows)\n"); + return -ENODEV; + } ++#else ++static int if_cs_ioprobe(struct pcmcia_device *p_dev, ++ cistpl_cftable_entry_t *cfg, ++ cistpl_cftable_entry_t *dflt, ++ unsigned int vcc, ++ void *priv_data) ++{ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) ++ p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; ++ p_dev->resource[0]->start = cfg->io.win[0].base; ++ p_dev->resource[0]->end = cfg->io.win[0].len; ++#else ++ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; ++ p_dev->io.BasePort1 = cfg->io.win[0].base; ++ p_dev->io.NumPorts1 = cfg->io.win[0].len; ++#endif ++ ++ /* Do we need to allocate an interrupt? */ ++ p_dev->conf.Attributes |= CONF_ENABLE_IRQ; ++ ++ /* IO window settings */ ++ if (cfg->io.nwin != 1) { ++ pr_err("wrong CIS (check number of IO windows)\n"); ++ return -ENODEV; ++ } ++#endif + + /* This reserves IO space but doesn't actually enable it */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + return pcmcia_request_io(p_dev); ++#else ++ return pcmcia_request_io(p_dev, &p_dev->io); ++#endif + } + + static int if_cs_probe(struct pcmcia_device *p_dev) +@@ -863,7 +905,16 @@ + card->p_dev = p_dev; + p_dev->priv = card; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; ++#else ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++ p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; ++ p_dev->irq.Handler = NULL; ++#endif ++ p_dev->conf.Attributes = 0; ++ p_dev->conf.IntType = INT_MEMORY_AND_IO; ++#endif + + if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) { + pr_err("error in pcmcia_loop_config\n"); +@@ -875,12 +926,26 @@ + * a handler to the interrupt, unless the 'Handler' member of + * the irq structure is initialized. + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + if (!p_dev->irq) + goto out1; ++#else ++ if (p_dev->conf.Attributes & CONF_ENABLE_IRQ) { ++ ret = pcmcia_request_irq(p_dev, &p_dev->irq); ++ if (ret) { ++ pr_err("error in pcmcia_request_irq\n"); ++ goto out1; ++ } ++ } ++#endif + + /* Initialize io access */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + card->iobase = ioport_map(p_dev->resource[0]->start, + resource_size(p_dev->resource[0])); ++#else ++ card->iobase = ioport_map(p_dev->io.BasePort1, p_dev->io.NumPorts1); ++#endif + if (!card->iobase) { + pr_err("error in ioport_map\n"); + ret = -EIO; +@@ -894,7 +959,17 @@ + } + + /* Finally, report what we've done */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + lbs_deb_cs("irq %d, io %pR", p_dev->irq, p_dev->resource[0]); ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) ++ lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n", ++ p_dev->irq, p_dev->io.BasePort1, ++ p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1); ++#else ++ lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n", ++ p_dev->irq.AssignedIRQ, p_dev->io.BasePort1, ++ p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1); ++#endif + + /* + * Most of the libertas cards can do unaligned register access, but some +@@ -1001,7 +1076,13 @@ + + static struct pcmcia_driver lbs_driver = { + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + .name = DRV_NAME, ++#else ++ .drv = { ++ .name = DRV_NAME, ++ }, ++#endif + .probe = if_cs_probe, + .remove = if_cs_detach, + .id_table = if_cs_ids, diff --git a/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_orinoco_orinoco_cs.c b/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_orinoco_orinoco_cs.c new file mode 100644 index 000000000000..ef86ab3ec27a --- /dev/null +++ b/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_orinoco_orinoco_cs.c @@ -0,0 +1,207 @@ +--- a/drivers/net/wireless/orinoco/orinoco_cs.c ++++ b/drivers/net/wireless/orinoco/orinoco_cs.c +@@ -78,7 +78,11 @@ + /* We need atomic ops here, because we're not holding the lock */ + set_bit(0, &card->hard_reset_in_progress); + ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27) ++ err = pcmcia_reset_card(link, NULL); ++#else + err = pcmcia_reset_card(link->socket); ++#endif + if (err) + return err; + +@@ -108,6 +112,16 @@ + card->p_dev = link; + link->priv = priv; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++ /* Interrupt setup */ ++ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; ++ link->irq.Handler = orinoco_interrupt; ++#endif ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) ++ link->conf.Attributes = 0; ++ link->conf.IntType = INT_MEMORY_AND_IO; ++#endif ++ + return orinoco_cs_config(link); + } /* orinoco_cs_attach */ + +@@ -122,6 +136,7 @@ + free_orinocodev(priv); + } /* orinoco_cs_detach */ + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + static int orinoco_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) + { + if (p_dev->config_index == 0) +@@ -129,6 +144,98 @@ + + return pcmcia_request_io(p_dev); + }; ++#else ++static int orinoco_cs_config_check(struct pcmcia_device *p_dev, ++ cistpl_cftable_entry_t *cfg, ++ cistpl_cftable_entry_t *dflt, ++ unsigned int vcc, ++ void *priv_data) ++{ ++ if (cfg->index == 0) ++ goto next_entry; ++ ++ /* Use power settings for Vcc and Vpp if present */ ++ /* Note that the CIS values need to be rescaled */ ++ if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { ++ if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000) { ++ DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", ++ __func__, vcc, ++ cfg->vcc.param[CISTPL_POWER_VNOM] / 10000); ++ if (!ignore_cis_vcc) ++ goto next_entry; ++ } ++ } else if (dflt->vcc.present & (1 << CISTPL_POWER_VNOM)) { ++ if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM] / 10000) { ++ DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", ++ __func__, vcc, ++ dflt->vcc.param[CISTPL_POWER_VNOM] / 10000); ++ if (!ignore_cis_vcc) ++ goto next_entry; ++ } ++ } ++ ++ if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) ++ p_dev->conf.Vpp = ++ cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; ++ else if (dflt->vpp1.present & (1 << CISTPL_POWER_VNOM)) ++ p_dev->conf.Vpp = ++ dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; ++ ++ /* Do we need to allocate an interrupt? */ ++ p_dev->conf.Attributes |= CONF_ENABLE_IRQ; ++ ++ /* IO window settings */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ++#else ++ p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; ++#endif ++ if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { ++ cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; ++ p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; ++ p_dev->resource[0]->flags |= ++ pcmcia_io_cfg_data_width(io->flags); ++ p_dev->resource[0]->start = io->win[0].base; ++ p_dev->resource[0]->end = io->win[0].len; ++#else ++ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; ++ if (!(io->flags & CISTPL_IO_8BIT)) ++ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; ++ if (!(io->flags & CISTPL_IO_16BIT)) ++ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; ++ p_dev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; ++ p_dev->io.BasePort1 = io->win[0].base; ++ p_dev->io.NumPorts1 = io->win[0].len; ++#endif ++ if (io->nwin > 1) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ p_dev->resource[1]->flags = p_dev->resource[0]->flags; ++ p_dev->resource[1]->start = io->win[1].base; ++ p_dev->resource[1]->end = io->win[1].len; ++#else ++ p_dev->io.Attributes2 = p_dev->io.Attributes1; ++ p_dev->io.BasePort2 = io->win[1].base; ++ p_dev->io.NumPorts2 = io->win[1].len; ++#endif ++ } ++ ++ /* This reserves IO space but doesn't actually enable it */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ if (pcmcia_request_io(p_dev) != 0) ++#else ++ if (pcmcia_request_io(p_dev, &p_dev->io) != 0) ++#endif ++ goto next_entry; ++ } ++ return 0; ++ ++next_entry: ++ pcmcia_disable_device(p_dev); ++ return -ENODEV; ++}; ++#endif + + static int + orinoco_cs_config(struct pcmcia_device *link) +@@ -138,10 +245,12 @@ + int ret; + void __iomem *mem; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC | + CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; + if (ignore_cis_vcc) + link->config_flags &= ~CONF_AUTO_CHECK_VCC; ++#endif + ret = pcmcia_loop_config(link, orinoco_cs_config_check, NULL); + if (ret) { + if (!ignore_cis_vcc) +@@ -151,8 +260,12 @@ + goto failed; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) + mem = ioport_map(link->resource[0]->start, + resource_size(link->resource[0])); ++#else ++ mem = ioport_map(link->io.BasePort1, link->io.NumPorts1); ++#endif + if (!mem) + goto failed; + +@@ -161,7 +274,11 @@ + * called. */ + hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + ret = pcmcia_request_irq(link, orinoco_interrupt); ++#else ++ ret = pcmcia_request_irq(link, &link->irq); ++#endif + if (ret) + goto failed; + +@@ -176,8 +293,16 @@ + } + + /* Register an interface with the stack */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + if (orinoco_if_add(priv, link->resource[0]->start, + link->irq, NULL) != 0) { ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) ++ if (orinoco_if_add(priv, link->io.BasePort1, ++ link->irq, NULL) != 0) { ++#else ++ if (orinoco_if_add(priv, link->io.BasePort1, ++ link->irq.AssignedIRQ, NULL) != 0) { ++#endif + printk(KERN_ERR PFX "orinoco_if_add() failed\n"); + goto failed; + } +@@ -331,7 +456,13 @@ + + static struct pcmcia_driver orinoco_driver = { + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + .name = DRIVER_NAME, ++#else ++ .drv = { ++ .name = DRIVER_NAME, ++ }, ++#endif + .probe = orinoco_cs_probe, + .remove = orinoco_cs_detach, + .id_table = orinoco_cs_ids, diff --git a/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_orinoco_spectrum_cs.c b/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_orinoco_spectrum_cs.c new file mode 100644 index 000000000000..d92d0cfa3c1c --- /dev/null +++ b/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_orinoco_spectrum_cs.c @@ -0,0 +1,195 @@ +--- a/drivers/net/wireless/orinoco/spectrum_cs.c ++++ b/drivers/net/wireless/orinoco/spectrum_cs.c +@@ -170,6 +170,16 @@ + card->p_dev = link; + link->priv = priv; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++ /* Interrupt setup */ ++ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; ++ link->irq.Handler = orinoco_interrupt; ++#endif ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) ++ link->conf.Attributes = 0; ++ link->conf.IntType = INT_MEMORY_AND_IO; ++#endif ++ + return spectrum_cs_config(link); + } /* spectrum_cs_attach */ + +@@ -184,6 +194,7 @@ + free_orinocodev(priv); + } /* spectrum_cs_detach */ + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + static int spectrum_cs_config_check(struct pcmcia_device *p_dev, + void *priv_data) + { +@@ -192,6 +203,98 @@ + + return pcmcia_request_io(p_dev); + }; ++#else ++static int spectrum_cs_config_check(struct pcmcia_device *p_dev, ++ cistpl_cftable_entry_t *cfg, ++ cistpl_cftable_entry_t *dflt, ++ unsigned int vcc, ++ void *priv_data) ++{ ++ if (cfg->index == 0) ++ goto next_entry; ++ ++ /* Use power settings for Vcc and Vpp if present */ ++ /* Note that the CIS values need to be rescaled */ ++ if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { ++ if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000) { ++ DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", ++ __func__, vcc, ++ cfg->vcc.param[CISTPL_POWER_VNOM] / 10000); ++ if (!ignore_cis_vcc) ++ goto next_entry; ++ } ++ } else if (dflt->vcc.present & (1 << CISTPL_POWER_VNOM)) { ++ if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM] / 10000) { ++ DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", ++ __func__, vcc, ++ dflt->vcc.param[CISTPL_POWER_VNOM] / 10000); ++ if (!ignore_cis_vcc) ++ goto next_entry; ++ } ++ } ++ ++ if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) ++ p_dev->conf.Vpp = ++ cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; ++ else if (dflt->vpp1.present & (1 << CISTPL_POWER_VNOM)) ++ p_dev->conf.Vpp = ++ dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; ++ ++ /* Do we need to allocate an interrupt? */ ++ p_dev->conf.Attributes |= CONF_ENABLE_IRQ; ++ ++ /* IO window settings */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ++#else ++ p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; ++#endif ++ if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { ++ cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; ++ p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; ++ p_dev->resource[0]->flags |= ++ pcmcia_io_cfg_data_width(io->flags); ++ p_dev->resource[0]->start = io->win[0].base; ++ p_dev->resource[0]->end = io->win[0].len; ++#else ++ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; ++ if (!(io->flags & CISTPL_IO_8BIT)) ++ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; ++ if (!(io->flags & CISTPL_IO_16BIT)) ++ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; ++ p_dev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; ++ p_dev->io.BasePort1 = io->win[0].base; ++ p_dev->io.NumPorts1 = io->win[0].len; ++#endif ++ if (io->nwin > 1) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ p_dev->resource[1]->flags = p_dev->resource[0]->flags; ++ p_dev->resource[1]->start = io->win[1].base; ++ p_dev->resource[1]->end = io->win[1].len; ++#else ++ p_dev->io.Attributes2 = p_dev->io.Attributes1; ++ p_dev->io.BasePort2 = io->win[1].base; ++ p_dev->io.NumPorts2 = io->win[1].len; ++#endif ++ } ++ ++ /* This reserves IO space but doesn't actually enable it */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) ++ if (pcmcia_request_io(p_dev) != 0) ++#else ++ if (pcmcia_request_io(p_dev, &p_dev->io) != 0) ++#endif ++ goto next_entry; ++ } ++ return 0; ++ ++next_entry: ++ pcmcia_disable_device(p_dev); ++ return -ENODEV; ++}; ++#endif + + static int + spectrum_cs_config(struct pcmcia_device *link) +@@ -201,10 +304,12 @@ + int ret; + void __iomem *mem; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC | + CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; + if (ignore_cis_vcc) + link->config_flags &= ~CONF_AUTO_CHECK_VCC; ++#endif + ret = pcmcia_loop_config(link, spectrum_cs_config_check, NULL); + if (ret) { + if (!ignore_cis_vcc) +@@ -214,8 +319,12 @@ + goto failed; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) + mem = ioport_map(link->resource[0]->start, + resource_size(link->resource[0])); ++#else ++ mem = ioport_map(link->io.BasePort1, link->io.NumPorts1); ++#endif + if (!mem) + goto failed; + +@@ -225,7 +334,11 @@ + hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); + hw->eeprom_pda = true; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + ret = pcmcia_request_irq(link, orinoco_interrupt); ++#else ++ ret = pcmcia_request_irq(link, &link->irq); ++#endif + if (ret) + goto failed; + +@@ -244,8 +357,16 @@ + } + + /* Register an interface with the stack */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + if (orinoco_if_add(priv, link->resource[0]->start, + link->irq, NULL) != 0) { ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) ++ if (orinoco_if_add(priv, link->io.BasePort1, ++ link->irq, NULL) != 0) { ++#else ++ if (orinoco_if_add(priv, link->io.BasePort1, ++ link->irq.AssignedIRQ, NULL) != 0) { ++#endif + printk(KERN_ERR PFX "orinoco_if_add() failed\n"); + goto failed; + } +@@ -311,7 +432,13 @@ + + static struct pcmcia_driver orinoco_driver = { + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + .name = DRIVER_NAME, ++#else ++ .drv = { ++ .name = DRIVER_NAME, ++ }, ++#endif + .probe = spectrum_cs_probe, + .remove = spectrum_cs_detach, + .suspend = spectrum_cs_suspend, diff --git a/patches/collateral-evolutions/network/24-pcmcia/drivers_ssb_main.c b/patches/collateral-evolutions/network/24-pcmcia/drivers_ssb_main.c new file mode 100644 index 000000000000..7223ace2ba5a --- /dev/null +++ b/patches/collateral-evolutions/network/24-pcmcia/drivers_ssb_main.c @@ -0,0 +1,14 @@ +--- a/drivers/ssb/main.c ++++ b/drivers/ssb/main.c +@@ -517,7 +517,11 @@ + break; + case SSB_BUSTYPE_PCMCIA: + #ifdef CONFIG_SSB_PCMCIAHOST ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + sdev->irq = bus->host_pcmcia->irq; ++#else ++ sdev->irq = bus->host_pcmcia->irq.AssignedIRQ; ++#endif + dev->parent = &bus->host_pcmcia->dev; + #endif + break; diff --git a/patches/collateral-evolutions/network/25-multicast-list_head.patch b/patches/collateral-evolutions/network/25-multicast-list_head.patch deleted file mode 100644 index a20aa5472dc1..000000000000 --- a/patches/collateral-evolutions/network/25-multicast-list_head.patch +++ /dev/null @@ -1,872 +0,0 @@ -Backport commit 22bedad3ce112d5ca1eaf043d4990fa2ed698c87: - net: convert multicast list to list_head - - Converts the list and the core manipulating with it to be the same as uc_list. - - +uses two functions for adding/removing mc address (normal and "global" - variant) instead of a function parameter. - +removes dev_mcast.c completely. - +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for - manipulation with lists on a sandbox (used in bonding and 80211 drivers) - -This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856 - ---- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -@@ -410,7 +410,11 @@ static void atl1c_set_multi(struct net_d - - /* comoute mc addresses' hash value ,and put it into hash table */ - netdev_for_each_mc_addr(ha, netdev) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - hash_value = atl1c_hash_mc_addr(hw, ha->addr); -+#else -+ hash_value = atl1c_hash_mc_addr(hw, ha->dmi_addr); -+#endif - atl1c_hash_set(hw, hash_value); - } - } ---- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -@@ -308,7 +308,11 @@ static void atl1e_set_multi(struct net_d - - /* comoute mc addresses' hash value ,and put it into hash table */ - netdev_for_each_mc_addr(ha, netdev) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - hash_value = atl1e_hash_mc_addr(hw, ha->addr); -+#else -+ hash_value = atl1e_hash_mc_addr(hw, ha->dmi_addr); -+#endif - atl1e_hash_set(hw, hash_value); - } - } ---- a/drivers/net/ethernet/atheros/atlx/atl2.c -+++ b/drivers/net/ethernet/atheros/atlx/atl2.c -@@ -159,7 +159,11 @@ static void atl2_set_multi(struct net_de - - /* comoute mc addresses' hash value ,and put it into hash table */ - netdev_for_each_mc_addr(ha, netdev) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - hash_value = atl2_hash_mc_addr(hw, ha->addr); -+#else -+ hash_value = atl2_hash_mc_addr(hw, ha->dmi_addr); -+#endif - atl2_hash_set(hw, hash_value); - } - } ---- a/drivers/net/ethernet/atheros/atlx/atlx.c -+++ b/drivers/net/ethernet/atheros/atlx/atlx.c -@@ -149,7 +149,11 @@ static void atlx_set_multi(struct net_de - - /* compute mc addresses' hash value ,and put it into hash table */ - netdev_for_each_mc_addr(ha, netdev) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - hash_value = atlx_hash_mc_addr(hw, ha->addr); -+#else -+ hash_value = atlx_hash_mc_addr(hw, ha->dmi_addr); -+#endif - atlx_hash_set(hw, hash_value); - } - } ---- a/drivers/net/ethernet/broadcom/b44.c -+++ b/drivers/net/ethernet/broadcom/b44.c -@@ -1693,7 +1693,11 @@ static int __b44_load_mcast(struct b44 * - netdev_for_each_mc_addr(ha, dev) { - if (i == num_ents) - break; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - __b44_cam_write(bp, ha->addr, i++ + 1); -+#else -+ __b44_cam_write(bp, ha->dmi_addr, i++ + 1); -+#endif - } - return i+1; - } ---- a/drivers/net/wireless/adm8211.c -+++ b/drivers/net/wireless/adm8211.c -@@ -1320,19 +1320,37 @@ static void adm8211_bss_info_changed(str - } - - static u64 adm8211_prepare_multicast(struct ieee80211_hw *hw, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr_list *mc_list) -+#else -+ int mc_count, struct dev_addr_list *ha) -+#endif - { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - unsigned int bit_nr; -- u32 mc_filter[2]; - struct netdev_hw_addr *ha; -+#else -+ unsigned int bit_nr, i; -+#endif -+ u32 mc_filter[2]; - - mc_filter[1] = mc_filter[0] = 0; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - netdev_hw_addr_list_for_each(ha, mc_list) { - bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; -+#else -+ for (i = 0; i < mc_count; i++) { -+ if (!ha) -+ break; -+ bit_nr = ether_crc(ETH_ALEN, ha->dmi_addr) >> 26; -+#endif - - bit_nr &= 0x3F; - mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+ ha = ha->next; -+#endif - } - - return mc_filter[0] | ((u64)(mc_filter[1]) << 32); ---- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c -+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c -@@ -318,20 +318,42 @@ ath5k_bss_info_changed(struct ieee80211_ - - static u64 - ath5k_prepare_multicast(struct ieee80211_hw *hw, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr_list *mc_list) -+#else -+ int mc_count, struct dev_addr_list *ha) -+#endif - { - u32 mfilt[2], val; - u8 pos; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr *ha; -+#else -+ int i; -+#endif - - mfilt[0] = 0; - mfilt[1] = 1; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - netdev_hw_addr_list_for_each(ha, mc_list) { -+#else -+ for (i = 0; i < mc_count; i++) { -+ if (!ha) -+ break; -+#endif - /* calculate XOR of eight 6-bit values */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - val = get_unaligned_le32(ha->addr + 0); -+#else -+ val = get_unaligned_le32(ha->dmi_addr + 0); -+#endif - pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - val = get_unaligned_le32(ha->addr + 3); -+#else -+ val = get_unaligned_le32(ha->dmi_addr + 3); -+#endif - pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; - pos &= 0x3f; - mfilt[pos / 32] |= (1 << (pos % 32)); -@@ -340,6 +362,9 @@ ath5k_prepare_multicast(struct ieee80211 - * need to inform below not to reset the mcast */ - /* ath5k_hw_set_mcast_filterindex(ah, - * ha->addr[5]); */ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+ ha = ha->next; -+#endif - } - - return ((u64)(mfilt[1]) << 32) | mfilt[0]; ---- a/drivers/net/wireless/ath/carl9170/main.c -+++ b/drivers/net/wireless/ath/carl9170/main.c -@@ -967,17 +967,35 @@ out: - return err; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw, - struct netdev_hw_addr_list *mc_list) -+#else -+static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, -+ struct dev_addr_list *ha) -+#endif - { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr *ha; -+#else -+ int i; -+#endif - u64 mchash; - - /* always get broadcast frames */ - mchash = 1ULL << (0xff >> 2); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - netdev_hw_addr_list_for_each(ha, mc_list) - mchash |= 1ULL << (ha->addr[5] >> 2); -+#else -+ for (i = 0; i < mc_count; i++) { -+ if (WARN_ON(!ha)) -+ break; -+ mchash |= 1ULL << (ha->dmi_addr[5] >> 2); -+ ha = ha->next; -+ } -+#endif - - return mchash; - } ---- a/drivers/net/wireless/libertas/main.c -+++ b/drivers/net/wireless/libertas/main.c -@@ -349,18 +349,34 @@ static int lbs_add_mcast_addrs(struct cm - netif_addr_lock_bh(dev); - cnt = netdev_mc_count(dev); - netdev_for_each_mc_addr(ha, dev) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - if (mac_in_list(cmd->maclist, nr_addrs, ha->addr)) { -+#else -+ if (mac_in_list(cmd->maclist, nr_addrs, ha->dmi_addr)) { -+#endif - lbs_deb_net("mcast address %s:%pM skipped\n", dev->name, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - ha->addr); -+#else -+ ha->dmi_addr); -+#endif - cnt--; - continue; - } - - if (i == MRVDRV_MAX_MULTICAST_LIST_SIZE) - break; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - memcpy(&cmd->maclist[6*i], ha->addr, ETH_ALEN); -+#else -+ memcpy(&cmd->maclist[6*i], ha->dmi_addr, ETH_ALEN); -+#endif - lbs_deb_net("mcast address %s:%pM added to filter\n", dev->name, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - ha->addr); -+#else -+ ha->dmi_addr); -+#endif - i++; - cnt--; - } ---- a/drivers/net/wireless/libertas_tf/main.c -+++ b/drivers/net/wireless/libertas_tf/main.c -@@ -421,20 +421,36 @@ static int lbtf_op_config(struct ieee802 - } - - static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr_list *mc_list) -+#else -+ int mc_count, struct dev_addr_list *ha) -+#endif - { - struct lbtf_private *priv = hw->priv; - int i; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr *ha; - int mc_count = netdev_hw_addr_list_count(mc_list); -+#endif - - if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE) - return mc_count; - - priv->nr_of_multicastmacaddr = mc_count; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - i = 0; - netdev_hw_addr_list_for_each(ha, mc_list) - memcpy(&priv->multicastlist[i++], ha->addr, ETH_ALEN); -+#else -+ for (i = 0; i < mc_count; i++) { -+ if (!ha) -+ break; -+ memcpy(&priv->multicastlist[i], ha->da_addr, -+ ETH_ALEN); -+ ha = ha->next; -+ } -+#endif - - return mc_count; - } ---- a/drivers/net/wireless/mwifiex/sta_ioctl.c -+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c -@@ -43,7 +43,11 @@ int mwifiex_copy_mcast_addr(struct mwifi - struct netdev_hw_addr *ha; - - netdev_for_each_mc_addr(ha, dev) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - memcpy(&mlist->mac_list[i++], ha->addr, ETH_ALEN); -+#else -+ memcpy(&mlist->mac_list[i++], ha->dmi_addr, ETH_ALEN); -+#endif - - return i; - } ---- a/drivers/net/wireless/mwifiex/debugfs.c -+++ b/drivers/net/wireless/mwifiex/debugfs.c -@@ -215,7 +215,11 @@ mwifiex_info_read(struct file *file, cha - - netdev_for_each_mc_addr(ha, netdev) - p += sprintf(p, "multicast_address[%d]=\"%pM\"\n", -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - i++, ha->addr); -+#else -+ i++, ha->dmi_addr); -+#endif - } - - p += sprintf(p, "num_tx_bytes = %lu\n", priv->stats.tx_bytes); ---- a/drivers/net/wireless/mwl8k.c -+++ b/drivers/net/wireless/mwl8k.c -@@ -2656,15 +2656,21 @@ struct mwl8k_cmd_mac_multicast_adr { - - static struct mwl8k_cmd_pkt * - __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr_list *mc_list) -+#else -+ int mc_count, struct dev_addr_list *ha) -+#endif - { - struct mwl8k_priv *priv = hw->priv; - struct mwl8k_cmd_mac_multicast_adr *cmd; - int size; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - int mc_count = 0; - - if (mc_list) - mc_count = netdev_hw_addr_list_count(mc_list); -+#endif - - if (allmulti || mc_count > priv->num_mcaddrs) { - allmulti = 1; -@@ -2685,13 +2691,27 @@ __mwl8k_cmd_mac_multicast_adr(struct iee - if (allmulti) { - cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_ALL_MULTICAST); - } else if (mc_count) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr *ha; - int i = 0; -+#else -+ int i; -+#endif - - cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_MULTICAST); - cmd->numaddr = cpu_to_le16(mc_count); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - netdev_hw_addr_list_for_each(ha, mc_list) { - memcpy(cmd->addr[i], ha->addr, ETH_ALEN); -+#else -+ for (i = 0; i < mc_count && ha; i++) { -+ if (ha->da_addrlen != ETH_ALEN) { -+ kfree(cmd); -+ return NULL; -+ } -+ memcpy(cmd->addr[i], ha->da_addr, ETH_ALEN); -+ ha = ha->next; -+#endif - } - } - -@@ -5022,7 +5042,11 @@ mwl8k_bss_info_changed(struct ieee80211_ - } - - static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr_list *mc_list) -+#else -+ int mc_count, struct dev_addr_list *ha) -+#endif - { - struct mwl8k_cmd_pkt *cmd; - -@@ -5033,7 +5057,11 @@ static u64 mwl8k_prepare_multicast(struc - * we'll end up throwing this packet away and creating a new - * one in mwl8k_configure_filter(). - */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - cmd = __mwl8k_cmd_mac_multicast_adr(hw, 0, mc_list); -+#else -+ cmd = __mwl8k_cmd_mac_multicast_adr(hw, 0, mc_count, ha); -+#endif - - return (unsigned long)cmd; - } -@@ -5155,7 +5183,11 @@ static void mwl8k_configure_filter(struc - */ - if (*total_flags & FIF_ALLMULTI) { - kfree(cmd); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - cmd = __mwl8k_cmd_mac_multicast_adr(hw, 1, NULL); -+#else -+ cmd = __mwl8k_cmd_mac_multicast_adr(hw, 1, 0, NULL); -+#endif - } - - if (cmd != NULL) { ---- a/drivers/net/wireless/orinoco/hw.c -+++ b/drivers/net/wireless/orinoco/hw.c -@@ -1093,7 +1093,11 @@ int __orinoco_hw_set_multicast_list(stru - netdev_for_each_mc_addr(ha, dev) { - if (i == mc_count) - break; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - memcpy(mclist.addr[i++], ha->addr, ETH_ALEN); -+#else -+ memcpy(mclist.addr[i++], ha->dmi_addr, ETH_ALEN); -+#endif - } - - err = hw->ops->write_ltv(hw, USER_BAP, ---- a/drivers/net/wireless/orinoco/hw.h -+++ b/drivers/net/wireless/orinoco/hw.h -@@ -22,6 +22,9 @@ - - /* Forward declarations */ - struct orinoco_private; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+struct dev_addr_list; -+#endif - - int determine_fw_capabilities(struct orinoco_private *priv, char *fw_name, - size_t fw_name_len, u32 *hw_ver); ---- a/drivers/net/wireless/p54/main.c -+++ b/drivers/net/wireless/p54/main.c -@@ -364,11 +364,18 @@ out: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - static u64 p54_prepare_multicast(struct ieee80211_hw *dev, - struct netdev_hw_addr_list *mc_list) -+#else -+static u64 p54_prepare_multicast(struct ieee80211_hw *dev, int mc_count, -+ struct dev_addr_list *ha) -+#endif - { - struct p54_common *priv = dev->priv; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr *ha; -+#endif - int i; - - BUILD_BUG_ON(ARRAY_SIZE(priv->mc_maclist) != -@@ -378,12 +385,23 @@ static u64 p54_prepare_multicast(struct - * Otherwise the firmware will drop it and ARP will no longer work. - */ - i = 1; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - priv->mc_maclist_num = netdev_hw_addr_list_count(mc_list) + i; - netdev_hw_addr_list_for_each(ha, mc_list) { - memcpy(&priv->mc_maclist[i], ha->addr, ETH_ALEN); -+#else -+ priv->mc_maclist_num = mc_count + i; -+ while (i <= mc_count) { -+ if (!ha) -+ break; -+ memcpy(&priv->mc_maclist[i], ha->dmi_addr, ETH_ALEN); -+#endif - i++; - if (i >= ARRAY_SIZE(priv->mc_maclist)) - break; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) -+ ha = ha->next; -+#endif - } - - return 1; /* update */ ---- a/drivers/net/wireless/rndis_wlan.c -+++ b/drivers/net/wireless/rndis_wlan.c -@@ -1629,7 +1629,11 @@ static void set_multicast_list(struct us - - netdev_for_each_mc_addr(ha, usbdev->net) - memcpy(mc_addrs + i++ * ETH_ALEN, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - ha->addr, ETH_ALEN); -+#else -+ ha->dmi_addr, ETH_ALEN); -+#endif - } - netif_addr_unlock_bh(usbdev->net); - ---- a/drivers/net/wireless/rtl818x/rtl8180/dev.c -+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c -@@ -818,10 +818,19 @@ static void rtl8180_bss_info_changed(str - } - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - static u64 rtl8180_prepare_multicast(struct ieee80211_hw *dev, - struct netdev_hw_addr_list *mc_list) -+#else -+static u64 rtl8180_prepare_multicast(struct ieee80211_hw *dev, int mc_count, -+ struct dev_addr_list *mc_list) -+#endif - { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - return netdev_hw_addr_list_count(mc_list); -+#else -+ return mc_count; -+#endif - } - - static void rtl8180_configure_filter(struct ieee80211_hw *dev, ---- a/drivers/net/wireless/rtl818x/rtl8187/dev.c -+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c -@@ -1290,9 +1290,17 @@ static void rtl8187_bss_info_changed(str - } - - static u64 rtl8187_prepare_multicast(struct ieee80211_hw *dev, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr_list *mc_list) -+#else -+ int mc_count, struct dev_addr_list *mc_list) -+#endif - { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - return netdev_hw_addr_list_count(mc_list); -+#else -+ return mc_count; -+#endif - } - - static void rtl8187_configure_filter(struct ieee80211_hw *dev, ---- a/drivers/net/wireless/ti/wlcore/main.c -+++ b/drivers/net/wireless/ti/wlcore/main.c -@@ -2952,11 +2952,20 @@ struct wl1271_filter_params { - u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN]; - }; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, - struct netdev_hw_addr_list *mc_list) -+#else -+static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, -+ struct dev_addr_list *mc_list) -+#endif - { - struct wl1271_filter_params *fp; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr *ha; -+#else -+ int i; -+#endif - - fp = kzalloc(sizeof(*fp), GFP_ATOMIC); - if (!fp) { -@@ -2965,16 +2974,40 @@ static u64 wl1271_op_prepare_multicast(s - } - - /* update multicast filtering parameters */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - fp->mc_list_length = 0; - if (netdev_hw_addr_list_count(mc_list) > ACX_MC_ADDRESS_GROUP_MAX) { -+#else -+ fp->enabled = true; -+ if (mc_count > ACX_MC_ADDRESS_GROUP_MAX) { -+ mc_count = 0; -+#endif - fp->enabled = false; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - } else { - fp->enabled = true; - netdev_hw_addr_list_for_each(ha, mc_list) { -+#else -+ } -+ -+ fp->mc_list_length = 0; -+ for (i = 0; i < mc_count; i++) { -+ if (mc_list->da_addrlen == ETH_ALEN) { -+#endif - memcpy(fp->mc_list[fp->mc_list_length], -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - ha->addr, ETH_ALEN); -+#else -+ mc_list->da_addr, ETH_ALEN); -+#endif - fp->mc_list_length++; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - } -+#else -+ } else -+ wl1271_warning("Unknown mc address length."); -+ mc_list = mc_list->next; -+#endif - } - - return (u64)(unsigned long)fp; ---- a/drivers/net/wireless/zd1211rw/zd_mac.c -+++ b/drivers/net/wireless/zd1211rw/zd_mac.c -@@ -1215,17 +1215,34 @@ static void zd_process_intr(struct work_ - - - static u64 zd_op_prepare_multicast(struct ieee80211_hw *hw, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr_list *mc_list) -+#else -+ int mc_count, struct dev_addr_list *ha) -+#endif - { - struct zd_mac *mac = zd_hw_mac(hw); - struct zd_mc_hash hash; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr *ha; -+#else -+ int i; -+#endif - - zd_mc_clear(&hash); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - netdev_hw_addr_list_for_each(ha, mc_list) { - dev_dbg_f(zd_mac_dev(mac), "mc addr %pM\n", ha->addr); - zd_mc_add_addr(&hash, ha->addr); -+#else -+ for (i = 0; i < mc_count; i++) { -+ if (!ha) -+ break; -+ dev_dbg_f(zd_mac_dev(mac), "mc addr %pM\n", ha->dmi_addr); -+ zd_mc_add_addr(&hash, ha->dmi_addr); -+ ha = ha->next; -+#endif - } - - return hash.low | ((u64)hash.high << 32); ---- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c -@@ -103,7 +103,11 @@ static void _brcmf_set_multicast_list(st - netdev_for_each_mc_addr(ha, ndev) { - if (!cnt) - break; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - memcpy(bufp, ha->addr, ETH_ALEN); -+#else -+ memcpy(bufp, ha->dmi_addr, ETH_ALEN); -+#endif - bufp += ETH_ALEN; - cnt--; - } ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -2604,14 +2604,24 @@ struct ieee80211_ops { - void (*stop_ap)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); - - u64 (*prepare_multicast)(struct ieee80211_hw *hw, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr_list *mc_list); -+#else -+ int mc_count, struct dev_addr_list *mc_list); -+#endif - void (*configure_filter)(struct ieee80211_hw *hw, - unsigned int changed_flags, - unsigned int *total_flags, - u64 multicast); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - void (*set_multicast_list)(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, bool allmulti, - struct netdev_hw_addr_list *mc_list); -+#else -+ void (*set_multicast_list)(struct ieee80211_hw *hw, -+ struct ieee80211_vif *vif, bool allmulti, -+ int mc_count, struct dev_addr_list *ha); -+#endif - - int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, - bool set); ---- a/net/bluetooth/bnep/netdev.c -+++ b/net/bluetooth/bnep/netdev.c -@@ -93,8 +93,13 @@ static void bnep_net_set_mc_list(struct - netdev_for_each_mc_addr(ha, dev) { - if (i == BNEP_MAX_MULTICAST_FILTERS) - break; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN); - memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN); -+#else -+ memcpy(__skb_put(skb, ETH_ALEN), ha->dmi_addr, ETH_ALEN); -+ memcpy(__skb_put(skb, ETH_ALEN), ha->dmi_addr, ETH_ALEN); -+#endif - - i++; - } ---- a/net/mac80211/driver-ops.h -+++ b/net/mac80211/driver-ops.h -@@ -227,20 +227,35 @@ static inline void drv_bss_info_changed( - } - - static inline u64 drv_prepare_multicast(struct ieee80211_local *local, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr_list *mc_list) -+#else -+ int mc_count, -+ struct dev_addr_list *mc_list) -+#endif - { - u64 ret = 0; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - trace_drv_prepare_multicast(local, mc_list->count); -+#else -+ trace_drv_prepare_multicast(local, mc_count); -+#endif - - if (local->ops->prepare_multicast) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - ret = local->ops->prepare_multicast(&local->hw, mc_list); -+#else -+ ret = local->ops->prepare_multicast(&local->hw, mc_count, -+ mc_list); -+#endif - - trace_drv_return_u64(local, ret); - - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - static inline void drv_set_multicast_list(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, - struct netdev_hw_addr_list *mc_list) -@@ -256,6 +271,23 @@ static inline void drv_set_multicast_lis - allmulti, mc_list); - trace_drv_return_void(local); - } -+#else -+static inline void drv_set_multicast_list(struct ieee80211_local *local, -+ struct ieee80211_sub_if_data *sdata, -+ int mc_count, struct dev_addr_list *ha) -+{ -+ bool allmulti = sdata->flags & IEEE80211_SDATA_ALLMULTI; -+ -+ trace_drv_set_multicast_list(local, sdata, mc_count); -+ -+ check_sdata_in_driver(sdata); -+ -+ if (local->ops->set_multicast_list) -+ local->ops->set_multicast_list(&local->hw, &sdata->vif, -+ allmulti, mc_count, ha); -+ trace_drv_return_void(local); -+} -+#endif - - static inline void drv_configure_filter(struct ieee80211_local *local, - unsigned int changed_flags, ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -907,7 +907,12 @@ struct ieee80211_local { - struct work_struct reconfig_filter; - - /* aggregated multicast list */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - struct netdev_hw_addr_list mc_list; -+#else -+ struct dev_addr_list *mc_list; -+ int mc_count; -+#endif - - bool tim_in_locked_section; /* see ieee80211_beacon_get() */ - ---- a/net/mac80211/iface.c -+++ b/net/mac80211/iface.c -@@ -743,8 +743,13 @@ static void ieee80211_do_stop(struct iee - if (sdata->dev) { - netif_addr_lock_bh(sdata->dev); - spin_lock_bh(&local->filter_lock); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - __hw_addr_unsync(&local->mc_list, &sdata->dev->mc, - sdata->dev->addr_len); -+#else -+ __dev_addr_unsync(&local->mc_list, &local->mc_count, -+ &sdata->dev->mc_list, &sdata->dev->mc_count); -+#endif - spin_unlock_bh(&local->filter_lock); - netif_addr_unlock_bh(sdata->dev); - -@@ -927,10 +932,20 @@ static void ieee80211_set_multicast_list - if (sdata->vif.type != NL80211_IFTYPE_MONITOR && - sdata->vif.type != NL80211_IFTYPE_AP_VLAN && - sdata->vif.type != NL80211_IFTYPE_AP) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - drv_set_multicast_list(local, sdata, &dev->mc); -+#else -+ drv_set_multicast_list(local, sdata, dev->mc_count, -+ dev->mc_list); -+#endif - - spin_lock_bh(&local->filter_lock); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - __hw_addr_sync(&local->mc_list, &dev->mc, dev->addr_len); -+#else -+ __dev_addr_sync(&local->mc_list, &local->mc_count, -+ &dev->mc_list, &dev->mc_count); -+#endif - spin_unlock_bh(&local->filter_lock); - ieee80211_queue_work(&local->hw, &local->reconfig_filter); - } ---- a/net/mac80211/main.c -+++ b/net/mac80211/main.c -@@ -71,7 +71,11 @@ void ieee80211_configure_filter(struct i - spin_lock_bh(&local->filter_lock); - changed_flags = local->filter_flags ^ new_flags; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - mc = drv_prepare_multicast(local, &local->mc_list); -+#else -+ mc = drv_prepare_multicast(local, local->mc_count, local->mc_list); -+#endif - spin_unlock_bh(&local->filter_lock); - - /* be a bit nasty */ -@@ -592,9 +596,11 @@ struct ieee80211_hw *ieee80211_alloc_hw( - wiphy->vht_capa_mod_mask = &mac80211_vht_capa_mod_mask; - - INIT_LIST_HEAD(&local->interfaces); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - - __hw_addr_init(&local->mc_list); - -+#endif - mutex_init(&local->iflist_mtx); - mutex_init(&local->mtx); - ---- a/drivers/net/wireless/ath/ath6kl/main.c -+++ b/drivers/net/wireless/ath/ath6kl/main.c -@@ -1205,7 +1205,11 @@ static void ath6kl_set_multicast_list(st - list_for_each_entry_safe(mc_filter, tmp, &vif->mc_filter, list) { - found = false; - netdev_for_each_mc_addr(ha, ndev) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - if (memcmp(ha->addr, mc_filter->hw_addr, -+#else -+ if (memcmp(ha->dmi_addr, mc_filter->hw_addr, -+#endif - ATH6KL_MCAST_FILTER_MAC_ADDR_SIZE) == 0) { - found = true; - break; -@@ -1239,7 +1243,11 @@ static void ath6kl_set_multicast_list(st - netdev_for_each_mc_addr(ha, ndev) { - found = false; - list_for_each_entry(mc_filter, &vif->mc_filter, list) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - if (memcmp(ha->addr, mc_filter->hw_addr, -+#else -+ if (memcmp(ha->dmi_addr, mc_filter->hw_addr, -+#endif - ATH6KL_MCAST_FILTER_MAC_ADDR_SIZE) == 0) { - found = true; - break; -@@ -1254,7 +1262,11 @@ static void ath6kl_set_multicast_list(st - goto out; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - memcpy(mc_filter->hw_addr, ha->addr, -+#else -+ memcpy(mc_filter->hw_addr, ha->dmi_addr, -+#endif - ATH6KL_MCAST_FILTER_MAC_ADDR_SIZE); - /* Set the multicast filter */ - ath6kl_dbg(ATH6KL_DBG_TRC, diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/INFO b/patches/collateral-evolutions/network/25-multicast-list_head/INFO new file mode 100644 index 000000000000..09b605b2c0cd --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/INFO @@ -0,0 +1,13 @@ +Backport commit 22bedad3ce112d5ca1eaf043d4990fa2ed698c87: + net: convert multicast list to list_head + + Converts the list and the core manipulating with it to be the same as uc_list. + + +uses two functions for adding/removing mc address (normal and "global" + variant) instead of a function parameter. + +removes dev_mcast.c completely. + +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for + manipulation with lists on a sandbox (used in bonding and 80211 drivers) + +This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856 + diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atl1c_atl1c_main.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atl1c_atl1c_main.c new file mode 100644 index 000000000000..84961af695b1 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atl1c_atl1c_main.c @@ -0,0 +1,14 @@ +--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c ++++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +@@ -410,7 +410,11 @@ + + /* comoute mc addresses' hash value ,and put it into hash table */ + netdev_for_each_mc_addr(ha, netdev) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + hash_value = atl1c_hash_mc_addr(hw, ha->addr); ++#else ++ hash_value = atl1c_hash_mc_addr(hw, ha->dmi_addr); ++#endif + atl1c_hash_set(hw, hash_value); + } + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atl1e_atl1e_main.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atl1e_atl1e_main.c new file mode 100644 index 000000000000..830f8c70d1a0 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atl1e_atl1e_main.c @@ -0,0 +1,14 @@ +--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c ++++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +@@ -308,7 +308,11 @@ + + /* comoute mc addresses' hash value ,and put it into hash table */ + netdev_for_each_mc_addr(ha, netdev) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + hash_value = atl1e_hash_mc_addr(hw, ha->addr); ++#else ++ hash_value = atl1e_hash_mc_addr(hw, ha->dmi_addr); ++#endif + atl1e_hash_set(hw, hash_value); + } + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atlx_atl2.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atlx_atl2.c new file mode 100644 index 000000000000..3567501f41f6 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atlx_atl2.c @@ -0,0 +1,14 @@ +--- a/drivers/net/ethernet/atheros/atlx/atl2.c ++++ b/drivers/net/ethernet/atheros/atlx/atl2.c +@@ -159,7 +159,11 @@ + + /* comoute mc addresses' hash value ,and put it into hash table */ + netdev_for_each_mc_addr(ha, netdev) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + hash_value = atl2_hash_mc_addr(hw, ha->addr); ++#else ++ hash_value = atl2_hash_mc_addr(hw, ha->dmi_addr); ++#endif + atl2_hash_set(hw, hash_value); + } + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atlx_atlx.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atlx_atlx.c new file mode 100644 index 000000000000..c41d4c3aa1f4 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_atlx_atlx.c @@ -0,0 +1,14 @@ +--- a/drivers/net/ethernet/atheros/atlx/atlx.c ++++ b/drivers/net/ethernet/atheros/atlx/atlx.c +@@ -149,7 +149,11 @@ + + /* compute mc addresses' hash value ,and put it into hash table */ + netdev_for_each_mc_addr(ha, netdev) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + hash_value = atlx_hash_mc_addr(hw, ha->addr); ++#else ++ hash_value = atlx_hash_mc_addr(hw, ha->dmi_addr); ++#endif + atlx_hash_set(hw, hash_value); + } + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_broadcom_b44.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_broadcom_b44.c new file mode 100644 index 000000000000..ad9fde3e2c40 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_broadcom_b44.c @@ -0,0 +1,14 @@ +--- a/drivers/net/ethernet/broadcom/b44.c ++++ b/drivers/net/ethernet/broadcom/b44.c +@@ -1693,7 +1693,11 @@ + netdev_for_each_mc_addr(ha, dev) { + if (i == num_ents) + break; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + __b44_cam_write(bp, ha->addr, i++ + 1); ++#else ++ __b44_cam_write(bp, ha->dmi_addr, i++ + 1); ++#endif + } + return i+1; + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_adm8211.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_adm8211.c new file mode 100644 index 000000000000..1dd519e2ffb9 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_adm8211.c @@ -0,0 +1,41 @@ +--- a/drivers/net/wireless/adm8211.c ++++ b/drivers/net/wireless/adm8211.c +@@ -1320,19 +1320,37 @@ + } + + static u64 adm8211_prepare_multicast(struct ieee80211_hw *hw, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr_list *mc_list) ++#else ++ int mc_count, struct dev_addr_list *ha) ++#endif + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + unsigned int bit_nr; +- u32 mc_filter[2]; + struct netdev_hw_addr *ha; ++#else ++ unsigned int bit_nr, i; ++#endif ++ u32 mc_filter[2]; + + mc_filter[1] = mc_filter[0] = 0; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + netdev_hw_addr_list_for_each(ha, mc_list) { + bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; ++#else ++ for (i = 0; i < mc_count; i++) { ++ if (!ha) ++ break; ++ bit_nr = ether_crc(ETH_ALEN, ha->dmi_addr) >> 26; ++#endif + + bit_nr &= 0x3F; + mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++ ha = ha->next; ++#endif + } + + return mc_filter[0] | ((u64)(mc_filter[1]) << 32); diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_ath5k_mac80211-ops.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_ath5k_mac80211-ops.c new file mode 100644 index 000000000000..b9d8ba453c1d --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_ath5k_mac80211-ops.c @@ -0,0 +1,55 @@ +--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c ++++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c +@@ -318,20 +318,42 @@ + + static u64 + ath5k_prepare_multicast(struct ieee80211_hw *hw, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr_list *mc_list) ++#else ++ int mc_count, struct dev_addr_list *ha) ++#endif + { + u32 mfilt[2], val; + u8 pos; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr *ha; ++#else ++ int i; ++#endif + + mfilt[0] = 0; + mfilt[1] = 1; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + netdev_hw_addr_list_for_each(ha, mc_list) { ++#else ++ for (i = 0; i < mc_count; i++) { ++ if (!ha) ++ break; ++#endif + /* calculate XOR of eight 6-bit values */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + val = get_unaligned_le32(ha->addr + 0); ++#else ++ val = get_unaligned_le32(ha->dmi_addr + 0); ++#endif + pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + val = get_unaligned_le32(ha->addr + 3); ++#else ++ val = get_unaligned_le32(ha->dmi_addr + 3); ++#endif + pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; + pos &= 0x3f; + mfilt[pos / 32] |= (1 << (pos % 32)); +@@ -340,6 +362,9 @@ + * need to inform below not to reset the mcast */ + /* ath5k_hw_set_mcast_filterindex(ah, + * ha->addr[5]); */ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++ ha = ha->next; ++#endif + } + + return ((u64)(mfilt[1]) << 32) | mfilt[0]; diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_ath6kl_main.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_ath6kl_main.c new file mode 100644 index 000000000000..6923fea12433 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_ath6kl_main.c @@ -0,0 +1,38 @@ +--- a/drivers/net/wireless/ath/ath6kl/main.c ++++ b/drivers/net/wireless/ath/ath6kl/main.c +@@ -1205,7 +1205,11 @@ + list_for_each_entry_safe(mc_filter, tmp, &vif->mc_filter, list) { + found = false; + netdev_for_each_mc_addr(ha, ndev) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + if (memcmp(ha->addr, mc_filter->hw_addr, ++#else ++ if (memcmp(ha->dmi_addr, mc_filter->hw_addr, ++#endif + ATH6KL_MCAST_FILTER_MAC_ADDR_SIZE) == 0) { + found = true; + break; +@@ -1239,7 +1243,11 @@ + netdev_for_each_mc_addr(ha, ndev) { + found = false; + list_for_each_entry(mc_filter, &vif->mc_filter, list) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + if (memcmp(ha->addr, mc_filter->hw_addr, ++#else ++ if (memcmp(ha->dmi_addr, mc_filter->hw_addr, ++#endif + ATH6KL_MCAST_FILTER_MAC_ADDR_SIZE) == 0) { + found = true; + break; +@@ -1254,7 +1262,11 @@ + goto out; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + memcpy(mc_filter->hw_addr, ha->addr, ++#else ++ memcpy(mc_filter->hw_addr, ha->dmi_addr, ++#endif + ATH6KL_MCAST_FILTER_MAC_ADDR_SIZE); + /* Set the multicast filter */ + ath6kl_dbg(ATH6KL_DBG_TRC, diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_carl9170_main.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_carl9170_main.c new file mode 100644 index 000000000000..0b850d7157b3 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ath_carl9170_main.c @@ -0,0 +1,38 @@ +--- a/drivers/net/wireless/ath/carl9170/main.c ++++ b/drivers/net/wireless/ath/carl9170/main.c +@@ -967,17 +967,35 @@ + return err; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw, + struct netdev_hw_addr_list *mc_list) ++#else ++static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, ++ struct dev_addr_list *ha) ++#endif + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr *ha; ++#else ++ int i; ++#endif + u64 mchash; + + /* always get broadcast frames */ + mchash = 1ULL << (0xff >> 2); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + netdev_hw_addr_list_for_each(ha, mc_list) + mchash |= 1ULL << (ha->addr[5] >> 2); ++#else ++ for (i = 0; i < mc_count; i++) { ++ if (WARN_ON(!ha)) ++ break; ++ mchash |= 1ULL << (ha->dmi_addr[5] >> 2); ++ ha = ha->next; ++ } ++#endif + + return mchash; + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_brcm80211_brcmfmac_dhd_linux.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_brcm80211_brcmfmac_dhd_linux.c new file mode 100644 index 000000000000..a6ca11158a44 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_brcm80211_brcmfmac_dhd_linux.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +@@ -103,7 +103,11 @@ + netdev_for_each_mc_addr(ha, ndev) { + if (!cnt) + break; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + memcpy(bufp, ha->addr, ETH_ALEN); ++#else ++ memcpy(bufp, ha->dmi_addr, ETH_ALEN); ++#endif + bufp += ETH_ALEN; + cnt--; + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_libertas_main.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_libertas_main.c new file mode 100644 index 000000000000..8aa9d171280f --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_libertas_main.c @@ -0,0 +1,37 @@ +--- a/drivers/net/wireless/libertas/main.c ++++ b/drivers/net/wireless/libertas/main.c +@@ -349,18 +349,34 @@ + netif_addr_lock_bh(dev); + cnt = netdev_mc_count(dev); + netdev_for_each_mc_addr(ha, dev) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + if (mac_in_list(cmd->maclist, nr_addrs, ha->addr)) { ++#else ++ if (mac_in_list(cmd->maclist, nr_addrs, ha->dmi_addr)) { ++#endif + lbs_deb_net("mcast address %s:%pM skipped\n", dev->name, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + ha->addr); ++#else ++ ha->dmi_addr); ++#endif + cnt--; + continue; + } + + if (i == MRVDRV_MAX_MULTICAST_LIST_SIZE) + break; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + memcpy(&cmd->maclist[6*i], ha->addr, ETH_ALEN); ++#else ++ memcpy(&cmd->maclist[6*i], ha->dmi_addr, ETH_ALEN); ++#endif + lbs_deb_net("mcast address %s:%pM added to filter\n", dev->name, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + ha->addr); ++#else ++ ha->dmi_addr); ++#endif + i++; + cnt--; + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_libertas_tf_main.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_libertas_tf_main.c new file mode 100644 index 000000000000..f681b71b184b --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_libertas_tf_main.c @@ -0,0 +1,39 @@ +--- a/drivers/net/wireless/libertas_tf/main.c ++++ b/drivers/net/wireless/libertas_tf/main.c +@@ -421,20 +421,36 @@ + } + + static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr_list *mc_list) ++#else ++ int mc_count, struct dev_addr_list *ha) ++#endif + { + struct lbtf_private *priv = hw->priv; + int i; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr *ha; + int mc_count = netdev_hw_addr_list_count(mc_list); ++#endif + + if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE) + return mc_count; + + priv->nr_of_multicastmacaddr = mc_count; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + i = 0; + netdev_hw_addr_list_for_each(ha, mc_list) + memcpy(&priv->multicastlist[i++], ha->addr, ETH_ALEN); ++#else ++ for (i = 0; i < mc_count; i++) { ++ if (!ha) ++ break; ++ memcpy(&priv->multicastlist[i], ha->da_addr, ++ ETH_ALEN); ++ ha = ha->next; ++ } ++#endif + + return mc_count; + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwifiex_debugfs.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwifiex_debugfs.c new file mode 100644 index 000000000000..e5ed0b93fdce --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwifiex_debugfs.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/mwifiex/debugfs.c ++++ b/drivers/net/wireless/mwifiex/debugfs.c +@@ -215,7 +215,11 @@ + + netdev_for_each_mc_addr(ha, netdev) + p += sprintf(p, "multicast_address[%d]=\"%pM\"\n", ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + i++, ha->addr); ++#else ++ i++, ha->dmi_addr); ++#endif + } + + p += sprintf(p, "num_tx_bytes = %lu\n", priv->stats.tx_bytes); diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwifiex_sta_ioctl.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwifiex_sta_ioctl.c new file mode 100644 index 000000000000..fb9ca756719b --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwifiex_sta_ioctl.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/mwifiex/sta_ioctl.c ++++ b/drivers/net/wireless/mwifiex/sta_ioctl.c +@@ -43,7 +43,11 @@ + struct netdev_hw_addr *ha; + + netdev_for_each_mc_addr(ha, dev) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + memcpy(&mlist->mac_list[i++], ha->addr, ETH_ALEN); ++#else ++ memcpy(&mlist->mac_list[i++], ha->dmi_addr, ETH_ALEN); ++#endif + + return i; + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwl8k.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwl8k.c new file mode 100644 index 000000000000..ab703c63a7c3 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwl8k.c @@ -0,0 +1,88 @@ +--- a/drivers/net/wireless/mwl8k.c ++++ b/drivers/net/wireless/mwl8k.c +@@ -2656,15 +2656,21 @@ + + static struct mwl8k_cmd_pkt * + __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr_list *mc_list) ++#else ++ int mc_count, struct dev_addr_list *ha) ++#endif + { + struct mwl8k_priv *priv = hw->priv; + struct mwl8k_cmd_mac_multicast_adr *cmd; + int size; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + int mc_count = 0; + + if (mc_list) + mc_count = netdev_hw_addr_list_count(mc_list); ++#endif + + if (allmulti || mc_count > priv->num_mcaddrs) { + allmulti = 1; +@@ -2685,13 +2691,27 @@ + if (allmulti) { + cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_ALL_MULTICAST); + } else if (mc_count) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr *ha; + int i = 0; ++#else ++ int i; ++#endif + + cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_MULTICAST); + cmd->numaddr = cpu_to_le16(mc_count); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + netdev_hw_addr_list_for_each(ha, mc_list) { + memcpy(cmd->addr[i], ha->addr, ETH_ALEN); ++#else ++ for (i = 0; i < mc_count && ha; i++) { ++ if (ha->da_addrlen != ETH_ALEN) { ++ kfree(cmd); ++ return NULL; ++ } ++ memcpy(cmd->addr[i], ha->da_addr, ETH_ALEN); ++ ha = ha->next; ++#endif + } + } + +@@ -5022,7 +5042,11 @@ + } + + static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr_list *mc_list) ++#else ++ int mc_count, struct dev_addr_list *ha) ++#endif + { + struct mwl8k_cmd_pkt *cmd; + +@@ -5033,7 +5057,11 @@ + * we'll end up throwing this packet away and creating a new + * one in mwl8k_configure_filter(). + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + cmd = __mwl8k_cmd_mac_multicast_adr(hw, 0, mc_list); ++#else ++ cmd = __mwl8k_cmd_mac_multicast_adr(hw, 0, mc_count, ha); ++#endif + + return (unsigned long)cmd; + } +@@ -5155,7 +5183,11 @@ + */ + if (*total_flags & FIF_ALLMULTI) { + kfree(cmd); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + cmd = __mwl8k_cmd_mac_multicast_adr(hw, 1, NULL); ++#else ++ cmd = __mwl8k_cmd_mac_multicast_adr(hw, 1, 0, NULL); ++#endif + } + + if (cmd != NULL) { diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_orinoco_hw.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_orinoco_hw.c new file mode 100644 index 000000000000..7b266daa6a63 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_orinoco_hw.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/orinoco/hw.c ++++ b/drivers/net/wireless/orinoco/hw.c +@@ -1093,7 +1093,11 @@ + netdev_for_each_mc_addr(ha, dev) { + if (i == mc_count) + break; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + memcpy(mclist.addr[i++], ha->addr, ETH_ALEN); ++#else ++ memcpy(mclist.addr[i++], ha->dmi_addr, ETH_ALEN); ++#endif + } + + err = hw->ops->write_ltv(hw, USER_BAP, diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_orinoco_hw.h b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_orinoco_hw.h new file mode 100644 index 000000000000..e01119bea192 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_orinoco_hw.h @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/orinoco/hw.h ++++ b/drivers/net/wireless/orinoco/hw.h +@@ -22,6 +22,9 @@ + + /* Forward declarations */ + struct orinoco_private; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++struct dev_addr_list; ++#endif + + int determine_fw_capabilities(struct orinoco_private *priv, char *fw_name, + size_t fw_name_len, u32 *hw_ver); diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_p54_main.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_p54_main.c new file mode 100644 index 000000000000..7c12eefb0052 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_p54_main.c @@ -0,0 +1,45 @@ +--- a/drivers/net/wireless/p54/main.c ++++ b/drivers/net/wireless/p54/main.c +@@ -364,11 +364,18 @@ + return ret; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + static u64 p54_prepare_multicast(struct ieee80211_hw *dev, + struct netdev_hw_addr_list *mc_list) ++#else ++static u64 p54_prepare_multicast(struct ieee80211_hw *dev, int mc_count, ++ struct dev_addr_list *ha) ++#endif + { + struct p54_common *priv = dev->priv; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr *ha; ++#endif + int i; + + BUILD_BUG_ON(ARRAY_SIZE(priv->mc_maclist) != +@@ -378,12 +385,23 @@ + * Otherwise the firmware will drop it and ARP will no longer work. + */ + i = 1; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + priv->mc_maclist_num = netdev_hw_addr_list_count(mc_list) + i; + netdev_hw_addr_list_for_each(ha, mc_list) { + memcpy(&priv->mc_maclist[i], ha->addr, ETH_ALEN); ++#else ++ priv->mc_maclist_num = mc_count + i; ++ while (i <= mc_count) { ++ if (!ha) ++ break; ++ memcpy(&priv->mc_maclist[i], ha->dmi_addr, ETH_ALEN); ++#endif + i++; + if (i >= ARRAY_SIZE(priv->mc_maclist)) + break; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) ++ ha = ha->next; ++#endif + } + + return 1; /* update */ diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rndis_wlan.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rndis_wlan.c new file mode 100644 index 000000000000..bac06a411e1d --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rndis_wlan.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/rndis_wlan.c ++++ b/drivers/net/wireless/rndis_wlan.c +@@ -1629,7 +1629,11 @@ + + netdev_for_each_mc_addr(ha, usbdev->net) + memcpy(mc_addrs + i++ * ETH_ALEN, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + ha->addr, ETH_ALEN); ++#else ++ ha->dmi_addr, ETH_ALEN); ++#endif + } + netif_addr_unlock_bh(usbdev->net); + diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rtl818x_rtl8180_dev.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rtl818x_rtl8180_dev.c new file mode 100644 index 000000000000..499eb6205331 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rtl818x_rtl8180_dev.c @@ -0,0 +1,22 @@ +--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c ++++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c +@@ -818,10 +818,19 @@ + } + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + static u64 rtl8180_prepare_multicast(struct ieee80211_hw *dev, + struct netdev_hw_addr_list *mc_list) ++#else ++static u64 rtl8180_prepare_multicast(struct ieee80211_hw *dev, int mc_count, ++ struct dev_addr_list *mc_list) ++#endif + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + return netdev_hw_addr_list_count(mc_list); ++#else ++ return mc_count; ++#endif + } + + static void rtl8180_configure_filter(struct ieee80211_hw *dev, diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rtl818x_rtl8187_dev.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rtl818x_rtl8187_dev.c new file mode 100644 index 000000000000..536744cc6c2d --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rtl818x_rtl8187_dev.c @@ -0,0 +1,20 @@ +--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c ++++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c +@@ -1290,9 +1290,17 @@ + } + + static u64 rtl8187_prepare_multicast(struct ieee80211_hw *dev, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr_list *mc_list) ++#else ++ int mc_count, struct dev_addr_list *mc_list) ++#endif + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + return netdev_hw_addr_list_count(mc_list); ++#else ++ return mc_count; ++#endif + } + + static void rtl8187_configure_filter(struct ieee80211_hw *dev, diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ti_wlcore_main.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ti_wlcore_main.c new file mode 100644 index 000000000000..0cb7c4b87bcf --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ti_wlcore_main.c @@ -0,0 +1,64 @@ +--- a/drivers/net/wireless/ti/wlcore/main.c ++++ b/drivers/net/wireless/ti/wlcore/main.c +@@ -2952,11 +2952,20 @@ + u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN]; + }; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, + struct netdev_hw_addr_list *mc_list) ++#else ++static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, ++ struct dev_addr_list *mc_list) ++#endif + { + struct wl1271_filter_params *fp; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr *ha; ++#else ++ int i; ++#endif + + fp = kzalloc(sizeof(*fp), GFP_ATOMIC); + if (!fp) { +@@ -2965,16 +2974,40 @@ + } + + /* update multicast filtering parameters */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + fp->mc_list_length = 0; + if (netdev_hw_addr_list_count(mc_list) > ACX_MC_ADDRESS_GROUP_MAX) { ++#else ++ fp->enabled = true; ++ if (mc_count > ACX_MC_ADDRESS_GROUP_MAX) { ++ mc_count = 0; ++#endif + fp->enabled = false; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + } else { + fp->enabled = true; + netdev_hw_addr_list_for_each(ha, mc_list) { ++#else ++ } ++ ++ fp->mc_list_length = 0; ++ for (i = 0; i < mc_count; i++) { ++ if (mc_list->da_addrlen == ETH_ALEN) { ++#endif + memcpy(fp->mc_list[fp->mc_list_length], ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + ha->addr, ETH_ALEN); ++#else ++ mc_list->da_addr, ETH_ALEN); ++#endif + fp->mc_list_length++; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + } ++#else ++ } else ++ wl1271_warning("Unknown mc address length."); ++ mc_list = mc_list->next; ++#endif + } + + return (u64)(unsigned long)fp; diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_zd1211rw_zd_mac.c b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_zd1211rw_zd_mac.c new file mode 100644 index 000000000000..8223b7e5f09c --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_zd1211rw_zd_mac.c @@ -0,0 +1,37 @@ +--- a/drivers/net/wireless/zd1211rw/zd_mac.c ++++ b/drivers/net/wireless/zd1211rw/zd_mac.c +@@ -1215,17 +1215,34 @@ + + + static u64 zd_op_prepare_multicast(struct ieee80211_hw *hw, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr_list *mc_list) ++#else ++ int mc_count, struct dev_addr_list *ha) ++#endif + { + struct zd_mac *mac = zd_hw_mac(hw); + struct zd_mc_hash hash; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr *ha; ++#else ++ int i; ++#endif + + zd_mc_clear(&hash); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + netdev_hw_addr_list_for_each(ha, mc_list) { + dev_dbg_f(zd_mac_dev(mac), "mc addr %pM\n", ha->addr); + zd_mc_add_addr(&hash, ha->addr); ++#else ++ for (i = 0; i < mc_count; i++) { ++ if (!ha) ++ break; ++ dev_dbg_f(zd_mac_dev(mac), "mc addr %pM\n", ha->dmi_addr); ++ zd_mc_add_addr(&hash, ha->dmi_addr); ++ ha = ha->next; ++#endif + } + + return hash.low | ((u64)hash.high << 32); diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/include_net_mac80211.h b/patches/collateral-evolutions/network/25-multicast-list_head/include_net_mac80211.h new file mode 100644 index 000000000000..634e5edf1e35 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/include_net_mac80211.h @@ -0,0 +1,27 @@ +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -2604,14 +2604,24 @@ + void (*stop_ap)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); + + u64 (*prepare_multicast)(struct ieee80211_hw *hw, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr_list *mc_list); ++#else ++ int mc_count, struct dev_addr_list *mc_list); ++#endif + void (*configure_filter)(struct ieee80211_hw *hw, + unsigned int changed_flags, + unsigned int *total_flags, + u64 multicast); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + void (*set_multicast_list)(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, bool allmulti, + struct netdev_hw_addr_list *mc_list); ++#else ++ void (*set_multicast_list)(struct ieee80211_hw *hw, ++ struct ieee80211_vif *vif, bool allmulti, ++ int mc_count, struct dev_addr_list *ha); ++#endif + + int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, + bool set); diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/net_bluetooth_bnep_netdev.c b/patches/collateral-evolutions/network/25-multicast-list_head/net_bluetooth_bnep_netdev.c new file mode 100644 index 000000000000..aca6602c07f2 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/net_bluetooth_bnep_netdev.c @@ -0,0 +1,16 @@ +--- a/net/bluetooth/bnep/netdev.c ++++ b/net/bluetooth/bnep/netdev.c +@@ -93,8 +93,13 @@ + netdev_for_each_mc_addr(ha, dev) { + if (i == BNEP_MAX_MULTICAST_FILTERS) + break; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN); + memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN); ++#else ++ memcpy(__skb_put(skb, ETH_ALEN), ha->dmi_addr, ETH_ALEN); ++ memcpy(__skb_put(skb, ETH_ALEN), ha->dmi_addr, ETH_ALEN); ++#endif + + i++; + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_driver-ops.h b/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_driver-ops.h new file mode 100644 index 000000000000..657d9ba8f333 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_driver-ops.h @@ -0,0 +1,62 @@ +--- a/net/mac80211/driver-ops.h ++++ b/net/mac80211/driver-ops.h +@@ -227,20 +227,35 @@ + } + + static inline u64 drv_prepare_multicast(struct ieee80211_local *local, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr_list *mc_list) ++#else ++ int mc_count, ++ struct dev_addr_list *mc_list) ++#endif + { + u64 ret = 0; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + trace_drv_prepare_multicast(local, mc_list->count); ++#else ++ trace_drv_prepare_multicast(local, mc_count); ++#endif + + if (local->ops->prepare_multicast) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + ret = local->ops->prepare_multicast(&local->hw, mc_list); ++#else ++ ret = local->ops->prepare_multicast(&local->hw, mc_count, ++ mc_list); ++#endif + + trace_drv_return_u64(local, ret); + + return ret; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + static inline void drv_set_multicast_list(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + struct netdev_hw_addr_list *mc_list) +@@ -256,6 +271,23 @@ + allmulti, mc_list); + trace_drv_return_void(local); + } ++#else ++static inline void drv_set_multicast_list(struct ieee80211_local *local, ++ struct ieee80211_sub_if_data *sdata, ++ int mc_count, struct dev_addr_list *ha) ++{ ++ bool allmulti = sdata->flags & IEEE80211_SDATA_ALLMULTI; ++ ++ trace_drv_set_multicast_list(local, sdata, mc_count); ++ ++ check_sdata_in_driver(sdata); ++ ++ if (local->ops->set_multicast_list) ++ local->ops->set_multicast_list(&local->hw, &sdata->vif, ++ allmulti, mc_count, ha); ++ trace_drv_return_void(local); ++} ++#endif + + static inline void drv_configure_filter(struct ieee80211_local *local, + unsigned int changed_flags, diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_ieee80211_i.h b/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_ieee80211_i.h new file mode 100644 index 000000000000..e897989179f2 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_ieee80211_i.h @@ -0,0 +1,15 @@ +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -907,7 +907,12 @@ + struct work_struct reconfig_filter; + + /* aggregated multicast list */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + struct netdev_hw_addr_list mc_list; ++#else ++ struct dev_addr_list *mc_list; ++ int mc_count; ++#endif + + bool tim_in_locked_section; /* see ieee80211_beacon_get() */ + diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_iface.c b/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_iface.c new file mode 100644 index 000000000000..fc9924766199 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_iface.c @@ -0,0 +1,37 @@ +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -743,8 +743,13 @@ + if (sdata->dev) { + netif_addr_lock_bh(sdata->dev); + spin_lock_bh(&local->filter_lock); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + __hw_addr_unsync(&local->mc_list, &sdata->dev->mc, + sdata->dev->addr_len); ++#else ++ __dev_addr_unsync(&local->mc_list, &local->mc_count, ++ &sdata->dev->mc_list, &sdata->dev->mc_count); ++#endif + spin_unlock_bh(&local->filter_lock); + netif_addr_unlock_bh(sdata->dev); + +@@ -927,10 +932,20 @@ + if (sdata->vif.type != NL80211_IFTYPE_MONITOR && + sdata->vif.type != NL80211_IFTYPE_AP_VLAN && + sdata->vif.type != NL80211_IFTYPE_AP) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + drv_set_multicast_list(local, sdata, &dev->mc); ++#else ++ drv_set_multicast_list(local, sdata, dev->mc_count, ++ dev->mc_list); ++#endif + + spin_lock_bh(&local->filter_lock); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + __hw_addr_sync(&local->mc_list, &dev->mc, dev->addr_len); ++#else ++ __dev_addr_sync(&local->mc_list, &local->mc_count, ++ &dev->mc_list, &dev->mc_count); ++#endif + spin_unlock_bh(&local->filter_lock); + ieee80211_queue_work(&local->hw, &local->reconfig_filter); + } diff --git a/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_main.c b/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_main.c new file mode 100644 index 000000000000..03c405b88270 --- /dev/null +++ b/patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_main.c @@ -0,0 +1,26 @@ +--- a/net/mac80211/main.c ++++ b/net/mac80211/main.c +@@ -71,7 +71,11 @@ + spin_lock_bh(&local->filter_lock); + changed_flags = local->filter_flags ^ new_flags; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + mc = drv_prepare_multicast(local, &local->mc_list); ++#else ++ mc = drv_prepare_multicast(local, local->mc_count, local->mc_list); ++#endif + spin_unlock_bh(&local->filter_lock); + + /* be a bit nasty */ +@@ -592,9 +596,11 @@ + wiphy->vht_capa_mod_mask = &mac80211_vht_capa_mod_mask; + + INIT_LIST_HEAD(&local->interfaces); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) + + __hw_addr_init(&local->mc_list); + ++#endif + mutex_init(&local->iflist_mtx); + mutex_init(&local->mtx); + diff --git a/patches/collateral-evolutions/network/26-sdio-quirks.patch b/patches/collateral-evolutions/network/26-sdio-quirks.patch deleted file mode 100644 index d9340f612b51..000000000000 --- a/patches/collateral-evolutions/network/26-sdio-quirks.patch +++ /dev/null @@ -1,32 +0,0 @@ -The quirks attribute is not available on older kernels. - ---- a/drivers/net/wireless/libertas/if_sdio.c -+++ b/drivers/net/wireless/libertas/if_sdio.c -@@ -877,6 +877,7 @@ static int if_sdio_power_on(struct if_sd - if (ret) - goto release; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) - /* For 1-bit transfers to the 8686 model, we need to enable the - * interrupt flag in the CCCR register. Set the MMC_QUIRK_LENIENT_FN0 - * bit to allow access to non-vendor registers. */ -@@ -895,6 +896,7 @@ static int if_sdio_power_on(struct if_sd - if (ret) - goto disable; - } -+#endif - - card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret); - if (ret) ---- a/drivers/net/wireless/mwifiex/sdio.c -+++ b/drivers/net/wireless/mwifiex/sdio.c -@@ -75,7 +75,9 @@ mwifiex_sdio_probe(struct sdio_func *fun - - card->func = func; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; -+#endif - - sdio_claim_host(func); - ret = sdio_enable_func(func); diff --git a/patches/collateral-evolutions/network/26-sdio-quirks/INFO b/patches/collateral-evolutions/network/26-sdio-quirks/INFO new file mode 100644 index 000000000000..e0b21b2c465a --- /dev/null +++ b/patches/collateral-evolutions/network/26-sdio-quirks/INFO @@ -0,0 +1,2 @@ +The quirks attribute is not available on older kernels. + diff --git a/patches/collateral-evolutions/network/26-sdio-quirks/drivers_net_wireless_libertas_if_sdio.c b/patches/collateral-evolutions/network/26-sdio-quirks/drivers_net_wireless_libertas_if_sdio.c new file mode 100644 index 000000000000..7f8485965f1a --- /dev/null +++ b/patches/collateral-evolutions/network/26-sdio-quirks/drivers_net_wireless_libertas_if_sdio.c @@ -0,0 +1,18 @@ +--- a/drivers/net/wireless/libertas/if_sdio.c ++++ b/drivers/net/wireless/libertas/if_sdio.c +@@ -877,6 +877,7 @@ + if (ret) + goto release; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) + /* For 1-bit transfers to the 8686 model, we need to enable the + * interrupt flag in the CCCR register. Set the MMC_QUIRK_LENIENT_FN0 + * bit to allow access to non-vendor registers. */ +@@ -895,6 +896,7 @@ + if (ret) + goto disable; + } ++#endif + + card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret); + if (ret) diff --git a/patches/collateral-evolutions/network/26-sdio-quirks/drivers_net_wireless_mwifiex_sdio.c b/patches/collateral-evolutions/network/26-sdio-quirks/drivers_net_wireless_mwifiex_sdio.c new file mode 100644 index 000000000000..3f8fcf705a8d --- /dev/null +++ b/patches/collateral-evolutions/network/26-sdio-quirks/drivers_net_wireless_mwifiex_sdio.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/mwifiex/sdio.c ++++ b/drivers/net/wireless/mwifiex/sdio.c +@@ -75,7 +75,9 @@ + + card->func = func; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; ++#endif + + sdio_claim_host(func); + ret = sdio_enable_func(func); diff --git a/patches/collateral-evolutions/network/27-hermes-read-pda-conflict.patch b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict.patch deleted file mode 100644 index 4be543fc19e4..000000000000 --- a/patches/collateral-evolutions/network/27-hermes-read-pda-conflict.patch +++ /dev/null @@ -1,56 +0,0 @@ -Rename read_pda to something else because this symbol is used in a -define for something else in arch/um/include/asm/pda.h on older kernels. - ---- a/drivers/net/wireless/orinoco/fw.c -+++ b/drivers/net/wireless/orinoco/fw.c -@@ -123,7 +123,7 @@ orinoco_dl_firmware(struct orinoco_priva - dev_dbg(dev, "Attempting to download firmware %s\n", firmware); - - /* Read current plug data */ -- err = hw->ops->read_pda(hw, pda, fw->pda_addr, fw->pda_size); -+ err = hw->ops->read_pda_h(hw, pda, fw->pda_addr, fw->pda_size); - dev_dbg(dev, "Read PDA returned %d\n", err); - if (err) - goto free; -@@ -225,7 +225,7 @@ symbol_dl_image(struct orinoco_private * - if (!pda) - return -ENOMEM; - -- ret = hw->ops->read_pda(hw, pda, fw->pda_addr, fw->pda_size); -+ ret = hw->ops->read_pda_h(hw, pda, fw->pda_addr, fw->pda_size); - if (ret) - goto free; - } ---- a/drivers/net/wireless/orinoco/hermes.c -+++ b/drivers/net/wireless/orinoco/hermes.c -@@ -767,7 +767,7 @@ static const struct hermes_ops hermes_op - .write_ltv = hermes_write_ltv, - .bap_pread = hermes_bap_pread, - .bap_pwrite = hermes_bap_pwrite, -- .read_pda = hermes_read_pda, -+ .read_pda_h = hermes_read_pda, - .program_init = hermesi_program_init, - .program_end = hermesi_program_end, - .program = hermes_program_bytes, ---- a/drivers/net/wireless/orinoco/hermes.h -+++ b/drivers/net/wireless/orinoco/hermes.h -@@ -393,7 +393,7 @@ struct hermes_ops { - u16 id, u16 offset); - int (*bap_pwrite)(struct hermes *hw, int bap, const void *buf, - int len, u16 id, u16 offset); -- int (*read_pda)(struct hermes *hw, __le16 *pda, -+ int (*read_pda_h)(struct hermes *hw, __le16 *pda, - u32 pda_addr, u16 pda_len); - int (*program_init)(struct hermes *hw, u32 entry_point); - int (*program_end)(struct hermes *hw); ---- a/drivers/net/wireless/orinoco/orinoco_usb.c -+++ b/drivers/net/wireless/orinoco/orinoco_usb.c -@@ -1553,7 +1553,7 @@ static const struct hermes_ops ezusb_ops - .read_ltv = ezusb_read_ltv, - .write_ltv = ezusb_write_ltv, - .bap_pread = ezusb_bap_pread, -- .read_pda = ezusb_read_pda, -+ .read_pda_h = ezusb_read_pda, - .program_init = ezusb_program_init, - .program_end = ezusb_program_end, - .program = ezusb_program, diff --git a/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/INFO b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/INFO new file mode 100644 index 000000000000..f4bf2d212079 --- /dev/null +++ b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/INFO @@ -0,0 +1,3 @@ +Rename read_pda to something else because this symbol is used in a +define for something else in arch/um/include/asm/pda.h on older kernels. + diff --git a/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_fw.c b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_fw.c new file mode 100644 index 000000000000..cd0b9be0219f --- /dev/null +++ b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_fw.c @@ -0,0 +1,20 @@ +--- a/drivers/net/wireless/orinoco/fw.c ++++ b/drivers/net/wireless/orinoco/fw.c +@@ -123,7 +123,7 @@ + dev_dbg(dev, "Attempting to download firmware %s\n", firmware); + + /* Read current plug data */ +- err = hw->ops->read_pda(hw, pda, fw->pda_addr, fw->pda_size); ++ err = hw->ops->read_pda_h(hw, pda, fw->pda_addr, fw->pda_size); + dev_dbg(dev, "Read PDA returned %d\n", err); + if (err) + goto free; +@@ -225,7 +225,7 @@ + if (!pda) + return -ENOMEM; + +- ret = hw->ops->read_pda(hw, pda, fw->pda_addr, fw->pda_size); ++ ret = hw->ops->read_pda_h(hw, pda, fw->pda_addr, fw->pda_size); + if (ret) + goto free; + } diff --git a/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_hermes.c b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_hermes.c new file mode 100644 index 000000000000..e2f4b6874670 --- /dev/null +++ b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_hermes.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/orinoco/hermes.c ++++ b/drivers/net/wireless/orinoco/hermes.c +@@ -767,7 +767,7 @@ + .write_ltv = hermes_write_ltv, + .bap_pread = hermes_bap_pread, + .bap_pwrite = hermes_bap_pwrite, +- .read_pda = hermes_read_pda, ++ .read_pda_h = hermes_read_pda, + .program_init = hermesi_program_init, + .program_end = hermesi_program_end, + .program = hermes_program_bytes, diff --git a/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_hermes.h b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_hermes.h new file mode 100644 index 000000000000..7ae3f0cb33a9 --- /dev/null +++ b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_hermes.h @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/orinoco/hermes.h ++++ b/drivers/net/wireless/orinoco/hermes.h +@@ -393,7 +393,7 @@ + u16 id, u16 offset); + int (*bap_pwrite)(struct hermes *hw, int bap, const void *buf, + int len, u16 id, u16 offset); +- int (*read_pda)(struct hermes *hw, __le16 *pda, ++ int (*read_pda_h)(struct hermes *hw, __le16 *pda, + u32 pda_addr, u16 pda_len); + int (*program_init)(struct hermes *hw, u32 entry_point); + int (*program_end)(struct hermes *hw); diff --git a/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_orinoco_usb.c b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_orinoco_usb.c new file mode 100644 index 000000000000..29c72445f1b5 --- /dev/null +++ b/patches/collateral-evolutions/network/27-hermes-read-pda-conflict/drivers_net_wireless_orinoco_orinoco_usb.c @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/orinoco/orinoco_usb.c ++++ b/drivers/net/wireless/orinoco/orinoco_usb.c +@@ -1553,7 +1553,7 @@ + .read_ltv = ezusb_read_ltv, + .write_ltv = ezusb_write_ltv, + .bap_pread = ezusb_bap_pread, +- .read_pda = ezusb_read_pda, ++ .read_pda_h = ezusb_read_pda, + .program_init = ezusb_program_init, + .program_end = ezusb_program_end, + .program = ezusb_program, diff --git a/patches/collateral-evolutions/network/29-sdio_no_suspend.patch b/patches/collateral-evolutions/network/29-sdio_no_suspend.patch deleted file mode 100644 index 8ac92fe62e8a..000000000000 --- a/patches/collateral-evolutions/network/29-sdio_no_suspend.patch +++ /dev/null @@ -1,199 +0,0 @@ -Starting with commit 66fceb69b72ff7e9cd8da2ca70033982d5376e0e -"libertas: Added callback functions to support SDIO suspend/resume." -libertas uses new functions from the in kernel sdio framework for -suspend and resume that are not backported. - ---- a/drivers/net/wireless/ath/ath6kl/sdio.c -+++ b/drivers/net/wireless/ath/ath6kl/sdio.c -@@ -817,6 +817,7 @@ out: - return ret; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - static int ath6kl_set_sdio_pm_caps(struct ath6kl *ar) - { - struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar); -@@ -950,6 +951,17 @@ static int ath6kl_sdio_resume(struct ath - - return 0; - } -+#else -+static int ath6kl_sdio_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow) -+{ -+ return 0; -+} -+ -+static int ath6kl_sdio_resume(struct ath6kl *ar) -+{ -+ return 0; -+} -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ - - /* set the window address register (using 4-byte register access ). */ - static int ath6kl_set_addrwin_reg(struct ath6kl *ar, u32 reg_addr, u32 addr) -@@ -1263,7 +1275,7 @@ static const struct ath6kl_hif_ops ath6k - .stop = ath6kl_sdio_stop, - }; - --#ifdef CONFIG_PM_SLEEP -+#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - - /* - * Empty handlers so that mmc subsystem doesn't remove us entirely during -@@ -1413,7 +1425,9 @@ static struct sdio_driver ath6kl_sdio_dr - .id_table = ath6kl_sdio_devices, - .probe = ath6kl_sdio_probe, - .remove = ath6kl_sdio_remove, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - .drv.pm = ATH6KL_SDIO_PM_OPS, -+#endif - }; - - static int __init ath6kl_sdio_init(void) ---- a/drivers/net/wireless/libertas/if_sdio.c -+++ b/drivers/net/wireless/libertas/if_sdio.c -@@ -1345,6 +1345,7 @@ static void if_sdio_remove(struct sdio_f - lbs_deb_leave(LBS_DEB_SDIO); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - static int if_sdio_suspend(struct device *dev) - { - struct sdio_func *func = dev_to_sdio_func(dev); -@@ -1403,15 +1404,18 @@ static const struct dev_pm_ops if_sdio_p - .suspend = if_sdio_suspend, - .resume = if_sdio_resume, - }; -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ - - static struct sdio_driver if_sdio_driver = { - .name = "libertas_sdio", - .id_table = if_sdio_ids, - .probe = if_sdio_probe, - .remove = if_sdio_remove, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - .drv = { - .pm = &if_sdio_pm_ops, - }, -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ - }; - - /*******************************************************************/ ---- a/drivers/net/wireless/mwifiex/sdio.c -+++ b/drivers/net/wireless/mwifiex/sdio.c -@@ -129,8 +129,10 @@ mwifiex_sdio_remove(struct sdio_func *fu - wait_for_completion(&adapter->fw_load); - - if (user_rmmod) { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - if (adapter->is_suspended) - mwifiex_sdio_resume(adapter->dev); -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ - - for (i = 0; i < adapter->priv_num; i++) - if ((GET_BSS_ROLE(adapter->priv[i]) == -@@ -147,6 +149,7 @@ mwifiex_sdio_remove(struct sdio_func *fu - kfree(card); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - /* - * SDIO suspend. - * -@@ -246,6 +249,7 @@ static int mwifiex_sdio_resume(struct de - - return 0; - } -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ - - /* Device ID for SD8786 */ - #define SDIO_DEVICE_ID_MARVELL_8786 (0x9116) -@@ -264,10 +268,12 @@ static const struct sdio_device_id mwifi - - MODULE_DEVICE_TABLE(sdio, mwifiex_ids); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - static const struct dev_pm_ops mwifiex_sdio_pm_ops = { - .suspend = mwifiex_sdio_suspend, - .resume = mwifiex_sdio_resume, - }; -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ - - static struct sdio_driver mwifiex_sdio = { - .name = "mwifiex_sdio", -@@ -276,7 +282,9 @@ static struct sdio_driver mwifiex_sdio = - .remove = mwifiex_sdio_remove, - .drv = { - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - .pm = &mwifiex_sdio_pm_ops, -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ - } - }; - ---- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c -@@ -71,7 +71,7 @@ static bool - brcmf_pm_resume_error(struct brcmf_sdio_dev *sdiodev) - { - bool is_err = false; --#ifdef CONFIG_PM_SLEEP -+#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - is_err = atomic_read(&sdiodev->suspend); - #endif - return is_err; -@@ -80,7 +80,7 @@ brcmf_pm_resume_error(struct brcmf_sdio_ - static void - brcmf_pm_resume_wait(struct brcmf_sdio_dev *sdiodev, wait_queue_head_t *wq) - { --#ifdef CONFIG_PM_SLEEP -+#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - int retry = 0; - while (atomic_read(&sdiodev->suspend) && retry++ != 30) - wait_event_timeout(*wq, false, HZ/100); -@@ -546,7 +546,7 @@ static void brcmf_ops_sdio_remove(struct - brcmf_dbg(TRACE, "Exit\n"); - } - --#ifdef CONFIG_PM_SLEEP -+#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - static int brcmf_sdio_suspend(struct device *dev) - { - mmc_pm_flag_t sdio_flags; -@@ -596,7 +596,7 @@ static struct sdio_driver brcmf_sdmmc_dr - .remove = brcmf_ops_sdio_remove, - .name = "brcmfmac", - .id_table = brcmf_sdmmc_ids, --#ifdef CONFIG_PM_SLEEP -+#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - .drv = { - .pm = &brcmf_sdio_pm_ops, - }, ---- a/drivers/bluetooth/btmrvl_sdio.c -+++ b/drivers/bluetooth/btmrvl_sdio.c -@@ -1050,6 +1050,7 @@ static void btmrvl_sdio_remove(struct sd - } - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - static int btmrvl_sdio_suspend(struct device *dev) - { - struct sdio_func *func = dev_to_sdio_func(dev); -@@ -1145,6 +1146,7 @@ static const struct dev_pm_ops btmrvl_sd - .suspend = btmrvl_sdio_suspend, - .resume = btmrvl_sdio_resume, - }; -+#endif - - static struct sdio_driver bt_mrvl_sdio = { - .name = "btmrvl_sdio", -@@ -1153,7 +1155,9 @@ static struct sdio_driver bt_mrvl_sdio = - .remove = btmrvl_sdio_remove, - .drv = { - .owner = THIS_MODULE, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - .pm = &btmrvl_sdio_pm_ops, -+#endif - } - }; - diff --git a/patches/collateral-evolutions/network/29-sdio_no_suspend/INFO b/patches/collateral-evolutions/network/29-sdio_no_suspend/INFO new file mode 100644 index 000000000000..c5e2fe43eede --- /dev/null +++ b/patches/collateral-evolutions/network/29-sdio_no_suspend/INFO @@ -0,0 +1,5 @@ +Starting with commit 66fceb69b72ff7e9cd8da2ca70033982d5376e0e +"libertas: Added callback functions to support SDIO suspend/resume." +libertas uses new functions from the in kernel sdio framework for +suspend and resume that are not backported. + diff --git a/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_bluetooth_btmrvl_sdio.c b/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_bluetooth_btmrvl_sdio.c new file mode 100644 index 000000000000..77f3dac029d2 --- /dev/null +++ b/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_bluetooth_btmrvl_sdio.c @@ -0,0 +1,28 @@ +--- a/drivers/bluetooth/btmrvl_sdio.c ++++ b/drivers/bluetooth/btmrvl_sdio.c +@@ -1050,6 +1050,7 @@ + } + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + static int btmrvl_sdio_suspend(struct device *dev) + { + struct sdio_func *func = dev_to_sdio_func(dev); +@@ -1145,6 +1146,7 @@ + .suspend = btmrvl_sdio_suspend, + .resume = btmrvl_sdio_resume, + }; ++#endif + + static struct sdio_driver bt_mrvl_sdio = { + .name = "btmrvl_sdio", +@@ -1153,7 +1155,9 @@ + .remove = btmrvl_sdio_remove, + .drv = { + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + .pm = &btmrvl_sdio_pm_ops, ++#endif + } + }; + diff --git a/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_ath_ath6kl_sdio.c b/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_ath_ath6kl_sdio.c new file mode 100644 index 000000000000..c67f2309bd29 --- /dev/null +++ b/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_ath_ath6kl_sdio.c @@ -0,0 +1,47 @@ +--- a/drivers/net/wireless/ath/ath6kl/sdio.c ++++ b/drivers/net/wireless/ath/ath6kl/sdio.c +@@ -817,6 +817,7 @@ + return ret; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + static int ath6kl_set_sdio_pm_caps(struct ath6kl *ar) + { + struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar); +@@ -950,6 +951,17 @@ + + return 0; + } ++#else ++static int ath6kl_sdio_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow) ++{ ++ return 0; ++} ++ ++static int ath6kl_sdio_resume(struct ath6kl *ar) ++{ ++ return 0; ++} ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ + + /* set the window address register (using 4-byte register access ). */ + static int ath6kl_set_addrwin_reg(struct ath6kl *ar, u32 reg_addr, u32 addr) +@@ -1263,7 +1275,7 @@ + .stop = ath6kl_sdio_stop, + }; + +-#ifdef CONFIG_PM_SLEEP ++#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + + /* + * Empty handlers so that mmc subsystem doesn't remove us entirely during +@@ -1413,7 +1425,9 @@ + .id_table = ath6kl_sdio_devices, + .probe = ath6kl_sdio_probe, + .remove = ath6kl_sdio_remove, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + .drv.pm = ATH6KL_SDIO_PM_OPS, ++#endif + }; + + static int __init ath6kl_sdio_init(void) diff --git a/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_brcm80211_brcmfmac_bcmsdh_sdmmc.c b/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_brcm80211_brcmfmac_bcmsdh_sdmmc.c new file mode 100644 index 000000000000..d76c3c855750 --- /dev/null +++ b/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_brcm80211_brcmfmac_bcmsdh_sdmmc.c @@ -0,0 +1,38 @@ +--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +@@ -71,7 +71,7 @@ + brcmf_pm_resume_error(struct brcmf_sdio_dev *sdiodev) + { + bool is_err = false; +-#ifdef CONFIG_PM_SLEEP ++#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + is_err = atomic_read(&sdiodev->suspend); + #endif + return is_err; +@@ -80,7 +80,7 @@ + static void + brcmf_pm_resume_wait(struct brcmf_sdio_dev *sdiodev, wait_queue_head_t *wq) + { +-#ifdef CONFIG_PM_SLEEP ++#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + int retry = 0; + while (atomic_read(&sdiodev->suspend) && retry++ != 30) + wait_event_timeout(*wq, false, HZ/100); +@@ -546,7 +546,7 @@ + brcmf_dbg(TRACE, "Exit\n"); + } + +-#ifdef CONFIG_PM_SLEEP ++#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + static int brcmf_sdio_suspend(struct device *dev) + { + mmc_pm_flag_t sdio_flags; +@@ -596,7 +596,7 @@ + .remove = brcmf_ops_sdio_remove, + .name = "brcmfmac", + .id_table = brcmf_sdmmc_ids, +-#ifdef CONFIG_PM_SLEEP ++#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + .drv = { + .pm = &brcmf_sdio_pm_ops, + }, diff --git a/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_libertas_if_sdio.c b/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_libertas_if_sdio.c new file mode 100644 index 000000000000..3ee28d7c2248 --- /dev/null +++ b/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_libertas_if_sdio.c @@ -0,0 +1,29 @@ +--- a/drivers/net/wireless/libertas/if_sdio.c ++++ b/drivers/net/wireless/libertas/if_sdio.c +@@ -1345,6 +1345,7 @@ + lbs_deb_leave(LBS_DEB_SDIO); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + static int if_sdio_suspend(struct device *dev) + { + struct sdio_func *func = dev_to_sdio_func(dev); +@@ -1403,15 +1404,18 @@ + .suspend = if_sdio_suspend, + .resume = if_sdio_resume, + }; ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ + + static struct sdio_driver if_sdio_driver = { + .name = "libertas_sdio", + .id_table = if_sdio_ids, + .probe = if_sdio_probe, + .remove = if_sdio_remove, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + .drv = { + .pm = &if_sdio_pm_ops, + }, ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ + }; + + /*******************************************************************/ diff --git a/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_mwifiex_sdio.c b/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_mwifiex_sdio.c new file mode 100644 index 000000000000..14297c483920 --- /dev/null +++ b/patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_mwifiex_sdio.c @@ -0,0 +1,52 @@ +--- a/drivers/net/wireless/mwifiex/sdio.c ++++ b/drivers/net/wireless/mwifiex/sdio.c +@@ -129,8 +129,10 @@ + wait_for_completion(&adapter->fw_load); + + if (user_rmmod) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + if (adapter->is_suspended) + mwifiex_sdio_resume(adapter->dev); ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ + + for (i = 0; i < adapter->priv_num; i++) + if ((GET_BSS_ROLE(adapter->priv[i]) == +@@ -147,6 +149,7 @@ + kfree(card); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + /* + * SDIO suspend. + * +@@ -246,6 +249,7 @@ + + return 0; + } ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ + + /* Device ID for SD8786 */ + #define SDIO_DEVICE_ID_MARVELL_8786 (0x9116) +@@ -264,10 +268,12 @@ + + MODULE_DEVICE_TABLE(sdio, mwifiex_ids); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + static const struct dev_pm_ops mwifiex_sdio_pm_ops = { + .suspend = mwifiex_sdio_suspend, + .resume = mwifiex_sdio_resume, + }; ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ + + static struct sdio_driver mwifiex_sdio = { + .name = "mwifiex_sdio", +@@ -276,7 +282,9 @@ + .remove = mwifiex_sdio_remove, + .drv = { + .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + .pm = &mwifiex_sdio_pm_ops, ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */ + } + }; + diff --git a/patches/collateral-evolutions/network/30-bridge-port.patch b/patches/collateral-evolutions/network/30-bridge-port/INFO similarity index 56% rename from patches/collateral-evolutions/network/30-bridge-port.patch rename to patches/collateral-evolutions/network/30-bridge-port/INFO index f7b4ea75029e..2d9d24cc1b6a 100644 --- a/patches/collateral-evolutions/network/30-bridge-port.patch +++ b/patches/collateral-evolutions/network/30-bridge-port/INFO @@ -21,25 +21,3 @@ to drivers and not just private bridge code. If that patch doesn't get accepted upstream we'l have to carry this patch around for compat-drivers. ---- a/net/wireless/util.c -+++ b/net/wireless/util.c -@@ -816,7 +816,7 @@ int cfg80211_change_iface(struct cfg8021 - return -EOPNOTSUPP; - - /* if it's part of a bridge, reject changing type to station/ibss */ -- if ((dev->priv_flags & IFF_BRIDGE_PORT) && -+ if (br_port_exists(dev) && - (ntype == NL80211_IFTYPE_ADHOC || - ntype == NL80211_IFTYPE_STATION || - ntype == NL80211_IFTYPE_P2P_CLIENT)) ---- a/net/wireless/nl80211.c -+++ b/net/wireless/nl80211.c -@@ -2298,7 +2298,7 @@ static int nl80211_valid_4addr(struct cf - enum nl80211_iftype iftype) - { - if (!use_4addr) { -- if (netdev && (netdev->priv_flags & IFF_BRIDGE_PORT)) -+ if (netdev && br_port_exists(netdev)) - return -EBUSY; - return 0; - } diff --git a/patches/collateral-evolutions/network/30-bridge-port/net_wireless_nl80211.c b/patches/collateral-evolutions/network/30-bridge-port/net_wireless_nl80211.c new file mode 100644 index 000000000000..35b26338ffea --- /dev/null +++ b/patches/collateral-evolutions/network/30-bridge-port/net_wireless_nl80211.c @@ -0,0 +1,11 @@ +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -2298,7 +2298,7 @@ + enum nl80211_iftype iftype) + { + if (!use_4addr) { +- if (netdev && (netdev->priv_flags & IFF_BRIDGE_PORT)) ++ if (netdev && br_port_exists(netdev)) + return -EBUSY; + return 0; + } diff --git a/patches/collateral-evolutions/network/30-bridge-port/net_wireless_util.c b/patches/collateral-evolutions/network/30-bridge-port/net_wireless_util.c new file mode 100644 index 000000000000..cbbf16fb16b5 --- /dev/null +++ b/patches/collateral-evolutions/network/30-bridge-port/net_wireless_util.c @@ -0,0 +1,11 @@ +--- a/net/wireless/util.c ++++ b/net/wireless/util.c +@@ -816,7 +816,7 @@ + return -EOPNOTSUPP; + + /* if it's part of a bridge, reject changing type to station/ibss */ +- if ((dev->priv_flags & IFF_BRIDGE_PORT) && ++ if (br_port_exists(dev) && + (ntype == NL80211_IFTYPE_ADHOC || + ntype == NL80211_IFTYPE_STATION || + ntype == NL80211_IFTYPE_P2P_CLIENT)) diff --git a/patches/collateral-evolutions/network/32-remove-ns-type.patch b/patches/collateral-evolutions/network/32-remove-ns-type/net_wireless_sysfs.c similarity index 83% rename from patches/collateral-evolutions/network/32-remove-ns-type.patch rename to patches/collateral-evolutions/network/32-remove-ns-type/net_wireless_sysfs.c index 9f25775b49e6..0a2ac04d82f7 100644 --- a/patches/collateral-evolutions/network/32-remove-ns-type.patch +++ b/patches/collateral-evolutions/network/32-remove-ns-type/net_wireless_sysfs.c @@ -1,6 +1,6 @@ --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c -@@ -133,12 +133,14 @@ static int wiphy_resume(struct device *d +@@ -133,12 +133,14 @@ return ret; } @@ -15,7 +15,7 @@ struct class ieee80211_class = { .name = "ieee80211", -@@ -148,8 +150,10 @@ struct class ieee80211_class = { +@@ -148,8 +150,10 @@ .dev_uevent = wiphy_uevent, .suspend = wiphy_suspend, .resume = wiphy_resume, diff --git a/patches/collateral-evolutions/network/35-fix-makefile-includes.patch b/patches/collateral-evolutions/network/35-fix-makefile-includes.patch deleted file mode 100644 index d0e0089c6b1e..000000000000 --- a/patches/collateral-evolutions/network/35-fix-makefile-includes.patch +++ /dev/null @@ -1,71 +0,0 @@ -When some other headers are included in some makefile it must be -relative to the current object file processed. When giving the full -path the make process will search in the kernel tree for the headers. - ---- a/drivers/net/wireless/rtl818x/rtl8180/Makefile -+++ b/drivers/net/wireless/rtl818x/rtl8180/Makefile -@@ -2,4 +2,4 @@ rtl8180-objs := dev.o rtl8225.o sa2400. - - obj-$(CONFIG_RTL8180) += rtl8180.o - --ccflags-y += -Idrivers/net/wireless/rtl818x -+ccflags-y += -I$(obj)/.. ---- a/drivers/net/wireless/rtl818x/rtl8187/Makefile -+++ b/drivers/net/wireless/rtl818x/rtl8187/Makefile -@@ -2,4 +2,4 @@ rtl8187-objs := dev.o rtl8225.o leds.o - - obj-$(CONFIG_RTL8187) += rtl8187.o - --ccflags-y += -Idrivers/net/wireless/rtl818x -+ccflags-y += -I$(obj)/.. ---- a/drivers/net/wireless/brcm80211/brcmfmac/Makefile -+++ b/drivers/net/wireless/brcm80211/brcmfmac/Makefile -@@ -16,8 +16,8 @@ - # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ccflags-y += \ -- -Idrivers/net/wireless/brcm80211/brcmfmac \ -- -Idrivers/net/wireless/brcm80211/include -+ -I$(obj) \ -+ -I$(obj)/../include - - ccflags-y += -D__CHECK_ENDIAN__ - ---- a/drivers/net/wireless/brcm80211/brcmsmac/Makefile -+++ b/drivers/net/wireless/brcm80211/brcmsmac/Makefile -@@ -17,9 +17,9 @@ - - ccflags-y := \ - -D__CHECK_ENDIAN__ \ -- -Idrivers/net/wireless/brcm80211/brcmsmac \ -- -Idrivers/net/wireless/brcm80211/brcmsmac/phy \ -- -Idrivers/net/wireless/brcm80211/include -+ -I$(obj) \ -+ -I$(obj)/phy \ -+ -I$(obj)/../include - - BRCMSMAC_OFILES := \ - mac80211_if.o \ ---- a/drivers/net/wireless/brcm80211/brcmutil/Makefile -+++ b/drivers/net/wireless/brcm80211/brcmutil/Makefile -@@ -16,8 +16,8 @@ - # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ccflags-y := \ -- -Idrivers/net/wireless/brcm80211/brcmutil \ -- -Idrivers/net/wireless/brcm80211/include -+ -I$(obj) \ -+ -I$(obj)/../include - - BRCMUTIL_OFILES := \ - utils.o ---- a/net/wireless/Makefile -+++ b/net/wireless/Makefile -@@ -20,6 +20,6 @@ CFLAGS_trace.o := -I$(src) - ccflags-y += -D__CHECK_ENDIAN__ - - $(obj)/regdb.c: $(src)/db.txt $(src)/genregdb.awk -- @$(AWK) -f $(srctree)/$(src)/genregdb.awk < $< > $@ -+ @$(AWK) -f $(src)/genregdb.awk < $< > $@ - - clean-files := regdb.c diff --git a/patches/collateral-evolutions/network/35-fix-makefile-includes/INFO b/patches/collateral-evolutions/network/35-fix-makefile-includes/INFO new file mode 100644 index 000000000000..09d901a47072 --- /dev/null +++ b/patches/collateral-evolutions/network/35-fix-makefile-includes/INFO @@ -0,0 +1,4 @@ +When some other headers are included in some makefile it must be +relative to the current object file processed. When giving the full +path the make process will search in the kernel tree for the headers. + diff --git a/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmfmac_Makefile b/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmfmac_Makefile new file mode 100644 index 000000000000..aa914462c273 --- /dev/null +++ b/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmfmac_Makefile @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/brcm80211/brcmfmac/Makefile ++++ b/drivers/net/wireless/brcm80211/brcmfmac/Makefile +@@ -16,8 +16,8 @@ + # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ccflags-y += \ +- -Idrivers/net/wireless/brcm80211/brcmfmac \ +- -Idrivers/net/wireless/brcm80211/include ++ -I$(obj) \ ++ -I$(obj)/../include + + ccflags-y += -D__CHECK_ENDIAN__ + diff --git a/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmsmac_Makefile b/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmsmac_Makefile new file mode 100644 index 000000000000..973adaf62275 --- /dev/null +++ b/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmsmac_Makefile @@ -0,0 +1,15 @@ +--- a/drivers/net/wireless/brcm80211/brcmsmac/Makefile ++++ b/drivers/net/wireless/brcm80211/brcmsmac/Makefile +@@ -17,9 +17,9 @@ + + ccflags-y := \ + -D__CHECK_ENDIAN__ \ +- -Idrivers/net/wireless/brcm80211/brcmsmac \ +- -Idrivers/net/wireless/brcm80211/brcmsmac/phy \ +- -Idrivers/net/wireless/brcm80211/include ++ -I$(obj) \ ++ -I$(obj)/phy \ ++ -I$(obj)/../include + + BRCMSMAC_OFILES := \ + mac80211_if.o \ diff --git a/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmutil_Makefile b/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmutil_Makefile new file mode 100644 index 000000000000..13545013ecb7 --- /dev/null +++ b/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_brcm80211_brcmutil_Makefile @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/brcm80211/brcmutil/Makefile ++++ b/drivers/net/wireless/brcm80211/brcmutil/Makefile +@@ -16,8 +16,8 @@ + # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ccflags-y := \ +- -Idrivers/net/wireless/brcm80211/brcmutil \ +- -Idrivers/net/wireless/brcm80211/include ++ -I$(obj) \ ++ -I$(obj)/../include + + BRCMUTIL_OFILES := \ + utils.o diff --git a/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_rtl818x_rtl8180_Makefile b/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_rtl818x_rtl8180_Makefile new file mode 100644 index 000000000000..8160ae02b1ce --- /dev/null +++ b/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_rtl818x_rtl8180_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/net/wireless/rtl818x/rtl8180/Makefile ++++ b/drivers/net/wireless/rtl818x/rtl8180/Makefile +@@ -2,4 +2,4 @@ + + obj-$(CONFIG_RTL8180) += rtl8180.o + +-ccflags-y += -Idrivers/net/wireless/rtl818x ++ccflags-y += -I$(obj)/.. diff --git a/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_rtl818x_rtl8187_Makefile b/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_rtl818x_rtl8187_Makefile new file mode 100644 index 000000000000..7ba4696ffe9b --- /dev/null +++ b/patches/collateral-evolutions/network/35-fix-makefile-includes/drivers_net_wireless_rtl818x_rtl8187_Makefile @@ -0,0 +1,8 @@ +--- a/drivers/net/wireless/rtl818x/rtl8187/Makefile ++++ b/drivers/net/wireless/rtl818x/rtl8187/Makefile +@@ -2,4 +2,4 @@ + + obj-$(CONFIG_RTL8187) += rtl8187.o + +-ccflags-y += -Idrivers/net/wireless/rtl818x ++ccflags-y += -I$(obj)/.. diff --git a/patches/collateral-evolutions/network/35-fix-makefile-includes/net_wireless_Makefile b/patches/collateral-evolutions/network/35-fix-makefile-includes/net_wireless_Makefile new file mode 100644 index 000000000000..cb9f890b2de7 --- /dev/null +++ b/patches/collateral-evolutions/network/35-fix-makefile-includes/net_wireless_Makefile @@ -0,0 +1,10 @@ +--- a/net/wireless/Makefile ++++ b/net/wireless/Makefile +@@ -20,6 +20,6 @@ + ccflags-y += -D__CHECK_ENDIAN__ + + $(obj)/regdb.c: $(src)/db.txt $(src)/genregdb.awk +- @$(AWK) -f $(srctree)/$(src)/genregdb.awk < $< > $@ ++ @$(AWK) -f $(src)/genregdb.awk < $< > $@ + + clean-files := regdb.c diff --git a/patches/collateral-evolutions/network/36-workqueue/INFO b/patches/collateral-evolutions/network/36-workqueue/INFO new file mode 100644 index 000000000000..a09aaa27544b --- /dev/null +++ b/patches/collateral-evolutions/network/36-workqueue/INFO @@ -0,0 +1,3 @@ +Backport commit 99b88a0ecbdbc6df03527292571b2b442965814a +The rest is backported in include/linux/compat-2.6.37.h + diff --git a/patches/collateral-evolutions/network/36-workqueue.patch b/patches/collateral-evolutions/network/36-workqueue/net_mac80211_main.c similarity index 58% rename from patches/collateral-evolutions/network/36-workqueue.patch rename to patches/collateral-evolutions/network/36-workqueue/net_mac80211_main.c index c2c6bbd6f0ae..dbcbd4431015 100644 --- a/patches/collateral-evolutions/network/36-workqueue.patch +++ b/patches/collateral-evolutions/network/36-workqueue/net_mac80211_main.c @@ -1,9 +1,6 @@ -Backport commit 99b88a0ecbdbc6df03527292571b2b442965814a -The rest is backported in include/linux/compat-2.6.37.h - --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -1152,6 +1152,10 @@ static void __exit ieee80211_exit(void) +@@ -1152,6 +1152,10 @@ rc80211_minstrel_ht_exit(); rc80211_minstrel_exit(); diff --git a/patches/collateral-evolutions/network/37-vsnprintk.patch b/patches/collateral-evolutions/network/37-vsnprintk/drivers_net_wireless_ath_main.c similarity index 84% rename from patches/collateral-evolutions/network/37-vsnprintk.patch rename to patches/collateral-evolutions/network/37-vsnprintk/drivers_net_wireless_ath_main.c index 2a3d30440034..b09ca7aee4b1 100644 --- a/patches/collateral-evolutions/network/37-vsnprintk.patch +++ b/patches/collateral-evolutions/network/37-vsnprintk/drivers_net_wireless_ath_main.c @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/main.c +++ b/drivers/net/wireless/ath/main.c -@@ -59,6 +59,7 @@ struct sk_buff *ath_rxbuf_alloc(struct a +@@ -59,6 +59,7 @@ } EXPORT_SYMBOL(ath_rxbuf_alloc); @@ -8,7 +8,7 @@ void ath_printk(const char *level, const struct ath_common* common, const char *fmt, ...) { -@@ -78,4 +79,24 @@ void ath_printk(const char *level, const +@@ -78,4 +79,24 @@ va_end(args); } diff --git a/patches/collateral-evolutions/network/38-led-max-brightness.patch b/patches/collateral-evolutions/network/38-led-max-brightness.patch deleted file mode 100644 index 1495815c09db..000000000000 --- a/patches/collateral-evolutions/network/38-led-max-brightness.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/drivers/net/wireless/iwlegacy/common.c -+++ b/drivers/net/wireless/iwlegacy/common.c -@@ -562,7 +562,9 @@ il_leds_init(struct il_priv *il) - kasprintf(GFP_KERNEL, "%s-led", wiphy_name(il->hw->wiphy)); - il->led.brightness_set = il_led_brightness_set; - il->led.blink_set = il_led_blink_set; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) - il->led.max_brightness = 1; -+#endif - - switch (mode) { - case IL_LED_DEFAULT: ---- a/drivers/net/wireless/iwlwifi/dvm/led.c -+++ b/drivers/net/wireless/iwlwifi/dvm/led.c -@@ -187,7 +187,9 @@ void iwl_leds_init(struct iwl_priv *priv - wiphy_name(priv->hw->wiphy)); - priv->led.brightness_set = iwl_led_brightness_set; - priv->led.blink_set = iwl_led_blink_set; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) - priv->led.max_brightness = 1; -+#endif - - switch (mode) { - case IWL_LED_DEFAULT: ---- a/drivers/net/wireless/iwlwifi/mvm/led.c -+++ b/drivers/net/wireless/iwlwifi/mvm/led.c -@@ -108,7 +108,9 @@ int iwl_mvm_leds_init(struct iwl_mvm *mv - mvm->led.name = kasprintf(GFP_KERNEL, "%s-led", - wiphy_name(mvm->hw->wiphy)); - mvm->led.brightness_set = iwl_led_brightness_set; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) - mvm->led.max_brightness = 1; -+#endif - - if (mode == IWL_LED_RF_STATE) - mvm->led.default_trigger = diff --git a/patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlegacy_common.c b/patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlegacy_common.c new file mode 100644 index 000000000000..dec9bab87642 --- /dev/null +++ b/patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlegacy_common.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/iwlegacy/common.c ++++ b/drivers/net/wireless/iwlegacy/common.c +@@ -562,7 +562,9 @@ + kasprintf(GFP_KERNEL, "%s-led", wiphy_name(il->hw->wiphy)); + il->led.brightness_set = il_led_brightness_set; + il->led.blink_set = il_led_blink_set; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) + il->led.max_brightness = 1; ++#endif + + switch (mode) { + case IL_LED_DEFAULT: diff --git a/patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlwifi_dvm_led.c b/patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlwifi_dvm_led.c new file mode 100644 index 000000000000..fdc7708dcc4d --- /dev/null +++ b/patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlwifi_dvm_led.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/iwlwifi/dvm/led.c ++++ b/drivers/net/wireless/iwlwifi/dvm/led.c +@@ -187,7 +187,9 @@ + wiphy_name(priv->hw->wiphy)); + priv->led.brightness_set = iwl_led_brightness_set; + priv->led.blink_set = iwl_led_blink_set; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) + priv->led.max_brightness = 1; ++#endif + + switch (mode) { + case IWL_LED_DEFAULT: diff --git a/patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlwifi_mvm_led.c b/patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlwifi_mvm_led.c new file mode 100644 index 000000000000..e4093b571955 --- /dev/null +++ b/patches/collateral-evolutions/network/38-led-max-brightness/drivers_net_wireless_iwlwifi_mvm_led.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/iwlwifi/mvm/led.c ++++ b/drivers/net/wireless/iwlwifi/mvm/led.c +@@ -108,7 +108,9 @@ + mvm->led.name = kasprintf(GFP_KERNEL, "%s-led", + wiphy_name(mvm->hw->wiphy)); + mvm->led.brightness_set = iwl_led_brightness_set; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) + mvm->led.max_brightness = 1; ++#endif + + if (mode == IWL_LED_RF_STATE) + mvm->led.default_trigger = diff --git a/patches/collateral-evolutions/network/39-remove_blink_set.patch b/patches/collateral-evolutions/network/39-remove_blink_set.patch deleted file mode 100644 index dc9af73fb7b1..000000000000 --- a/patches/collateral-evolutions/network/39-remove_blink_set.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- a/drivers/net/wireless/iwlegacy/common.c -+++ b/drivers/net/wireless/iwlegacy/common.c -@@ -540,6 +540,7 @@ il_led_brightness_set(struct led_classde - il_led_cmd(il, on, 0); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) - static int - il_led_blink_set(struct led_classdev *led_cdev, unsigned long *delay_on, - unsigned long *delay_off) -@@ -548,6 +549,7 @@ il_led_blink_set(struct led_classdev *le - - return il_led_cmd(il, *delay_on, *delay_off); - } -+#endif - - void - il_leds_init(struct il_priv *il) -@@ -561,7 +563,9 @@ il_leds_init(struct il_priv *il) - il->led.name = - kasprintf(GFP_KERNEL, "%s-led", wiphy_name(il->hw->wiphy)); - il->led.brightness_set = il_led_brightness_set; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) - il->led.blink_set = il_led_blink_set; -+#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) - il->led.max_brightness = 1; - #endif ---- a/drivers/net/wireless/iwlwifi/dvm/led.c -+++ b/drivers/net/wireless/iwlwifi/dvm/led.c -@@ -162,6 +162,7 @@ static void iwl_led_brightness_set(struc - iwl_led_cmd(priv, on, 0); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) - static int iwl_led_blink_set(struct led_classdev *led_cdev, - unsigned long *delay_on, - unsigned long *delay_off) -@@ -170,6 +171,7 @@ static int iwl_led_blink_set(struct led_ - - return iwl_led_cmd(priv, *delay_on, *delay_off); - } -+#endif - - void iwl_leds_init(struct iwl_priv *priv) - { -@@ -186,7 +188,9 @@ void iwl_leds_init(struct iwl_priv *priv - priv->led.name = kasprintf(GFP_KERNEL, "%s-led", - wiphy_name(priv->hw->wiphy)); - priv->led.brightness_set = iwl_led_brightness_set; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) - priv->led.blink_set = iwl_led_blink_set; -+#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) - priv->led.max_brightness = 1; - #endif diff --git a/patches/collateral-evolutions/network/39-remove_blink_set/drivers_net_wireless_iwlegacy_common.c b/patches/collateral-evolutions/network/39-remove_blink_set/drivers_net_wireless_iwlegacy_common.c new file mode 100644 index 000000000000..0704ecba676f --- /dev/null +++ b/patches/collateral-evolutions/network/39-remove_blink_set/drivers_net_wireless_iwlegacy_common.c @@ -0,0 +1,28 @@ +--- a/drivers/net/wireless/iwlegacy/common.c ++++ b/drivers/net/wireless/iwlegacy/common.c +@@ -540,6 +540,7 @@ + il_led_cmd(il, on, 0); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) + static int + il_led_blink_set(struct led_classdev *led_cdev, unsigned long *delay_on, + unsigned long *delay_off) +@@ -548,6 +549,7 @@ + + return il_led_cmd(il, *delay_on, *delay_off); + } ++#endif + + void + il_leds_init(struct il_priv *il) +@@ -561,7 +563,9 @@ + il->led.name = + kasprintf(GFP_KERNEL, "%s-led", wiphy_name(il->hw->wiphy)); + il->led.brightness_set = il_led_brightness_set; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) + il->led.blink_set = il_led_blink_set; ++#endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) + il->led.max_brightness = 1; + #endif diff --git a/patches/collateral-evolutions/network/39-remove_blink_set/drivers_net_wireless_iwlwifi_dvm_led.c b/patches/collateral-evolutions/network/39-remove_blink_set/drivers_net_wireless_iwlwifi_dvm_led.c new file mode 100644 index 000000000000..b73774aa689d --- /dev/null +++ b/patches/collateral-evolutions/network/39-remove_blink_set/drivers_net_wireless_iwlwifi_dvm_led.c @@ -0,0 +1,28 @@ +--- a/drivers/net/wireless/iwlwifi/dvm/led.c ++++ b/drivers/net/wireless/iwlwifi/dvm/led.c +@@ -162,6 +162,7 @@ + iwl_led_cmd(priv, on, 0); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) + static int iwl_led_blink_set(struct led_classdev *led_cdev, + unsigned long *delay_on, + unsigned long *delay_off) +@@ -170,6 +171,7 @@ + + return iwl_led_cmd(priv, *delay_on, *delay_off); + } ++#endif + + void iwl_leds_init(struct iwl_priv *priv) + { +@@ -186,7 +188,9 @@ + priv->led.name = kasprintf(GFP_KERNEL, "%s-led", + wiphy_name(priv->hw->wiphy)); + priv->led.brightness_set = iwl_led_brightness_set; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) + priv->led.blink_set = iwl_led_blink_set; ++#endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) + priv->led.max_brightness = 1; + #endif diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features.patch b/patches/collateral-evolutions/network/40-netdev-hw-features.patch deleted file mode 100644 index b96b5994f655..000000000000 --- a/patches/collateral-evolutions/network/40-netdev-hw-features.patch +++ /dev/null @@ -1,372 +0,0 @@ -This reverts the commits that deal with hw_features and -set_features, fix_features for kernels < 2.6.39. - -Below is one example commit being reverted, but we also do -this for ath6kl and any driver that uses this in this file. - -commit 782d640afd15af7a1faf01cfe566ca4ac511319d -Author: Michał Mirosław -Date: Thu Apr 7 07:32:18 2011 +0000 - - net: atl*: convert to hw_features - - Things left as they were: - - atl1: is RX checksum really enabled? - - atl2: copy-paste from atl1, with-errors-on-modify I presume - - atl1c: there's a bug: MTU can't be changed if device is not up - - Signed-off-by: Michał Mirosław - Signed-off-by: David S. Miller - ---- a/drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c -+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c -@@ -114,6 +114,13 @@ static int atl1c_set_settings(struct net - return 0; - } - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) -+static u32 atl1c_get_tx_csum(struct net_device *netdev) -+{ -+ return (netdev->features & NETIF_F_HW_CSUM) != 0; -+} -+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ -+ - static u32 atl1c_get_msglevel(struct net_device *netdev) - { - struct atl1c_adapter *adapter = netdev_priv(netdev); -@@ -301,6 +308,11 @@ static const struct ethtool_ops atl1c_et - .get_link = ethtool_op_get_link, - .get_eeprom_len = atl1c_get_eeprom_len, - .get_eeprom = atl1c_get_eeprom, -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) -+ .get_tx_csum = atl1c_get_tx_csum, -+ .get_sg = ethtool_op_get_sg, -+ .set_sg = ethtool_op_set_sg, -+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ - }; - - void atl1c_set_ethtool_ops(struct net_device *netdev) ---- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -@@ -491,6 +491,7 @@ static void atl1c_set_rxbufsize(struct a - roundup(mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN, 8) : AT_RX_BUF_SIZE; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - static netdev_features_t atl1c_fix_features(struct net_device *netdev, - netdev_features_t features) - { -@@ -519,6 +520,7 @@ static int atl1c_set_features(struct net - - return 0; - } -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - - /** - * atl1c_change_mtu - Change the Maximum Transfer Unit -@@ -551,8 +553,19 @@ static int atl1c_change_mtu(struct net_d - netdev->mtu = new_mtu; - adapter->hw.max_frame_size = new_mtu; - atl1c_set_rxbufsize(adapter, netdev); -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) -+ if (new_mtu > MAX_TSO_FRAME_SIZE) { -+ adapter->netdev->features &= ~NETIF_F_TSO; -+ adapter->netdev->features &= ~NETIF_F_TSO6; -+ } else { -+ adapter->netdev->features |= NETIF_F_TSO; -+ adapter->netdev->features |= NETIF_F_TSO6; -+ } -+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ - atl1c_down(adapter); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - netdev_update_features(netdev); -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - atl1c_up(adapter); - clear_bit(__AT_RESETTING, &adapter->flags); - } -@@ -2459,8 +2472,10 @@ static const struct net_device_ops atl1c - .ndo_set_mac_address = atl1c_set_mac_addr, - .ndo_set_rx_mode = atl1c_set_multi, - .ndo_change_mtu = atl1c_change_mtu, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - .ndo_fix_features = atl1c_fix_features, - .ndo_set_features = atl1c_set_features, -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - .ndo_do_ioctl = atl1c_ioctl, - .ndo_tx_timeout = atl1c_tx_timeout, - .ndo_get_stats = atl1c_get_stats, -@@ -2479,6 +2494,7 @@ static int atl1c_init_netdev(struct net_ - atl1c_set_ethtool_ops(netdev); - - /* TODO: add when ready */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - netdev->hw_features = NETIF_F_SG | - NETIF_F_HW_CSUM | - NETIF_F_HW_VLAN_RX | -@@ -2486,6 +2502,14 @@ static int atl1c_init_netdev(struct net_ - NETIF_F_TSO6; - netdev->features = netdev->hw_features | - NETIF_F_HW_VLAN_TX; -+#else -+ netdev->features = NETIF_F_SG | -+ NETIF_F_HW_CSUM | -+ NETIF_F_HW_VLAN_TX | -+ NETIF_F_HW_VLAN_RX | -+ NETIF_F_TSO | -+ NETIF_F_TSO6; -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - return 0; - } - ---- a/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c -+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c -@@ -384,6 +384,11 @@ static const struct ethtool_ops atl1e_et - .get_eeprom_len = atl1e_get_eeprom_len, - .get_eeprom = atl1e_get_eeprom, - .set_eeprom = atl1e_set_eeprom, -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) -+ .set_tx_csum = ethtool_op_set_tx_hw_csum, -+ .set_sg = ethtool_op_set_sg, -+ .set_tso = ethtool_op_set_tso, -+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ - }; - - void atl1e_set_ethtool_ops(struct net_device *netdev) ---- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -@@ -375,6 +375,7 @@ static int atl1e_set_mac_addr(struct net - return 0; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - static netdev_features_t atl1e_fix_features(struct net_device *netdev, - netdev_features_t features) - { -@@ -400,6 +401,7 @@ static int atl1e_set_features(struct net - - return 0; - } -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - - /** - * atl1e_change_mtu - Change the Maximum Transfer Unit -@@ -1925,7 +1927,11 @@ void atl1e_down(struct atl1e_adapter *ad - * reschedule our watchdog timer */ - set_bit(__AT_DOWN, &adapter->flags); - -+#if defined(NETIF_F_LLTX) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - netif_stop_queue(netdev); -+#else -+ netif_tx_disable(netdev); -+#endif - - /* reset MAC to disable all RX/TX */ - atl1e_reset_hw(&adapter->hw); -@@ -2195,8 +2201,10 @@ static const struct net_device_ops atl1e - .ndo_set_rx_mode = atl1e_set_multi, - .ndo_validate_addr = eth_validate_addr, - .ndo_set_mac_address = atl1e_set_mac_addr, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - .ndo_fix_features = atl1e_fix_features, - .ndo_set_features = atl1e_set_features, -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - .ndo_change_mtu = atl1e_change_mtu, - .ndo_do_ioctl = atl1e_ioctl, - .ndo_tx_timeout = atl1e_tx_timeout, -@@ -2216,10 +2224,15 @@ static int atl1e_init_netdev(struct net_ - netdev->watchdog_timeo = AT_TX_WATCHDOG; - atl1e_set_ethtool_ops(netdev); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - netdev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO | - NETIF_F_HW_VLAN_RX; - netdev->features = netdev->hw_features | NETIF_F_LLTX | - NETIF_F_HW_VLAN_TX; -+#else -+ netdev->features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO | -+ NETIF_F_HW_VLAN_RX | NETIF_F_LLTX | NETIF_F_HW_VLAN_TX; -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - - return 0; - } ---- a/drivers/net/ethernet/atheros/atlx/atl1.c -+++ b/drivers/net/ethernet/atheros/atlx/atl1.c -@@ -2917,8 +2917,10 @@ static const struct net_device_ops atl1_ - .ndo_validate_addr = eth_validate_addr, - .ndo_set_mac_address = atl1_set_mac, - .ndo_change_mtu = atl1_change_mtu, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - .ndo_fix_features = atlx_fix_features, - .ndo_set_features = atlx_set_features, -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - .ndo_do_ioctl = atlx_ioctl, - .ndo_tx_timeout = atlx_tx_timeout, - #ifdef CONFIG_NET_POLL_CONTROLLER -@@ -3028,11 +3030,13 @@ static int atl1_probe(struct pci_dev *pd - netdev->features |= NETIF_F_SG; - netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - netdev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_TSO | - NETIF_F_HW_VLAN_RX; - - /* is this valid? see atl1_setup_mac_ctrl() */ - netdev->features |= NETIF_F_RXCSUM; -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - - /* - * patch for some L1 of old version, -@@ -3645,6 +3649,14 @@ static int atl1_set_pauseparam(struct ne - return 0; - } - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) -+/* FIXME: is this right? -- CHS */ -+static u32 atl1_get_rx_csum(struct net_device *netdev) -+{ -+ return 1; -+} -+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ -+ - static void atl1_get_strings(struct net_device *netdev, u32 stringset, - u8 *data) - { -@@ -3717,4 +3729,10 @@ static const struct ethtool_ops atl1_eth - .nway_reset = atl1_nway_reset, - .get_ethtool_stats = atl1_get_ethtool_stats, - .get_sset_count = atl1_get_sset_count, -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) -+ .get_rx_csum = atl1_get_rx_csum, -+ .set_tx_csum = ethtool_op_set_tx_hw_csum, -+ .set_sg = ethtool_op_set_sg, -+ .set_tso = ethtool_op_set_tso, -+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ - }; ---- a/drivers/net/ethernet/atheros/atlx/atl2.c -+++ b/drivers/net/ethernet/atheros/atlx/atl2.c -@@ -396,6 +396,7 @@ static void atl2_restore_vlan(struct atl - atl2_vlan_mode(adapter->netdev, adapter->netdev->features); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - static netdev_features_t atl2_fix_features(struct net_device *netdev, - netdev_features_t features) - { -@@ -421,6 +422,7 @@ static int atl2_set_features(struct net_ - - return 0; - } -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - - static void atl2_intr_rx(struct atl2_adapter *adapter) - { -@@ -1319,8 +1321,10 @@ static const struct net_device_ops atl2_ - .ndo_validate_addr = eth_validate_addr, - .ndo_set_mac_address = atl2_set_mac, - .ndo_change_mtu = atl2_change_mtu, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - .ndo_fix_features = atl2_fix_features, - .ndo_set_features = atl2_set_features, -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - .ndo_do_ioctl = atl2_ioctl, - .ndo_tx_timeout = atl2_tx_timeout, - #ifdef CONFIG_NET_POLL_CONTROLLER -@@ -1417,8 +1421,12 @@ static int atl2_probe(struct pci_dev *pd - - err = -EIO; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - netdev->hw_features = NETIF_F_SG | NETIF_F_HW_VLAN_RX; -+#endif -+#if defined(NETIF_F_HW_VLAN_TX) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); -+#endif - - /* Init PHY as early as possible due to power saving issue */ - atl2_phy_init(&adapter->hw); -@@ -1838,6 +1846,13 @@ static int atl2_set_settings(struct net_ - return 0; - } - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) -+static u32 atl2_get_tx_csum(struct net_device *netdev) -+{ -+ return (netdev->features & NETIF_F_HW_CSUM) != 0; -+} -+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ -+ - static u32 atl2_get_msglevel(struct net_device *netdev) - { - return 0; -@@ -2107,6 +2122,14 @@ static const struct ethtool_ops atl2_eth - .get_eeprom_len = atl2_get_eeprom_len, - .get_eeprom = atl2_get_eeprom, - .set_eeprom = atl2_set_eeprom, -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) -+ .get_tx_csum = atl2_get_tx_csum, -+ .get_sg = ethtool_op_get_sg, -+ .set_sg = ethtool_op_set_sg, -+#ifdef NETIF_F_TSO -+ .get_tso = ethtool_op_get_tso, -+#endif -+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ - }; - - static void atl2_set_ethtool_ops(struct net_device *netdev) ---- a/drivers/net/ethernet/atheros/atlx/atlx.c -+++ b/drivers/net/ethernet/atheros/atlx/atlx.c -@@ -254,6 +254,7 @@ static void atlx_restore_vlan(struct atl - atlx_vlan_mode(adapter->netdev, adapter->netdev->features); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - static netdev_features_t atlx_fix_features(struct net_device *netdev, - netdev_features_t features) - { -@@ -279,5 +280,6 @@ static int atlx_set_features(struct net_ - - return 0; - } -+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ - - #endif /* ATLX_C */ ---- a/drivers/net/wireless/ath/ath6kl/main.c -+++ b/drivers/net/wireless/ath/ath6kl/main.c -@@ -1116,6 +1116,7 @@ static struct net_device_stats *ath6kl_g - return &vif->net_stats; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - static int ath6kl_set_features(struct net_device *dev, - netdev_features_t features) - { -@@ -1148,6 +1149,7 @@ static int ath6kl_set_features(struct ne - - return err; - } -+#endif - - static void ath6kl_set_multicast_list(struct net_device *ndev) - { -@@ -1295,7 +1297,9 @@ static const struct net_device_ops ath6k - .ndo_stop = ath6kl_close, - .ndo_start_xmit = ath6kl_data_tx, - .ndo_get_stats = ath6kl_get_stats, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - .ndo_set_features = ath6kl_set_features, -+#endif - .ndo_set_rx_mode = ath6kl_set_multicast_list, - }; - -@@ -1312,7 +1316,11 @@ void init_netdev(struct net_device *dev) - WMI_MAX_TX_META_SZ + - ATH6KL_HTC_ALIGN_BYTES, 4); - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) - dev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_RXCSUM; -+#else -+ dev->features |= NETIF_F_IP_CSUM; -+#endif - - return; - } diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/INFO b/patches/collateral-evolutions/network/40-netdev-hw-features/INFO new file mode 100644 index 000000000000..169682c6719d --- /dev/null +++ b/patches/collateral-evolutions/network/40-netdev-hw-features/INFO @@ -0,0 +1,20 @@ +This reverts the commits that deal with hw_features and +set_features, fix_features for kernels < 2.6.39. + +Below is one example commit being reverted, but we also do +this for ath6kl and any driver that uses this in this file. + +commit 782d640afd15af7a1faf01cfe566ca4ac511319d +Author: Michał Mirosław +Date: Thu Apr 7 07:32:18 2011 +0000 + + net: atl*: convert to hw_features + + Things left as they were: + - atl1: is RX checksum really enabled? + - atl2: copy-paste from atl1, with-errors-on-modify I presume + - atl1c: there's a bug: MTU can't be changed if device is not up + + Signed-off-by: Michał Mirosław + Signed-off-by: David S. Miller + diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1c_atl1c_ethtool.c b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1c_atl1c_ethtool.c new file mode 100644 index 000000000000..b070a3325fa9 --- /dev/null +++ b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1c_atl1c_ethtool.c @@ -0,0 +1,28 @@ +--- a/drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c ++++ b/drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c +@@ -114,6 +114,13 @@ + return 0; + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) ++static u32 atl1c_get_tx_csum(struct net_device *netdev) ++{ ++ return (netdev->features & NETIF_F_HW_CSUM) != 0; ++} ++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ ++ + static u32 atl1c_get_msglevel(struct net_device *netdev) + { + struct atl1c_adapter *adapter = netdev_priv(netdev); +@@ -301,6 +308,11 @@ + .get_link = ethtool_op_get_link, + .get_eeprom_len = atl1c_get_eeprom_len, + .get_eeprom = atl1c_get_eeprom, ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) ++ .get_tx_csum = atl1c_get_tx_csum, ++ .get_sg = ethtool_op_get_sg, ++ .set_sg = ethtool_op_set_sg, ++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ + }; + + void atl1c_set_ethtool_ops(struct net_device *netdev) diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1c_atl1c_main.c b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1c_atl1c_main.c new file mode 100644 index 000000000000..e5b937ae192e --- /dev/null +++ b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1c_atl1c_main.c @@ -0,0 +1,72 @@ +--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c ++++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +@@ -491,6 +491,7 @@ + roundup(mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN, 8) : AT_RX_BUF_SIZE; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + static netdev_features_t atl1c_fix_features(struct net_device *netdev, + netdev_features_t features) + { +@@ -519,6 +520,7 @@ + + return 0; + } ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + + /** + * atl1c_change_mtu - Change the Maximum Transfer Unit +@@ -551,8 +553,19 @@ + netdev->mtu = new_mtu; + adapter->hw.max_frame_size = new_mtu; + atl1c_set_rxbufsize(adapter, netdev); ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) ++ if (new_mtu > MAX_TSO_FRAME_SIZE) { ++ adapter->netdev->features &= ~NETIF_F_TSO; ++ adapter->netdev->features &= ~NETIF_F_TSO6; ++ } else { ++ adapter->netdev->features |= NETIF_F_TSO; ++ adapter->netdev->features |= NETIF_F_TSO6; ++ } ++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ + atl1c_down(adapter); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + netdev_update_features(netdev); ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + atl1c_up(adapter); + clear_bit(__AT_RESETTING, &adapter->flags); + } +@@ -2459,8 +2472,10 @@ + .ndo_set_mac_address = atl1c_set_mac_addr, + .ndo_set_rx_mode = atl1c_set_multi, + .ndo_change_mtu = atl1c_change_mtu, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + .ndo_fix_features = atl1c_fix_features, + .ndo_set_features = atl1c_set_features, ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + .ndo_do_ioctl = atl1c_ioctl, + .ndo_tx_timeout = atl1c_tx_timeout, + .ndo_get_stats = atl1c_get_stats, +@@ -2479,6 +2494,7 @@ + atl1c_set_ethtool_ops(netdev); + + /* TODO: add when ready */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + netdev->hw_features = NETIF_F_SG | + NETIF_F_HW_CSUM | + NETIF_F_HW_VLAN_RX | +@@ -2486,6 +2502,14 @@ + NETIF_F_TSO6; + netdev->features = netdev->hw_features | + NETIF_F_HW_VLAN_TX; ++#else ++ netdev->features = NETIF_F_SG | ++ NETIF_F_HW_CSUM | ++ NETIF_F_HW_VLAN_TX | ++ NETIF_F_HW_VLAN_RX | ++ NETIF_F_TSO | ++ NETIF_F_TSO6; ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + return 0; + } + diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1e_atl1e_ethtool.c b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1e_atl1e_ethtool.c new file mode 100644 index 000000000000..0e66ca914391 --- /dev/null +++ b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1e_atl1e_ethtool.c @@ -0,0 +1,14 @@ +--- a/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c ++++ b/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c +@@ -384,6 +384,11 @@ + .get_eeprom_len = atl1e_get_eeprom_len, + .get_eeprom = atl1e_get_eeprom, + .set_eeprom = atl1e_set_eeprom, ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) ++ .set_tx_csum = ethtool_op_set_tx_hw_csum, ++ .set_sg = ethtool_op_set_sg, ++ .set_tso = ethtool_op_set_tso, ++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ + }; + + void atl1e_set_ethtool_ops(struct net_device *netdev) diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1e_atl1e_main.c b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1e_atl1e_main.c new file mode 100644 index 000000000000..b0eb801d3f36 --- /dev/null +++ b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atl1e_atl1e_main.c @@ -0,0 +1,57 @@ +--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c ++++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +@@ -375,6 +375,7 @@ + return 0; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + static netdev_features_t atl1e_fix_features(struct net_device *netdev, + netdev_features_t features) + { +@@ -400,6 +401,7 @@ + + return 0; + } ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + + /** + * atl1e_change_mtu - Change the Maximum Transfer Unit +@@ -1925,7 +1927,11 @@ + * reschedule our watchdog timer */ + set_bit(__AT_DOWN, &adapter->flags); + ++#if defined(NETIF_F_LLTX) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + netif_stop_queue(netdev); ++#else ++ netif_tx_disable(netdev); ++#endif + + /* reset MAC to disable all RX/TX */ + atl1e_reset_hw(&adapter->hw); +@@ -2195,8 +2201,10 @@ + .ndo_set_rx_mode = atl1e_set_multi, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = atl1e_set_mac_addr, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + .ndo_fix_features = atl1e_fix_features, + .ndo_set_features = atl1e_set_features, ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + .ndo_change_mtu = atl1e_change_mtu, + .ndo_do_ioctl = atl1e_ioctl, + .ndo_tx_timeout = atl1e_tx_timeout, +@@ -2216,10 +2224,15 @@ + netdev->watchdog_timeo = AT_TX_WATCHDOG; + atl1e_set_ethtool_ops(netdev); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + netdev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO | + NETIF_F_HW_VLAN_RX; + netdev->features = netdev->hw_features | NETIF_F_LLTX | + NETIF_F_HW_VLAN_TX; ++#else ++ netdev->features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO | ++ NETIF_F_HW_VLAN_RX | NETIF_F_LLTX | NETIF_F_HW_VLAN_TX; ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + + return 0; + } diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atl1.c b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atl1.c new file mode 100644 index 000000000000..08c85bd02dc7 --- /dev/null +++ b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atl1.c @@ -0,0 +1,53 @@ +--- a/drivers/net/ethernet/atheros/atlx/atl1.c ++++ b/drivers/net/ethernet/atheros/atlx/atl1.c +@@ -2917,8 +2917,10 @@ + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = atl1_set_mac, + .ndo_change_mtu = atl1_change_mtu, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + .ndo_fix_features = atlx_fix_features, + .ndo_set_features = atlx_set_features, ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + .ndo_do_ioctl = atlx_ioctl, + .ndo_tx_timeout = atlx_tx_timeout, + #ifdef CONFIG_NET_POLL_CONTROLLER +@@ -3028,11 +3030,13 @@ + netdev->features |= NETIF_F_SG; + netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + netdev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_TSO | + NETIF_F_HW_VLAN_RX; + + /* is this valid? see atl1_setup_mac_ctrl() */ + netdev->features |= NETIF_F_RXCSUM; ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + + /* + * patch for some L1 of old version, +@@ -3645,6 +3649,14 @@ + return 0; + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) ++/* FIXME: is this right? -- CHS */ ++static u32 atl1_get_rx_csum(struct net_device *netdev) ++{ ++ return 1; ++} ++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ ++ + static void atl1_get_strings(struct net_device *netdev, u32 stringset, + u8 *data) + { +@@ -3717,4 +3729,10 @@ + .nway_reset = atl1_nway_reset, + .get_ethtool_stats = atl1_get_ethtool_stats, + .get_sset_count = atl1_get_sset_count, ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) ++ .get_rx_csum = atl1_get_rx_csum, ++ .set_tx_csum = ethtool_op_set_tx_hw_csum, ++ .set_sg = ethtool_op_set_sg, ++ .set_tso = ethtool_op_set_tso, ++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ + }; diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atl2.c b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atl2.c new file mode 100644 index 000000000000..2a2681c8d5ab --- /dev/null +++ b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atl2.c @@ -0,0 +1,71 @@ +--- a/drivers/net/ethernet/atheros/atlx/atl2.c ++++ b/drivers/net/ethernet/atheros/atlx/atl2.c +@@ -396,6 +396,7 @@ + atl2_vlan_mode(adapter->netdev, adapter->netdev->features); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + static netdev_features_t atl2_fix_features(struct net_device *netdev, + netdev_features_t features) + { +@@ -421,6 +422,7 @@ + + return 0; + } ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + + static void atl2_intr_rx(struct atl2_adapter *adapter) + { +@@ -1319,8 +1321,10 @@ + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = atl2_set_mac, + .ndo_change_mtu = atl2_change_mtu, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + .ndo_fix_features = atl2_fix_features, + .ndo_set_features = atl2_set_features, ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + .ndo_do_ioctl = atl2_ioctl, + .ndo_tx_timeout = atl2_tx_timeout, + #ifdef CONFIG_NET_POLL_CONTROLLER +@@ -1417,8 +1421,12 @@ + + err = -EIO; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + netdev->hw_features = NETIF_F_SG | NETIF_F_HW_VLAN_RX; ++#endif ++#if defined(NETIF_F_HW_VLAN_TX) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); ++#endif + + /* Init PHY as early as possible due to power saving issue */ + atl2_phy_init(&adapter->hw); +@@ -1838,6 +1846,13 @@ + return 0; + } + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) ++static u32 atl2_get_tx_csum(struct net_device *netdev) ++{ ++ return (netdev->features & NETIF_F_HW_CSUM) != 0; ++} ++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ ++ + static u32 atl2_get_msglevel(struct net_device *netdev) + { + return 0; +@@ -2107,6 +2122,14 @@ + .get_eeprom_len = atl2_get_eeprom_len, + .get_eeprom = atl2_get_eeprom, + .set_eeprom = atl2_set_eeprom, ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) ++ .get_tx_csum = atl2_get_tx_csum, ++ .get_sg = ethtool_op_get_sg, ++ .set_sg = ethtool_op_set_sg, ++#ifdef NETIF_F_TSO ++ .get_tso = ethtool_op_get_tso, ++#endif ++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ + }; + + static void atl2_set_ethtool_ops(struct net_device *netdev) diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atlx.c b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atlx.c new file mode 100644 index 000000000000..b0304171ca83 --- /dev/null +++ b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_atlx_atlx.c @@ -0,0 +1,17 @@ +--- a/drivers/net/ethernet/atheros/atlx/atlx.c ++++ b/drivers/net/ethernet/atheros/atlx/atlx.c +@@ -254,6 +254,7 @@ + atlx_vlan_mode(adapter->netdev, adapter->netdev->features); + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + static netdev_features_t atlx_fix_features(struct net_device *netdev, + netdev_features_t features) + { +@@ -279,5 +280,6 @@ + + return 0; + } ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */ + + #endif /* ATLX_C */ diff --git a/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_wireless_ath_ath6kl_main.c b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_wireless_ath_ath6kl_main.c new file mode 100644 index 000000000000..2704449a2303 --- /dev/null +++ b/patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_wireless_ath_ath6kl_main.c @@ -0,0 +1,40 @@ +--- a/drivers/net/wireless/ath/ath6kl/main.c ++++ b/drivers/net/wireless/ath/ath6kl/main.c +@@ -1116,6 +1116,7 @@ + return &vif->net_stats; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + static int ath6kl_set_features(struct net_device *dev, + netdev_features_t features) + { +@@ -1148,6 +1149,7 @@ + + return err; + } ++#endif + + static void ath6kl_set_multicast_list(struct net_device *ndev) + { +@@ -1295,7 +1297,9 @@ + .ndo_stop = ath6kl_close, + .ndo_start_xmit = ath6kl_data_tx, + .ndo_get_stats = ath6kl_get_stats, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + .ndo_set_features = ath6kl_set_features, ++#endif + .ndo_set_rx_mode = ath6kl_set_multicast_list, + }; + +@@ -1312,7 +1316,11 @@ + WMI_MAX_TX_META_SZ + + ATH6KL_HTC_ALIGN_BYTES, 4); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) + dev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_RXCSUM; ++#else ++ dev->features |= NETIF_F_IP_CSUM; ++#endif + + return; + } diff --git a/patches/collateral-evolutions/network/42-netlink_seq.patch b/patches/collateral-evolutions/network/42-netlink_seq/net_wireless_nl80211.c similarity index 82% rename from patches/collateral-evolutions/network/42-netlink_seq.patch rename to patches/collateral-evolutions/network/42-netlink_seq/net_wireless_nl80211.c index be71278419be..4d290197c1ed 100644 --- a/patches/collateral-evolutions/network/42-netlink_seq.patch +++ b/patches/collateral-evolutions/network/42-netlink_seq/net_wireless_nl80211.c @@ -1,6 +1,6 @@ --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -5669,7 +5669,9 @@ static int nl80211_dump_scan(struct sk_b +@@ -5669,7 +5669,9 @@ spin_lock_bh(&rdev->bss_lock); cfg80211_bss_expire(rdev); diff --git a/patches/collateral-evolutions/network/43-rename_pm_qos_request.patch b/patches/collateral-evolutions/network/43-rename_pm_qos_request/drivers_net_wireless_ipw2x00_ipw2100.c similarity index 87% rename from patches/collateral-evolutions/network/43-rename_pm_qos_request.patch rename to patches/collateral-evolutions/network/43-rename_pm_qos_request/drivers_net_wireless_ipw2x00_ipw2100.c index d000d913d3d5..da12bc150a90 100644 --- a/patches/collateral-evolutions/network/43-rename_pm_qos_request.patch +++ b/patches/collateral-evolutions/network/43-rename_pm_qos_request/drivers_net_wireless_ipw2x00_ipw2100.c @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c -@@ -175,7 +175,11 @@ that only one external action is invoked +@@ -175,7 +175,11 @@ #define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2100 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation" diff --git a/patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/INFO b/patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/INFO new file mode 100644 index 000000000000..461bdf07572e --- /dev/null +++ b/patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/INFO @@ -0,0 +1,2 @@ +Do not activate the mac80211 tracing for kernels <= 2.6.32 + diff --git a/patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/net_mac80211_Makefile b/patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/net_mac80211_Makefile new file mode 100644 index 000000000000..abb5410c7cf4 --- /dev/null +++ b/patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/net_mac80211_Makefile @@ -0,0 +1,13 @@ +--- a/net/mac80211/Makefile ++++ b/net/mac80211/Makefile +@@ -25,7 +25,9 @@ + wme.o \ + event.o \ + chan.o \ +- trace.o mlme.o ++ mlme.o ++ ++mac80211-$(CONFIG_COMPAT_MAC80211_DRIVER_API_TRACER) += trace.o + + mac80211-$(CONFIG_MAC80211_LEDS) += led.o + mac80211-$(CONFIG_MAC80211_DEBUGFS) += \ diff --git a/patches/collateral-evolutions/network/44-deactivate-mac80211-tracing.patch b/patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/net_wireless_Makefile similarity index 56% rename from patches/collateral-evolutions/network/44-deactivate-mac80211-tracing.patch rename to patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/net_wireless_Makefile index 9c9858ddb1ee..9b54295a339a 100644 --- a/patches/collateral-evolutions/network/44-deactivate-mac80211-tracing.patch +++ b/patches/collateral-evolutions/network/44-deactivate-mac80211-tracing/net_wireless_Makefile @@ -1,21 +1,6 @@ -Do not activate the mac80211 tracing for kernels <= 2.6.32 - ---- a/net/mac80211/Makefile -+++ b/net/mac80211/Makefile -@@ -25,7 +25,9 @@ mac80211-y := \ - wme.o \ - event.o \ - chan.o \ -- trace.o mlme.o -+ mlme.o -+ -+mac80211-$(CONFIG_COMPAT_MAC80211_DRIVER_API_TRACER) += trace.o - - mac80211-$(CONFIG_MAC80211_LEDS) += led.o - mac80211-$(CONFIG_MAC80211_DEBUGFS) += \ --- a/net/wireless/Makefile +++ b/net/wireless/Makefile -@@ -10,7 +10,8 @@ obj-$(CONFIG_WEXT_SPY) += wext-spy.o +@@ -10,7 +10,8 @@ obj-$(CONFIG_WEXT_PRIV) += wext-priv.o cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o diff --git a/patches/collateral-evolutions/network/45-remove-platform-id-table.patch b/patches/collateral-evolutions/network/45-remove-platform-id-table/drivers_net_wireless_ti_wl12xx_main.c similarity index 95% rename from patches/collateral-evolutions/network/45-remove-platform-id-table.patch rename to patches/collateral-evolutions/network/45-remove-platform-id-table/drivers_net_wireless_ti_wl12xx_main.c index c2a040da2115..803c3973a570 100644 --- a/patches/collateral-evolutions/network/45-remove-platform-id-table.patch +++ b/patches/collateral-evolutions/network/45-remove-platform-id-table/drivers_net_wireless_ti_wl12xx_main.c @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c -@@ -1815,16 +1815,20 @@ out: +@@ -1815,16 +1815,20 @@ return wlcore_remove(pdev); } diff --git a/patches/collateral-evolutions/network/46-use_other_workqueue/INFO b/patches/collateral-evolutions/network/46-use_other_workqueue/INFO new file mode 100644 index 000000000000..c9f4f3710ed1 --- /dev/null +++ b/patches/collateral-evolutions/network/46-use_other_workqueue/INFO @@ -0,0 +1,4 @@ +Old kernel versions do not support WQ_HIGHPRI and WQ_MEM_RECLAIM so we +should use create_singlethread_workqueue() which was used at this +position before. + diff --git a/patches/collateral-evolutions/network/46-use_other_workqueue.patch b/patches/collateral-evolutions/network/46-use_other_workqueue/net_bluetooth_hci_core.c similarity index 78% rename from patches/collateral-evolutions/network/46-use_other_workqueue.patch rename to patches/collateral-evolutions/network/46-use_other_workqueue/net_bluetooth_hci_core.c index 4f5ba875875e..bfce3d092917 100644 --- a/patches/collateral-evolutions/network/46-use_other_workqueue.patch +++ b/patches/collateral-evolutions/network/46-use_other_workqueue/net_bluetooth_hci_core.c @@ -1,10 +1,6 @@ -Old kernel versions do not support WQ_HIGHPRI and WQ_MEM_RECLAIM so we -should use create_singlethread_workqueue() which was used at this -position before. - --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c -@@ -2066,16 +2066,24 @@ int hci_register_dev(struct hci_dev *hde +@@ -2066,16 +2066,24 @@ list_add(&hdev->list, &hci_dev_list); write_unlock(&hci_dev_list_lock); diff --git a/patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue/INFO b/patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue/INFO new file mode 100644 index 000000000000..dcb74b34403b --- /dev/null +++ b/patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue/INFO @@ -0,0 +1,4 @@ +The struct netdev_queue does not have the attribute trans_start in +kernel < 2.6.31. trans_start on struct net_device does the same +on older kernels. + diff --git a/patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue.patch b/patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue/drivers_net_wireless_mwifiex_init.c similarity index 57% rename from patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue.patch rename to patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue/drivers_net_wireless_mwifiex_init.c index 573b5794c3ef..cf7a04af6729 100644 --- a/patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue.patch +++ b/patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue/drivers_net_wireless_mwifiex_init.c @@ -1,10 +1,6 @@ -The struct netdev_queue does not have the attribute trans_start in -kernel < 2.6.31. trans_start on struct net_device does the same -on older kernels. - --- a/drivers/net/wireless/mwifiex/init.c +++ b/drivers/net/wireless/mwifiex/init.c -@@ -371,8 +371,10 @@ void mwifiex_set_trans_start(struct net_ +@@ -371,8 +371,10 @@ { int i; diff --git a/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping.patch b/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping.patch deleted file mode 100644 index 670394c05ff1..000000000000 --- a/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping.patch +++ /dev/null @@ -1,38 +0,0 @@ -Use skb_get_queue_mapping() for getting the queue_mapping member of -skb. Some old kernels do not have the member queue_mapping, but this -function always returns something. - ---- a/drivers/net/wireless/b43/main.c -+++ b/drivers/net/wireless/b43/main.c -@@ -3456,11 +3456,11 @@ static void b43_op_tx(struct ieee80211_h - } - B43_WARN_ON(skb_shinfo(skb)->nr_frags); - -- skb_queue_tail(&wl->tx_queue[skb->queue_mapping], skb); -- if (!wl->tx_queue_stopped[skb->queue_mapping]) { -+ skb_queue_tail(&wl->tx_queue[skb_get_queue_mapping(skb)], skb); -+ if (!wl->tx_queue_stopped[skb_get_queue_mapping(skb)]) { - ieee80211_queue_work(wl->hw, &wl->tx_work); - } else { -- ieee80211_stop_queue(wl->hw, skb->queue_mapping); -+ ieee80211_stop_queue(wl->hw, skb_get_queue_mapping(skb)); - } - } - ---- a/drivers/net/wireless/b43legacy/main.c -+++ b/drivers/net/wireless/b43legacy/main.c -@@ -2529,11 +2529,11 @@ static void b43legacy_op_tx(struct ieee8 - } - B43legacy_WARN_ON(skb_shinfo(skb)->nr_frags); - -- skb_queue_tail(&wl->tx_queue[skb->queue_mapping], skb); -- if (!wl->tx_queue_stopped[skb->queue_mapping]) -+ skb_queue_tail(&wl->tx_queue[skb_get_queue_mapping(skb)], skb); -+ if (!wl->tx_queue_stopped[skb_get_queue_mapping(skb)]) - ieee80211_queue_work(wl->hw, &wl->tx_work); - else -- ieee80211_stop_queue(wl->hw, skb->queue_mapping); -+ ieee80211_stop_queue(wl->hw, skb_get_queue_mapping(skb)); - } - - static int b43legacy_op_conf_tx(struct ieee80211_hw *hw, diff --git a/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/INFO b/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/INFO new file mode 100644 index 000000000000..74635687362e --- /dev/null +++ b/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/INFO @@ -0,0 +1,4 @@ +Use skb_get_queue_mapping() for getting the queue_mapping member of +skb. Some old kernels do not have the member queue_mapping, but this +function always returns something. + diff --git a/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/drivers_net_wireless_b43_main.c b/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/drivers_net_wireless_b43_main.c new file mode 100644 index 000000000000..279dfdde8bd8 --- /dev/null +++ b/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/drivers_net_wireless_b43_main.c @@ -0,0 +1,17 @@ +--- a/drivers/net/wireless/b43/main.c ++++ b/drivers/net/wireless/b43/main.c +@@ -3456,11 +3456,11 @@ + } + B43_WARN_ON(skb_shinfo(skb)->nr_frags); + +- skb_queue_tail(&wl->tx_queue[skb->queue_mapping], skb); +- if (!wl->tx_queue_stopped[skb->queue_mapping]) { ++ skb_queue_tail(&wl->tx_queue[skb_get_queue_mapping(skb)], skb); ++ if (!wl->tx_queue_stopped[skb_get_queue_mapping(skb)]) { + ieee80211_queue_work(wl->hw, &wl->tx_work); + } else { +- ieee80211_stop_queue(wl->hw, skb->queue_mapping); ++ ieee80211_stop_queue(wl->hw, skb_get_queue_mapping(skb)); + } + } + diff --git a/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/drivers_net_wireless_b43legacy_main.c b/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/drivers_net_wireless_b43legacy_main.c new file mode 100644 index 000000000000..e1b38ab01658 --- /dev/null +++ b/patches/collateral-evolutions/network/48-use_skb_get_queue_mapping/drivers_net_wireless_b43legacy_main.c @@ -0,0 +1,17 @@ +--- a/drivers/net/wireless/b43legacy/main.c ++++ b/drivers/net/wireless/b43legacy/main.c +@@ -2529,11 +2529,11 @@ + } + B43legacy_WARN_ON(skb_shinfo(skb)->nr_frags); + +- skb_queue_tail(&wl->tx_queue[skb->queue_mapping], skb); +- if (!wl->tx_queue_stopped[skb->queue_mapping]) ++ skb_queue_tail(&wl->tx_queue[skb_get_queue_mapping(skb)], skb); ++ if (!wl->tx_queue_stopped[skb_get_queue_mapping(skb)]) + ieee80211_queue_work(wl->hw, &wl->tx_work); + else +- ieee80211_stop_queue(wl->hw, skb->queue_mapping); ++ ieee80211_stop_queue(wl->hw, skb_get_queue_mapping(skb)); + } + + static int b43legacy_op_conf_tx(struct ieee80211_hw *hw, diff --git a/patches/collateral-evolutions/network/50-libertas-olpc-ec-wakeup/INFO b/patches/collateral-evolutions/network/50-libertas-olpc-ec-wakeup/INFO new file mode 100644 index 000000000000..ddb4f3351629 --- /dev/null +++ b/patches/collateral-evolutions/network/50-libertas-olpc-ec-wakeup/INFO @@ -0,0 +1,5 @@ +This section of the libertas driver calls functions that simply don't +exist before the release of 3.1. This code in question was an addition, +not a change from any existing code. It is safe to simply remove it for +older kernels. + diff --git a/patches/collateral-evolutions/network/50-libertas-olpc-ec-wakeup.patch b/patches/collateral-evolutions/network/50-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.c similarity index 50% rename from patches/collateral-evolutions/network/50-libertas-olpc-ec-wakeup.patch rename to patches/collateral-evolutions/network/50-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.c index 5997a7527b5a..ec381372beae 100644 --- a/patches/collateral-evolutions/network/50-libertas-olpc-ec-wakeup.patch +++ b/patches/collateral-evolutions/network/50-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.c @@ -1,11 +1,6 @@ -This section of the libertas driver calls functions that simply don't -exist before the release of 3.1. This code in question was an addition, -not a change from any existing code. It is safe to simply remove it for -older kernels. - --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c -@@ -962,6 +962,7 @@ static int if_usb_suspend(struct usb_int +@@ -962,6 +962,7 @@ goto out; } @@ -13,7 +8,7 @@ older kernels. #ifdef CONFIG_OLPC if (machine_is_olpc()) { if (priv->wol_criteria == EHS_REMOVE_WAKEUP) -@@ -970,6 +971,7 @@ static int if_usb_suspend(struct usb_int +@@ -970,6 +971,7 @@ olpc_ec_wakeup_set(EC_SCI_SRC_WLAN); } #endif diff --git a/patches/collateral-evolutions/network/52-tty-dev.patch b/patches/collateral-evolutions/network/52-tty-dev/INFO similarity index 57% rename from patches/collateral-evolutions/network/52-tty-dev.patch rename to patches/collateral-evolutions/network/52-tty-dev/INFO index 659aa6928b4b..e9fe2d161490 100644 --- a/patches/collateral-evolutions/network/52-tty-dev.patch +++ b/patches/collateral-evolutions/network/52-tty-dev/INFO @@ -17,16 +17,3 @@ Date: Fri Feb 11 17:19:26 2011 -0600 Signed-off-by: Gustavo F. Padovan ---- a/drivers/bluetooth/hci_ldisc.c -+++ b/drivers/bluetooth/hci_ldisc.c -@@ -421,7 +421,10 @@ static int hci_uart_register_dev(struct - hdev->close = hci_uart_close; - hdev->flush = hci_uart_flush; - hdev->send = hci_uart_send_frame; -+ -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)) - SET_HCIDEV_DEV(hdev, hu->tty->dev); -+#endif - - if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags)) - set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); diff --git a/patches/collateral-evolutions/network/52-tty-dev/drivers_bluetooth_hci_ldisc.c b/patches/collateral-evolutions/network/52-tty-dev/drivers_bluetooth_hci_ldisc.c new file mode 100644 index 000000000000..0d4cd7797f75 --- /dev/null +++ b/patches/collateral-evolutions/network/52-tty-dev/drivers_bluetooth_hci_ldisc.c @@ -0,0 +1,13 @@ +--- a/drivers/bluetooth/hci_ldisc.c ++++ b/drivers/bluetooth/hci_ldisc.c +@@ -421,7 +421,10 @@ + hdev->close = hci_uart_close; + hdev->flush = hci_uart_flush; + hdev->send = hci_uart_send_frame; ++ ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)) + SET_HCIDEV_DEV(hdev, hu->tty->dev); ++#endif + + if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags)) + set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); diff --git a/patches/collateral-evolutions/network/53-pr_fmt.patch b/patches/collateral-evolutions/network/53-pr_fmt.patch deleted file mode 100644 index f2fc5a571393..000000000000 --- a/patches/collateral-evolutions/network/53-pr_fmt.patch +++ /dev/null @@ -1,715 +0,0 @@ -This is the correct way to use pr_fmt. This helps avoid -compiler warnings. This is going to be sent upstream. - ---- a/drivers/bcma/bcma_private.h -+++ b/drivers/bcma/bcma_private.h -@@ -1,10 +1,10 @@ - #ifndef LINUX_BCMA_PRIVATE_H_ - #define LINUX_BCMA_PRIVATE_H_ - --#ifndef pr_fmt -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt --#endif - -+#include - #include - #include - ---- a/drivers/net/ethernet/broadcom/b44.c -+++ b/drivers/net/ethernet/broadcom/b44.c -@@ -10,9 +10,11 @@ - * Distribute under GPL. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include -+#include - #include - #include - #include ---- a/drivers/net/wireless/iwlegacy/3945-mac.c -+++ b/drivers/net/wireless/iwlegacy/3945-mac.c -@@ -27,9 +27,11 @@ - * - *****************************************************************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include -+#include - #include - #include - #include ---- a/drivers/net/wireless/iwlegacy/4965-mac.c -+++ b/drivers/net/wireless/iwlegacy/4965-mac.c -@@ -27,9 +27,11 @@ - * - *****************************************************************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas/cfg.c -+++ b/drivers/net/wireless/libertas/cfg.c -@@ -6,8 +6,10 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas/if_usb.c -+++ b/drivers/net/wireless/libertas/if_usb.c -@@ -2,8 +2,10 @@ - * This file contains functions used in USB interface module. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas/if_sdio.c -+++ b/drivers/net/wireless/libertas/if_sdio.c -@@ -26,9 +26,11 @@ - * if_sdio_card_to_host() to pad the data. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas/if_spi.c -+++ b/drivers/net/wireless/libertas/if_spi.c -@@ -17,8 +17,10 @@ - * (at your option) any later version. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas/rx.c -+++ b/drivers/net/wireless/libertas/rx.c -@@ -2,8 +2,10 @@ - * This file contains the handling of RX in wlan driver. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas/if_cs.c -+++ b/drivers/net/wireless/libertas/if_cs.c -@@ -21,8 +21,10 @@ - - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas/mesh.c -+++ b/drivers/net/wireless/libertas/mesh.c -@@ -1,5 +1,7 @@ -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas/main.c -+++ b/drivers/net/wireless/libertas/main.c -@@ -4,8 +4,10 @@ - * thread etc.. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas_tf/cmd.c -+++ b/drivers/net/wireless/libertas_tf/cmd.c -@@ -7,8 +7,10 @@ - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - */ -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas_tf/if_usb.c -+++ b/drivers/net/wireless/libertas_tf/if_usb.c -@@ -9,11 +9,13 @@ - */ - #define DRV_NAME "lbtf_usb" - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include "libertas_tf.h" - #include "if_usb.h" - -+#include - #include - #include - #include ---- a/drivers/net/wireless/libertas_tf/main.c -+++ b/drivers/net/wireless/libertas_tf/main.c -@@ -7,8 +7,10 @@ - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - */ -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - ---- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c -@@ -14,9 +14,11 @@ - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include -+#include - #include - #include - ---- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c -@@ -16,8 +16,10 @@ - */ - - #define __UNDEF_NO_VERSION__ -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/brcm80211/brcmsmac/main.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c -@@ -15,8 +15,10 @@ - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/brcm80211/brcmutil/utils.c -+++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c -@@ -14,8 +14,10 @@ - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - ---- a/net/bluetooth/lib.c -+++ b/net/bluetooth/lib.c -@@ -24,9 +24,11 @@ - - /* Bluetooth kernel library. */ - -+#undef pr_fmt - #define pr_fmt(fmt) "Bluetooth: " fmt - - #include -+#include - - #include - ---- a/net/wireless/lib80211.c -+++ b/net/wireless/lib80211.c -@@ -13,8 +13,10 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/net/wireless/reg.c -+++ b/net/wireless/reg.c -@@ -42,9 +42,11 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include -+#include - #include - #include - #include ---- a/net/wireless/core.c -+++ b/net/wireless/core.c -@@ -4,8 +4,10 @@ - * Copyright 2006-2010 Johannes Berg - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/net/wireless/lib80211_crypt_tkip.c -+++ b/net/wireless/lib80211_crypt_tkip.c -@@ -10,8 +10,10 @@ - * more details. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c -@@ -16,8 +16,10 @@ - * File contents: support functions for PCI/PCIe - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - - #include ---- a/drivers/net/wireless/rtlwifi/wifi.h -+++ b/drivers/net/wireless/rtlwifi/wifi.h -@@ -30,8 +30,10 @@ - #ifndef __RTL_WIFI_H__ - #define __RTL_WIFI_H__ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/ath/main.c -+++ b/drivers/net/wireless/ath/main.c -@@ -14,9 +14,11 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include -+#include - #include - - #include "ath.h" ---- a/drivers/net/wireless/ath/regd.c -+++ b/drivers/net/wireless/ath/regd.c -@@ -14,9 +14,11 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include -+#include - #include - #include - #include ---- a/drivers/net/wireless/ath/ath5k/initvals.c -+++ b/drivers/net/wireless/ath/ath5k/initvals.c -@@ -19,8 +19,11 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include -+ - #include "ath5k.h" - #include "reg.h" - #include "debug.h" ---- a/drivers/net/wireless/ath/ath5k/desc.c -+++ b/drivers/net/wireless/ath/ath5k/desc.c -@@ -21,8 +21,11 @@ - Hardware Descriptor Functions - \******************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include -+ - #include "ath5k.h" - #include "reg.h" - #include "debug.h" ---- a/drivers/net/wireless/ath/ath5k/dma.c -+++ b/drivers/net/wireless/ath/ath5k/dma.c -@@ -29,8 +29,11 @@ - * status registers (ISR). - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include -+ - #include "ath5k.h" - #include "reg.h" - #include "debug.h" ---- a/drivers/net/wireless/ath/ath5k/qcu.c -+++ b/drivers/net/wireless/ath/ath5k/qcu.c -@@ -20,8 +20,11 @@ - Queue Control Unit, DCF Control Unit Functions - \********************************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include -+ - #include "ath5k.h" - #include "reg.h" - #include "debug.h" ---- a/drivers/net/wireless/ath/ath5k/phy.c -+++ b/drivers/net/wireless/ath/ath5k/phy.c -@@ -22,8 +22,10 @@ - * PHY related functions * - \***********************/ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/ath/ath5k/reset.c -+++ b/drivers/net/wireless/ath/ath5k/reset.c -@@ -23,10 +23,12 @@ - Reset function and helpers - \****************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include - -+#include - #include /* To determine if a card is pci-e */ - #include - #include ---- a/drivers/net/wireless/ath/ath5k/attach.c -+++ b/drivers/net/wireless/ath/ath5k/attach.c -@@ -20,8 +20,10 @@ - * Attach/Detach Functions and helpers * - \*************************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include "ath5k.h" ---- a/drivers/net/wireless/ath/ath5k/base.c -+++ b/drivers/net/wireless/ath/ath5k/base.c -@@ -40,8 +40,10 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/ath/ath5k/led.c -+++ b/drivers/net/wireless/ath/ath5k/led.c -@@ -39,8 +39,10 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include "ath5k.h" - ---- a/drivers/net/wireless/ath/ath5k/ani.c -+++ b/drivers/net/wireless/ath/ath5k/ani.c -@@ -14,8 +14,11 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include -+ - #include "ath5k.h" - #include "reg.h" - #include "debug.h" ---- a/drivers/net/wireless/ath/ath5k/sysfs.c -+++ b/drivers/net/wireless/ath/ath5k/sysfs.c -@@ -1,5 +1,7 @@ -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - ---- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c -+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c -@@ -41,11 +41,14 @@ - * - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - - #include - #include - -+#include -+ - #include "ath5k.h" - #include "base.h" - #include "reg.h" ---- a/drivers/net/wireless/ath/ath5k/pci.c -+++ b/drivers/net/wireless/ath/ath5k/pci.c -@@ -14,8 +14,10 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/ath/ath6kl/cfg80211.c -+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c -@@ -15,8 +15,10 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/ath/ath6kl/init.c -+++ b/drivers/net/wireless/ath/ath6kl/init.c -@@ -16,8 +16,10 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/ath/ath6kl/main.c -+++ b/drivers/net/wireless/ath/ath6kl/main.c -@@ -15,8 +15,11 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include -+ - #include "core.h" - #include "hif-ops.h" - #include "cfg80211.h" ---- a/drivers/net/wireless/ath/ath6kl/txrx.c -+++ b/drivers/net/wireless/ath/ath6kl/txrx.c -@@ -15,8 +15,11 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include -+ - #include "core.h" - #include "debug.h" - #include "htc-ops.h" ---- a/drivers/net/wireless/ath/ath9k/init.c -+++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -14,8 +14,10 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/ath/ath9k/pci.c -+++ b/drivers/net/wireless/ath/ath9k/pci.c -@@ -14,8 +14,10 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/ath/ath9k/htc_hst.c -+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c -@@ -14,8 +14,11 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include -+ - #include "htc.h" - - static int htc_issue_send(struct htc_target *target, struct sk_buff* skb, ---- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c -+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c -@@ -14,8 +14,11 @@ - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include -+ - #include "htc.h" - - MODULE_AUTHOR("Atheros Communications"); ---- a/drivers/net/wireless/iwlwifi/dvm/main.c -+++ b/drivers/net/wireless/iwlwifi/dvm/main.c -@@ -27,8 +27,10 @@ - * - *****************************************************************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/iwlwifi/pcie/drv.c -+++ b/drivers/net/wireless/iwlwifi/pcie/drv.c -@@ -61,8 +61,10 @@ - * - *****************************************************************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - #include ---- a/drivers/net/wireless/ath/ath5k/eeprom.c -+++ b/drivers/net/wireless/ath/ath5k/eeprom.c -@@ -21,8 +21,10 @@ - * EEPROM access functions and helpers * - \*************************************/ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - - #include "ath5k.h" ---- a/drivers/net/wireless/ath/ath5k/debug.c -+++ b/drivers/net/wireless/ath/ath5k/debug.c -@@ -58,8 +58,10 @@ - * THE POSSIBILITY OF SUCH DAMAGES. - */ - -+#undef pr_fmt - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include - #include - #include - diff --git a/patches/collateral-evolutions/network/53-pr_fmt/INFO b/patches/collateral-evolutions/network/53-pr_fmt/INFO new file mode 100644 index 000000000000..cd88ad54331b --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/INFO @@ -0,0 +1,3 @@ +This is the correct way to use pr_fmt. This helps avoid +compiler warnings. This is going to be sent upstream. + diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_bcma_bcma_private.h b/patches/collateral-evolutions/network/53-pr_fmt/drivers_bcma_bcma_private.h new file mode 100644 index 000000000000..913deecf1586 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_bcma_bcma_private.h @@ -0,0 +1,15 @@ +--- a/drivers/bcma/bcma_private.h ++++ b/drivers/bcma/bcma_private.h +@@ -1,10 +1,10 @@ + #ifndef LINUX_BCMA_PRIVATE_H_ + #define LINUX_BCMA_PRIVATE_H_ + +-#ifndef pr_fmt ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +-#endif + ++#include + #include + #include + diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_ethernet_broadcom_b44.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_ethernet_broadcom_b44.c new file mode 100644 index 000000000000..157905880805 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_ethernet_broadcom_b44.c @@ -0,0 +1,14 @@ +--- a/drivers/net/ethernet/broadcom/b44.c ++++ b/drivers/net/ethernet/broadcom/b44.c +@@ -10,9 +10,11 @@ + * Distribute under GPL. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_ani.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_ani.c new file mode 100644 index 000000000000..53aee6451fc5 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_ani.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath5k/ani.c ++++ b/drivers/net/wireless/ath/ath5k/ani.c +@@ -14,8 +14,11 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include ++ + #include "ath5k.h" + #include "reg.h" + #include "debug.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_attach.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_attach.c new file mode 100644 index 000000000000..2c6ba9f26fbe --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_attach.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath5k/attach.c ++++ b/drivers/net/wireless/ath/ath5k/attach.c +@@ -20,8 +20,10 @@ + * Attach/Detach Functions and helpers * + \*************************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include "ath5k.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_base.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_base.c new file mode 100644 index 000000000000..fd837ab659ac --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_base.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath5k/base.c ++++ b/drivers/net/wireless/ath/ath5k/base.c +@@ -40,8 +40,10 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_debug.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_debug.c new file mode 100644 index 000000000000..ff2d8dfd5b4e --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_debug.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath5k/debug.c ++++ b/drivers/net/wireless/ath/ath5k/debug.c +@@ -58,8 +58,10 @@ + * THE POSSIBILITY OF SUCH DAMAGES. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_desc.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_desc.c new file mode 100644 index 000000000000..034e4812165a --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_desc.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath5k/desc.c ++++ b/drivers/net/wireless/ath/ath5k/desc.c +@@ -21,8 +21,11 @@ + Hardware Descriptor Functions + \******************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include ++ + #include "ath5k.h" + #include "reg.h" + #include "debug.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_dma.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_dma.c new file mode 100644 index 000000000000..daaf54fc8ce1 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_dma.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath5k/dma.c ++++ b/drivers/net/wireless/ath/ath5k/dma.c +@@ -29,8 +29,11 @@ + * status registers (ISR). + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include ++ + #include "ath5k.h" + #include "reg.h" + #include "debug.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_eeprom.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_eeprom.c new file mode 100644 index 000000000000..d05d207c7ae0 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_eeprom.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath5k/eeprom.c ++++ b/drivers/net/wireless/ath/ath5k/eeprom.c +@@ -21,8 +21,10 @@ + * EEPROM access functions and helpers * + \*************************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + + #include "ath5k.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_initvals.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_initvals.c new file mode 100644 index 000000000000..ba94dd3963c2 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_initvals.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath5k/initvals.c ++++ b/drivers/net/wireless/ath/ath5k/initvals.c +@@ -19,8 +19,11 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include ++ + #include "ath5k.h" + #include "reg.h" + #include "debug.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_led.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_led.c new file mode 100644 index 000000000000..05b91bf5bb98 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_led.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath5k/led.c ++++ b/drivers/net/wireless/ath/ath5k/led.c +@@ -39,8 +39,10 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include "ath5k.h" + diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_mac80211-ops.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_mac80211-ops.c new file mode 100644 index 000000000000..a11835bb0122 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_mac80211-ops.c @@ -0,0 +1,17 @@ +--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c ++++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c +@@ -41,11 +41,14 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include + #include + ++#include ++ + #include "ath5k.h" + #include "base.h" + #include "reg.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_pci.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_pci.c new file mode 100644 index 000000000000..3affa135f2b7 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_pci.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath5k/pci.c ++++ b/drivers/net/wireless/ath/ath5k/pci.c +@@ -14,8 +14,10 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_phy.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_phy.c new file mode 100644 index 000000000000..84ab4dbb2515 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_phy.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath5k/phy.c ++++ b/drivers/net/wireless/ath/ath5k/phy.c +@@ -22,8 +22,10 @@ + * PHY related functions * + \***********************/ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_qcu.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_qcu.c new file mode 100644 index 000000000000..92ae2fb0cbdc --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_qcu.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath5k/qcu.c ++++ b/drivers/net/wireless/ath/ath5k/qcu.c +@@ -20,8 +20,11 @@ + Queue Control Unit, DCF Control Unit Functions + \********************************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include ++ + #include "ath5k.h" + #include "reg.h" + #include "debug.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_reset.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_reset.c new file mode 100644 index 000000000000..852fa3e2dbf9 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_reset.c @@ -0,0 +1,15 @@ +--- a/drivers/net/wireless/ath/ath5k/reset.c ++++ b/drivers/net/wireless/ath/ath5k/reset.c +@@ -23,10 +23,12 @@ + Reset function and helpers + \****************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include + ++#include + #include /* To determine if a card is pci-e */ + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_sysfs.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_sysfs.c new file mode 100644 index 000000000000..b7782bdf6bd0 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath5k_sysfs.c @@ -0,0 +1,10 @@ +--- a/drivers/net/wireless/ath/ath5k/sysfs.c ++++ b/drivers/net/wireless/ath/ath5k/sysfs.c +@@ -1,5 +1,7 @@ ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_cfg80211.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_cfg80211.c new file mode 100644 index 000000000000..be1d7b35bf98 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_cfg80211.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c ++++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c +@@ -15,8 +15,10 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_init.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_init.c new file mode 100644 index 000000000000..b754cfdd044c --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_init.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath6kl/init.c ++++ b/drivers/net/wireless/ath/ath6kl/init.c +@@ -16,8 +16,10 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_main.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_main.c new file mode 100644 index 000000000000..1490bb3eeb33 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_main.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath6kl/main.c ++++ b/drivers/net/wireless/ath/ath6kl/main.c +@@ -15,8 +15,11 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include ++ + #include "core.h" + #include "hif-ops.h" + #include "cfg80211.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_txrx.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_txrx.c new file mode 100644 index 000000000000..7a6fd422ea90 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath6kl_txrx.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath6kl/txrx.c ++++ b/drivers/net/wireless/ath/ath6kl/txrx.c +@@ -15,8 +15,11 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include ++ + #include "core.h" + #include "debug.h" + #include "htc-ops.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_htc_drv_init.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_htc_drv_init.c new file mode 100644 index 000000000000..c1298567b0fb --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_htc_drv_init.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c ++++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c +@@ -14,8 +14,11 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include ++ + #include "htc.h" + + MODULE_AUTHOR("Atheros Communications"); diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_htc_hst.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_htc_hst.c new file mode 100644 index 000000000000..b88569ae73a8 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_htc_hst.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath9k/htc_hst.c ++++ b/drivers/net/wireless/ath/ath9k/htc_hst.c +@@ -14,8 +14,11 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include ++ + #include "htc.h" + + static int htc_issue_send(struct htc_target *target, struct sk_buff* skb, diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_init.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_init.c new file mode 100644 index 000000000000..7de038eed6e5 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_init.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath9k/init.c ++++ b/drivers/net/wireless/ath/ath9k/init.c +@@ -14,8 +14,10 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_pci.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_pci.c new file mode 100644 index 000000000000..45d362b37939 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_ath9k_pci.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath9k/pci.c ++++ b/drivers/net/wireless/ath/ath9k/pci.c +@@ -14,8 +14,10 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_main.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_main.c new file mode 100644 index 000000000000..1fd91709a109 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_main.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/main.c ++++ b/drivers/net/wireless/ath/main.c +@@ -14,9 +14,11 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include ++#include + #include + + #include "ath.h" diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_regd.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_regd.c new file mode 100644 index 000000000000..c147951c73ed --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_ath_regd.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/regd.c ++++ b/drivers/net/wireless/ath/regd.c +@@ -14,9 +14,11 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_aiutils.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_aiutils.c new file mode 100644 index 000000000000..eb604a1d2eb7 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_aiutils.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c +@@ -16,8 +16,10 @@ + * File contents: support functions for PCI/PCIe + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_mac80211_if.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_mac80211_if.c new file mode 100644 index 000000000000..bcd4f84694a1 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_mac80211_if.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +@@ -16,8 +16,10 @@ + */ + + #define __UNDEF_NO_VERSION__ ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_main.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_main.c new file mode 100644 index 000000000000..5a33c9c3439c --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_main.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +@@ -15,8 +15,10 @@ + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_phy_phy_n.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_phy_phy_n.c new file mode 100644 index 000000000000..090eae88dedf --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmsmac_phy_phy_n.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c +@@ -14,9 +14,11 @@ + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include ++#include + #include + #include + diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmutil_utils.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmutil_utils.c new file mode 100644 index 000000000000..9d6ed2967124 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_brcm80211_brcmutil_utils.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/brcm80211/brcmutil/utils.c ++++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c +@@ -14,8 +14,10 @@ + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlegacy_3945-mac.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlegacy_3945-mac.c new file mode 100644 index 000000000000..90afaff676da --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlegacy_3945-mac.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/iwlegacy/3945-mac.c ++++ b/drivers/net/wireless/iwlegacy/3945-mac.c +@@ -27,9 +27,11 @@ + * + *****************************************************************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlegacy_4965-mac.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlegacy_4965-mac.c new file mode 100644 index 000000000000..6b44e957016c --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlegacy_4965-mac.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/iwlegacy/4965-mac.c ++++ b/drivers/net/wireless/iwlegacy/4965-mac.c +@@ -27,9 +27,11 @@ + * + *****************************************************************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlwifi_dvm_main.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlwifi_dvm_main.c new file mode 100644 index 000000000000..74429ebe71c0 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlwifi_dvm_main.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/iwlwifi/dvm/main.c ++++ b/drivers/net/wireless/iwlwifi/dvm/main.c +@@ -27,8 +27,10 @@ + * + *****************************************************************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlwifi_pcie_drv.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlwifi_pcie_drv.c new file mode 100644 index 000000000000..0e06ca39ccf9 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_iwlwifi_pcie_drv.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/iwlwifi/pcie/drv.c ++++ b/drivers/net/wireless/iwlwifi/pcie/drv.c +@@ -61,8 +61,10 @@ + * + *****************************************************************************/ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_cfg.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_cfg.c new file mode 100644 index 000000000000..d5250c54d672 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_cfg.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/libertas/cfg.c ++++ b/drivers/net/wireless/libertas/cfg.c +@@ -6,8 +6,10 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_cs.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_cs.c new file mode 100644 index 000000000000..90063951bf6a --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_cs.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/libertas/if_cs.c ++++ b/drivers/net/wireless/libertas/if_cs.c +@@ -21,8 +21,10 @@ + + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_sdio.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_sdio.c new file mode 100644 index 000000000000..13f793c7caf6 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_sdio.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/libertas/if_sdio.c ++++ b/drivers/net/wireless/libertas/if_sdio.c +@@ -26,9 +26,11 @@ + * if_sdio_card_to_host() to pad the data. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_spi.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_spi.c new file mode 100644 index 000000000000..0946aab6f4b1 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_spi.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/libertas/if_spi.c ++++ b/drivers/net/wireless/libertas/if_spi.c +@@ -17,8 +17,10 @@ + * (at your option) any later version. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_usb.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_usb.c new file mode 100644 index 000000000000..a53b31103d85 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_if_usb.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/libertas/if_usb.c ++++ b/drivers/net/wireless/libertas/if_usb.c +@@ -2,8 +2,10 @@ + * This file contains functions used in USB interface module. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_main.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_main.c new file mode 100644 index 000000000000..a3837c957ce1 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_main.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/libertas/main.c ++++ b/drivers/net/wireless/libertas/main.c +@@ -4,8 +4,10 @@ + * thread etc.. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_mesh.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_mesh.c new file mode 100644 index 000000000000..3e3b7e63481c --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_mesh.c @@ -0,0 +1,10 @@ +--- a/drivers/net/wireless/libertas/mesh.c ++++ b/drivers/net/wireless/libertas/mesh.c +@@ -1,5 +1,7 @@ ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_rx.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_rx.c new file mode 100644 index 000000000000..eb81eaa536c0 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_rx.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/libertas/rx.c ++++ b/drivers/net/wireless/libertas/rx.c +@@ -2,8 +2,10 @@ + * This file contains the handling of RX in wlan driver. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_cmd.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_cmd.c new file mode 100644 index 000000000000..27e8d844692e --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_cmd.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/libertas_tf/cmd.c ++++ b/drivers/net/wireless/libertas_tf/cmd.c +@@ -7,8 +7,10 @@ + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + */ ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_if_usb.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_if_usb.c new file mode 100644 index 000000000000..4d2fdf48a9f4 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_if_usb.c @@ -0,0 +1,16 @@ +--- a/drivers/net/wireless/libertas_tf/if_usb.c ++++ b/drivers/net/wireless/libertas_tf/if_usb.c +@@ -9,11 +9,13 @@ + */ + #define DRV_NAME "lbtf_usb" + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include "libertas_tf.h" + #include "if_usb.h" + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_main.c b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_main.c new file mode 100644 index 000000000000..88c9fd344aa2 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_libertas_tf_main.c @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/libertas_tf/main.c ++++ b/drivers/net/wireless/libertas_tf/main.c +@@ -7,8 +7,10 @@ + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + */ ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + diff --git a/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_rtlwifi_wifi.h b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_rtlwifi_wifi.h new file mode 100644 index 000000000000..bed0b2941c1e --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/drivers_net_wireless_rtlwifi_wifi.h @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/rtlwifi/wifi.h ++++ b/drivers/net/wireless/rtlwifi/wifi.h +@@ -30,8 +30,10 @@ + #ifndef __RTL_WIFI_H__ + #define __RTL_WIFI_H__ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/net_bluetooth_lib.c b/patches/collateral-evolutions/network/53-pr_fmt/net_bluetooth_lib.c new file mode 100644 index 000000000000..8492b14dfa13 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/net_bluetooth_lib.c @@ -0,0 +1,14 @@ +--- a/net/bluetooth/lib.c ++++ b/net/bluetooth/lib.c +@@ -24,9 +24,11 @@ + + /* Bluetooth kernel library. */ + ++#undef pr_fmt + #define pr_fmt(fmt) "Bluetooth: " fmt + + #include ++#include + + #include + diff --git a/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_core.c b/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_core.c new file mode 100644 index 000000000000..cc37a50e607c --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_core.c @@ -0,0 +1,13 @@ +--- a/net/wireless/core.c ++++ b/net/wireless/core.c +@@ -4,8 +4,10 @@ + * Copyright 2006-2010 Johannes Berg + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_lib80211.c b/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_lib80211.c new file mode 100644 index 000000000000..29a3604a91e0 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_lib80211.c @@ -0,0 +1,13 @@ +--- a/net/wireless/lib80211.c ++++ b/net/wireless/lib80211.c +@@ -13,8 +13,10 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_lib80211_crypt_tkip.c b/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_lib80211_crypt_tkip.c new file mode 100644 index 000000000000..a5d56eef4967 --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_lib80211_crypt_tkip.c @@ -0,0 +1,13 @@ +--- a/net/wireless/lib80211_crypt_tkip.c ++++ b/net/wireless/lib80211_crypt_tkip.c +@@ -10,8 +10,10 @@ + * more details. + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_reg.c b/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_reg.c new file mode 100644 index 000000000000..168b4d17a17c --- /dev/null +++ b/patches/collateral-evolutions/network/53-pr_fmt/net_wireless_reg.c @@ -0,0 +1,14 @@ +--- a/net/wireless/reg.c ++++ b/net/wireless/reg.c +@@ -42,9 +42,11 @@ + * + */ + ++#undef pr_fmt + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include ++#include + #include + #include + #include diff --git a/patches/collateral-evolutions/network/54-get_ts_info.patch b/patches/collateral-evolutions/network/54-get_ts_info/INFO similarity index 72% rename from patches/collateral-evolutions/network/54-get_ts_info.patch rename to patches/collateral-evolutions/network/54-get_ts_info/INFO index 5e5764f37a82..a43dd308690c 100644 --- a/patches/collateral-evolutions/network/54-get_ts_info.patch +++ b/patches/collateral-evolutions/network/54-get_ts_info/INFO @@ -25,15 +25,3 @@ Date: Tue Apr 3 22:59:17 2012 +0000 Reviewed-by: Ben Hutchings Signed-off-by: David S. Miller ---- a/drivers/net/usb/usbnet.c -+++ b/drivers/net/usb/usbnet.c -@@ -933,7 +933,9 @@ static const struct ethtool_ops usbnet_e - .get_drvinfo = usbnet_get_drvinfo, - .get_msglevel = usbnet_get_msglevel, - .set_msglevel = usbnet_set_msglevel, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .get_ts_info = ethtool_op_get_ts_info, -+#endif - }; - - /*-------------------------------------------------------------------------*/ diff --git a/patches/collateral-evolutions/network/54-get_ts_info/drivers_net_usb_usbnet.c b/patches/collateral-evolutions/network/54-get_ts_info/drivers_net_usb_usbnet.c new file mode 100644 index 000000000000..0057f47b7897 --- /dev/null +++ b/patches/collateral-evolutions/network/54-get_ts_info/drivers_net_usb_usbnet.c @@ -0,0 +1,12 @@ +--- a/drivers/net/usb/usbnet.c ++++ b/drivers/net/usb/usbnet.c +@@ -933,7 +933,9 @@ + .get_drvinfo = usbnet_get_drvinfo, + .get_msglevel = usbnet_get_msglevel, + .set_msglevel = usbnet_set_msglevel, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .get_ts_info = ethtool_op_get_ts_info, ++#endif + }; + + /*-------------------------------------------------------------------------*/ diff --git a/patches/collateral-evolutions/network/55-iwlwifi-msg-trace-fix/INFO b/patches/collateral-evolutions/network/55-iwlwifi-msg-trace-fix/INFO new file mode 100644 index 000000000000..9437ac31c9a7 --- /dev/null +++ b/patches/collateral-evolutions/network/55-iwlwifi-msg-trace-fix/INFO @@ -0,0 +1,5 @@ +In recent kernels, %pV will copy the va_list before using it. +This isn't true for all kernels, so copy the va_list for use +by the dev_*() functions, otherwise the kernel will crash if +the message is printed and traced. + diff --git a/patches/collateral-evolutions/network/55-iwlwifi-msg-trace-fix.patch b/patches/collateral-evolutions/network/55-iwlwifi-msg-trace-fix/drivers_net_wireless_iwlwifi_iwl-debug.c similarity index 77% rename from patches/collateral-evolutions/network/55-iwlwifi-msg-trace-fix.patch rename to patches/collateral-evolutions/network/55-iwlwifi-msg-trace-fix/drivers_net_wireless_iwlwifi_iwl-debug.c index 72f248029190..a546b3ae31f2 100644 --- a/patches/collateral-evolutions/network/55-iwlwifi-msg-trace-fix.patch +++ b/patches/collateral-evolutions/network/55-iwlwifi-msg-trace-fix/drivers_net_wireless_iwlwifi_iwl-debug.c @@ -1,11 +1,6 @@ -In recent kernels, %pV will copy the va_list before using it. -This isn't true for all kernels, so copy the va_list for use -by the dev_*() functions, otherwise the kernel will crash if -the message is printed and traced. - --- a/drivers/net/wireless/iwlwifi/iwl-debug.c +++ b/drivers/net/wireless/iwlwifi/iwl-debug.c -@@ -76,13 +76,16 @@ void __iwl_ ##fn(struct device *dev, con +@@ -76,13 +76,16 @@ struct va_format vaf = { \ .fmt = fmt, \ }; \ @@ -26,7 +21,7 @@ the message is printed and traced. } __iwl_fn(warn) -@@ -101,13 +104,18 @@ void __iwl_err(struct device *dev, bool +@@ -101,13 +104,18 @@ va_list args; va_start(args, fmt); @@ -46,7 +41,7 @@ the message is printed and traced. trace_iwlwifi_err(&vaf); va_end(args); } -@@ -124,13 +132,19 @@ void __iwl_dbg(struct device *dev, +@@ -124,13 +132,19 @@ va_list args; va_start(args, fmt); diff --git a/patches/collateral-evolutions/network/56-mac80211-trace-fix.patch b/patches/collateral-evolutions/network/56-mac80211-trace-fix/net_mac80211_trace.c similarity index 83% rename from patches/collateral-evolutions/network/56-mac80211-trace-fix.patch rename to patches/collateral-evolutions/network/56-mac80211-trace-fix/net_mac80211_trace.c index 183cec252fe3..6dc729461986 100644 --- a/patches/collateral-evolutions/network/56-mac80211-trace-fix.patch +++ b/patches/collateral-evolutions/network/56-mac80211-trace-fix/net_mac80211_trace.c @@ -1,6 +1,6 @@ --- a/net/mac80211/trace.c +++ b/net/mac80211/trace.c -@@ -15,12 +15,16 @@ void __sdata_info(const char *fmt, ...) +@@ -15,12 +15,16 @@ struct va_format vaf = { .fmt = fmt, }; @@ -19,7 +19,7 @@ trace_mac80211_info(&vaf); va_end(args); } -@@ -33,10 +37,16 @@ void __sdata_dbg(bool print, const char +@@ -33,10 +37,16 @@ va_list args; va_start(args, fmt); @@ -38,7 +38,7 @@ trace_mac80211_dbg(&vaf); va_end(args); } -@@ -46,12 +56,16 @@ void __sdata_err(const char *fmt, ...) +@@ -46,12 +56,16 @@ struct va_format vaf = { .fmt = fmt, }; @@ -57,7 +57,7 @@ trace_mac80211_err(&vaf); va_end(args); } -@@ -64,10 +78,16 @@ void __wiphy_dbg(struct wiphy *wiphy, bo +@@ -64,10 +78,16 @@ va_list args; va_start(args, fmt); diff --git a/patches/collateral-evolutions/network/57-iwlwifi-debug-fix/INFO b/patches/collateral-evolutions/network/57-iwlwifi-debug-fix/INFO new file mode 100644 index 000000000000..98fdfd1a2874 --- /dev/null +++ b/patches/collateral-evolutions/network/57-iwlwifi-debug-fix/INFO @@ -0,0 +1,5 @@ +Due to compat including linux/device.h before we do, +we don't get a chance to #define DEBUG to get our +debugging prints. This patch replaces dev_dbg with +dev_printk to make them show up again. + diff --git a/patches/collateral-evolutions/network/57-iwlwifi-debug-fix.patch b/patches/collateral-evolutions/network/57-iwlwifi-debug-fix/drivers_net_wireless_iwlwifi_iwl-debug.c similarity index 58% rename from patches/collateral-evolutions/network/57-iwlwifi-debug-fix.patch rename to patches/collateral-evolutions/network/57-iwlwifi-debug-fix/drivers_net_wireless_iwlwifi_iwl-debug.c index db7cc80320d9..e9bd18a1f7a8 100644 --- a/patches/collateral-evolutions/network/57-iwlwifi-debug-fix.patch +++ b/patches/collateral-evolutions/network/57-iwlwifi-debug-fix/drivers_net_wireless_iwlwifi_iwl-debug.c @@ -1,11 +1,6 @@ -Due to compat including linux/device.h before we do, -we don't get a chance to #define DEBUG to get our -debugging prints. This patch replaces dev_dbg with -dev_printk to make them show up again. - --- a/drivers/net/wireless/iwlwifi/iwl-debug.c +++ b/drivers/net/wireless/iwlwifi/iwl-debug.c -@@ -139,8 +139,9 @@ void __iwl_dbg(struct device *dev, +@@ -139,8 +139,9 @@ va_copy(args2, args); vaf.va = &args2; diff --git a/patches/collateral-evolutions/network/61-netdev-addr_assign_type.patch b/patches/collateral-evolutions/network/61-netdev-addr_assign_type.patch deleted file mode 100644 index 810115181d19..000000000000 --- a/patches/collateral-evolutions/network/61-netdev-addr_assign_type.patch +++ /dev/null @@ -1,31 +0,0 @@ -You cannot backport assignment of netdev->addr_assign_type -given that its part of the netdev data structure only in future -kernels. - -mcgrof@tux ~/linux-next (git::master)$ git describe --contains c1f79426 -v2.6.36-rc1~571^2~104 - ---- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -@@ -2622,7 +2622,9 @@ static int atl1c_probe(struct pci_dev *p - } - if (atl1c_read_mac_addr(&adapter->hw)) { - /* got a random MAC address, set NET_ADDR_RANDOM to netdev */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - netdev->addr_assign_type = NET_ADDR_RANDOM; -+#endif - } - memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len); - if (netif_msg_probe(adapter)) ---- a/drivers/net/ethernet/atheros/atlx/atl1.c -+++ b/drivers/net/ethernet/atheros/atlx/atl1.c -@@ -3060,7 +3060,9 @@ static int atl1_probe(struct pci_dev *pd - /* copy the MAC address out of the EEPROM */ - if (atl1_read_mac_addr(&adapter->hw)) { - /* mark random mac */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) - netdev->addr_assign_type = NET_ADDR_RANDOM; -+#endif - } - memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len); - diff --git a/patches/collateral-evolutions/network/61-netdev-addr_assign_type/INFO b/patches/collateral-evolutions/network/61-netdev-addr_assign_type/INFO new file mode 100644 index 000000000000..08a9b210a60e --- /dev/null +++ b/patches/collateral-evolutions/network/61-netdev-addr_assign_type/INFO @@ -0,0 +1,7 @@ +You cannot backport assignment of netdev->addr_assign_type +given that its part of the netdev data structure only in future +kernels. + +mcgrof@tux ~/linux-next (git::master)$ git describe --contains c1f79426 +v2.6.36-rc1~571^2~104 + diff --git a/patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_atl1c_atl1c_main.c b/patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_atl1c_atl1c_main.c new file mode 100644 index 000000000000..c66d5f280489 --- /dev/null +++ b/patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_atl1c_atl1c_main.c @@ -0,0 +1,12 @@ +--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c ++++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +@@ -2622,7 +2622,9 @@ + } + if (atl1c_read_mac_addr(&adapter->hw)) { + /* got a random MAC address, set NET_ADDR_RANDOM to netdev */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + netdev->addr_assign_type = NET_ADDR_RANDOM; ++#endif + } + memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len); + if (netif_msg_probe(adapter)) diff --git a/patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_atlx_atl1.c b/patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_atlx_atl1.c new file mode 100644 index 000000000000..b4237c226ad3 --- /dev/null +++ b/patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_atlx_atl1.c @@ -0,0 +1,12 @@ +--- a/drivers/net/ethernet/atheros/atlx/atl1.c ++++ b/drivers/net/ethernet/atheros/atlx/atl1.c +@@ -3060,7 +3060,9 @@ + /* copy the MAC address out of the EEPROM */ + if (atl1_read_mac_addr(&adapter->hw)) { + /* mark random mac */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + netdev->addr_assign_type = NET_ADDR_RANDOM; ++#endif + } + memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len); + diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm.patch deleted file mode 100644 index 458ba4cfb75e..000000000000 --- a/patches/collateral-evolutions/network/62-usb_driver_lpm.patch +++ /dev/null @@ -1,276 +0,0 @@ ---- a/drivers/bluetooth/ath3k.c -+++ b/drivers/bluetooth/ath3k.c -@@ -473,7 +473,9 @@ static struct usb_driver ath3k_driver = - .probe = ath3k_probe, - .disconnect = ath3k_disconnect, - .id_table = ath3k_table, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(ath3k_driver); ---- a/drivers/bluetooth/bcm203x.c -+++ b/drivers/bluetooth/bcm203x.c -@@ -273,7 +273,9 @@ static struct usb_driver bcm203x_driver - .probe = bcm203x_probe, - .disconnect = bcm203x_disconnect, - .id_table = bcm203x_table, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(bcm203x_driver); ---- a/drivers/bluetooth/bfusb.c -+++ b/drivers/bluetooth/bfusb.c -@@ -745,7 +745,9 @@ static struct usb_driver bfusb_driver = - .probe = bfusb_probe, - .disconnect = bfusb_disconnect, - .id_table = bfusb_table, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(bfusb_driver); ---- a/drivers/bluetooth/bpa10x.c -+++ b/drivers/bluetooth/bpa10x.c -@@ -504,7 +504,9 @@ static struct usb_driver bpa10x_driver = - .probe = bpa10x_probe, - .disconnect = bpa10x_disconnect, - .id_table = bpa10x_table, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(bpa10x_driver); ---- a/drivers/bluetooth/btusb.c -+++ b/drivers/bluetooth/btusb.c -@@ -1234,7 +1234,9 @@ static struct usb_driver btusb_driver = - #endif - .id_table = btusb_table, - .supports_autosuspend = 1, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(btusb_driver); ---- a/drivers/net/usb/cdc_ether.c -+++ b/drivers/net/usb/cdc_ether.c -@@ -720,7 +720,9 @@ static struct usb_driver cdc_driver = { - .resume = usbnet_resume, - .reset_resume = usbnet_resume, - .supports_autosuspend = 1, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(cdc_driver); ---- a/drivers/net/usb/rndis_host.c -+++ b/drivers/net/usb/rndis_host.c -@@ -642,7 +642,9 @@ static struct usb_driver rndis_driver = - .disconnect = usbnet_disconnect, - .suspend = usbnet_suspend, - .resume = usbnet_resume, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(rndis_driver); ---- a/drivers/net/wireless/at76c50x-usb.c -+++ b/drivers/net/wireless/at76c50x-usb.c -@@ -2451,7 +2451,9 @@ static struct usb_driver at76_driver = { - .probe = at76_probe, - .disconnect = at76_disconnect, - .id_table = dev_table, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - static int __init at76_mod_init(void) ---- a/drivers/net/wireless/ath/ath6kl/usb.c -+++ b/drivers/net/wireless/ath/ath6kl/usb.c -@@ -1207,7 +1207,9 @@ static struct usb_driver ath6kl_usb_driv - .disconnect = ath6kl_usb_remove, - .id_table = ath6kl_usb_ids, - .supports_autosuspend = true, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - static int ath6kl_usb_init(void) ---- a/drivers/net/wireless/ath/ath9k/hif_usb.c -+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c -@@ -1373,7 +1373,9 @@ static struct usb_driver ath9k_hif_usb_d - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) - .soft_unbind = 1, - #endif -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - int ath9k_hif_usb_init(void) ---- a/drivers/net/wireless/ath/carl9170/usb.c -+++ b/drivers/net/wireless/ath/carl9170/usb.c -@@ -1166,7 +1166,9 @@ static struct usb_driver carl9170_driver - .resume = carl9170_usb_resume, - .reset_resume = carl9170_usb_resume, - #endif /* CONFIG_PM */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(carl9170_driver); ---- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c -@@ -1498,7 +1498,9 @@ static struct usb_driver brcmf_usbdrvr = - .resume = brcmf_usb_resume, - .reset_resume = brcmf_usb_reset_resume, - .supports_autosuspend = 1, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - static void brcmf_release_fw(struct list_head *q) ---- a/drivers/net/wireless/libertas/if_usb.c -+++ b/drivers/net/wireless/libertas/if_usb.c -@@ -1015,7 +1015,9 @@ static struct usb_driver if_usb_driver = - .suspend = if_usb_suspend, - .resume = if_usb_resume, - .reset_resume = if_usb_resume, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(if_usb_driver); ---- a/drivers/net/wireless/libertas_tf/if_usb.c -+++ b/drivers/net/wireless/libertas_tf/if_usb.c -@@ -922,7 +922,9 @@ static struct usb_driver if_usb_driver = - .id_table = if_usb_table, - .suspend = if_usb_suspend, - .resume = if_usb_resume, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(if_usb_driver); ---- a/drivers/net/wireless/orinoco/orinoco_usb.c -+++ b/drivers/net/wireless/orinoco/orinoco_usb.c -@@ -1758,7 +1758,9 @@ static struct usb_driver orinoco_driver - .probe = ezusb_probe, - .disconnect = ezusb_disconnect, - .id_table = ezusb_table, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(orinoco_driver); ---- a/drivers/net/wireless/p54/p54usb.c -+++ b/drivers/net/wireless/p54/p54usb.c -@@ -1140,7 +1140,9 @@ static struct usb_driver p54u_driver = { - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) - .soft_unbind = 1, - #endif -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(p54u_driver); ---- a/drivers/net/wireless/rndis_wlan.c -+++ b/drivers/net/wireless/rndis_wlan.c -@@ -3757,7 +3757,9 @@ static struct usb_driver rndis_wlan_driv - .disconnect = usbnet_disconnect, - .suspend = usbnet_suspend, - .resume = usbnet_resume, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(rndis_wlan_driver); ---- a/drivers/net/wireless/rt2x00/rt2500usb.c -+++ b/drivers/net/wireless/rt2x00/rt2500usb.c -@@ -1989,7 +1989,9 @@ static struct usb_driver rt2500usb_drive - .suspend = rt2x00usb_suspend, - .resume = rt2x00usb_resume, - .reset_resume = rt2x00usb_resume, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(rt2500usb_driver); ---- a/drivers/net/wireless/rt2x00/rt2800usb.c -+++ b/drivers/net/wireless/rt2x00/rt2800usb.c -@@ -1375,7 +1375,9 @@ static struct usb_driver rt2800usb_drive - .suspend = rt2x00usb_suspend, - .resume = rt2x00usb_resume, - .reset_resume = rt2x00usb_resume, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(rt2800usb_driver); ---- a/drivers/net/wireless/rt2x00/rt73usb.c -+++ b/drivers/net/wireless/rt2x00/rt73usb.c -@@ -2536,7 +2536,9 @@ static struct usb_driver rt73usb_driver - .suspend = rt2x00usb_suspend, - .resume = rt2x00usb_resume, - .reset_resume = rt2x00usb_resume, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(rt73usb_driver); ---- a/drivers/net/wireless/rtl818x/rtl8187/dev.c -+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c -@@ -1673,7 +1673,9 @@ static struct usb_driver rtl8187_driver - .id_table = rtl8187_table, - .probe = rtl8187_probe, - .disconnect = rtl8187_disconnect, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(rtl8187_driver); ---- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c -+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c -@@ -384,7 +384,9 @@ static struct usb_driver rtl8192cu_drive - #ifdef CONFIG_AUTOSUSPEND - .supports_autosuspend = 1, - #endif -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - module_usb_driver(rtl8192cu_driver); ---- a/drivers/net/wireless/zd1211rw/zd_usb.c -+++ b/drivers/net/wireless/zd1211rw/zd_usb.c -@@ -1540,7 +1540,9 @@ static struct usb_driver driver = { - .disconnect = disconnect, - .pre_reset = pre_reset, - .post_reset = post_reset, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - .disable_hub_initiated_lpm = 1, -+#endif - }; - - struct workqueue_struct *zd_workqueue; diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_ath3k.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_ath3k.c new file mode 100644 index 000000000000..05b6ea90e2aa --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_ath3k.c @@ -0,0 +1,12 @@ +--- a/drivers/bluetooth/ath3k.c ++++ b/drivers/bluetooth/ath3k.c +@@ -473,7 +473,9 @@ + .probe = ath3k_probe, + .disconnect = ath3k_disconnect, + .id_table = ath3k_table, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(ath3k_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bcm203x.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bcm203x.c new file mode 100644 index 000000000000..3dba6a3928f4 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bcm203x.c @@ -0,0 +1,12 @@ +--- a/drivers/bluetooth/bcm203x.c ++++ b/drivers/bluetooth/bcm203x.c +@@ -273,7 +273,9 @@ + .probe = bcm203x_probe, + .disconnect = bcm203x_disconnect, + .id_table = bcm203x_table, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(bcm203x_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bfusb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bfusb.c new file mode 100644 index 000000000000..0830697adeb5 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bfusb.c @@ -0,0 +1,12 @@ +--- a/drivers/bluetooth/bfusb.c ++++ b/drivers/bluetooth/bfusb.c +@@ -745,7 +745,9 @@ + .probe = bfusb_probe, + .disconnect = bfusb_disconnect, + .id_table = bfusb_table, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(bfusb_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bpa10x.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bpa10x.c new file mode 100644 index 000000000000..ee06c08489a2 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_bpa10x.c @@ -0,0 +1,12 @@ +--- a/drivers/bluetooth/bpa10x.c ++++ b/drivers/bluetooth/bpa10x.c +@@ -504,7 +504,9 @@ + .probe = bpa10x_probe, + .disconnect = bpa10x_disconnect, + .id_table = bpa10x_table, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(bpa10x_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_btusb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_btusb.c new file mode 100644 index 000000000000..5a0cf012699d --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_btusb.c @@ -0,0 +1,12 @@ +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -1234,7 +1234,9 @@ + #endif + .id_table = btusb_table, + .supports_autosuspend = 1, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(btusb_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ether.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ether.c new file mode 100644 index 000000000000..e4b942ad1ced --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ether.c @@ -0,0 +1,12 @@ +--- a/drivers/net/usb/cdc_ether.c ++++ b/drivers/net/usb/cdc_ether.c +@@ -720,7 +720,9 @@ + .resume = usbnet_resume, + .reset_resume = usbnet_resume, + .supports_autosuspend = 1, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(cdc_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_rndis_host.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_rndis_host.c new file mode 100644 index 000000000000..231263220e08 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_rndis_host.c @@ -0,0 +1,12 @@ +--- a/drivers/net/usb/rndis_host.c ++++ b/drivers/net/usb/rndis_host.c +@@ -642,7 +642,9 @@ + .disconnect = usbnet_disconnect, + .suspend = usbnet_suspend, + .resume = usbnet_resume, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(rndis_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_at76c50x-usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_at76c50x-usb.c new file mode 100644 index 000000000000..b210ec15a7b5 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_at76c50x-usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/at76c50x-usb.c ++++ b/drivers/net/wireless/at76c50x-usb.c +@@ -2451,7 +2451,9 @@ + .probe = at76_probe, + .disconnect = at76_disconnect, + .id_table = dev_table, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + static int __init at76_mod_init(void) diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_ath6kl_usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_ath6kl_usb.c new file mode 100644 index 000000000000..300813a85269 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_ath6kl_usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/ath/ath6kl/usb.c ++++ b/drivers/net/wireless/ath/ath6kl/usb.c +@@ -1207,7 +1207,9 @@ + .disconnect = ath6kl_usb_remove, + .id_table = ath6kl_usb_ids, + .supports_autosuspend = true, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + static int ath6kl_usb_init(void) diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_ath9k_hif_usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_ath9k_hif_usb.c new file mode 100644 index 000000000000..3de2052b9fb6 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_ath9k_hif_usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/ath/ath9k/hif_usb.c ++++ b/drivers/net/wireless/ath/ath9k/hif_usb.c +@@ -1373,7 +1373,9 @@ + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) + .soft_unbind = 1, + #endif ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + int ath9k_hif_usb_init(void) diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_carl9170_usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_carl9170_usb.c new file mode 100644 index 000000000000..b5d5530ceb84 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_carl9170_usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/ath/carl9170/usb.c ++++ b/drivers/net/wireless/ath/carl9170/usb.c +@@ -1166,7 +1166,9 @@ + .resume = carl9170_usb_resume, + .reset_resume = carl9170_usb_resume, + #endif /* CONFIG_PM */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(carl9170_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_brcm80211_brcmfmac_usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_brcm80211_brcmfmac_usb.c new file mode 100644 index 000000000000..b5fa593b6c74 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_brcm80211_brcmfmac_usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c +@@ -1498,7 +1498,9 @@ + .resume = brcmf_usb_resume, + .reset_resume = brcmf_usb_reset_resume, + .supports_autosuspend = 1, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + static void brcmf_release_fw(struct list_head *q) diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_libertas_if_usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_libertas_if_usb.c new file mode 100644 index 000000000000..7c30cc5c5c3b --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_libertas_if_usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/libertas/if_usb.c ++++ b/drivers/net/wireless/libertas/if_usb.c +@@ -1015,7 +1015,9 @@ + .suspend = if_usb_suspend, + .resume = if_usb_resume, + .reset_resume = if_usb_resume, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(if_usb_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_libertas_tf_if_usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_libertas_tf_if_usb.c new file mode 100644 index 000000000000..22466f265fd4 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_libertas_tf_if_usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/libertas_tf/if_usb.c ++++ b/drivers/net/wireless/libertas_tf/if_usb.c +@@ -922,7 +922,9 @@ + .id_table = if_usb_table, + .suspend = if_usb_suspend, + .resume = if_usb_resume, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(if_usb_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_orinoco_orinoco_usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_orinoco_orinoco_usb.c new file mode 100644 index 000000000000..c2af629c7e56 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_orinoco_orinoco_usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/orinoco/orinoco_usb.c ++++ b/drivers/net/wireless/orinoco/orinoco_usb.c +@@ -1758,7 +1758,9 @@ + .probe = ezusb_probe, + .disconnect = ezusb_disconnect, + .id_table = ezusb_table, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(orinoco_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_p54_p54usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_p54_p54usb.c new file mode 100644 index 000000000000..8f4397ba4cf4 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_p54_p54usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/p54/p54usb.c ++++ b/drivers/net/wireless/p54/p54usb.c +@@ -1140,7 +1140,9 @@ + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) + .soft_unbind = 1, + #endif ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(p54u_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rndis_wlan.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rndis_wlan.c new file mode 100644 index 000000000000..fa077acbd0cc --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rndis_wlan.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/rndis_wlan.c ++++ b/drivers/net/wireless/rndis_wlan.c +@@ -3757,7 +3757,9 @@ + .disconnect = usbnet_disconnect, + .suspend = usbnet_suspend, + .resume = usbnet_resume, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(rndis_wlan_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt2500usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt2500usb.c new file mode 100644 index 000000000000..adb8e06a4951 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt2500usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/rt2x00/rt2500usb.c ++++ b/drivers/net/wireless/rt2x00/rt2500usb.c +@@ -1989,7 +1989,9 @@ + .suspend = rt2x00usb_suspend, + .resume = rt2x00usb_resume, + .reset_resume = rt2x00usb_resume, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(rt2500usb_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt2800usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt2800usb.c new file mode 100644 index 000000000000..bf384886ce01 --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt2800usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/rt2x00/rt2800usb.c ++++ b/drivers/net/wireless/rt2x00/rt2800usb.c +@@ -1375,7 +1375,9 @@ + .suspend = rt2x00usb_suspend, + .resume = rt2x00usb_resume, + .reset_resume = rt2x00usb_resume, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(rt2800usb_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt73usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt73usb.c new file mode 100644 index 000000000000..7955ace2698d --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt73usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/rt2x00/rt73usb.c ++++ b/drivers/net/wireless/rt2x00/rt73usb.c +@@ -2536,7 +2536,9 @@ + .suspend = rt2x00usb_suspend, + .resume = rt2x00usb_resume, + .reset_resume = rt2x00usb_resume, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(rt73usb_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtl818x_rtl8187_dev.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtl818x_rtl8187_dev.c new file mode 100644 index 000000000000..ead8be9f2d9f --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtl818x_rtl8187_dev.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c ++++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c +@@ -1673,7 +1673,9 @@ + .id_table = rtl8187_table, + .probe = rtl8187_probe, + .disconnect = rtl8187_disconnect, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(rtl8187_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtlwifi_rtl8192cu_sw.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtlwifi_rtl8192cu_sw.c new file mode 100644 index 000000000000..2d446441fa5e --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtlwifi_rtl8192cu_sw.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c ++++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +@@ -384,7 +384,9 @@ + #ifdef CONFIG_AUTOSUSPEND + .supports_autosuspend = 1, + #endif ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + module_usb_driver(rtl8192cu_driver); diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_zd1211rw_zd_usb.c b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_zd1211rw_zd_usb.c new file mode 100644 index 000000000000..315f7ead1fdb --- /dev/null +++ b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_zd1211rw_zd_usb.c @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/zd1211rw/zd_usb.c ++++ b/drivers/net/wireless/zd1211rw/zd_usb.c +@@ -1540,7 +1540,9 @@ + .disconnect = disconnect, + .pre_reset = pre_reset, + .post_reset = post_reset, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .disable_hub_initiated_lpm = 1, ++#endif + }; + + struct workqueue_struct *zd_workqueue; diff --git a/patches/collateral-evolutions/network/63-tty-termios.patch b/patches/collateral-evolutions/network/63-tty-termios.patch deleted file mode 100644 index d84e303afa6a..000000000000 --- a/patches/collateral-evolutions/network/63-tty-termios.patch +++ /dev/null @@ -1,49 +0,0 @@ -This patch requires a manual backport: - -commit adc8d746caa67fff4b53ba3e5163a6cbacc3b523 -Author: Alan Cox -Date: Sat Jul 14 15:31:47 2012 +0100 - - tty: move the termios object into the tty - - This will let us sort out a whole pile of tty related races. The - alternative would be to keep points and refcount the termios objects. - However - 1. They are tiny anyway - 2. Many devices don't use the stored copies - 3. We can remove a pty special case - - Signed-off-by: Alan Cox - Signed-off-by: Greg Kroah-Hartman - -We cannot use compat.git for this given that the assignment -was not done through a static inline helper. - ---- a/drivers/bluetooth/hci_ath.c -+++ b/drivers/bluetooth/hci_ath.c -@@ -58,7 +58,11 @@ static int ath_wakeup_ar3k(struct tty_st - return status; - - /* Disable Automatic RTSCTS */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) - ktermios = tty->termios; -+#else -+ memcpy(&ktermios, tty->termios, sizeof(ktermios)); -+#endif - ktermios.c_cflag &= ~CRTSCTS; - tty_set_termios(tty, &ktermios); - ---- a/net/bluetooth/rfcomm/tty.c -+++ b/net/bluetooth/rfcomm/tty.c -@@ -868,7 +868,11 @@ static int rfcomm_tty_ioctl(struct tty_s - - static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old) - { -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) - struct ktermios *new = &tty->termios; -+#else -+ struct ktermios *new = tty->termios; -+#endif - int old_baud_rate = tty_termios_baud_rate(old); - int new_baud_rate = tty_termios_baud_rate(new); - diff --git a/patches/collateral-evolutions/network/63-tty-termios/INFO b/patches/collateral-evolutions/network/63-tty-termios/INFO new file mode 100644 index 000000000000..a5e536d31549 --- /dev/null +++ b/patches/collateral-evolutions/network/63-tty-termios/INFO @@ -0,0 +1,21 @@ +This patch requires a manual backport: + +commit adc8d746caa67fff4b53ba3e5163a6cbacc3b523 +Author: Alan Cox +Date: Sat Jul 14 15:31:47 2012 +0100 + + tty: move the termios object into the tty + + This will let us sort out a whole pile of tty related races. The + alternative would be to keep points and refcount the termios objects. + However + 1. They are tiny anyway + 2. Many devices don't use the stored copies + 3. We can remove a pty special case + + Signed-off-by: Alan Cox + Signed-off-by: Greg Kroah-Hartman + +We cannot use compat.git for this given that the assignment +was not done through a static inline helper. + diff --git a/patches/collateral-evolutions/network/63-tty-termios/drivers_bluetooth_hci_ath.c b/patches/collateral-evolutions/network/63-tty-termios/drivers_bluetooth_hci_ath.c new file mode 100644 index 000000000000..8108b77527bd --- /dev/null +++ b/patches/collateral-evolutions/network/63-tty-termios/drivers_bluetooth_hci_ath.c @@ -0,0 +1,14 @@ +--- a/drivers/bluetooth/hci_ath.c ++++ b/drivers/bluetooth/hci_ath.c +@@ -58,7 +58,11 @@ + return status; + + /* Disable Automatic RTSCTS */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) + ktermios = tty->termios; ++#else ++ memcpy(&ktermios, tty->termios, sizeof(ktermios)); ++#endif + ktermios.c_cflag &= ~CRTSCTS; + tty_set_termios(tty, &ktermios); + diff --git a/patches/collateral-evolutions/network/63-tty-termios/net_bluetooth_rfcomm_tty.c b/patches/collateral-evolutions/network/63-tty-termios/net_bluetooth_rfcomm_tty.c new file mode 100644 index 000000000000..4e93ae5b77be --- /dev/null +++ b/patches/collateral-evolutions/network/63-tty-termios/net_bluetooth_rfcomm_tty.c @@ -0,0 +1,14 @@ +--- a/net/bluetooth/rfcomm/tty.c ++++ b/net/bluetooth/rfcomm/tty.c +@@ -868,7 +868,11 @@ + + static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old) + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)) + struct ktermios *new = &tty->termios; ++#else ++ struct ktermios *new = tty->termios; ++#endif + int old_baud_rate = tty_termios_baud_rate(old); + int new_baud_rate = tty_termios_baud_rate(new); + diff --git a/patches/collateral-evolutions/network/64-b44-32bit-stats/INFO b/patches/collateral-evolutions/network/64-b44-32bit-stats/INFO new file mode 100644 index 000000000000..ebe61cffef5c --- /dev/null +++ b/patches/collateral-evolutions/network/64-b44-32bit-stats/INFO @@ -0,0 +1,14 @@ +This patch requires a manual backport: + +commit eeda8585522bcc173f91d6254dfa63e871087c54 +Author: Kevin Groeneveld +Date: Tue Jul 17 17:46:01 2012 +0000 + + b44: add 64 bit stats + + Add support for 64 bit stats to Broadcom b44 ethernet driver. + + Signed-off-by: Kevin Groeneveld + Signed-off-by: Eric Dumazet + Signed-off-by: David S. Miller + diff --git a/patches/collateral-evolutions/network/64-b44-32bit-stats.patch b/patches/collateral-evolutions/network/64-b44-32bit-stats/drivers_net_ethernet_broadcom_b44.c similarity index 65% rename from patches/collateral-evolutions/network/64-b44-32bit-stats.patch rename to patches/collateral-evolutions/network/64-b44-32bit-stats/drivers_net_ethernet_broadcom_b44.c index 0169ad94f914..06e2f0c83c67 100644 --- a/patches/collateral-evolutions/network/64-b44-32bit-stats.patch +++ b/patches/collateral-evolutions/network/64-b44-32bit-stats/drivers_net_ethernet_broadcom_b44.c @@ -1,17 +1,3 @@ -This patch requires a manual backport: - -commit eeda8585522bcc173f91d6254dfa63e871087c54 -Author: Kevin Groeneveld -Date: Tue Jul 17 17:46:01 2012 +0000 - - b44: add 64 bit stats - - Add support for 64 bit stats to Broadcom b44 ethernet driver. - - Signed-off-by: Kevin Groeneveld - Signed-off-by: Eric Dumazet - Signed-off-by: David S. Miller - --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c @@ -31,6 +31,7 @@ @@ -22,7 +8,7 @@ Date: Tue Jul 17 17:46:01 2012 +0000 #include #include -@@ -1638,10 +1639,17 @@ static int b44_close(struct net_device * +@@ -1638,10 +1639,17 @@ return 0; } @@ -40,7 +26,7 @@ Date: Tue Jul 17 17:46:01 2012 +0000 struct b44_hw_stats *hwstat = &bp->hw_stats; unsigned int start; -@@ -2130,7 +2138,11 @@ static const struct net_device_ops b44_n +@@ -2130,7 +2138,11 @@ .ndo_open = b44_open, .ndo_stop = b44_close, .ndo_start_xmit = b44_start_xmit, diff --git a/patches/collateral-evolutions/network/65-ignore-dismantle/INFO b/patches/collateral-evolutions/network/65-ignore-dismantle/INFO new file mode 100644 index 000000000000..6872df6627d9 --- /dev/null +++ b/patches/collateral-evolutions/network/65-ignore-dismantle/INFO @@ -0,0 +1,9 @@ +The following patch makes use of the dismantle member in struct +net_device, this patch removes that access on older kernels. + +commit 9d5d496c3464b7ad0ba942b4ada5f27c07e07079 +Author: Daniel Drake +Date: Mon Jul 30 22:58:04 2012 +0100 + + libertas: don't reset card on error when it is being removed + diff --git a/patches/collateral-evolutions/network/65-ignore-dismantle.patch b/patches/collateral-evolutions/network/65-ignore-dismantle/drivers_net_wireless_libertas_main.c similarity index 50% rename from patches/collateral-evolutions/network/65-ignore-dismantle.patch rename to patches/collateral-evolutions/network/65-ignore-dismantle/drivers_net_wireless_libertas_main.c index fde4ce247534..2ff38063a946 100644 --- a/patches/collateral-evolutions/network/65-ignore-dismantle.patch +++ b/patches/collateral-evolutions/network/65-ignore-dismantle/drivers_net_wireless_libertas_main.c @@ -1,15 +1,6 @@ -The following patch makes use of the dismantle member in struct -net_device, this patch removes that access on older kernels. - -commit 9d5d496c3464b7ad0ba942b4ada5f27c07e07079 -Author: Daniel Drake -Date: Mon Jul 30 22:58:04 2012 +0100 - - libertas: don't reset card on error when it is being removed - --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c -@@ -592,7 +592,11 @@ static int lbs_thread(void *data) +@@ -592,7 +592,11 @@ /* Reset card, but only when it isn't in the process * of being shutdown anyway. */ diff --git a/patches/collateral-evolutions/network/66-uapi-changes.patch b/patches/collateral-evolutions/network/66-uapi-changes/INFO similarity index 75% rename from patches/collateral-evolutions/network/66-uapi-changes.patch rename to patches/collateral-evolutions/network/66-uapi-changes/INFO index 362f9bc1bde0..aac022544727 100644 --- a/patches/collateral-evolutions/network/66-uapi-changes.patch +++ b/patches/collateral-evolutions/network/66-uapi-changes/INFO @@ -16,14 +16,3 @@ we linux_next into the user's kernels rfkill.h and if the kernel is old we still to the rfkill_backport.h naming scheme. ---- a/include/linux/rfkill_backport.h -+++ b/include/linux/rfkill_backport.h -@@ -18,7 +18,7 @@ - #ifndef __RFKILL_H - #define __RFKILL_H - --#include -+#include - - /* don't allow anyone to use these in the kernel */ - enum rfkill_user_states { diff --git a/patches/collateral-evolutions/network/66-uapi-changes/include_linux_rfkill_backport.h b/patches/collateral-evolutions/network/66-uapi-changes/include_linux_rfkill_backport.h new file mode 100644 index 000000000000..f5d69d4f1dce --- /dev/null +++ b/patches/collateral-evolutions/network/66-uapi-changes/include_linux_rfkill_backport.h @@ -0,0 +1,11 @@ +--- a/include/linux/rfkill_backport.h ++++ b/include/linux/rfkill_backport.h +@@ -18,7 +18,7 @@ + #ifndef __RFKILL_H + #define __RFKILL_H + +-#include ++#include + + /* don't allow anyone to use these in the kernel */ + enum rfkill_user_states { diff --git a/patches/collateral-evolutions/network/67-fix-section-mismatch.patch b/patches/collateral-evolutions/network/67-fix-section-mismatch/drivers_net_wireless_ath_ath5k_led.c similarity index 100% rename from patches/collateral-evolutions/network/67-fix-section-mismatch.patch rename to patches/collateral-evolutions/network/67-fix-section-mismatch/drivers_net_wireless_ath_ath5k_led.c diff --git a/patches/collateral-evolutions/network/67-ipv6-dev-list/INFO b/patches/collateral-evolutions/network/67-ipv6-dev-list/INFO new file mode 100644 index 000000000000..6f9d61938004 --- /dev/null +++ b/patches/collateral-evolutions/network/67-ipv6-dev-list/INFO @@ -0,0 +1,8 @@ +This backports: + +commit 502a2ffd7376ae27cfde6172257db0ff9d8cfec2 +Author: stephen hemminger +Date: Wed Mar 17 20:31:13 2010 +0000 + + ipv6: convert idev_list to list macros + diff --git a/patches/collateral-evolutions/network/67-ipv6-dev-list.patch b/patches/collateral-evolutions/network/67-ipv6-dev-list/drivers_net_wireless_iwlwifi_mvm_d3.c similarity index 61% rename from patches/collateral-evolutions/network/67-ipv6-dev-list.patch rename to patches/collateral-evolutions/network/67-ipv6-dev-list/drivers_net_wireless_iwlwifi_mvm_d3.c index 6c816271c422..7c24bee95ace 100644 --- a/patches/collateral-evolutions/network/67-ipv6-dev-list.patch +++ b/patches/collateral-evolutions/network/67-ipv6-dev-list/drivers_net_wireless_iwlwifi_mvm_d3.c @@ -1,14 +1,6 @@ -This backports: - -commit 502a2ffd7376ae27cfde6172257db0ff9d8cfec2 -Author: stephen hemminger -Date: Wed Mar 17 20:31:13 2010 +0000 - - ipv6: convert idev_list to list macros - --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c -@@ -101,7 +101,11 @@ void iwl_mvm_ipv6_addr_change(struct iee +@@ -101,7 +101,11 @@ int idx = 0; read_lock_bh(&idev->lock); diff --git a/patches/collateral-evolutions/network/69-wowlan-no-socket/INFO b/patches/collateral-evolutions/network/69-wowlan-no-socket/INFO new file mode 100644 index 000000000000..3fa37c2fc683 --- /dev/null +++ b/patches/collateral-evolutions/network/69-wowlan-no-socket/INFO @@ -0,0 +1,2 @@ +__sock_create() is not available on kernel version < 2.6.37. + diff --git a/patches/collateral-evolutions/network/69-wowlan-no-socket.patch b/patches/collateral-evolutions/network/69-wowlan-no-socket/net_wireless_nl80211.c similarity index 75% rename from patches/collateral-evolutions/network/69-wowlan-no-socket.patch rename to patches/collateral-evolutions/network/69-wowlan-no-socket/net_wireless_nl80211.c index 225043e2179a..cbe824085256 100644 --- a/patches/collateral-evolutions/network/69-wowlan-no-socket.patch +++ b/patches/collateral-evolutions/network/69-wowlan-no-socket/net_wireless_nl80211.c @@ -1,8 +1,6 @@ -__sock_create() is not available on kernel version < 2.6.37. - --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -7728,7 +7728,7 @@ static int nl80211_parse_wowlan_tcp(stru +@@ -7728,7 +7728,7 @@ port = nla_get_u16(tb[NL80211_WOWLAN_TCP_SRC_PORT]); else port = 0; diff --git a/patches/collateral-evolutions/network/70-umode_t-api-change.patch b/patches/collateral-evolutions/network/70-umode_t-api-change.patch deleted file mode 100644 index dd6ec686dbb5..000000000000 --- a/patches/collateral-evolutions/network/70-umode_t-api-change.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/drivers/net/wireless/ath/ath9k/debug.c -+++ b/drivers/net/wireless/ath/ath9k/debug.c -@@ -1217,7 +1217,11 @@ static const struct file_operations fops - - static struct dentry *create_buf_file_handler(const char *filename, - struct dentry *parent, -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - umode_t mode, -+#else -+ int mode, -+#endif - struct rchan_buf *buf, - int *is_global) - { ---- a/drivers/gpu/drm/drm_sysfs.c -+++ b/drivers/gpu/drm/drm_sysfs.c -@@ -72,7 +72,11 @@ static int drm_class_resume(struct devic - return 0; - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - static char *drm_devnode(struct device *dev, umode_t *mode) -+#else -+static char *drm_devnode(struct device *dev, mode_t *mode) -+#endif - { - return kasprintf(GFP_KERNEL, "dri/%s", dev_name(dev)); - } diff --git a/patches/collateral-evolutions/network/70-umode_t-api-change/drivers_gpu_drm_drm_sysfs.c b/patches/collateral-evolutions/network/70-umode_t-api-change/drivers_gpu_drm_drm_sysfs.c new file mode 100644 index 000000000000..9321ed76424a --- /dev/null +++ b/patches/collateral-evolutions/network/70-umode_t-api-change/drivers_gpu_drm_drm_sysfs.c @@ -0,0 +1,14 @@ +--- a/drivers/gpu/drm/drm_sysfs.c ++++ b/drivers/gpu/drm/drm_sysfs.c +@@ -72,7 +72,11 @@ + return 0; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + static char *drm_devnode(struct device *dev, umode_t *mode) ++#else ++static char *drm_devnode(struct device *dev, mode_t *mode) ++#endif + { + return kasprintf(GFP_KERNEL, "dri/%s", dev_name(dev)); + } diff --git a/patches/collateral-evolutions/network/70-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.c b/patches/collateral-evolutions/network/70-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.c new file mode 100644 index 000000000000..777727848e30 --- /dev/null +++ b/patches/collateral-evolutions/network/70-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.c @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath9k/debug.c ++++ b/drivers/net/wireless/ath/ath9k/debug.c +@@ -1217,7 +1217,11 @@ + + static struct dentry *create_buf_file_handler(const char *filename, + struct dentry *parent, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) + umode_t mode, ++#else ++ int mode, ++#endif + struct rchan_buf *buf, + int *is_global) + { diff --git a/patches/collateral-evolutions/network/71-bin_attribute-api-change.patch b/patches/collateral-evolutions/network/71-bin_attribute-api-change/drivers_net_wireless_ti_wlcore_main.c similarity index 88% rename from patches/collateral-evolutions/network/71-bin_attribute-api-change.patch rename to patches/collateral-evolutions/network/71-bin_attribute-api-change/drivers_net_wireless_ti_wlcore_main.c index 242566087839..16526737ab5c 100644 --- a/patches/collateral-evolutions/network/71-bin_attribute-api-change.patch +++ b/patches/collateral-evolutions/network/71-bin_attribute-api-change/drivers_net_wireless_ti_wlcore_main.c @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c -@@ -5518,7 +5518,11 @@ static ssize_t wl1271_sysfs_show_hw_pg_v +@@ -5518,7 +5518,11 @@ static DEVICE_ATTR(hw_pg_ver, S_IRUGO, wl1271_sysfs_show_hw_pg_ver, NULL); diff --git a/patches/collateral-evolutions/network/99-change-makefiles.patch b/patches/collateral-evolutions/network/99-change-makefiles.patch deleted file mode 100644 index 699799a94475..000000000000 --- a/patches/collateral-evolutions/network/99-change-makefiles.patch +++ /dev/null @@ -1,102 +0,0 @@ - -This patch removes all drivers we do not support -or do not want to support. This lets us build -only the wireless stuff. - ---- a/drivers/misc/eeprom/Makefile -+++ b/drivers/misc/eeprom/Makefile -@@ -1,7 +1 @@ --obj-$(CONFIG_EEPROM_AT24) += at24.o --obj-$(CONFIG_EEPROM_AT25) += at25.o --obj-$(CONFIG_EEPROM_LEGACY) += eeprom.o --obj-$(CONFIG_EEPROM_MAX6875) += max6875.o - obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o --obj-$(CONFIG_EEPROM_93XX46) += eeprom_93xx46.o --obj-$(CONFIG_EEPROM_DIGSY_MTC_CFG) += digsy_mtc_eeprom.o ---- a/drivers/net/usb/Makefile -+++ b/drivers/net/usb/Makefile -@@ -2,35 +2,7 @@ - # Makefile for USB Network drivers - # - --obj-$(CONFIG_USB_CATC) += catc.o --obj-$(CONFIG_USB_KAWETH) += kaweth.o --obj-$(CONFIG_USB_PEGASUS) += pegasus.o --obj-$(CONFIG_USB_RTL8150) += rtl8150.o --obj-$(CONFIG_USB_HSO) += hso.o --obj-$(CONFIG_USB_NET_AX8817X) += asix.o --asix-y := asix_devices.o asix_common.o ax88172a.o --obj-$(CONFIG_USB_NET_AX88179_178A) += ax88179_178a.o - obj-$(CONFIG_USB_NET_COMPAT_CDCETHER) += cdc_ether.o --obj-$(CONFIG_USB_NET_CDC_EEM) += cdc_eem.o --obj-$(CONFIG_USB_NET_DM9601) += dm9601.o --obj-$(CONFIG_USB_NET_SMSC75XX) += smsc75xx.o --obj-$(CONFIG_USB_NET_SMSC95XX) += smsc95xx.o --obj-$(CONFIG_USB_NET_GL620A) += gl620a.o --obj-$(CONFIG_USB_NET_NET1080) += net1080.o --obj-$(CONFIG_USB_NET_PLUSB) += plusb.o - obj-$(CONFIG_USB_NET_COMPAT_RNDIS_HOST) += rndis_host.o --obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o --obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o --obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o - obj-$(CONFIG_USB_COMPAT_USBNET) += usbnet.o --obj-$(CONFIG_USB_NET_INT51X1) += int51x1.o --obj-$(CONFIG_USB_CDC_PHONET) += cdc-phonet.o --obj-$(CONFIG_USB_NET_KALMIA) += kalmia.o --obj-$(CONFIG_USB_IPHETH) += ipheth.o --obj-$(CONFIG_USB_SIERRA_NET) += sierra_net.o --obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o --obj-$(CONFIG_USB_NET_CDC_NCM) += cdc_ncm.o --obj-$(CONFIG_USB_VL600) += lg-vl600.o --obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan.o --obj-$(CONFIG_USB_NET_CDC_MBIM) += cdc_mbim.o - ---- a/drivers/net/wireless/Makefile -+++ b/drivers/net/wireless/Makefile -@@ -7,18 +7,8 @@ obj-$(CONFIG_IPW2200) += ipw2x00/ - - obj-$(CONFIG_HERMES) += orinoco/ - --obj-$(CONFIG_AIRO) += airo.o --obj-$(CONFIG_AIRO_CS) += airo_cs.o airo.o -- --obj-$(CONFIG_ATMEL) += atmel.o --obj-$(CONFIG_PCI_ATMEL) += atmel_pci.o --obj-$(CONFIG_PCMCIA_ATMEL) += atmel_cs.o -- - obj-$(CONFIG_AT76C50X_USB) += at76c50x-usb.o - --obj-$(CONFIG_PRISM54) += prism54/ -- --obj-$(CONFIG_HOSTAP) += hostap/ - obj-$(CONFIG_B43) += b43/ - obj-$(CONFIG_B43LEGACY) += b43legacy/ - obj-$(CONFIG_COMPAT_ZD1211RW) += zd1211rw/ -@@ -26,13 +16,8 @@ obj-$(CONFIG_RTL8180) += rtl818x/ - obj-$(CONFIG_RTL8187) += rtl818x/ - obj-$(CONFIG_RTLWIFI) += rtlwifi/ - --# 16-bit wireless PCMCIA client drivers --obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o --obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o -- - obj-$(CONFIG_USB_NET_COMPAT_RNDIS_WLAN) += rndis_wlan.o - --obj-$(CONFIG_USB_ZD1201) += zd1201.o - obj-$(CONFIG_LIBERTAS) += libertas/ - - obj-$(CONFIG_LIBERTAS_THINFIRM) += libertas_tf/ ---- a/net/wireless/Makefile -+++ b/net/wireless/Makefile -@@ -4,11 +4,6 @@ obj-$(CONFIG_LIB80211_CRYPT_WEP) += lib8 - obj-$(CONFIG_LIB80211_CRYPT_CCMP) += lib80211_crypt_ccmp.o - obj-$(CONFIG_LIB80211_CRYPT_TKIP) += lib80211_crypt_tkip.o - --obj-$(CONFIG_WEXT_CORE) += wext-core.o --obj-$(CONFIG_WEXT_PROC) += wext-proc.o --obj-$(CONFIG_WEXT_SPY) += wext-spy.o --obj-$(CONFIG_WEXT_PRIV) += wext-priv.o -- - cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o - cfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o - cfg80211-$(CONFIG_COMPAT_CFG80211_DRIVER_API_TRACER) += trace.o diff --git a/patches/collateral-evolutions/network/99-change-makefiles/INFO b/patches/collateral-evolutions/network/99-change-makefiles/INFO new file mode 100644 index 000000000000..48580ff4ac67 --- /dev/null +++ b/patches/collateral-evolutions/network/99-change-makefiles/INFO @@ -0,0 +1,5 @@ + +This patch removes all drivers we do not support +or do not want to support. This lets us build +only the wireless stuff. + diff --git a/patches/collateral-evolutions/network/99-change-makefiles/drivers_misc_eeprom_Makefile b/patches/collateral-evolutions/network/99-change-makefiles/drivers_misc_eeprom_Makefile new file mode 100644 index 000000000000..bbf7447b7bbf --- /dev/null +++ b/patches/collateral-evolutions/network/99-change-makefiles/drivers_misc_eeprom_Makefile @@ -0,0 +1,10 @@ +--- a/drivers/misc/eeprom/Makefile ++++ b/drivers/misc/eeprom/Makefile +@@ -1,7 +1,1 @@ +-obj-$(CONFIG_EEPROM_AT24) += at24.o +-obj-$(CONFIG_EEPROM_AT25) += at25.o +-obj-$(CONFIG_EEPROM_LEGACY) += eeprom.o +-obj-$(CONFIG_EEPROM_MAX6875) += max6875.o + obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o +-obj-$(CONFIG_EEPROM_93XX46) += eeprom_93xx46.o +-obj-$(CONFIG_EEPROM_DIGSY_MTC_CFG) += digsy_mtc_eeprom.o diff --git a/patches/collateral-evolutions/network/99-change-makefiles/drivers_net_usb_Makefile b/patches/collateral-evolutions/network/99-change-makefiles/drivers_net_usb_Makefile new file mode 100644 index 000000000000..c83c1c0cb6dc --- /dev/null +++ b/patches/collateral-evolutions/network/99-change-makefiles/drivers_net_usb_Makefile @@ -0,0 +1,38 @@ +--- a/drivers/net/usb/Makefile ++++ b/drivers/net/usb/Makefile +@@ -2,35 +2,7 @@ + # Makefile for USB Network drivers + # + +-obj-$(CONFIG_USB_CATC) += catc.o +-obj-$(CONFIG_USB_KAWETH) += kaweth.o +-obj-$(CONFIG_USB_PEGASUS) += pegasus.o +-obj-$(CONFIG_USB_RTL8150) += rtl8150.o +-obj-$(CONFIG_USB_HSO) += hso.o +-obj-$(CONFIG_USB_NET_AX8817X) += asix.o +-asix-y := asix_devices.o asix_common.o ax88172a.o +-obj-$(CONFIG_USB_NET_AX88179_178A) += ax88179_178a.o + obj-$(CONFIG_USB_NET_COMPAT_CDCETHER) += cdc_ether.o +-obj-$(CONFIG_USB_NET_CDC_EEM) += cdc_eem.o +-obj-$(CONFIG_USB_NET_DM9601) += dm9601.o +-obj-$(CONFIG_USB_NET_SMSC75XX) += smsc75xx.o +-obj-$(CONFIG_USB_NET_SMSC95XX) += smsc95xx.o +-obj-$(CONFIG_USB_NET_GL620A) += gl620a.o +-obj-$(CONFIG_USB_NET_NET1080) += net1080.o +-obj-$(CONFIG_USB_NET_PLUSB) += plusb.o + obj-$(CONFIG_USB_NET_COMPAT_RNDIS_HOST) += rndis_host.o +-obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o +-obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o +-obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o + obj-$(CONFIG_USB_COMPAT_USBNET) += usbnet.o +-obj-$(CONFIG_USB_NET_INT51X1) += int51x1.o +-obj-$(CONFIG_USB_CDC_PHONET) += cdc-phonet.o +-obj-$(CONFIG_USB_NET_KALMIA) += kalmia.o +-obj-$(CONFIG_USB_IPHETH) += ipheth.o +-obj-$(CONFIG_USB_SIERRA_NET) += sierra_net.o +-obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o +-obj-$(CONFIG_USB_NET_CDC_NCM) += cdc_ncm.o +-obj-$(CONFIG_USB_VL600) += lg-vl600.o +-obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan.o +-obj-$(CONFIG_USB_NET_CDC_MBIM) += cdc_mbim.o + diff --git a/patches/collateral-evolutions/network/99-change-makefiles/drivers_net_wireless_Makefile b/patches/collateral-evolutions/network/99-change-makefiles/drivers_net_wireless_Makefile new file mode 100644 index 000000000000..98b2346a145e --- /dev/null +++ b/patches/collateral-evolutions/network/99-change-makefiles/drivers_net_wireless_Makefile @@ -0,0 +1,35 @@ +--- a/drivers/net/wireless/Makefile ++++ b/drivers/net/wireless/Makefile +@@ -7,18 +7,8 @@ + + obj-$(CONFIG_HERMES) += orinoco/ + +-obj-$(CONFIG_AIRO) += airo.o +-obj-$(CONFIG_AIRO_CS) += airo_cs.o airo.o +- +-obj-$(CONFIG_ATMEL) += atmel.o +-obj-$(CONFIG_PCI_ATMEL) += atmel_pci.o +-obj-$(CONFIG_PCMCIA_ATMEL) += atmel_cs.o +- + obj-$(CONFIG_AT76C50X_USB) += at76c50x-usb.o + +-obj-$(CONFIG_PRISM54) += prism54/ +- +-obj-$(CONFIG_HOSTAP) += hostap/ + obj-$(CONFIG_B43) += b43/ + obj-$(CONFIG_B43LEGACY) += b43legacy/ + obj-$(CONFIG_COMPAT_ZD1211RW) += zd1211rw/ +@@ -26,13 +16,8 @@ + obj-$(CONFIG_RTL8187) += rtl818x/ + obj-$(CONFIG_RTLWIFI) += rtlwifi/ + +-# 16-bit wireless PCMCIA client drivers +-obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o +-obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o +- + obj-$(CONFIG_USB_NET_COMPAT_RNDIS_WLAN) += rndis_wlan.o + +-obj-$(CONFIG_USB_ZD1201) += zd1201.o + obj-$(CONFIG_LIBERTAS) += libertas/ + + obj-$(CONFIG_LIBERTAS_THINFIRM) += libertas_tf/ diff --git a/patches/collateral-evolutions/network/99-change-makefiles/net_wireless_Makefile b/patches/collateral-evolutions/network/99-change-makefiles/net_wireless_Makefile new file mode 100644 index 000000000000..a058541c9a81 --- /dev/null +++ b/patches/collateral-evolutions/network/99-change-makefiles/net_wireless_Makefile @@ -0,0 +1,14 @@ +--- a/net/wireless/Makefile ++++ b/net/wireless/Makefile +@@ -4,11 +4,6 @@ + obj-$(CONFIG_LIB80211_CRYPT_CCMP) += lib80211_crypt_ccmp.o + obj-$(CONFIG_LIB80211_CRYPT_TKIP) += lib80211_crypt_tkip.o + +-obj-$(CONFIG_WEXT_CORE) += wext-core.o +-obj-$(CONFIG_WEXT_PROC) += wext-proc.o +-obj-$(CONFIG_WEXT_SPY) += wext-spy.o +-obj-$(CONFIG_WEXT_PRIV) += wext-priv.o +- + cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o + cfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o + cfg80211-$(CONFIG_COMPAT_CFG80211_DRIVER_API_TRACER) += trace.o -- 2.30.2