1
0

020-08-rt2x00-rt2800lib-move-rt2800_drv_data-declaration-in.patch 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. From 96609f366c6f792421e1939c5c834abbe24eb88a Mon Sep 17 00:00:00 2001
  2. From: Gabor Juhos <juhosg@openwrt.org>
  3. Date: Wed, 15 Feb 2017 10:25:04 +0100
  4. Subject: [PATCH 08/19] rt2x00: rt2800lib: move rt2800_drv_data declaration
  5. into rt2800lib.h
  6. The rt2800_drv_data structure contains driver specific
  7. information. Move the declaration into the rt2800lib.h
  8. header which is a more logical place for it. Also fix
  9. the comment style to avoid checkpatch warning.
  10. The patch contains no functional changes, it is in
  11. preparation for the next patch.
  12. Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  13. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  14. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
  15. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  16. ---
  17. drivers/net/wireless/ralink/rt2x00/rt2800.h | 25 -------------------------
  18. drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 23 +++++++++++++++++++++++
  19. 2 files changed, 23 insertions(+), 25 deletions(-)
  20. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800.h b/drivers/net/wireless/ralink/rt2x00/rt2800.h
  21. index 256496bfbafb..0e7051d8132f 100644
  22. --- a/drivers/net/wireless/ralink/rt2x00/rt2800.h
  23. +++ b/drivers/net/wireless/ralink/rt2x00/rt2800.h
  24. @@ -2987,29 +2987,4 @@ enum rt2800_eeprom_word {
  25. */
  26. #define BCN_TBTT_OFFSET 64
  27. -/*
  28. - * Hardware has 255 WCID table entries. First 32 entries are reserved for
  29. - * shared keys. Since parts of the pairwise key table might be shared with
  30. - * the beacon frame buffers 6 & 7 we could only use the first 222 entries.
  31. - */
  32. -#define WCID_START 33
  33. -#define WCID_END 222
  34. -#define STA_IDS_SIZE (WCID_END - WCID_START + 2)
  35. -
  36. -/*
  37. - * RT2800 driver data structure
  38. - */
  39. -struct rt2800_drv_data {
  40. - u8 calibration_bw20;
  41. - u8 calibration_bw40;
  42. - u8 bbp25;
  43. - u8 bbp26;
  44. - u8 txmixer_gain_24g;
  45. - u8 txmixer_gain_5g;
  46. - u8 max_psdu;
  47. - unsigned int tbtt_tick;
  48. - unsigned int ampdu_factor_cnt[4];
  49. - DECLARE_BITMAP(sta_ids, STA_IDS_SIZE);
  50. -};
  51. -
  52. #endif /* RT2800_H */
  53. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h
  54. index 0a8b4df665fe..8e1ae138c3f1 100644
  55. --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h
  56. +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h
  57. @@ -20,6 +20,29 @@
  58. #ifndef RT2800LIB_H
  59. #define RT2800LIB_H
  60. +/*
  61. + * Hardware has 255 WCID table entries. First 32 entries are reserved for
  62. + * shared keys. Since parts of the pairwise key table might be shared with
  63. + * the beacon frame buffers 6 & 7 we could only use the first 222 entries.
  64. + */
  65. +#define WCID_START 33
  66. +#define WCID_END 222
  67. +#define STA_IDS_SIZE (WCID_END - WCID_START + 2)
  68. +
  69. +/* RT2800 driver data structure */
  70. +struct rt2800_drv_data {
  71. + u8 calibration_bw20;
  72. + u8 calibration_bw40;
  73. + u8 bbp25;
  74. + u8 bbp26;
  75. + u8 txmixer_gain_24g;
  76. + u8 txmixer_gain_5g;
  77. + u8 max_psdu;
  78. + unsigned int tbtt_tick;
  79. + unsigned int ampdu_factor_cnt[4];
  80. + DECLARE_BITMAP(sta_ids, STA_IDS_SIZE);
  81. +};
  82. +
  83. struct rt2800_ops {
  84. void (*register_read)(struct rt2x00_dev *rt2x00dev,
  85. const unsigned int offset, u32 *value);
  86. --
  87. 2.12.1